Merge lp:~mg5core2/mg5amcnlo/2.5.5 into lp:mg5amcnlo/lts
- 2.5.5
- Merge into series2.0
Status: | Merged |
---|---|
Merged at revision: | 272 |
Proposed branch: | lp:~mg5core2/mg5amcnlo/2.5.5 |
Merge into: | lp:mg5amcnlo/lts |
Diff against target: |
13029 lines (+5054/-4396) 123 files modified
MadSpin/decay.py (+7/-1) MadSpin/interface_madspin.py (+2/-0) Template/Common/Cards/delphes_card_ATLAS.dat (+221/-78) Template/Common/Cards/delphes_card_CMS.dat (+263/-75) Template/Common/Cards/delphes_card_default.dat (+263/-75) Template/LO/bin/internal/store4grid (+5/-0) Template/NLO/Source/basecode.f (+0/-127) Template/NLO/Source/combine_events.f (+0/-728) Template/NLO/Source/genps.inc (+2/-42) Template/NLO/Source/hbook.inc (+0/-17) Template/NLO/Source/hcurve.f (+0/-74) Template/NLO/Source/hfill.f (+0/-37) Template/NLO/Source/invarients.f (+0/-302) Template/NLO/Source/leshouche.inc (+0/-8) Template/NLO/Source/makefile (+8/-34) Template/NLO/Source/nexternal.inc (+0/-4) Template/NLO/Source/open_file.f (+0/-46) Template/NLO/Source/pawgraphs.f (+0/-83) Template/NLO/Source/psample.inc (+0/-9) Template/NLO/Source/ran1.f (+0/-33) Template/NLO/Source/rw_events.f (+0/-159) Template/NLO/Source/rw_events.short.f (+0/-162) Template/NLO/Source/rw_routines.f (+0/-412) Template/NLO/Source/setrun.f (+9/-10) Template/NLO/Source/sum.f (+0/-55) Template/NLO/Source/write_banner.f (+0/-116) Template/NLO/SubProcesses/add_write_info.f (+4/-8) Template/NLO/SubProcesses/check_poles.f (+7/-3) Template/NLO/SubProcesses/cluster.f (+23/-9) Template/NLO/SubProcesses/cluster.inc (+1/-1) Template/NLO/SubProcesses/cuts.f (+0/-6) Template/NLO/SubProcesses/driver_mintFO.f (+5/-27) Template/NLO/SubProcesses/driver_mintMC.f (+8/-14) Template/NLO/SubProcesses/fks_singular.f (+2/-4) Template/NLO/SubProcesses/genps_fks.f (+1/-0) Template/NLO/SubProcesses/iproc_map.f (+0/-4) Template/NLO/SubProcesses/leshouche_inc_chooser.f (+0/-2) Template/NLO/SubProcesses/makefile_fks_dir (+2/-22) Template/NLO/SubProcesses/mint-integrator2.f (+3/-1) Template/NLO/SubProcesses/montecarlocounter.f (+1/-1) Template/NLO/SubProcesses/pythia_unlops.f (+0/-2) Template/NLO/SubProcesses/reweight.f (+5/-7) Template/NLO/SubProcesses/reweight_events.f (+0/-375) Template/NLO/SubProcesses/setcuts.f (+0/-6) Template/NLO/SubProcesses/symmetry_fks_test_MC.f (+5/-7) Template/NLO/SubProcesses/symmetry_fks_test_ME.f (+3/-6) Template/NLO/SubProcesses/symmetry_fks_test_Sij.f (+0/-505) Template/NLO/SubProcesses/symmetry_fks_v3.f (+16/-282) Template/NLO/bin/internal/clean_template (+0/-1) UpdateNotes.txt (+13/-0) VERSION (+2/-2) aloha/aloha_writers.py (+18/-4) madgraph/interface/amcatnlo_run_interface.py (+1/-1) madgraph/interface/common_run_interface.py (+64/-21) madgraph/interface/extended_cmd.py (+15/-1) madgraph/interface/loop_interface.py (+1/-1) madgraph/interface/madevent_interface.py (+40/-15) madgraph/interface/madgraph_interface.py (+11/-5) madgraph/interface/reweight_interface.py (+4/-3) madgraph/iolibs/export_fks.py (+22/-6) madgraph/iolibs/export_v4.py (+42/-6) madgraph/iolibs/template_files/born_fks.inc (+2/-4) madgraph/iolibs/ufo_expression_parsers.py (+40/-3) madgraph/loop/loop_helas_objects.py (+28/-17) madgraph/madweight/write_MadWeight.py (+3/-1) madgraph/various/lhe_parser.py (+38/-16) madgraph/various/misc.py (+10/-7) tests/acceptance_tests/test_cmd.py (+1/-0) tests/acceptance_tests/test_cmd_madevent.py (+47/-0) tests/acceptance_tests/test_export_fks.py (+4/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%configs_and_props_info.dat (+6/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%leshouche_info.dat (+3/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%configs_and_props_info.dat (+6/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%leshouche_info.dat (+3/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%configs_and_props_info.dat (+6/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%leshouche_info.dat (+3/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%configs_and_props_info.dat (+1358/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%leshouche_info.dat (+143/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%configs_and_props_info.dat (+504/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%leshouche_info.dat (+123/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%configs_and_props_info.dat (+504/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%leshouche_info.dat (+123/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%MadLoop5_resources%ColorDenomFactors.dat (+2/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%MadLoop5_resources%ColorNumFactors.dat (+2/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%MadLoop5_resources%HelConfigs.dat (+12/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%configs_and_props_info.dat (+108/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%leshouche_info.dat (+35/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%MadLoop5_resources%ColorDenomFactors.dat (+2/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%MadLoop5_resources%ColorNumFactors.dat (+2/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%MadLoop5_resources%HelConfigs.dat (+12/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%configs_and_props_info.dat (+108/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%leshouche_info.dat (+35/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f (+2/-4) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%configs_and_props_info.dat (+261/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%iproc.dat (+1/-0) tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%leshouche_info.dat (+33/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+10/-0) tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+10/-0) tests/parallel_tests/compare_with_old_mg5_version.py (+2/-2) tests/time_db (+260/-259) tests/unit_tests/various/test_lhe_parser.py (+19/-2) |
To merge this branch: | bzr merge lp:~mg5core2/mg5amcnlo/2.5.5 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Valentin Hirschi | Approve | ||
Review via email: mp+324347@code.launchpad.net |
Commit message
Description of the change
Hi guys,
I have found (and fix) a quite important bug today.
It is related to the LO gridpack where the grid generated during the setup of the gridpack were not saved inside the gridpack (killing the efficiency of such gridpack).
I therefore plan to freeze this version on Monday and release it asap after that.
As soon as the release will be done, we will need to send an email to CMS and Atlas such that they are aware of such problem.
Cheers,
Olivier
Rikkert Frederix (frederix) wrote : | # |
Olivier Mattelaer (olivier-mattelaer) wrote : | # |
Hi Rik,
> Hasn't this always been the case?
That was my first reaction when I realised that they were missing. So I checked that point explicitly and indeed this is something new (since 2.4.3).
> I thought that the only really important information to safe was the relative contributions of all the channels, so that one exactly knows how many events each channel should give.
I agree that this is the crucial information. Now discarding the grid is wasting a lot of information.
I also have to double check this but in the last run I did, it was written that the grid was kept fixed.
If this is the case, starting from the default grid sounds a bad idea.
Cheers,
Olivier
> On 20 May 2017, at 02:47, Rikkert Frederix <email address hidden> wrote:
>
> Hi Olivier,
>
> Hasn't this always been the case? I thought that the gridpacks became too large when all the grids are saved. I thought that the only really important information to safe was the relative contributions of all the channels, so that one exactly knows how many events each channel should give.
>
> Best,
> Rikkert
>
> --
> https:/
> Your team mg5core2 is subscribed to branch lp:~mg5core2/mg5amcnlo/2.5.5.
Rikkert Frederix (frederix) wrote : | # |
Hi Olivier,
I saw that in your fix of the grid-pack creation, you also changed all(?) the default Delphes cards. If this is indeed intended, there should be a mention of this in the UpdateNotes.txt.
For the rest: approve.
Best,
Rikkert
- 301. By Rikkert Frederix
-
Fix in FxFx merging in case there are diagrams with 1->3 decays. See
question #631090. - 302. By Valentin Hirschi
-
1. Fixed a subtle side-effect of having removed the recycling of the FD structure
attached to the loops, which was necessary to solve a fermion flow problem.
The problem was that as a result, some of the external wavefunctions were not
recycled as they should have. This could be fixed by creating the wavefunctions
of the FD structures with *all* the different lorentz structure *at once* instead
of progressively adding them.
Valentin Hirschi (valentin-hirschi) wrote : | # |
Hi Olivier, quick last minute review:
MadSpin/
two left-over misc.sprint
This change seems a bit hacky, is it really safe?
For example, what could happen if the first operator used is exponentiation, i.e. ** ?
=== modified file 'aloha/
--- aloha/aloha_
+++ aloha/aloha_
@@ -802,7 +802,13 @@
for ind in numerator.
if formatted.
- formatted = '(%s)*%s' % tuple(formatted
+ if '*' in formatted:
+ formatted = '(%s)*%s' % tuple(formatted
+ else:
+ if formatted.
+ formatted = formatted[1:]
+ else:
+ formatted = '(-1)*%s' % formatted[1:]
Going through the other changes nothing struck me.
However, I don't know well enough MadFKS to be able to assess the impact of Rik's clean-up of the code.
So it's all ok for me.
Olivier Mattelaer (olivier-mattelaer) wrote : | # |
Hi,
Let assume that formatted returned "+23**2"
Then it will be transformed in (+23)**2
So this should not be a problem.
Cheers,
Olivier
PS: actually exponent are always associated to paranthesis so the problem will never occur.
> On 24 May 2017, at 23:26, Valentin Hirschi <email address hidden> wrote:
>
> Review: Approve
>
> Hi Olivier, quick last minute review:
>
> MadSpin/
> two left-over misc.sprint
>
> This change seems a bit hacky, is it really safe?
> For example, what could happen if the first operator used is exponentiation, i.e. ** ?
>
> === modified file 'aloha/
> --- aloha/aloha_
> +++ aloha/aloha_
> @@ -802,7 +802,13 @@
> for ind in numerator.
> formatted = self.write_
> if formatted.
> - formatted = '(%s)*%s' % tuple(formatted
> + if '*' in formatted:
> + formatted = '(%s)*%s' % tuple(formatted
> + else:
> + if formatted.
> + formatted = formatted[1:]
> + else:
> + formatted = '(-1)*%s' % formatted[1:]
> to_order[
> ' %s(%d)= %s%s\n' % (self.outname, self.pass_
> coeff, formatted)
>
> Going through the other changes nothing struck me.
> However, I don't know well enough MadFKS to be able to assess the impact of Rik's clean-up of the code.
>
> So it's all ok for me.
>
>
>
>
> --
> https:/
> Your team mg5core2 is subscribed to branch lp:~mg5core2/mg5amcnlo/2.5.5.
- 303. By olivier-mattelaer
-
fixing last tests + ma5 related bug when latex is not available
Preview Diff
1 | === modified file 'MadSpin/decay.py' |
2 | --- MadSpin/decay.py 2017-03-17 19:58:41 +0000 |
3 | +++ MadSpin/decay.py 2017-05-24 22:17:46 +0000 |
4 | @@ -1638,6 +1638,12 @@ |
5 | ' '.join('--%s=%s' % (key,value) for (key,value) in opts.items() |
6 | if key not in ['model', 'force', 'particles'] and value)) |
7 | cmd.exec_cmd('import model %s' % model.get('modelpath+restriction')) |
8 | + |
9 | + #pattern for checking complex mass scheme. |
10 | + has_cms = re.compile(r'''set\s+complex_mass_scheme\s*(True|T|1|true|$|;)''', re.M) |
11 | + force_CMS = has_cms.search(self.banner['mg5proccard']) |
12 | + if force_CMS: |
13 | + cmd.exec_cmd('set complex_mass_scheme') |
14 | # cmd._curr_model = model |
15 | # cmd._curr_fortran_model = helas_call_writers.FortranUFOHelasCallWriter(model) |
16 | cmd.exec_cmd(line) |
17 | @@ -3210,7 +3216,7 @@ |
18 | logger.warning( 'no events for %s' % decay_tag) |
19 | continue |
20 | weights.sort(reverse=True) |
21 | - assert weights[0] >= weights[1] |
22 | + assert len(weights) == 1 or weights[0] >= weights[1] |
23 | ave_weight, std_weight = decay_tools.get_mean_sd(weights) |
24 | base_max_weight = 1.05 * (ave_weight+self.options['nb_sigma']*std_weight) |
25 | |
26 | |
27 | === modified file 'MadSpin/interface_madspin.py' |
28 | --- MadSpin/interface_madspin.py 2017-03-23 16:11:59 +0000 |
29 | +++ MadSpin/interface_madspin.py 2017-05-24 22:17:46 +0000 |
30 | @@ -1412,6 +1412,8 @@ |
31 | info = self.generate_all.all_me[tag] |
32 | except: |
33 | misc.sprint(self.generate_all.all_me) |
34 | + misc.sprint(production) |
35 | + misc.sprint(decays) |
36 | raise |
37 | import copy |
38 | |
39 | |
40 | === modified file 'Template/Common/Cards/delphes_card_ATLAS.dat' |
41 | --- Template/Common/Cards/delphes_card_ATLAS.dat 2016-08-29 22:10:09 +0000 |
42 | +++ Template/Common/Cards/delphes_card_ATLAS.dat 2017-05-24 22:17:46 +0000 |
43 | @@ -3,7 +3,7 @@ |
44 | ####################################### |
45 | |
46 | set ExecutionPath { |
47 | - ParticlePropagator |
48 | + ParticlePropagator |
49 | |
50 | ChargedHadronTrackingEfficiency |
51 | ElectronTrackingEfficiency |
52 | @@ -14,9 +14,14 @@ |
53 | MuonMomentumSmearing |
54 | |
55 | TrackMerger |
56 | + |
57 | + ECal |
58 | + HCal |
59 | + |
60 | Calorimeter |
61 | EFlowMerger |
62 | - |
63 | + EFlowFilter |
64 | + |
65 | PhotonEfficiency |
66 | PhotonIsolation |
67 | |
68 | @@ -24,6 +29,8 @@ |
69 | ElectronEfficiency |
70 | ElectronIsolation |
71 | |
72 | + ChargedHadronFilter |
73 | + |
74 | MuonEfficiency |
75 | MuonIsolation |
76 | |
77 | @@ -32,11 +39,11 @@ |
78 | NeutrinoFilter |
79 | GenJetFinder |
80 | GenMissingET |
81 | - |
82 | + |
83 | FastJetFinder |
84 | |
85 | JetEnergyScale |
86 | - |
87 | + |
88 | JetFlavorAssociation |
89 | |
90 | BTagging |
91 | @@ -140,9 +147,9 @@ |
92 | # set ResolutionFormula {resolution formula as a function of eta and pt} |
93 | |
94 | # resolution formula for charged hadrons |
95 | - set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + |
96 | - (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + |
97 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} |
98 | + set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + |
99 | + (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + |
100 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} |
101 | } |
102 | |
103 | ################################### |
104 | @@ -188,26 +195,23 @@ |
105 | set OutputArray tracks |
106 | } |
107 | |
108 | -############# |
109 | -# Calorimeter |
110 | -############# |
111 | - |
112 | -module Calorimeter Calorimeter { |
113 | + |
114 | +############# |
115 | +# ECAL |
116 | +############# |
117 | + |
118 | +module SimpleCalorimeter ECal { |
119 | set ParticleInputArray ParticlePropagator/stableParticles |
120 | set TrackInputArray TrackMerger/tracks |
121 | |
122 | - set TowerOutputArray towers |
123 | - set PhotonOutputArray photons |
124 | - |
125 | + set TowerOutputArray ecalTowers |
126 | set EFlowTrackOutputArray eflowTracks |
127 | - set EFlowPhotonOutputArray eflowPhotons |
128 | - set EFlowNeutralHadronOutputArray eflowNeutralHadrons |
129 | - |
130 | - set ECalEnergyMin 0.5 |
131 | - set HCalEnergyMin 1.0 |
132 | - |
133 | - set ECalEnergySignificanceMin 1.0 |
134 | - set HCalEnergySignificanceMin 1.0 |
135 | + set EFlowTowerOutputArray eflowPhotons |
136 | + |
137 | + set IsEcal true |
138 | + |
139 | + set EnergyMin 0.5 |
140 | + set EnergySignificanceMin 2.0 |
141 | |
142 | set SmearTowerCenter true |
143 | |
144 | @@ -217,6 +221,107 @@ |
145 | # each list starts with the lower edge of the first tower |
146 | # the list ends with the higher edged of the last tower |
147 | |
148 | + # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 |
149 | + |
150 | + set PhiBins {} |
151 | + for {set i -180} {$i <= 180} {incr i} { |
152 | + add PhiBins [expr {$i * $pi/180.0}] |
153 | + } |
154 | + |
155 | + # 0.02 unit in eta up to eta = 1.5 (barrel) |
156 | + for {set i -85} {$i <= 86} {incr i} { |
157 | + set eta [expr {$i * 0.0174}] |
158 | + add EtaPhiBins $eta $PhiBins |
159 | + } |
160 | + |
161 | + # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 |
162 | + set PhiBins {} |
163 | + for {set i -180} {$i <= 180} {incr i} { |
164 | + add PhiBins [expr {$i * $pi/180.0}] |
165 | + } |
166 | + |
167 | + # 0.02 unit in eta up to eta = 3 |
168 | + for {set i 1} {$i <= 84} {incr i} { |
169 | + set eta [expr { -2.958 + $i * 0.0174}] |
170 | + add EtaPhiBins $eta $PhiBins |
171 | + } |
172 | + |
173 | + for {set i 1} {$i <= 84} {incr i} { |
174 | + set eta [expr { 1.4964 + $i * 0.0174}] |
175 | + add EtaPhiBins $eta $PhiBins |
176 | + } |
177 | + |
178 | + # take present CMS granularity for HF |
179 | + |
180 | + # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 |
181 | + set PhiBins {} |
182 | + for {set i -18} {$i <= 18} {incr i} { |
183 | + add PhiBins [expr {$i * $pi/18.0}] |
184 | + } |
185 | + |
186 | + foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { |
187 | + add EtaPhiBins $eta $PhiBins |
188 | + } |
189 | + |
190 | + |
191 | + add EnergyFraction {0} {0.0} |
192 | + # energy fractions for e, gamma and pi0 |
193 | + add EnergyFraction {11} {1.0} |
194 | + add EnergyFraction {22} {1.0} |
195 | + add EnergyFraction {111} {1.0} |
196 | + # energy fractions for muon, neutrinos and neutralinos |
197 | + add EnergyFraction {12} {0.0} |
198 | + add EnergyFraction {13} {0.0} |
199 | + add EnergyFraction {14} {0.0} |
200 | + add EnergyFraction {16} {0.0} |
201 | + add EnergyFraction {1000022} {0.0} |
202 | + add EnergyFraction {1000023} {0.0} |
203 | + add EnergyFraction {1000025} {0.0} |
204 | + add EnergyFraction {1000035} {0.0} |
205 | + add EnergyFraction {1000045} {0.0} |
206 | + # energy fractions for K0short and Lambda |
207 | + add EnergyFraction {310} {0.3} |
208 | + add EnergyFraction {3122} {0.3} |
209 | + |
210 | + # set ResolutionFormula {resolution formula as a function of eta and energy} |
211 | + |
212 | + # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
213 | + # http://arxiv.org/pdf/physics/0608012v1 jinst8_08_s08003 |
214 | + # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf |
215 | + # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf |
216 | + set ResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + |
217 | + (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} |
218 | + |
219 | + |
220 | +} |
221 | + |
222 | + |
223 | + |
224 | +############# |
225 | +# HCAL |
226 | +############# |
227 | + |
228 | +module SimpleCalorimeter HCal { |
229 | + set ParticleInputArray ParticlePropagator/stableParticles |
230 | + set TrackInputArray ECal/eflowTracks |
231 | + |
232 | + set TowerOutputArray hcalTowers |
233 | + set EFlowTrackOutputArray eflowTracks |
234 | + set EFlowTowerOutputArray eflowNeutralHadrons |
235 | + |
236 | + set IsEcal false |
237 | + |
238 | + set EnergyMin 1.0 |
239 | + set EnergySignificanceMin 2.0 |
240 | + |
241 | + set SmearTowerCenter true |
242 | + |
243 | + set pi [expr {acos(-1)}] |
244 | + |
245 | + # lists of the edges of each tower in eta and phi |
246 | + # each list starts with the lower edge of the first tower |
247 | + # the list ends with the higher edged of the last tower |
248 | + |
249 | # 10 degrees towers |
250 | set PhiBins {} |
251 | for {set i -18} {$i <= 18} {incr i} { |
252 | @@ -236,50 +341,99 @@ |
253 | } |
254 | |
255 | # default energy fractions {abs(PDG code)} {Fecal Fhcal} |
256 | - add EnergyFraction {0} {0.0 1.0} |
257 | + add EnergyFraction {0} {1.0} |
258 | # energy fractions for e, gamma and pi0 |
259 | - add EnergyFraction {11} {1.0 0.0} |
260 | - add EnergyFraction {22} {1.0 0.0} |
261 | - add EnergyFraction {111} {1.0 0.0} |
262 | + add EnergyFraction {11} {0.0} |
263 | + add EnergyFraction {22} {0.0} |
264 | + add EnergyFraction {111} {0.0} |
265 | # energy fractions for muon, neutrinos and neutralinos |
266 | - add EnergyFraction {12} {0.0 0.0} |
267 | - add EnergyFraction {13} {0.0 0.0} |
268 | - add EnergyFraction {14} {0.0 0.0} |
269 | - add EnergyFraction {16} {0.0 0.0} |
270 | - add EnergyFraction {1000022} {0.0 0.0} |
271 | - add EnergyFraction {1000023} {0.0 0.0} |
272 | - add EnergyFraction {1000025} {0.0 0.0} |
273 | - add EnergyFraction {1000035} {0.0 0.0} |
274 | - add EnergyFraction {1000045} {0.0 0.0} |
275 | + add EnergyFraction {12} {0.0} |
276 | + add EnergyFraction {13} {0.0} |
277 | + add EnergyFraction {14} {0.0} |
278 | + add EnergyFraction {16} {0.0} |
279 | + add EnergyFraction {1000022} {0.0} |
280 | + add EnergyFraction {1000023} {0.0} |
281 | + add EnergyFraction {1000025} {0.0} |
282 | + add EnergyFraction {1000035} {0.0} |
283 | + add EnergyFraction {1000045} {0.0} |
284 | # energy fractions for K0short and Lambda |
285 | - add EnergyFraction {310} {0.3 0.7} |
286 | - add EnergyFraction {3122} {0.3 0.7} |
287 | + add EnergyFraction {310} {0.7} |
288 | + add EnergyFraction {3122} {0.7} |
289 | |
290 | - # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
291 | - # http://arxiv.org/pdf/physics/0608012v1 jinst8_08_s08003 |
292 | + # http://arxiv.org/pdf/hep-ex/0004009v1 |
293 | # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf |
294 | - # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf |
295 | - set ECalResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + |
296 | - (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} |
297 | - |
298 | # set HCalResolutionFormula {resolution formula as a function of eta and energy} |
299 | - # http://arxiv.org/pdf/hep-ex/0004009v1 |
300 | - # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf |
301 | - set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + |
302 | + set ResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + |
303 | (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + |
304 | (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} |
305 | } |
306 | |
307 | + |
308 | +################# |
309 | +# Electron filter |
310 | +################# |
311 | + |
312 | +module PdgCodeFilter ElectronFilter { |
313 | + set InputArray HCal/eflowTracks |
314 | + set OutputArray electrons |
315 | + set Invert true |
316 | + add PdgCode {11} |
317 | + add PdgCode {-11} |
318 | +} |
319 | + |
320 | +###################### |
321 | +# ChargedHadronFilter |
322 | +###################### |
323 | + |
324 | +module PdgCodeFilter ChargedHadronFilter { |
325 | + set InputArray HCal/eflowTracks |
326 | + set OutputArray chargedHadrons |
327 | + |
328 | + add PdgCode {11} |
329 | + add PdgCode {-11} |
330 | + add PdgCode {13} |
331 | + add PdgCode {-13} |
332 | +} |
333 | + |
334 | + |
335 | + |
336 | +################################################### |
337 | +# Tower Merger (in case not using e-flow algorithm) |
338 | +################################################### |
339 | + |
340 | +module Merger Calorimeter { |
341 | +# add InputArray InputArray |
342 | + add InputArray ECal/ecalTowers |
343 | + add InputArray HCal/hcalTowers |
344 | + set OutputArray towers |
345 | +} |
346 | + |
347 | + |
348 | + |
349 | #################### |
350 | # Energy flow merger |
351 | #################### |
352 | |
353 | module Merger EFlowMerger { |
354 | # add InputArray InputArray |
355 | - add InputArray Calorimeter/eflowTracks |
356 | - add InputArray Calorimeter/eflowPhotons |
357 | - add InputArray Calorimeter/eflowNeutralHadrons |
358 | - set OutputArray eflow |
359 | + add InputArray HCal/eflowTracks |
360 | + add InputArray ECal/eflowPhotons |
361 | + add InputArray HCal/eflowNeutralHadrons |
362 | + set OutputArray eflow |
363 | +} |
364 | + |
365 | +###################### |
366 | +# EFlowFilter |
367 | +###################### |
368 | + |
369 | +module PdgCodeFilter EFlowFilter { |
370 | + set InputArray EFlowMerger/eflow |
371 | + set OutputArray eflow |
372 | + |
373 | + add PdgCode {11} |
374 | + add PdgCode {-11} |
375 | + add PdgCode {13} |
376 | + add PdgCode {-13} |
377 | } |
378 | |
379 | ################### |
380 | @@ -287,7 +441,7 @@ |
381 | ################### |
382 | |
383 | module Efficiency PhotonEfficiency { |
384 | - set InputArray Calorimeter/eflowPhotons |
385 | + set InputArray ECal/eflowPhotons |
386 | set OutputArray photons |
387 | |
388 | # set EfficiencyFormula {efficiency formula as a function of eta and pt} |
389 | @@ -305,7 +459,7 @@ |
390 | |
391 | module Isolation PhotonIsolation { |
392 | set CandidateInputArray PhotonEfficiency/photons |
393 | - set IsolationInputArray EFlowMerger/eflow |
394 | + set IsolationInputArray EFlowFilter/eflow |
395 | |
396 | set OutputArray photons |
397 | |
398 | @@ -316,17 +470,6 @@ |
399 | set PTRatioMax 0.12 |
400 | } |
401 | |
402 | -################# |
403 | -# Electron filter |
404 | -################# |
405 | - |
406 | -module PdgCodeFilter ElectronFilter { |
407 | - set InputArray Calorimeter/eflowTracks |
408 | - set OutputArray electrons |
409 | - set Invert true |
410 | - add PdgCode {11} |
411 | - add PdgCode {-11} |
412 | -} |
413 | |
414 | ##################### |
415 | # Electron efficiency |
416 | @@ -351,7 +494,7 @@ |
417 | |
418 | module Isolation ElectronIsolation { |
419 | set CandidateInputArray ElectronEfficiency/electrons |
420 | - set IsolationInputArray EFlowMerger/eflow |
421 | + set IsolationInputArray EFlowFilter/eflow |
422 | |
423 | set OutputArray electrons |
424 | |
425 | @@ -385,7 +528,7 @@ |
426 | |
427 | module Isolation MuonIsolation { |
428 | set CandidateInputArray MuonEfficiency/muons |
429 | - set IsolationInputArray EFlowMerger/eflow |
430 | + set IsolationInputArray EFlowFilter/eflow |
431 | |
432 | set OutputArray muons |
433 | |
434 | @@ -402,7 +545,7 @@ |
435 | |
436 | module Merger MissingET { |
437 | # add InputArray InputArray |
438 | - add InputArray EFlowMerger/eflow |
439 | + add InputArray Calorimeter/towers |
440 | set MomentumOutputArray momentum |
441 | } |
442 | |
443 | @@ -502,12 +645,12 @@ |
444 | ######################## |
445 | |
446 | module JetFlavorAssociation JetFlavorAssociation { |
447 | - |
448 | + |
449 | set PartonInputArray Delphes/partons |
450 | set ParticleInputArray Delphes/allParticles |
451 | set ParticleLHEFInputArray Delphes/allParticlesLHEF |
452 | set JetInputArray JetEnergyScale/jets |
453 | - |
454 | + |
455 | set DeltaR 0.5 |
456 | set PartonPTMin 1.0 |
457 | set PartonEtaMax 2.5 |
458 | @@ -544,7 +687,7 @@ |
459 | ############# |
460 | |
461 | module TrackCountingTauTagging TauTagging { |
462 | - |
463 | + |
464 | set ParticleInputArray Delphes/allParticles |
465 | set PartonInputArray Delphes/partons |
466 | set TrackInputArray TrackMerger/tracks |
467 | @@ -554,19 +697,19 @@ |
468 | set DeltaRTrack 0.2 |
469 | |
470 | set TrackPTMin 1.0 |
471 | - |
472 | + |
473 | set TauPTMin 1.0 |
474 | set TauEtaMax 2.5 |
475 | |
476 | - # instructions: {n-prongs} {eff} |
477 | - |
478 | + # instructions: {n-prongs} {eff} |
479 | + |
480 | # 1 - one prong efficiency |
481 | # 2 - two or more efficiency |
482 | # -1 - one prong mistag rate |
483 | # -2 - two or more mistag rate |
484 | - |
485 | + |
486 | set BitNumber 0 |
487 | - |
488 | + |
489 | # taken from ATL-PHYS-PUB-2015-045 (medium working point) |
490 | add EfficiencyFormula {1} {0.70} |
491 | add EfficiencyFormula {2} {0.60} |
492 | @@ -603,9 +746,9 @@ |
493 | add Branch TrackMerger/tracks Track Track |
494 | add Branch Calorimeter/towers Tower Tower |
495 | |
496 | - add Branch Calorimeter/eflowTracks EFlowTrack Track |
497 | - add Branch Calorimeter/eflowPhotons EFlowPhoton Tower |
498 | - add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower |
499 | + add Branch HCal/eflowTracks EFlowTrack Track |
500 | + add Branch ECal/eflowPhotons EFlowPhoton Tower |
501 | + add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower |
502 | |
503 | add Branch GenJetFinder/jets GenJet Jet |
504 | add Branch GenMissingET/momentum GenMissingET MissingET |
505 | |
506 | === modified file 'Template/Common/Cards/delphes_card_CMS.dat' |
507 | --- Template/Common/Cards/delphes_card_CMS.dat 2016-08-29 22:10:09 +0000 |
508 | +++ Template/Common/Cards/delphes_card_CMS.dat 2017-05-24 22:17:46 +0000 |
509 | @@ -14,9 +14,14 @@ |
510 | MuonMomentumSmearing |
511 | |
512 | TrackMerger |
513 | + |
514 | + ECal |
515 | + HCal |
516 | + |
517 | Calorimeter |
518 | EFlowMerger |
519 | - |
520 | + EFlowFilter |
521 | + |
522 | PhotonEfficiency |
523 | PhotonIsolation |
524 | |
525 | @@ -24,6 +29,8 @@ |
526 | ElectronEfficiency |
527 | ElectronIsolation |
528 | |
529 | + ChargedHadronFilter |
530 | + |
531 | MuonEfficiency |
532 | MuonIsolation |
533 | |
534 | @@ -34,6 +41,7 @@ |
535 | GenMissingET |
536 | |
537 | FastJetFinder |
538 | + FatJetFinder |
539 | |
540 | JetEnergyScale |
541 | |
542 | @@ -123,9 +131,12 @@ |
543 | # tracking efficiency formula for muons |
544 | set EfficiencyFormula { (pt <= 0.1) * (0.00) + |
545 | (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + |
546 | - (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + |
547 | + (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e3) * (0.99) + |
548 | + (abs(eta) <= 1.5) * (pt > 1.0e3 ) * (0.99 * exp(0.5 - pt*5.0e-4)) + |
549 | + |
550 | (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + |
551 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + |
552 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e3) * (0.98) + |
553 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e3) * (0.98 * exp(0.5 - pt*5.0e-4)) + |
554 | (abs(eta) > 2.5) * (0.00)} |
555 | } |
556 | |
557 | @@ -141,9 +152,9 @@ |
558 | |
559 | # resolution formula for charged hadrons |
560 | # based on arXiv:1405.6569 |
561 | - set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + |
562 | - (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + |
563 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} |
564 | + set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + |
565 | + (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + |
566 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} |
567 | } |
568 | |
569 | ################################### |
570 | @@ -191,26 +202,125 @@ |
571 | set OutputArray tracks |
572 | } |
573 | |
574 | -############# |
575 | -# Calorimeter |
576 | -############# |
577 | - |
578 | -module Calorimeter Calorimeter { |
579 | + |
580 | + |
581 | +############# |
582 | +# ECAL |
583 | +############# |
584 | + |
585 | +module SimpleCalorimeter ECal { |
586 | set ParticleInputArray ParticlePropagator/stableParticles |
587 | set TrackInputArray TrackMerger/tracks |
588 | |
589 | - set TowerOutputArray towers |
590 | - set PhotonOutputArray photons |
591 | - |
592 | - set EFlowTrackOutputArray eflowTracks |
593 | - set EFlowPhotonOutputArray eflowPhotons |
594 | - set EFlowNeutralHadronOutputArray eflowNeutralHadrons |
595 | - |
596 | - set ECalEnergyMin 0.5 |
597 | - set HCalEnergyMin 1.0 |
598 | - |
599 | - set ECalEnergySignificanceMin 1.0 |
600 | - set HCalEnergySignificanceMin 1.0 |
601 | + set TowerOutputArray ecalTowers |
602 | + set EFlowTrackOutputArray eflowTracks |
603 | + set EFlowTowerOutputArray eflowPhotons |
604 | + |
605 | + set IsEcal true |
606 | + |
607 | + set EnergyMin 0.5 |
608 | + set EnergySignificanceMin 2.0 |
609 | + |
610 | + set SmearTowerCenter true |
611 | + |
612 | + set pi [expr {acos(-1)}] |
613 | + |
614 | + # lists of the edges of each tower in eta and phi |
615 | + # each list starts with the lower edge of the first tower |
616 | + # the list ends with the higher edged of the last tower |
617 | + |
618 | + # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 |
619 | + |
620 | + set PhiBins {} |
621 | + for {set i -180} {$i <= 180} {incr i} { |
622 | + add PhiBins [expr {$i * $pi/180.0}] |
623 | + } |
624 | + |
625 | + # 0.02 unit in eta up to eta = 1.5 (barrel) |
626 | + for {set i -85} {$i <= 86} {incr i} { |
627 | + set eta [expr {$i * 0.0174}] |
628 | + add EtaPhiBins $eta $PhiBins |
629 | + } |
630 | + |
631 | + # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL) |
632 | + |
633 | + set PhiBins {} |
634 | + for {set i -180} {$i <= 180} {incr i} { |
635 | + add PhiBins [expr {$i * $pi/180.0}] |
636 | + } |
637 | + |
638 | + # 0.02 unit in eta up to eta = 3 |
639 | + for {set i 1} {$i <= 84} {incr i} { |
640 | + set eta [expr { -2.958 + $i * 0.0174}] |
641 | + add EtaPhiBins $eta $PhiBins |
642 | + } |
643 | + |
644 | + for {set i 1} {$i <= 84} {incr i} { |
645 | + set eta [expr { 1.4964 + $i * 0.0174}] |
646 | + add EtaPhiBins $eta $PhiBins |
647 | + } |
648 | + |
649 | + # take present CMS granularity for HF |
650 | + |
651 | + # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 |
652 | + set PhiBins {} |
653 | + for {set i -18} {$i <= 18} {incr i} { |
654 | + add PhiBins [expr {$i * $pi/18.0}] |
655 | + } |
656 | + |
657 | + foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { |
658 | + add EtaPhiBins $eta $PhiBins |
659 | + } |
660 | + |
661 | + |
662 | + add EnergyFraction {0} {0.0} |
663 | + # energy fractions for e, gamma and pi0 |
664 | + add EnergyFraction {11} {1.0} |
665 | + add EnergyFraction {22} {1.0} |
666 | + add EnergyFraction {111} {1.0} |
667 | + # energy fractions for muon, neutrinos and neutralinos |
668 | + add EnergyFraction {12} {0.0} |
669 | + add EnergyFraction {13} {0.0} |
670 | + add EnergyFraction {14} {0.0} |
671 | + add EnergyFraction {16} {0.0} |
672 | + add EnergyFraction {1000022} {0.0} |
673 | + add EnergyFraction {1000023} {0.0} |
674 | + add EnergyFraction {1000025} {0.0} |
675 | + add EnergyFraction {1000035} {0.0} |
676 | + add EnergyFraction {1000045} {0.0} |
677 | + # energy fractions for K0short and Lambda |
678 | + add EnergyFraction {310} {0.3} |
679 | + add EnergyFraction {3122} {0.3} |
680 | + |
681 | + # set ResolutionFormula {resolution formula as a function of eta and energy} |
682 | + |
683 | + # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016 and 1502.02701 |
684 | + |
685 | + # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
686 | + # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 |
687 | + set ResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
688 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
689 | + (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} |
690 | + |
691 | +} |
692 | + |
693 | + |
694 | +############# |
695 | +# HCAL |
696 | +############# |
697 | + |
698 | +module SimpleCalorimeter HCal { |
699 | + set ParticleInputArray ParticlePropagator/stableParticles |
700 | + set TrackInputArray ECal/eflowTracks |
701 | + |
702 | + set TowerOutputArray hcalTowers |
703 | + set EFlowTrackOutputArray eflowTracks |
704 | + set EFlowTowerOutputArray eflowNeutralHadrons |
705 | + |
706 | + set IsEcal false |
707 | + |
708 | + set EnergyMin 1.0 |
709 | + set EnergySignificanceMin 1.0 |
710 | |
711 | set SmearTowerCenter true |
712 | |
713 | @@ -248,35 +358,71 @@ |
714 | } |
715 | |
716 | # default energy fractions {abs(PDG code)} {Fecal Fhcal} |
717 | - add EnergyFraction {0} {0.0 1.0} |
718 | + add EnergyFraction {0} {1.0} |
719 | # energy fractions for e, gamma and pi0 |
720 | - add EnergyFraction {11} {1.0 0.0} |
721 | - add EnergyFraction {22} {1.0 0.0} |
722 | - add EnergyFraction {111} {1.0 0.0} |
723 | + add EnergyFraction {11} {0.0} |
724 | + add EnergyFraction {22} {0.0} |
725 | + add EnergyFraction {111} {0.0} |
726 | # energy fractions for muon, neutrinos and neutralinos |
727 | - add EnergyFraction {12} {0.0 0.0} |
728 | - add EnergyFraction {13} {0.0 0.0} |
729 | - add EnergyFraction {14} {0.0 0.0} |
730 | - add EnergyFraction {16} {0.0 0.0} |
731 | - add EnergyFraction {1000022} {0.0 0.0} |
732 | - add EnergyFraction {1000023} {0.0 0.0} |
733 | - add EnergyFraction {1000025} {0.0 0.0} |
734 | - add EnergyFraction {1000035} {0.0 0.0} |
735 | - add EnergyFraction {1000045} {0.0 0.0} |
736 | + add EnergyFraction {12} {0.0} |
737 | + add EnergyFraction {13} {0.0} |
738 | + add EnergyFraction {14} {0.0} |
739 | + add EnergyFraction {16} {0.0} |
740 | + add EnergyFraction {1000022} {0.0} |
741 | + add EnergyFraction {1000023} {0.0} |
742 | + add EnergyFraction {1000025} {0.0} |
743 | + add EnergyFraction {1000035} {0.0} |
744 | + add EnergyFraction {1000045} {0.0} |
745 | # energy fractions for K0short and Lambda |
746 | - add EnergyFraction {310} {0.3 0.7} |
747 | - add EnergyFraction {3122} {0.3 0.7} |
748 | - |
749 | - # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
750 | - # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 |
751 | - set ECalResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
752 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
753 | - (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} |
754 | + add EnergyFraction {310} {0.7} |
755 | + add EnergyFraction {3122} {0.7} |
756 | |
757 | # set HCalResolutionFormula {resolution formula as a function of eta and energy} |
758 | - set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + |
759 | + set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + |
760 | (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} |
761 | -} |
762 | + |
763 | +} |
764 | + |
765 | + |
766 | +################# |
767 | +# Electron filter |
768 | +################# |
769 | + |
770 | +module PdgCodeFilter ElectronFilter { |
771 | + set InputArray HCal/eflowTracks |
772 | + set OutputArray electrons |
773 | + set Invert true |
774 | + add PdgCode {11} |
775 | + add PdgCode {-11} |
776 | +} |
777 | + |
778 | +###################### |
779 | +# ChargedHadronFilter |
780 | +###################### |
781 | + |
782 | +module PdgCodeFilter ChargedHadronFilter { |
783 | + set InputArray HCal/eflowTracks |
784 | + set OutputArray chargedHadrons |
785 | + |
786 | + add PdgCode {11} |
787 | + add PdgCode {-11} |
788 | + add PdgCode {13} |
789 | + add PdgCode {-13} |
790 | +} |
791 | + |
792 | + |
793 | +################################################### |
794 | +# Tower Merger (in case not using e-flow algorithm) |
795 | +################################################### |
796 | + |
797 | +module Merger Calorimeter { |
798 | +# add InputArray InputArray |
799 | + add InputArray ECal/ecalTowers |
800 | + add InputArray HCal/hcalTowers |
801 | + set OutputArray towers |
802 | +} |
803 | + |
804 | + |
805 | |
806 | #################### |
807 | # Energy flow merger |
808 | @@ -284,18 +430,33 @@ |
809 | |
810 | module Merger EFlowMerger { |
811 | # add InputArray InputArray |
812 | - add InputArray Calorimeter/eflowTracks |
813 | - add InputArray Calorimeter/eflowPhotons |
814 | - add InputArray Calorimeter/eflowNeutralHadrons |
815 | - set OutputArray eflow |
816 | -} |
817 | + add InputArray HCal/eflowTracks |
818 | + add InputArray ECal/eflowPhotons |
819 | + add InputArray HCal/eflowNeutralHadrons |
820 | + set OutputArray eflow |
821 | +} |
822 | + |
823 | +###################### |
824 | +# EFlowFilter |
825 | +###################### |
826 | + |
827 | +module PdgCodeFilter EFlowFilter { |
828 | + set InputArray EFlowMerger/eflow |
829 | + set OutputArray eflow |
830 | + |
831 | + add PdgCode {11} |
832 | + add PdgCode {-11} |
833 | + add PdgCode {13} |
834 | + add PdgCode {-13} |
835 | +} |
836 | + |
837 | |
838 | ################### |
839 | # Photon efficiency |
840 | ################### |
841 | |
842 | module Efficiency PhotonEfficiency { |
843 | - set InputArray Calorimeter/eflowPhotons |
844 | + set InputArray ECal/eflowPhotons |
845 | set OutputArray photons |
846 | |
847 | # set EfficiencyFormula {efficiency formula as a function of eta and pt} |
848 | @@ -313,7 +474,7 @@ |
849 | |
850 | module Isolation PhotonIsolation { |
851 | set CandidateInputArray PhotonEfficiency/photons |
852 | - set IsolationInputArray EFlowMerger/eflow |
853 | + set IsolationInputArray EFlowFilter/eflow |
854 | |
855 | set OutputArray photons |
856 | |
857 | @@ -324,17 +485,6 @@ |
858 | set PTRatioMax 0.12 |
859 | } |
860 | |
861 | -################# |
862 | -# Electron filter |
863 | -################# |
864 | - |
865 | -module PdgCodeFilter ElectronFilter { |
866 | - set InputArray Calorimeter/eflowTracks |
867 | - set OutputArray electrons |
868 | - set Invert true |
869 | - add PdgCode {11} |
870 | - add PdgCode {-11} |
871 | -} |
872 | |
873 | ##################### |
874 | # Electron efficiency |
875 | @@ -359,7 +509,7 @@ |
876 | |
877 | module Isolation ElectronIsolation { |
878 | set CandidateInputArray ElectronEfficiency/electrons |
879 | - set IsolationInputArray EFlowMerger/eflow |
880 | + set IsolationInputArray EFlowFilter/eflow |
881 | |
882 | set OutputArray electrons |
883 | |
884 | @@ -381,11 +531,9 @@ |
885 | # set EfficiencyFormula {efficiency as a function of eta and pt} |
886 | |
887 | # efficiency formula for muons |
888 | - set EfficiencyFormula { (pt <= 10.0) * (0.00) + |
889 | - (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + |
890 | - (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + |
891 | - (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + |
892 | - (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + |
893 | + set EfficiencyFormula { (pt <= 10.0) * (0.00) + |
894 | + (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + |
895 | + (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.95) + |
896 | (abs(eta) > 2.4) * (0.00)} |
897 | } |
898 | |
899 | @@ -395,7 +543,7 @@ |
900 | |
901 | module Isolation MuonIsolation { |
902 | set CandidateInputArray MuonEfficiency/muons |
903 | - set IsolationInputArray EFlowMerger/eflow |
904 | + set IsolationInputArray EFlowFilter/eflow |
905 | |
906 | set OutputArray muons |
907 | |
908 | @@ -497,6 +645,43 @@ |
909 | } |
910 | |
911 | ################## |
912 | +# Fat Jet finder |
913 | +################## |
914 | + |
915 | +module FastJetFinder FatJetFinder { |
916 | + set InputArray EFlowMerger/eflow |
917 | + |
918 | + set OutputArray jets |
919 | + |
920 | + # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt |
921 | + set JetAlgorithm 6 |
922 | + set ParameterR 0.8 |
923 | + |
924 | + set ComputeNsubjettiness 1 |
925 | + set Beta 1.0 |
926 | + set AxisMode 4 |
927 | + |
928 | + set ComputeTrimming 1 |
929 | + set RTrim 0.2 |
930 | + set PtFracTrim 0.05 |
931 | + |
932 | + set ComputePruning 1 |
933 | + set ZcutPrun 0.1 |
934 | + set RcutPrun 0.5 |
935 | + set RPrun 0.8 |
936 | + |
937 | + set ComputeSoftDrop 1 |
938 | + set BetaSoftDrop 0.0 |
939 | + set SymmetryCutSoftDrop 0.1 |
940 | + set R0SoftDrop 0.8 |
941 | + |
942 | + set JetPTMin 200.0 |
943 | +} |
944 | + |
945 | + |
946 | + |
947 | + |
948 | +################## |
949 | # Jet Energy Scale |
950 | ################## |
951 | |
952 | @@ -601,17 +786,20 @@ |
953 | add Branch TrackMerger/tracks Track Track |
954 | add Branch Calorimeter/towers Tower Tower |
955 | |
956 | - add Branch Calorimeter/eflowTracks EFlowTrack Track |
957 | - add Branch Calorimeter/eflowPhotons EFlowPhoton Tower |
958 | - add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower |
959 | + add Branch HCal/eflowTracks EFlowTrack Track |
960 | + add Branch ECal/eflowPhotons EFlowPhoton Tower |
961 | + add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower |
962 | |
963 | add Branch GenJetFinder/jets GenJet Jet |
964 | add Branch GenMissingET/momentum GenMissingET MissingET |
965 | - |
966 | + |
967 | add Branch UniqueObjectFinder/jets Jet Jet |
968 | add Branch UniqueObjectFinder/electrons Electron Electron |
969 | add Branch UniqueObjectFinder/photons Photon Photon |
970 | add Branch UniqueObjectFinder/muons Muon Muon |
971 | + |
972 | + add Branch FatJetFinder/jets FatJet Jet |
973 | + |
974 | add Branch MissingET/momentum MissingET MissingET |
975 | add Branch ScalarHT/energy ScalarHT ScalarHT |
976 | } |
977 | |
978 | === modified file 'Template/Common/Cards/delphes_card_default.dat' |
979 | --- Template/Common/Cards/delphes_card_default.dat 2016-08-29 22:10:09 +0000 |
980 | +++ Template/Common/Cards/delphes_card_default.dat 2017-05-24 22:17:46 +0000 |
981 | @@ -14,9 +14,14 @@ |
982 | MuonMomentumSmearing |
983 | |
984 | TrackMerger |
985 | + |
986 | + ECal |
987 | + HCal |
988 | + |
989 | Calorimeter |
990 | EFlowMerger |
991 | - |
992 | + EFlowFilter |
993 | + |
994 | PhotonEfficiency |
995 | PhotonIsolation |
996 | |
997 | @@ -24,6 +29,8 @@ |
998 | ElectronEfficiency |
999 | ElectronIsolation |
1000 | |
1001 | + ChargedHadronFilter |
1002 | + |
1003 | MuonEfficiency |
1004 | MuonIsolation |
1005 | |
1006 | @@ -34,6 +41,7 @@ |
1007 | GenMissingET |
1008 | |
1009 | FastJetFinder |
1010 | + FatJetFinder |
1011 | |
1012 | JetEnergyScale |
1013 | |
1014 | @@ -123,9 +131,12 @@ |
1015 | # tracking efficiency formula for muons |
1016 | set EfficiencyFormula { (pt <= 0.1) * (0.00) + |
1017 | (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + |
1018 | - (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + |
1019 | + (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e3) * (0.99) + |
1020 | + (abs(eta) <= 1.5) * (pt > 1.0e3 ) * (0.99 * exp(0.5 - pt*5.0e-4)) + |
1021 | + |
1022 | (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + |
1023 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + |
1024 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e3) * (0.98) + |
1025 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e3) * (0.98 * exp(0.5 - pt*5.0e-4)) + |
1026 | (abs(eta) > 2.5) * (0.00)} |
1027 | } |
1028 | |
1029 | @@ -141,9 +152,9 @@ |
1030 | |
1031 | # resolution formula for charged hadrons |
1032 | # based on arXiv:1405.6569 |
1033 | - set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + |
1034 | - (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + |
1035 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} |
1036 | + set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + |
1037 | + (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + |
1038 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} |
1039 | } |
1040 | |
1041 | ################################### |
1042 | @@ -191,26 +202,125 @@ |
1043 | set OutputArray tracks |
1044 | } |
1045 | |
1046 | -############# |
1047 | -# Calorimeter |
1048 | -############# |
1049 | - |
1050 | -module Calorimeter Calorimeter { |
1051 | + |
1052 | + |
1053 | +############# |
1054 | +# ECAL |
1055 | +############# |
1056 | + |
1057 | +module SimpleCalorimeter ECal { |
1058 | set ParticleInputArray ParticlePropagator/stableParticles |
1059 | set TrackInputArray TrackMerger/tracks |
1060 | |
1061 | - set TowerOutputArray towers |
1062 | - set PhotonOutputArray photons |
1063 | - |
1064 | - set EFlowTrackOutputArray eflowTracks |
1065 | - set EFlowPhotonOutputArray eflowPhotons |
1066 | - set EFlowNeutralHadronOutputArray eflowNeutralHadrons |
1067 | - |
1068 | - set ECalEnergyMin 0.5 |
1069 | - set HCalEnergyMin 1.0 |
1070 | - |
1071 | - set ECalEnergySignificanceMin 1.0 |
1072 | - set HCalEnergySignificanceMin 1.0 |
1073 | + set TowerOutputArray ecalTowers |
1074 | + set EFlowTrackOutputArray eflowTracks |
1075 | + set EFlowTowerOutputArray eflowPhotons |
1076 | + |
1077 | + set IsEcal true |
1078 | + |
1079 | + set EnergyMin 0.5 |
1080 | + set EnergySignificanceMin 2.0 |
1081 | + |
1082 | + set SmearTowerCenter true |
1083 | + |
1084 | + set pi [expr {acos(-1)}] |
1085 | + |
1086 | + # lists of the edges of each tower in eta and phi |
1087 | + # each list starts with the lower edge of the first tower |
1088 | + # the list ends with the higher edged of the last tower |
1089 | + |
1090 | + # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 |
1091 | + |
1092 | + set PhiBins {} |
1093 | + for {set i -180} {$i <= 180} {incr i} { |
1094 | + add PhiBins [expr {$i * $pi/180.0}] |
1095 | + } |
1096 | + |
1097 | + # 0.02 unit in eta up to eta = 1.5 (barrel) |
1098 | + for {set i -85} {$i <= 86} {incr i} { |
1099 | + set eta [expr {$i * 0.0174}] |
1100 | + add EtaPhiBins $eta $PhiBins |
1101 | + } |
1102 | + |
1103 | + # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL) |
1104 | + |
1105 | + set PhiBins {} |
1106 | + for {set i -180} {$i <= 180} {incr i} { |
1107 | + add PhiBins [expr {$i * $pi/180.0}] |
1108 | + } |
1109 | + |
1110 | + # 0.02 unit in eta up to eta = 3 |
1111 | + for {set i 1} {$i <= 84} {incr i} { |
1112 | + set eta [expr { -2.958 + $i * 0.0174}] |
1113 | + add EtaPhiBins $eta $PhiBins |
1114 | + } |
1115 | + |
1116 | + for {set i 1} {$i <= 84} {incr i} { |
1117 | + set eta [expr { 1.4964 + $i * 0.0174}] |
1118 | + add EtaPhiBins $eta $PhiBins |
1119 | + } |
1120 | + |
1121 | + # take present CMS granularity for HF |
1122 | + |
1123 | + # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 |
1124 | + set PhiBins {} |
1125 | + for {set i -18} {$i <= 18} {incr i} { |
1126 | + add PhiBins [expr {$i * $pi/18.0}] |
1127 | + } |
1128 | + |
1129 | + foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { |
1130 | + add EtaPhiBins $eta $PhiBins |
1131 | + } |
1132 | + |
1133 | + |
1134 | + add EnergyFraction {0} {0.0} |
1135 | + # energy fractions for e, gamma and pi0 |
1136 | + add EnergyFraction {11} {1.0} |
1137 | + add EnergyFraction {22} {1.0} |
1138 | + add EnergyFraction {111} {1.0} |
1139 | + # energy fractions for muon, neutrinos and neutralinos |
1140 | + add EnergyFraction {12} {0.0} |
1141 | + add EnergyFraction {13} {0.0} |
1142 | + add EnergyFraction {14} {0.0} |
1143 | + add EnergyFraction {16} {0.0} |
1144 | + add EnergyFraction {1000022} {0.0} |
1145 | + add EnergyFraction {1000023} {0.0} |
1146 | + add EnergyFraction {1000025} {0.0} |
1147 | + add EnergyFraction {1000035} {0.0} |
1148 | + add EnergyFraction {1000045} {0.0} |
1149 | + # energy fractions for K0short and Lambda |
1150 | + add EnergyFraction {310} {0.3} |
1151 | + add EnergyFraction {3122} {0.3} |
1152 | + |
1153 | + # set ResolutionFormula {resolution formula as a function of eta and energy} |
1154 | + |
1155 | + # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016 and 1502.02701 |
1156 | + |
1157 | + # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
1158 | + # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 |
1159 | + set ResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
1160 | + (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
1161 | + (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} |
1162 | + |
1163 | +} |
1164 | + |
1165 | + |
1166 | +############# |
1167 | +# HCAL |
1168 | +############# |
1169 | + |
1170 | +module SimpleCalorimeter HCal { |
1171 | + set ParticleInputArray ParticlePropagator/stableParticles |
1172 | + set TrackInputArray ECal/eflowTracks |
1173 | + |
1174 | + set TowerOutputArray hcalTowers |
1175 | + set EFlowTrackOutputArray eflowTracks |
1176 | + set EFlowTowerOutputArray eflowNeutralHadrons |
1177 | + |
1178 | + set IsEcal false |
1179 | + |
1180 | + set EnergyMin 1.0 |
1181 | + set EnergySignificanceMin 1.0 |
1182 | |
1183 | set SmearTowerCenter true |
1184 | |
1185 | @@ -248,35 +358,71 @@ |
1186 | } |
1187 | |
1188 | # default energy fractions {abs(PDG code)} {Fecal Fhcal} |
1189 | - add EnergyFraction {0} {0.0 1.0} |
1190 | + add EnergyFraction {0} {1.0} |
1191 | # energy fractions for e, gamma and pi0 |
1192 | - add EnergyFraction {11} {1.0 0.0} |
1193 | - add EnergyFraction {22} {1.0 0.0} |
1194 | - add EnergyFraction {111} {1.0 0.0} |
1195 | + add EnergyFraction {11} {0.0} |
1196 | + add EnergyFraction {22} {0.0} |
1197 | + add EnergyFraction {111} {0.0} |
1198 | # energy fractions for muon, neutrinos and neutralinos |
1199 | - add EnergyFraction {12} {0.0 0.0} |
1200 | - add EnergyFraction {13} {0.0 0.0} |
1201 | - add EnergyFraction {14} {0.0 0.0} |
1202 | - add EnergyFraction {16} {0.0 0.0} |
1203 | - add EnergyFraction {1000022} {0.0 0.0} |
1204 | - add EnergyFraction {1000023} {0.0 0.0} |
1205 | - add EnergyFraction {1000025} {0.0 0.0} |
1206 | - add EnergyFraction {1000035} {0.0 0.0} |
1207 | - add EnergyFraction {1000045} {0.0 0.0} |
1208 | + add EnergyFraction {12} {0.0} |
1209 | + add EnergyFraction {13} {0.0} |
1210 | + add EnergyFraction {14} {0.0} |
1211 | + add EnergyFraction {16} {0.0} |
1212 | + add EnergyFraction {1000022} {0.0} |
1213 | + add EnergyFraction {1000023} {0.0} |
1214 | + add EnergyFraction {1000025} {0.0} |
1215 | + add EnergyFraction {1000035} {0.0} |
1216 | + add EnergyFraction {1000045} {0.0} |
1217 | # energy fractions for K0short and Lambda |
1218 | - add EnergyFraction {310} {0.3 0.7} |
1219 | - add EnergyFraction {3122} {0.3 0.7} |
1220 | - |
1221 | - # set ECalResolutionFormula {resolution formula as a function of eta and energy} |
1222 | - # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 |
1223 | - set ECalResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
1224 | - (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + |
1225 | - (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} |
1226 | + add EnergyFraction {310} {0.7} |
1227 | + add EnergyFraction {3122} {0.7} |
1228 | |
1229 | # set HCalResolutionFormula {resolution formula as a function of eta and energy} |
1230 | - set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + |
1231 | + set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + |
1232 | (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} |
1233 | -} |
1234 | + |
1235 | +} |
1236 | + |
1237 | + |
1238 | +################# |
1239 | +# Electron filter |
1240 | +################# |
1241 | + |
1242 | +module PdgCodeFilter ElectronFilter { |
1243 | + set InputArray HCal/eflowTracks |
1244 | + set OutputArray electrons |
1245 | + set Invert true |
1246 | + add PdgCode {11} |
1247 | + add PdgCode {-11} |
1248 | +} |
1249 | + |
1250 | +###################### |
1251 | +# ChargedHadronFilter |
1252 | +###################### |
1253 | + |
1254 | +module PdgCodeFilter ChargedHadronFilter { |
1255 | + set InputArray HCal/eflowTracks |
1256 | + set OutputArray chargedHadrons |
1257 | + |
1258 | + add PdgCode {11} |
1259 | + add PdgCode {-11} |
1260 | + add PdgCode {13} |
1261 | + add PdgCode {-13} |
1262 | +} |
1263 | + |
1264 | + |
1265 | +################################################### |
1266 | +# Tower Merger (in case not using e-flow algorithm) |
1267 | +################################################### |
1268 | + |
1269 | +module Merger Calorimeter { |
1270 | +# add InputArray InputArray |
1271 | + add InputArray ECal/ecalTowers |
1272 | + add InputArray HCal/hcalTowers |
1273 | + set OutputArray towers |
1274 | +} |
1275 | + |
1276 | + |
1277 | |
1278 | #################### |
1279 | # Energy flow merger |
1280 | @@ -284,18 +430,33 @@ |
1281 | |
1282 | module Merger EFlowMerger { |
1283 | # add InputArray InputArray |
1284 | - add InputArray Calorimeter/eflowTracks |
1285 | - add InputArray Calorimeter/eflowPhotons |
1286 | - add InputArray Calorimeter/eflowNeutralHadrons |
1287 | - set OutputArray eflow |
1288 | -} |
1289 | + add InputArray HCal/eflowTracks |
1290 | + add InputArray ECal/eflowPhotons |
1291 | + add InputArray HCal/eflowNeutralHadrons |
1292 | + set OutputArray eflow |
1293 | +} |
1294 | + |
1295 | +###################### |
1296 | +# EFlowFilter |
1297 | +###################### |
1298 | + |
1299 | +module PdgCodeFilter EFlowFilter { |
1300 | + set InputArray EFlowMerger/eflow |
1301 | + set OutputArray eflow |
1302 | + |
1303 | + add PdgCode {11} |
1304 | + add PdgCode {-11} |
1305 | + add PdgCode {13} |
1306 | + add PdgCode {-13} |
1307 | +} |
1308 | + |
1309 | |
1310 | ################### |
1311 | # Photon efficiency |
1312 | ################### |
1313 | |
1314 | module Efficiency PhotonEfficiency { |
1315 | - set InputArray Calorimeter/eflowPhotons |
1316 | + set InputArray ECal/eflowPhotons |
1317 | set OutputArray photons |
1318 | |
1319 | # set EfficiencyFormula {efficiency formula as a function of eta and pt} |
1320 | @@ -313,7 +474,7 @@ |
1321 | |
1322 | module Isolation PhotonIsolation { |
1323 | set CandidateInputArray PhotonEfficiency/photons |
1324 | - set IsolationInputArray EFlowMerger/eflow |
1325 | + set IsolationInputArray EFlowFilter/eflow |
1326 | |
1327 | set OutputArray photons |
1328 | |
1329 | @@ -324,17 +485,6 @@ |
1330 | set PTRatioMax 0.12 |
1331 | } |
1332 | |
1333 | -################# |
1334 | -# Electron filter |
1335 | -################# |
1336 | - |
1337 | -module PdgCodeFilter ElectronFilter { |
1338 | - set InputArray Calorimeter/eflowTracks |
1339 | - set OutputArray electrons |
1340 | - set Invert true |
1341 | - add PdgCode {11} |
1342 | - add PdgCode {-11} |
1343 | -} |
1344 | |
1345 | ##################### |
1346 | # Electron efficiency |
1347 | @@ -359,7 +509,7 @@ |
1348 | |
1349 | module Isolation ElectronIsolation { |
1350 | set CandidateInputArray ElectronEfficiency/electrons |
1351 | - set IsolationInputArray EFlowMerger/eflow |
1352 | + set IsolationInputArray EFlowFilter/eflow |
1353 | |
1354 | set OutputArray electrons |
1355 | |
1356 | @@ -381,11 +531,9 @@ |
1357 | # set EfficiencyFormula {efficiency as a function of eta and pt} |
1358 | |
1359 | # efficiency formula for muons |
1360 | - set EfficiencyFormula { (pt <= 10.0) * (0.00) + |
1361 | - (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + |
1362 | - (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + |
1363 | - (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + |
1364 | - (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + |
1365 | + set EfficiencyFormula { (pt <= 10.0) * (0.00) + |
1366 | + (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + |
1367 | + (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.95) + |
1368 | (abs(eta) > 2.4) * (0.00)} |
1369 | } |
1370 | |
1371 | @@ -395,7 +543,7 @@ |
1372 | |
1373 | module Isolation MuonIsolation { |
1374 | set CandidateInputArray MuonEfficiency/muons |
1375 | - set IsolationInputArray EFlowMerger/eflow |
1376 | + set IsolationInputArray EFlowFilter/eflow |
1377 | |
1378 | set OutputArray muons |
1379 | |
1380 | @@ -497,6 +645,43 @@ |
1381 | } |
1382 | |
1383 | ################## |
1384 | +# Fat Jet finder |
1385 | +################## |
1386 | + |
1387 | +module FastJetFinder FatJetFinder { |
1388 | + set InputArray EFlowMerger/eflow |
1389 | + |
1390 | + set OutputArray jets |
1391 | + |
1392 | + # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt |
1393 | + set JetAlgorithm 6 |
1394 | + set ParameterR 0.8 |
1395 | + |
1396 | + set ComputeNsubjettiness 1 |
1397 | + set Beta 1.0 |
1398 | + set AxisMode 4 |
1399 | + |
1400 | + set ComputeTrimming 1 |
1401 | + set RTrim 0.2 |
1402 | + set PtFracTrim 0.05 |
1403 | + |
1404 | + set ComputePruning 1 |
1405 | + set ZcutPrun 0.1 |
1406 | + set RcutPrun 0.5 |
1407 | + set RPrun 0.8 |
1408 | + |
1409 | + set ComputeSoftDrop 1 |
1410 | + set BetaSoftDrop 0.0 |
1411 | + set SymmetryCutSoftDrop 0.1 |
1412 | + set R0SoftDrop 0.8 |
1413 | + |
1414 | + set JetPTMin 200.0 |
1415 | +} |
1416 | + |
1417 | + |
1418 | + |
1419 | + |
1420 | +################## |
1421 | # Jet Energy Scale |
1422 | ################## |
1423 | |
1424 | @@ -601,17 +786,20 @@ |
1425 | add Branch TrackMerger/tracks Track Track |
1426 | add Branch Calorimeter/towers Tower Tower |
1427 | |
1428 | - add Branch Calorimeter/eflowTracks EFlowTrack Track |
1429 | - add Branch Calorimeter/eflowPhotons EFlowPhoton Tower |
1430 | - add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower |
1431 | + add Branch HCal/eflowTracks EFlowTrack Track |
1432 | + add Branch ECal/eflowPhotons EFlowPhoton Tower |
1433 | + add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower |
1434 | |
1435 | add Branch GenJetFinder/jets GenJet Jet |
1436 | add Branch GenMissingET/momentum GenMissingET MissingET |
1437 | - |
1438 | + |
1439 | add Branch UniqueObjectFinder/jets Jet Jet |
1440 | add Branch UniqueObjectFinder/electrons Electron Electron |
1441 | add Branch UniqueObjectFinder/photons Photon Photon |
1442 | add Branch UniqueObjectFinder/muons Muon Muon |
1443 | + |
1444 | + add Branch FatJetFinder/jets FatJet Jet |
1445 | + |
1446 | add Branch MissingET/momentum MissingET MissingET |
1447 | add Branch ScalarHT/energy ScalarHT ScalarHT |
1448 | } |
1449 | |
1450 | === modified file 'Template/LO/bin/internal/store4grid' |
1451 | --- Template/LO/bin/internal/store4grid 2016-07-29 15:27:30 +0000 |
1452 | +++ Template/LO/bin/internal/store4grid 2017-05-24 22:17:46 +0000 |
1453 | @@ -53,6 +53,11 @@ |
1454 | for j in ftn26.gz ; do |
1455 | if [[ -e $1_$j ]]; then |
1456 | mv -f $1_$j default_$j |
1457 | + elif [[ -e $j ]]; then |
1458 | + mv -f $j default_$j |
1459 | + elif [[ -e ftn26 ]]; then |
1460 | + gzip ftn26 |
1461 | + mv -f $j default_$j |
1462 | fi |
1463 | done |
1464 | cd ../ |
1465 | |
1466 | === removed file 'Template/NLO/Source/basecode.f' |
1467 | --- Template/NLO/Source/basecode.f 2012-08-28 21:06:34 +0000 |
1468 | +++ Template/NLO/Source/basecode.f 1970-01-01 00:00:00 +0000 |
1469 | @@ -1,127 +0,0 @@ |
1470 | - subroutine basecode_test |
1471 | - implicit none |
1472 | - integer imax |
1473 | - parameter (imax = 8) |
1474 | - integer icode,iarray(imax),ibase,i,j |
1475 | - logical done |
1476 | - |
1477 | - ibase = 3 |
1478 | -c do i=0,ibase**3-1 |
1479 | -c call decode(i,iarray,ibase,imax) |
1480 | -c call encode(icode,iarray,ibase,imax) |
1481 | -c write(*,*) i,icode,"=",(iarray(j),j=1,imax) |
1482 | -c enddo |
1483 | - icode = 0 |
1484 | - call decode(icode,iarray,ibase,imax) |
1485 | - iarray(2)=1 |
1486 | - iarray(4)=1 |
1487 | - iarray(5)=1 |
1488 | - iarray(7)=1 |
1489 | - done = .false. |
1490 | - write(*,*) (iarray(j),j=1,imax) |
1491 | - do while (.not. done) |
1492 | - write(*,*) (iarray(j),j=1,imax) |
1493 | - call increment_array(iarray,imax,ibase,done) |
1494 | - enddo |
1495 | - end |
1496 | - |
1497 | - |
1498 | - subroutine EnCode(icode,iarray,ibase,imax) |
1499 | -c****************************************************************************** |
1500 | -c Turns array of integers (iarray) values range (0,ibase-1) into a single |
1501 | -c integer icode. icode = Sum[ iarray(k) * ibase^k] |
1502 | -c****************************************************************************** |
1503 | - implicit none |
1504 | -c |
1505 | -c Arguments |
1506 | -c |
1507 | - integer imax !Number of integers to encode |
1508 | - integer icode !Output encoded value of iarray |
1509 | - integer iarray(imax) !Input values to be encoded |
1510 | - integer ibase !Base for encoding |
1511 | - |
1512 | -c |
1513 | -c Local |
1514 | -c |
1515 | - integer i |
1516 | -c----- |
1517 | -c Begin Code |
1518 | -c----- |
1519 | - icode = 0 |
1520 | - do i = 1, imax |
1521 | - if (iarray(i) .ge. 0 .and. iarray(i) .lt. ibase) then |
1522 | - icode = icode + iarray(i)*ibase**(i-1) |
1523 | - else |
1524 | - write(*,*) 'Error invalid number to be encoded',i,iarray(i) |
1525 | - endif |
1526 | - enddo |
1527 | - end |
1528 | - |
1529 | - subroutine DeCode(icode,iarray,ibase,imax) |
1530 | -c****************************************************************************** |
1531 | -c Decodes icode, into base integers used to create it. |
1532 | -c integer icode. icode = Sum[ iarray(k) * ibase^k] |
1533 | -c****************************************************************************** |
1534 | - implicit none |
1535 | -c |
1536 | -c Arguments |
1537 | -c |
1538 | - integer imax !Number of integers to encode |
1539 | - integer icode !Input encoded value of iarray |
1540 | - integer iarray(imax) !Output decoded values icode |
1541 | - integer ibase !Base for encoding |
1542 | - |
1543 | -c |
1544 | -c Local |
1545 | -c |
1546 | - integer i, jcode |
1547 | -c----- |
1548 | -c Begin Code |
1549 | -c----- |
1550 | - jcode = icode !create copy for use |
1551 | - do i = imax, 1, -1 |
1552 | - iarray(i) = 0 |
1553 | - do while (jcode .ge. ibase**(i-1) .and. iarray(i) .lt. ibase) |
1554 | - jcode = jcode-ibase**(i-1) |
1555 | - iarray(i)=iarray(i)+1 |
1556 | - enddo |
1557 | - enddo |
1558 | - end |
1559 | - |
1560 | - subroutine increment_array(iarray,imax,ibase,done) |
1561 | -c************************************************************************ |
1562 | -c Increments iarray |
1563 | -c************************************************************************ |
1564 | - implicit none |
1565 | -c |
1566 | -c Arguments |
1567 | -c |
1568 | - integer imax !Input, number of elements in iarray |
1569 | - integer ibase !Base for incrementing, 0 is skipped |
1570 | - integer iarray(imax) !Output:Array of values being incremented |
1571 | - logical done !Output:Set when no more incrementing |
1572 | -c |
1573 | -c Local |
1574 | -c |
1575 | - integer i,j |
1576 | - logical found |
1577 | -c----- |
1578 | -c Begin Code |
1579 | -c----- |
1580 | - found = .false. |
1581 | - i = 1 |
1582 | - do while (i .le. imax .and. .not. found) |
1583 | - if (iarray(i) .eq. 0) then !don't increment this |
1584 | - i=i+1 |
1585 | - elseif (iarray(i) .lt. ibase-1) then |
1586 | - found = .true. |
1587 | - iarray(i)=iarray(i)+1 |
1588 | - else |
1589 | - iarray(i)=1 |
1590 | - i=i+1 |
1591 | - endif |
1592 | - enddo |
1593 | - done = .not. found |
1594 | - end |
1595 | - |
1596 | - |
1597 | |
1598 | === removed file 'Template/NLO/Source/combine_events.f' |
1599 | --- Template/NLO/Source/combine_events.f 2012-08-28 21:06:34 +0000 |
1600 | +++ Template/NLO/Source/combine_events.f 1970-01-01 00:00:00 +0000 |
1601 | @@ -1,728 +0,0 @@ |
1602 | - program test |
1603 | -c***************************************************************** |
1604 | -c tests traversing directories to find all events |
1605 | -c**************************************************************** |
1606 | - implicit none |
1607 | -c |
1608 | -c Constants |
1609 | -c |
1610 | - include 'run_config.inc' |
1611 | - integer maxsubprocesses |
1612 | - parameter (maxsubprocesses=9999) |
1613 | - integer cmax_events |
1614 | - parameter (cmax_events=500000) |
1615 | - integer sfnum |
1616 | - parameter (sfnum=17) !Unit number for scratch file |
1617 | - integer maxexternal |
1618 | - parameter (maxexternal=17) |
1619 | - integer maxpara |
1620 | - parameter (maxpara=1000) |
1621 | -c |
1622 | -c Local |
1623 | -c |
1624 | - character*30 subname(maxsubprocesses) |
1625 | - integer i,j,m,ns,nreq,ievent |
1626 | - integer kevent,revent,iarray(cmax_events) |
1627 | - double precision sum, xsec, xerr, goal_wgt,xarray(cmax_events) |
1628 | - integer i4,r8,record_length |
1629 | - integer iseed |
1630 | - real xran1 |
1631 | - double precision wgt,maxwgt |
1632 | - double precision p(0:4,maxexternal) |
1633 | - integer ic(7,maxexternal),n |
1634 | - double precision scale,aqcd,aqed |
1635 | - character*20 param(maxpara),value(maxpara) |
1636 | - integer npara,nunwgt |
1637 | - double precision xtrunc, min_goal,max_goal |
1638 | - logical keep(cmax_events),done |
1639 | - integer ntry |
1640 | - logical gridrun,gridpack |
1641 | - |
1642 | - character*140 buff |
1643 | - |
1644 | - data iseed/-1/ |
1645 | -c----- |
1646 | -c Begin Code |
1647 | -c----- |
1648 | -c |
1649 | -c Get requested number of events |
1650 | -c |
1651 | - call load_para(npara,param,value) |
1652 | - call get_logical(npara,param,value," gridrun ",gridrun,.false.) |
1653 | - call get_logical(npara,param,value," gridpack ",gridpack,.false.) |
1654 | - if (gridrun.and.gridpack) then |
1655 | - call get_integer(npara,param,value," gevents " ,nreq ,2000 ) |
1656 | - else |
1657 | - call get_integer(npara,param,value," nevents " ,nreq ,10000 ) |
1658 | - endif |
1659 | - |
1660 | -c Get information for the <init> block |
1661 | - call setrun |
1662 | - |
1663 | -c nreq = 10000 |
1664 | -c |
1665 | -c Get total cross section |
1666 | -c |
1667 | - xsec = 0d0 |
1668 | - xerr = 0d0 |
1669 | - open(unit=15,file='results.dat',status='old',err=21) |
1670 | - read(15,*,err=20) xsec,xerr |
1671 | - write(*,*) "Results.dat xsec = ",xsec |
1672 | - 20 close(15) |
1673 | - 21 if (nreq .gt. 0 .and. xsec .gt. 0) then |
1674 | - goal_wgt = xsec/nreq/4d0 !Extra factor of 4 for weighted events |
1675 | - else |
1676 | - goal_wgt = 0d0 !Write out everything |
1677 | - endif |
1678 | -c |
1679 | -c Get list of subprocesses |
1680 | -c |
1681 | - call get_subprocess(subname,ns) |
1682 | - |
1683 | -c |
1684 | -c Create scratch file to hold events |
1685 | -c |
1686 | - I4 = 4 |
1687 | - R8 = 8 |
1688 | - record_length = 4*I4+maxexternal*I4*7+maxexternal*5*R8+3*R8+ |
1689 | - & 140 |
1690 | - open(unit=sfnum,access='direct',file='scratch',err=999, |
1691 | - & recl=record_length) |
1692 | -c |
1693 | -c Loop through subprocesses filling up scratch file with events |
1694 | -c |
1695 | - sum=0d0 |
1696 | - kevent=0 |
1697 | - revent=0 |
1698 | - maxwgt=0d0 |
1699 | - write(*,*) 'SubProcess/Channel kept read xsec ' |
1700 | - do i=1,ns |
1701 | -c write(*,*) 'Subprocess: ',subname(ns) |
1702 | - call read_channels(subname(i),sum,kevent,revent,goal_wgt,maxwgt) |
1703 | - enddo |
1704 | -c |
1705 | -c Get Random order for events |
1706 | -c |
1707 | - do i=1,kevent |
1708 | - iarray(i)=i |
1709 | - xarray(i)=xran1(iseed) |
1710 | - enddo |
1711 | - call sortO3(xarray,iarray,kevent) |
1712 | -c |
1713 | -c Write out the events in iarray order |
1714 | -c |
1715 | - open(unit=15,file='events.lhe',status='unknown',err=98) |
1716 | - call writebanner(15,kevent,sum,maxwgt,xerr) |
1717 | - do i=1,kevent |
1718 | - read(sfnum,rec=iarray(i)) wgt,n, |
1719 | - & ((ic(m,j),j=1,maxexternal),m=1,7),ievent, |
1720 | - & ((p(m,j),m=0,4),j=1,maxexternal),scale,aqcd,aqed, |
1721 | - & buff |
1722 | - call write_event(15,P,wgt,n,ic,ievent,scale,aqcd,aqed,buff) |
1723 | - enddo |
1724 | - close(15) |
1725 | -c |
1726 | -c Now select unweighted events. |
1727 | -c |
1728 | - goal_wgt = sum/(nreq*1.03) |
1729 | - min_goal = goal_wgt/5d0 |
1730 | - max_goal = goal_wgt*5d0 |
1731 | - ntry = 1 |
1732 | -c |
1733 | -c Loop to refine guess for goal_wgt while keeping xtrunc<0.01 |
1734 | -c |
1735 | - done=.false. |
1736 | - do while(.not. done) |
1737 | - done=.true. |
1738 | - nunwgt=0 |
1739 | - xtrunc=0d0 |
1740 | - do i=1,kevent |
1741 | - read(sfnum,rec=iarray(i)) wgt,n, |
1742 | - & ((ic(m,j),j=1,maxexternal),m=1,7),ievent, |
1743 | - & ((p(m,j),m=0,4),j=1,maxexternal),scale,aqcd,aqed, |
1744 | - & buff |
1745 | - if (wgt .gt. goal_wgt*xran1(iseed)) then |
1746 | - keep(i) = .true. |
1747 | - nunwgt=nunwgt+1 |
1748 | - if (wgt .gt. goal_wgt) then |
1749 | - xtrunc=xtrunc+wgt-goal_wgt |
1750 | - endif |
1751 | - else |
1752 | - keep(i)=.false. |
1753 | - endif |
1754 | - enddo |
1755 | - if (xtrunc .gt. 0.01d0*sum) then |
1756 | - done=.false. |
1757 | - min_goal = max(goal_wgt,min_goal) |
1758 | - goal_wgt = goal_wgt*1.3d0 |
1759 | - write(*,*) 'Iteration ',ntry, ' too large truncation ',xtrunc/sum,nunwgt |
1760 | -c write(*,*) min_goal,goal_wgt,max_goal |
1761 | - elseif (nunwgt .lt. nreq) then |
1762 | - done=.false. |
1763 | - max_goal = min(goal_wgt,max_goal) |
1764 | - goal_wgt = goal_wgt*0.95d0 |
1765 | - write(*,*) 'Iteration ',ntry, ' too few events ',xtrunc/sum,nunwgt |
1766 | -c write(*,*) min_goal,goal_wgt,max_goal |
1767 | - if (goal_wgt .lt. min_goal) then |
1768 | - done=.true. |
1769 | - write(*,*) 'Failed to find requested number of unweighted events',nreq,nunwgt |
1770 | - endif |
1771 | - endif |
1772 | - ntry=ntry+1 |
1773 | - if (ntry .gt. 20) done=.true. |
1774 | - enddo |
1775 | - if (nunwgt .lt. nreq) then |
1776 | - write(*,*) 'Unable to get ',nreq,' events. Writing ',nunwgt |
1777 | - nreq = nunwgt |
1778 | - else |
1779 | - write(*,*) 'Found ',nunwgt,' events writing first ',nreq |
1780 | - endif |
1781 | - write(*,*) 'Unweighting selected ',nreq, ' events.' |
1782 | - write(*,'(a,f5.2,a)') 'Truncated ',xtrunc*100./sum, '% of cross section' |
1783 | - open(unit=15,file='unweighted_events.lhe',status='unknown',err=99) |
1784 | - call writebanner_u(15,nreq,xsec,xtrunc,xerr) |
1785 | - ntry = 0 |
1786 | - do i=1,kevent |
1787 | - if (keep(i) .and. ntry .lt. nreq) then |
1788 | - read(sfnum,rec=iarray(i)) wgt,n, |
1789 | - & ((ic(m,j),j=1,maxexternal),m=1,7),ievent, |
1790 | - & ((p(m,j),m=0,4),j=1,maxexternal),scale,aqcd,aqed, |
1791 | - $ buff |
1792 | - call write_event(15,P,xsec/nreq,n,ic,ievent,scale,aqcd,aqed,buff) |
1793 | - ntry=ntry+1 |
1794 | - endif |
1795 | - enddo |
1796 | - close(15) |
1797 | - close(sfnum) |
1798 | - return |
1799 | - 98 write(*,*) 'Error writing events.dat' |
1800 | - return |
1801 | - 99 write(*,*) 'Error writing unweighted_events.dat' |
1802 | - return |
1803 | - 999 write(*,*) 'Error opening scratch file' |
1804 | - end |
1805 | - |
1806 | - |
1807 | - subroutine writebanner(lunw,nevent,sum,maxwgt,xerr) |
1808 | -c************************************************************************************** |
1809 | -c Writes out banner information at top of event file |
1810 | -c************************************************************************************** |
1811 | - implicit none |
1812 | -c |
1813 | -c Arguments |
1814 | -c |
1815 | - integer lunw,nevent |
1816 | - double precision sum,maxwgt,xerr |
1817 | -c |
1818 | -c Local |
1819 | -c |
1820 | - integer i,j |
1821 | - |
1822 | -c |
1823 | -c Les Houches init block (for the <init> info) |
1824 | -c |
1825 | - integer maxpup |
1826 | - parameter(maxpup=100) |
1827 | - integer idbmup,pdfgup,pdfsup,idwtup,nprup,lprup |
1828 | - double precision ebmup,xsecup,xerrup,xmaxup |
1829 | - common /heprup/ idbmup(2),ebmup(2),pdfgup(2),pdfsup(2), |
1830 | - & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), |
1831 | - & xmaxup(maxpup),lprup(maxpup) |
1832 | - |
1833 | -c |
1834 | -c Global |
1835 | -c |
1836 | -c double precision etmin(3:nexternal),etamax(3:nexternal) |
1837 | -c double precision r2min(3:nexternal,3:nexternal) |
1838 | -c double precision s_min(nexternal,nexternal) |
1839 | -c common/to_cuts/ etmin ,etamax , r2min, s_min |
1840 | - |
1841 | -c----- |
1842 | -c Begin Code |
1843 | -c----- |
1844 | -c |
1845 | -c gather the info |
1846 | -c |
1847 | -c call setpara('param_card.dat') |
1848 | -c call setcuts |
1849 | -c |
1850 | -c write it out |
1851 | -c |
1852 | -c call write_para(lunw) |
1853 | -c write(lunw,'(a70)') '## ' |
1854 | -c write(lunw,'(a70)') '##------------------- ' |
1855 | -c write(lunw,'(a70)') '## Run-time options ' |
1856 | -c write(lunw,'(a70)') '##------------------- ' |
1857 | -c write(lunw,'(a70)') '## ' |
1858 | -c write(lunw,'(a70)') '##********************************************************************' |
1859 | -c write(lunw,'(a70)') '## Standard Cuts *' |
1860 | -c write(lunw,'(a70)') '##********************************************************************' |
1861 | -c write(lunw,'(a13,8i8)') '## Particle ',(i,i=3,nexternal) |
1862 | -c write(lunw,'(a13,8f8.1)') '## Et >',(etmin(i),i=3,nexternal) |
1863 | -c write(lunw,'(a13,8f8.1)') '## Eta <',(etamax(i),i=3,nexternal) |
1864 | -c do j=3,nexternal-1 |
1865 | -c write(lunw,'(a,i2,a,8f8.1)') '## d R #',j,' >',(-0.0,i=3,j), |
1866 | -c & (r2min(i,j),i=j+1,nexternal) |
1867 | -c do i=j+1,nexternal |
1868 | -c r2min(i,j)=r2min(i,j)**2 !Since r2 returns distance squared |
1869 | -c enddo |
1870 | -c enddo |
1871 | -c do j=3,nexternal-1 |
1872 | -c write(lunw,'(a,i2,a,8f8.1)') '## s min #',j,'>', |
1873 | -c & (s_min(i,j),i=3,nexternal) |
1874 | -c enddo |
1875 | -c write(lunw,'(a70)') '#********************************************************************' |
1876 | -c |
1877 | -c Now write out specific information on the event set |
1878 | -c |
1879 | -c |
1880 | - write(lunw,'(a)') '<MGGenerationInfo>' |
1881 | - write(lunw,'(a30,i10)') '# Number of Events : ',nevent |
1882 | - write(lunw,'(a30,e10.5)') '# Integrated weight (pb) : ',sum |
1883 | - write(lunw,'(a30,e10.5)') '# Max wgt : ',maxwgt |
1884 | - write(lunw,'(a30,e10.5)') '# Average wgt : ',sum/nevent |
1885 | - write(lunw,'(a)') '</MGGenerationInfo>' |
1886 | - |
1887 | - |
1888 | - |
1889 | -C Write out compulsory init info |
1890 | - write(lunw,'(a)') '</header>' |
1891 | - write(lunw,'(a)') '<init>' |
1892 | - write(lunw,90) (idbmup(i),i=1,2),(ebmup(i),i=1,2),(pdfgup(i),i=1,2), |
1893 | - $ (pdfsup(i),i=1,2),2,nprup |
1894 | - do i=1,nprup |
1895 | - write(lunw,91) xsecup(i),xerr*xsecup(i)/sum,maxwgt,lprup(i) ! FACTOR OF nevts for maxwgt and wgt? error? |
1896 | - enddo |
1897 | - write(lunw,'(a)') '</init>' |
1898 | - 90 FORMAT(2i6,2e19.11,2i2,2i6,i2,i3) |
1899 | - 91 FORMAT(3e19.11,i4) |
1900 | - end |
1901 | - |
1902 | - |
1903 | - subroutine writebanner_u(lunw,nevent,sum,maxwgt,xerr) |
1904 | -c************************************************************************************** |
1905 | -c Writes out banner information at top of event file |
1906 | -c************************************************************************************** |
1907 | - implicit none |
1908 | -c |
1909 | -c Arguments |
1910 | -c |
1911 | - integer lunw,nevent |
1912 | - double precision sum,maxwgt,xerr |
1913 | -c |
1914 | -c Local |
1915 | -c |
1916 | - integer i,j |
1917 | -c |
1918 | -c Les Houches init block (for the <init> info) |
1919 | -c |
1920 | - integer maxpup |
1921 | - parameter(maxpup=100) |
1922 | - integer idbmup,pdfgup,pdfsup,idwtup,nprup,lprup |
1923 | - double precision ebmup,xsecup,xerrup,xmaxup |
1924 | - common /heprup/ idbmup(2),ebmup(2),pdfgup(2),pdfsup(2), |
1925 | - & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), |
1926 | - & xmaxup(maxpup),lprup(maxpup) |
1927 | -c |
1928 | -c Global |
1929 | -c |
1930 | -c double precision etmin(3:nexternal),etamax(3:nexternal) |
1931 | -c double precision r2min(3:nexternal,3:nexternal) |
1932 | -c double precision s_min(nexternal,nexternal) |
1933 | -c common/to_cuts/ etmin ,etamax , r2min, s_min |
1934 | - |
1935 | -c----- |
1936 | -c Begin Code |
1937 | -c----- |
1938 | -c |
1939 | -c gather the info |
1940 | -c |
1941 | -c call setpara('param_card.dat') |
1942 | -c call setcuts |
1943 | -c |
1944 | -c write it out |
1945 | -c |
1946 | -c call write_para(lunw) |
1947 | -c write(lunw,'(a70)') '## ' |
1948 | -c write(lunw,'(a70)') '##------------------- ' |
1949 | -c write(lunw,'(a70)') '## Run-time options ' |
1950 | -c write(lunw,'(a70)') '##------------------- ' |
1951 | -c write(lunw,'(a70)') '## ' |
1952 | -c write(lunw,'(a70)') '##********************************************************************' |
1953 | -c write(lunw,'(a70)') '## Standard Cuts *' |
1954 | -c write(lunw,'(a70)') '##********************************************************************' |
1955 | -c write(lunw,'(a13,8i8)') '## Particle ',(i,i=3,nexternal) |
1956 | -c write(lunw,'(a13,8f8.1)') '## Et >',(etmin(i),i=3,nexternal) |
1957 | -c write(lunw,'(a13,8f8.1)') '## Eta <',(etamax(i),i=3,nexternal) |
1958 | -c do j=3,nexternal-1 |
1959 | -c write(lunw,'(a,i2,a,8f8.1)') '## d R #',j,' >',(-0.0,i=3,j), |
1960 | -c & (r2min(i,j),i=j+1,nexternal) |
1961 | -c do i=j+1,nexternal |
1962 | -c r2min(i,j)=r2min(i,j)**2 !Since r2 returns distance squared |
1963 | -c enddo |
1964 | -c enddo |
1965 | -c do j=3,nexternal-1 |
1966 | -c write(lunw,'(a,i2,a,8f8.1)') '## s min #',j,'>', |
1967 | -c & (s_min(i,j),i=3,nexternal) |
1968 | -c enddo |
1969 | -c write(lunw,'(a70)') '##********************************************************************' |
1970 | -c |
1971 | -c Now write out specific information on the event set |
1972 | -c |
1973 | - |
1974 | - write(lunw,'(a)') '<MGGenerationInfo>' |
1975 | - write(lunw,'(a30,i10)') '# Number of Events : ',nevent |
1976 | - write(lunw,'(a30,e10.5)') '# Integrated weight (pb) : ',sum |
1977 | - write(lunw,'(a30,e10.5)') '# Truncated wgt (pb) : ',maxwgt |
1978 | - write(lunw,'(a30,e10.5)') '# Unit wgt : ',sum/nevent |
1979 | - write(lunw,'(a)') '</MGGenerationInfo>' |
1980 | - |
1981 | -C Write out compulsory init info |
1982 | - write(lunw,'(a)') '</header>' |
1983 | - write(lunw,'(a)') '<init>' |
1984 | - write(lunw,90) (idbmup(i),i=1,2),(ebmup(i),i=1,2),(pdfgup(i),i=1,2), |
1985 | - $ (pdfsup(i),i=1,2),3,nprup |
1986 | - do i=1,nprup |
1987 | - write(lunw,91) xsecup(i),xerr*xsecup(i)/sum,sum/nevent,lprup(i) ! FACTOR OF nevts for maxwgt and wgt? error? |
1988 | - enddo |
1989 | - write(lunw,'(a)') '</init>' |
1990 | - 90 FORMAT(2i6,2e19.11,2i2,2i6,i2,i3) |
1991 | - 91 FORMAT(3e19.11,i4) |
1992 | - |
1993 | - end |
1994 | - |
1995 | - |
1996 | - subroutine read_channels(dir,sum,kevent,revent,goal_wgt,maxwgt) |
1997 | -c***************************************************************** |
1998 | -c tests traversing directories to find all events |
1999 | -c**************************************************************** |
2000 | - implicit none |
2001 | -c |
2002 | -c Constants |
2003 | -c |
2004 | - character*(*) symfile |
2005 | - parameter (symfile='symfact.dat') |
2006 | -c |
2007 | -c Arguments |
2008 | -c |
2009 | - character*(30) dir |
2010 | - integer kevent,revent |
2011 | - double precision sum,goal_wgt,maxwgt |
2012 | -c |
2013 | -c Local |
2014 | -c |
2015 | - integer i,j, k, ip |
2016 | - double precision xi |
2017 | - character*50 dirname,dname,channame |
2018 | -c----- |
2019 | -c Begin Code |
2020 | -c----- |
2021 | - i = index(dir," ") |
2022 | - dname = dir(1:i-1)// "/" // symfile |
2023 | - open(unit=35, file=dname ,status='old',err=59) |
2024 | - do while (.true.) |
2025 | - read(35,*,err=99,end=99) xi,j |
2026 | - if (j .gt. 0) then |
2027 | - if ( (xi-int(xi+.01)) .lt. 1d-5) then |
2028 | - k = int(xi+.01) |
2029 | - if (k .lt. 10) then |
2030 | - write(dirname,'(a,i1,a)') 'G',k,'/' |
2031 | - else if (k .lt. 100) then |
2032 | - write(dirname,'(a,i2,a)') 'G',k,'/' |
2033 | - else if (k .lt. 1000) then |
2034 | - write(dirname,'(a,i3,a)') 'G',k,'/' |
2035 | - else if (k .lt. 10000) then |
2036 | - write(dirname,'(a,i4,a)') 'G',k,'/' |
2037 | - endif |
2038 | - else !Handle B.W. |
2039 | - if (xi .lt. 10) then |
2040 | - write(dirname,'(a,f5.3,a,a)') 'G',xi,'/' |
2041 | - else if (xi .lt. 100) then |
2042 | - write(dirname,'(a,f6.3,a,a)') 'G',xi,'/' |
2043 | - else if (xi .lt. 1000) then |
2044 | - write(dirname,'(a,f7.3,a,a)') 'G',xi,'/' |
2045 | - else if (xi .lt. 10000) then |
2046 | - write(dirname,'(a,f8.3,a,a)') 'G',xi,'/' |
2047 | - endif |
2048 | - endif |
2049 | - ip = index(dirname,'/') |
2050 | - channame = dname(1:i-1)// "/" //dirname(1:ip) |
2051 | - call read_dir_events(channame(1:i+ip),j,kevent,revent,sum,goal_wgt,maxwgt) |
2052 | - write(*,'(a,2i8,e10.3)') channame(1:i+ip),kevent,revent,sum |
2053 | - endif |
2054 | - 98 enddo |
2055 | - 99 close(35) |
2056 | - return |
2057 | -c |
2058 | -c Come here if there isn't a symfact file. Means we will work on |
2059 | -c this file alone |
2060 | -c |
2061 | - 59 dirname="./" |
2062 | - j = 1 |
2063 | - ip = 2 |
2064 | - channame = dirname(1:ip) |
2065 | - call read_dir_events(channame,j,kevent,revent,sum,goal_wgt,maxwgt) |
2066 | - write(*,'(a30,i8,e10.3)') channame(1:i+ip),kevent,sum |
2067 | - return |
2068 | - end |
2069 | - |
2070 | - subroutine read_dir_events(channame,nj,kevent,revent,sum,goal_wgt,maxwgt) |
2071 | -c******************************************************************** |
2072 | -c******************************************************************** |
2073 | - implicit none |
2074 | -c |
2075 | -c parameters |
2076 | -c |
2077 | - integer sfnum |
2078 | - parameter (sfnum=17) !Unit number for scratch file |
2079 | - character*(*) scaled_file |
2080 | - parameter (scaled_file='events.lhe') |
2081 | - integer maxexternal |
2082 | - parameter (maxexternal=17) |
2083 | - include 'run_config.inc' |
2084 | - integer max_read |
2085 | - parameter (max_read = 2000000) |
2086 | -c |
2087 | -c Arguments |
2088 | -c |
2089 | - character*(*) channame |
2090 | - integer nj,kevent,revent |
2091 | - double precision sum,goal_wgt,maxwgt |
2092 | -c |
2093 | -c Local |
2094 | -c |
2095 | - double precision wgt |
2096 | - double precision p(0:4,maxexternal) |
2097 | - double precision gsfact |
2098 | - real xwgt(max_read),xtot |
2099 | - integer i,j,k,m, ic(7,maxexternal),n |
2100 | - double precision scale,aqcd,aqed |
2101 | - integer ievent,iseed |
2102 | - logical done,found |
2103 | - character*140 buff |
2104 | - character*60 fullname |
2105 | -c |
2106 | -c Les Houches init block (for the <init> info) |
2107 | -c |
2108 | - integer maxpup |
2109 | - parameter(maxpup=100) |
2110 | - integer idbmup,pdfgup,pdfsup,idwtup,nprup,lprup |
2111 | - double precision ebmup,xsecup,xerrup,xmaxup |
2112 | - common /heprup/ idbmup(2),ebmup(2),pdfgup(2),pdfsup(2), |
2113 | - & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), |
2114 | - & xmaxup(maxpup),lprup(maxpup) |
2115 | - data nprup/0/ |
2116 | -c |
2117 | -c external |
2118 | -c |
2119 | - real xran1 |
2120 | -c |
2121 | -c data |
2122 | -c |
2123 | - data iseed/-1/ |
2124 | -c----- |
2125 | -c Begin Code |
2126 | -c----- |
2127 | - fullname = channame // "gscalefact.dat" |
2128 | - gsfact = 1d0 |
2129 | - open (unit=15,file=fullname,status='old',err=12) |
2130 | - read(15,*) gsfact !Scale factor for grid runs that only use some channels |
2131 | - 12 close(15) |
2132 | - if (gsfact .eq. 0d0) return |
2133 | - fullname = channame // scaled_file |
2134 | - open(unit=15,file=fullname, status='old',err=999) |
2135 | - done=.false. |
2136 | -c |
2137 | -c Start by initializing all event variables to zero (not really necessary) |
2138 | -c |
2139 | - do j=1,maxexternal |
2140 | - do i=1,7 |
2141 | - ic(i,j)=0 |
2142 | - enddo |
2143 | - do i=0,4 |
2144 | - p(i,j) = 0d0 |
2145 | - enddo |
2146 | - enddo |
2147 | -c |
2148 | -c Now loop through events |
2149 | -c |
2150 | - do while (.not. done) |
2151 | - call read_event(15,P,wgt,n,ic,ievent,scale,aqcd,aqed,buff,done) |
2152 | - if (.not. done) then |
2153 | - revent = revent+1 |
2154 | - wgt = wgt*nj*gsfact !symmetry factor * grid factor |
2155 | - if (wgt .gt. maxwgt) maxwgt=wgt |
2156 | - if (wgt .ge. goal_wgt*xran1(iseed)) then |
2157 | - kevent=kevent+1 |
2158 | - if (wgt .lt. goal_wgt) wgt = goal_wgt |
2159 | - write(sfnum,rec=kevent) wgt,n, |
2160 | - & ((ic(i,j),j=1,maxexternal),i=1,7),ievent, |
2161 | - & ((p(i,j),i=0,4),j=1,maxexternal),scale,aqcd,aqed,buff |
2162 | - sum=sum+wgt |
2163 | - found=.false. |
2164 | - do i=1,nprup |
2165 | - if(ievent.eq.lprup(i))then |
2166 | - xsecup(i)=xsecup(i)+wgt |
2167 | - found=.true. |
2168 | - endif |
2169 | - enddo |
2170 | - if(.not.found)then |
2171 | - nprup=nprup+1 |
2172 | - lprup(nprup)=ievent |
2173 | - xsecup(nprup)=wgt |
2174 | - endif |
2175 | - endif |
2176 | - endif |
2177 | - if (kevent .ge. max_read) then |
2178 | - write(*,*) 'Error too many events to read in select_events' |
2179 | - $ , kevent |
2180 | - write(*,*) 'Reset max_read in Source/select_events.f' |
2181 | - stop |
2182 | - endif |
2183 | - enddo |
2184 | - 99 close(15) |
2185 | - 55 format(i3,4e19.11) |
2186 | -c write(*,*) 'Found ',kevent,' events' |
2187 | -c write(*,*) 'Integrated weight',sum |
2188 | - return |
2189 | - 999 write(*,*) 'Error opening file ',channame,scaled_file |
2190 | - |
2191 | - end |
2192 | - |
2193 | - |
2194 | - |
2195 | - subroutine get_subprocess(subname,ns) |
2196 | -c***************************************************************** |
2197 | -c tests traversing directories to find all events |
2198 | -c**************************************************************** |
2199 | - implicit none |
2200 | -c |
2201 | -c Constants |
2202 | -c |
2203 | - character*(*) plist |
2204 | - parameter (plist='subproc.mg') |
2205 | - integer maxsubprocesses |
2206 | - parameter (maxsubprocesses=999) |
2207 | -c |
2208 | -c Arguments |
2209 | -c |
2210 | - character*30 subname(maxsubprocesses) |
2211 | - integer ns |
2212 | -c----- |
2213 | -c Begin Code |
2214 | -c----- |
2215 | - ns = 1 |
2216 | - open(unit=15, file=plist,status='old',err=99) |
2217 | - do while (.true.) |
2218 | - read(15,*,err=999,end=999) subname(ns) |
2219 | - ns=ns+1 |
2220 | - enddo |
2221 | - 99 subname(ns) = './' |
2222 | - write(*,*) "Did not find ", plist |
2223 | - return |
2224 | - 999 ns = ns-1 |
2225 | - write(*,*) "Found ", ns," subprocesses" |
2226 | - close(15) |
2227 | - end |
2228 | - |
2229 | - |
2230 | - function xran1(idum) |
2231 | - dimension r(97) |
2232 | - parameter (m1=259200,ia1=7141,ic1=54773,rm1=3.8580247e-6) |
2233 | - parameter (m2=134456,ia2=8121,ic2=28411,rm2=7.4373773e-6) |
2234 | - parameter (m3=243000,ia3=4561,ic3=51349) |
2235 | - data iff /0/ |
2236 | - save r, ix1,ix2,ix3 |
2237 | - if (idum.lt.0.or.iff.eq.0) then |
2238 | - iff=1 |
2239 | - ix1=mod(ic1-idum,m1) |
2240 | - ix1=mod(ia1*ix1+ic1,m1) |
2241 | - ix2=mod(ix1,m2) |
2242 | - ix1=mod(ia1*ix1+ic1,m1) |
2243 | - ix3=mod(ix1,m3) |
2244 | - do 11 j=1,97 |
2245 | - ix1=mod(ia1*ix1+ic1,m1) |
2246 | - ix2=mod(ia2*ix2+ic2,m2) |
2247 | - r(j)=(float(ix1)+float(ix2)*rm2)*rm1 |
2248 | -11 continue |
2249 | - idum=1 |
2250 | - endif |
2251 | - ix1=mod(ia1*ix1+ic1,m1) |
2252 | - ix2=mod(ia2*ix2+ic2,m2) |
2253 | - ix3=mod(ia3*ix3+ic3,m3) |
2254 | - j=1+(97*ix3)/m3 |
2255 | - if(j.gt.97.or.j.lt.1)then |
2256 | - write(*,*) 'j is bad in ran1.f',j, 97d0*ix3/m3 |
2257 | - STOP |
2258 | - endif |
2259 | - xran1=r(j) |
2260 | - r(j)=(float(ix1)+float(ix2)*rm2)*rm1 |
2261 | - return |
2262 | - end |
2263 | - |
2264 | - |
2265 | - subroutine sort2(array,aux1,n) |
2266 | - implicit none |
2267 | -! Arguments |
2268 | - integer n |
2269 | - integer aux1(n) |
2270 | - double precision array(n) |
2271 | -! Local Variables |
2272 | - integer i,k |
2273 | - double precision temp |
2274 | - logical done |
2275 | - |
2276 | -!----------- |
2277 | -! Begin Code |
2278 | -!----------- |
2279 | - do i=n-1,1,-1 |
2280 | - done = .true. |
2281 | - do k=1,i |
2282 | - if (array(k) .lt. array(k+1)) then |
2283 | - temp = array(k) |
2284 | - array(k) = array(k+1) |
2285 | - array(k+1) = temp |
2286 | - temp = aux1(k) |
2287 | - aux1(k) = aux1(k+1) |
2288 | - aux1(k+1) = temp |
2289 | - done = .false. |
2290 | - end if |
2291 | - end do |
2292 | - if (done) return |
2293 | - end do |
2294 | - end |
2295 | - |
2296 | - subroutine sortO3(array,aux1,n) |
2297 | - |
2298 | -c O-Sort Version 3, Sorting routine by Erik Oosterwal |
2299 | -c http://www.geocities.com/oosterwal/computer/sortroutines.html |
2300 | - |
2301 | - implicit none |
2302 | - |
2303 | -! Arguments |
2304 | - integer n |
2305 | - integer aux1(n) |
2306 | - double precision array(n) |
2307 | -! Local Variables |
2308 | - integer step,i,itemp |
2309 | - double precision SngPhi,SngFib |
2310 | - |
2311 | - SngPhi = 0.78 ! Define phi value |
2312 | - SngFib = n * SngPhi ! Set initial real step size |
2313 | - step = int(SngFib) ! set initial integer step size |
2314 | - |
2315 | - do while (step > 0) |
2316 | - do i = 1,n-step ! Set the range of the lower search cells |
2317 | - if (array(aux1(i))<array(aux1(i+step))) then ! Compare cells |
2318 | - itemp = aux1(i) ! \ |
2319 | - aux1(i) = aux1(i+step) ! | Swap cells |
2320 | - aux1(i+step) = itemp ! / |
2321 | - end if |
2322 | - enddo |
2323 | - |
2324 | - SngFib = SngFib * SngPhi ! Decrease the Real step size |
2325 | - Step = Int(SngFib) ! Set the integer step value |
2326 | - |
2327 | - enddo |
2328 | - |
2329 | - end |
2330 | |
2331 | === modified file 'Template/NLO/Source/genps.inc' |
2332 | --- Template/NLO/Source/genps.inc 2013-01-11 08:13:45 +0000 |
2333 | +++ Template/NLO/Source/genps.inc 2017-05-24 22:17:46 +0000 |
2334 | @@ -1,44 +1,4 @@ |
2335 | -c************************************************************************* |
2336 | -c Parameters used by genps |
2337 | -c************************************************************************* |
2338 | -c************************************************************************* |
2339 | -c Parameters used by genps and dsample, you must recompile |
2340 | -c dsample if you change anything below |
2341 | -c************************************************************************* |
2342 | include 'maxparticles.inc' |
2343 | - integer max_tree , max_dim |
2344 | - parameter (max_tree=200, max_dim=max_tree*(max_branch+1)) |
2345 | - integer ng , maxdim , maxinvar , maxconfigs |
2346 | -c parameter (ng = 96, maxdim = 25, maxinvar= 50 , maxconfigs=10) |
2347 | - parameter (ng = 96, maxdim = 3*(max_particles-2)-1, maxinvar= 4*max_particles, maxconfigs=10) |
2348 | - |
2349 | include 'maxconfigs.inc' |
2350 | - |
2351 | - |
2352 | - double precision xgmin, xgmax |
2353 | - parameter (xgmin=-1d0, xgmax=1d0) |
2354 | - |
2355 | - integer maxproc, maxamps |
2356 | - parameter (maxproc=100, maxamps=7500) |
2357 | - |
2358 | -c integer maxproc |
2359 | -c parameter (maxproc=100) |
2360 | - |
2361 | - integer maxevents !Requires about 1K/event |
2362 | - parameter (maxevents=100000) !Maximum # events to write to disk |
2363 | - |
2364 | -c************************************************************************* |
2365 | -c Parameters used for parrallel running |
2366 | -c************************************************************************* |
2367 | - integer max_host ,maxplace ,maxpoints ,maxans |
2368 | - parameter (max_host=9,maxplace=9,maxpoints=10,maxans=5) |
2369 | - integer maxprb |
2370 | - parameter (maxprb = maxconfigs*maxplace*maxpoints) |
2371 | - integer maxfprb |
2372 | - parameter (maxfprb = maxinvar*maxplace*maxpoints) |
2373 | - |
2374 | - |
2375 | - |
2376 | - |
2377 | - |
2378 | - |
2379 | + integer maxproc, maxamps ,maxflow |
2380 | + parameter (maxproc=100, maxamps=7500,maxflow=999) |
2381 | |
2382 | === removed file 'Template/NLO/Source/hbook.inc' |
2383 | --- Template/NLO/Source/hbook.inc 2012-08-28 21:06:34 +0000 |
2384 | +++ Template/NLO/Source/hbook.inc 1970-01-01 00:00:00 +0000 |
2385 | @@ -1,17 +0,0 @@ |
2386 | -C Internal common blocks for pheno/hbook routines |
2387 | -C |
2388 | -C LABELS(i) = label for histogram i |
2389 | -C nhist = number of histograms (starts as 0, max is 20) |
2390 | -C idnumber(i) = code number to identify histograms in HFILL |
2391 | -C pointer(i) = index of beginning of data for histo # i |
2392 | -C single dim(i) = .true. if single variable, .false. if double |
2393 | -C |
2394 | - parameter (nhistmax=20,nhistmax1=nhistmax+1) |
2395 | - real data(10000),error(10000),npoints(10000) |
2396 | - integer pointer(nhistmax1),id number(nhistmax) |
2397 | - logical single dim(nhistmax) |
2398 | - character*40 label(nhistmax) |
2399 | - |
2400 | - common /hbooklabel/ label |
2401 | - common /hbookarrays/nhist,id number,pointer, |
2402 | - $ single dim,data,error,npoints |
2403 | |
2404 | === removed file 'Template/NLO/Source/hcurve.f' |
2405 | --- Template/NLO/Source/hcurve.f 2012-08-28 21:06:34 +0000 |
2406 | +++ Template/NLO/Source/hcurve.f 1970-01-01 00:00:00 +0000 |
2407 | @@ -1,74 +0,0 @@ |
2408 | -C-------------------------------------------- |
2409 | -C |
2410 | -C Routine to dump histogram data to a file |
2411 | -C |
2412 | - subroutine hcurve(id,filename) |
2413 | -C |
2414 | -C Dumps current histogram number id to file 'filename' and |
2415 | -C clears histogram id. |
2416 | -C |
2417 | - include 'hbook.inc' |
2418 | - character*(*) filename |
2419 | - real sum,npts |
2420 | - |
2421 | - if (nhist .eq. 0) return |
2422 | - open (unit=69,name=filename,status='unknown') |
2423 | - do i = 1, nhist |
2424 | - if (id .eq. idnumber(i)) go to 10 |
2425 | - end do |
2426 | - return |
2427 | -10 continue |
2428 | - k = pointer(i) |
2429 | - nx = int(data(k)+.1) |
2430 | - xmin = data(k+1) |
2431 | - xmax = data(k+2) |
2432 | - xbinsize = (xmax-xmin)/nx |
2433 | - if (single dim(i)) then |
2434 | - sum=0 |
2435 | - npts=0 |
2436 | - do m=1,nx |
2437 | - sum=sum+data(k+2+m) |
2438 | - npts=npts+npoints(k+2+m) |
2439 | - enddo |
2440 | - write (69,300) label(i)(1:labelleng(label(i))) |
2441 | - write (69,700) (xmin+(m-.5)*xbinsize, |
2442 | - $ data(k+2+m),sqrt(abs(error(k+2+m))), |
2443 | - $ npoints(k+2+m)/(npts*sum+1e-23),m=1,nx) |
2444 | - else |
2445 | - ny = int(data(k+3) + .1) |
2446 | - ymin = data(k+4) |
2447 | - ymax = data(k+5) |
2448 | - ybinsize = (ymax-ymin)/ny |
2449 | - write (69,300) label(i)(1:labelleng(label(i))) |
2450 | - k = k + 5 |
2451 | - do n=1,ny |
2452 | - fixed y = ymin + (n-.5)*ybinsize |
2453 | - write (69,500) (xmin+(m-.5)*xbinsize,fixed y, |
2454 | - $ data(k+m),m=1,nx) |
2455 | - write(69,*) |
2456 | - k = k + nx |
2457 | - end do |
2458 | - end if |
2459 | - close (unit=69) |
2460 | - return |
2461 | -300 format ('# Histogram ',a) |
2462 | -400 format (1x,2g15.6) |
2463 | -500 format (1x,3g15.6) |
2464 | -700 format (1x,4g15.6) |
2465 | - end |
2466 | -C |
2467 | -C |
2468 | -C |
2469 | -C |
2470 | - function labelleng(string) |
2471 | - character*(*) string |
2472 | - |
2473 | - do i=len(string),1,-1 |
2474 | - if (string(i:i) .ne. ' ') then |
2475 | - labelleng=i |
2476 | - return |
2477 | - end if |
2478 | - end do |
2479 | - labelleng=1 |
2480 | - return |
2481 | - end |
2482 | |
2483 | === removed file 'Template/NLO/Source/hfill.f' |
2484 | --- Template/NLO/Source/hfill.f 2012-08-28 21:06:34 +0000 |
2485 | +++ Template/NLO/Source/hfill.f 1970-01-01 00:00:00 +0000 |
2486 | @@ -1,37 +0,0 @@ |
2487 | -C---------------------------------------------- |
2488 | -C |
2489 | -C Routine to add zincrement to a bin in a histogram |
2490 | -C |
2491 | - subroutine hfill(id,x,y,zincrement) |
2492 | -C |
2493 | -C id = integer associated with the histogram |
2494 | -C x = x value to locate bin (real) |
2495 | -C y = y value to locate bin (real) [ignored for 1-dim histo] |
2496 | -C zincrement = value to be added to bin specified by (x,y) |
2497 | -C |
2498 | - include 'hbook.inc' |
2499 | - data nhist/0/,pointer(1)/1/ |
2500 | - |
2501 | - do i=1,nhist |
2502 | - if (id number(i) .eq. id) go to 10 |
2503 | - end do |
2504 | - print*,' id number ',id,' does not belong to a current histogram' |
2505 | - return |
2506 | -10 continue |
2507 | - k = pointer(i) |
2508 | - nx=data(k)+.1 |
2509 | - ixoff = (x-data(k+1))/(data(k+2)-data(k+1))*data(k)+1 |
2510 | - if (ixoff .le. 0 .or. ixoff .gt. nx) return |
2511 | - if (single dim(i)) then |
2512 | - data(k+2+ixoff)=data(k+2+ixoff)+zincrement |
2513 | - error(k+2+ixoff)=error(k+2+ixoff)+zincrement**2 |
2514 | - npoints(k+2+ixoff)=npoints(k+2+ixoff)+1. |
2515 | - else |
2516 | - ny=data(k+3)+.1 |
2517 | - iyoff = (y-data(k+4))/(data(k+5)-data(k+4))*data(k+3)+1 |
2518 | - if (iyoff .le. 0 .or. iyoff .gt. ny) return |
2519 | - ioff = nx*(iyoff-1)+ixoff |
2520 | - data(k+5+ioff)=data(k+5+ioff)+zincrement |
2521 | - end if |
2522 | - return |
2523 | - end |
2524 | |
2525 | === removed file 'Template/NLO/Source/invarients.f' |
2526 | --- Template/NLO/Source/invarients.f 2012-08-28 21:06:34 +0000 |
2527 | +++ Template/NLO/Source/invarients.f 1970-01-01 00:00:00 +0000 |
2528 | @@ -1,302 +0,0 @@ |
2529 | - subroutine set_invarients(nfinal,ninvar) |
2530 | -c*************************************************************************** |
2531 | -c Calculates all of the invarients for a 2->n process |
2532 | -c*************************************************************************** |
2533 | - implicit none |
2534 | -c |
2535 | -c Constants |
2536 | -c |
2537 | - include 'genps.inc' |
2538 | -c |
2539 | -c Arguments |
2540 | -c |
2541 | - integer nfinal,ninvar |
2542 | -c |
2543 | -c Local |
2544 | -c |
2545 | - integer ip1,ip2,ipstart,ipstop,np,i |
2546 | - integer ncycle |
2547 | - character*10 buff |
2548 | -c |
2549 | -c Global |
2550 | -c |
2551 | - integer imom(maxinvar),ninvarients |
2552 | - common/to_invarients/imom ,ninvarients |
2553 | -c----- |
2554 | -c Begin Code |
2555 | -c----- |
2556 | - |
2557 | - do i=1,nfinal |
2558 | - imom(i)=i |
2559 | - enddo |
2560 | - ipstart=1 |
2561 | - ipstop =nfinal |
2562 | - np =nfinal |
2563 | -c |
2564 | -c First do all the s-channel |
2565 | -c |
2566 | - do ncycle=2,nfinal-1 |
2567 | - do ip1 = ipstart,ipstop-1 |
2568 | - do ip2=int((real(imom(ip1))/10.-imom(ip1)/10)*10+.1)+1, |
2569 | - $ nfinal |
2570 | - np=np+1 |
2571 | - if (np .gt. maxinvar) then |
2572 | - print*,'Sorry too many invarients',np,ip1,ip2,ncycle |
2573 | - stop |
2574 | - endif |
2575 | - imom(np)=imom(ip1)*10+imom(ip2) |
2576 | - if (imom(np) .lt. 10) then |
2577 | - write(buff,'(a2,i1)') 'S?',imom(np) |
2578 | - elseif (imom(np) .lt. 100) then |
2579 | - write(buff,'(a2,i2)') 'S?',imom(np) |
2580 | - elseif (imom(np) .lt. 1000) then |
2581 | - write(buff,'(a2,i3)') 'S?',imom(np) |
2582 | - elseif (imom(np) .lt. 10000) then |
2583 | - write(buff,'(a2,i4)') 'S?',imom(np) |
2584 | - elseif (imom(np) .lt. 100000) then |
2585 | - write(buff,'(a2,i5)') 'S?',imom(np) |
2586 | - else |
2587 | - write(buff,'(a2,i6)') 'S?',imom(ip1) |
2588 | - endif |
2589 | -c call hbook1(100+np-nfinal,buff,100,0.,1.,0.) |
2590 | -c write(*,'(i4,i6)') np-nfinal,imom(np) |
2591 | - write(*,'(i4,a1,a6)') np-nfinal,'=',buff |
2592 | - if ((np-nfinal)/7 .eq. real(np-nfinal)/7.) write(*,*)' ' |
2593 | - enddo |
2594 | - enddo |
2595 | - ipstart=ipstop+1 |
2596 | - ipstop = np |
2597 | - enddo |
2598 | -c |
2599 | -c Now do the t-channel |
2600 | -c |
2601 | - ipstop = np |
2602 | - do ip1 = 1,ipstop |
2603 | -c write(*,'(i4,a2,i6)') np-nfinal+ip1,'a-',imom(ip1) |
2604 | - if (imom(ip1) .lt. 10) then |
2605 | - write(buff,'(a2,i1)') 'T?',imom(ip1) |
2606 | - elseif (imom(ip1) .lt. 100) then |
2607 | - write(buff,'(a2,i2)') 'T?',imom(ip1) |
2608 | - elseif (imom(ip1) .lt. 1000) then |
2609 | - write(buff,'(a2,i3)') 'T?',imom(ip1) |
2610 | - elseif (imom(ip1) .lt. 10000) then |
2611 | - write(buff,'(a2,i4)') 'T?',imom(ip1) |
2612 | - elseif (imom(ip1) .lt. 100000) then |
2613 | - write(buff,'(a2,i5)') 'T?',imom(ip1) |
2614 | - else |
2615 | - write(buff,'(a2,i6)') 'T?',imom(ip1) |
2616 | - endif |
2617 | -c call hbook1(100+np-nfinal+ip1,buff,100,0.,1.,0.) |
2618 | -c write(*,*) np-nfinal+ip1,buff |
2619 | - write(*,'(i4,a1,a6)') np-nfinal+ip1,'=',buff |
2620 | - if ((np-nfinal+ip1)/7 .eq. real(np-nfinal+ip1)/7.) write(*,*) |
2621 | - enddo |
2622 | - write(*,*) |
2623 | - print*,'Particles, Invarients',nfinal,np-nfinal+np |
2624 | - ninvarients=np-nfinal+np |
2625 | - ninvar=ninvarients |
2626 | - if (ninvarients .gt. maxinvar) then |
2627 | - print*,'Error too many invarients to map' |
2628 | -c stop |
2629 | - endif |
2630 | - end |
2631 | - |
2632 | - |
2633 | - subroutine fill_invarients(nfinal,p1,s,xx) |
2634 | -c*************************************************************************** |
2635 | -c Calculates all of the invarients for a 2->n process |
2636 | -c*************************************************************************** |
2637 | - implicit none |
2638 | -c |
2639 | -c Constants |
2640 | -c |
2641 | - include 'genps.inc' |
2642 | -c |
2643 | -c Arguments |
2644 | -c |
2645 | - integer nfinal |
2646 | - double precision p1(0:3,nfinal+2),s,xx(55) |
2647 | -c |
2648 | -c Local |
2649 | -c |
2650 | - integer ip1,ip2,ipstart,ipstop,np,i,j |
2651 | - integer imom(maxinvar) |
2652 | - integer ncycle |
2653 | - character*10 buff |
2654 | - double precision p(0:3,maxinvar),ptemp(0:3) |
2655 | -c |
2656 | -c External |
2657 | -c |
2658 | - double precision dot |
2659 | - external dot |
2660 | -c----- |
2661 | -c Begin Code |
2662 | -c----- |
2663 | - |
2664 | - do i=1,nfinal |
2665 | - imom(i) = i |
2666 | - do j=0,3 |
2667 | - p(j,i)=p1(j,i+2) |
2668 | - enddo |
2669 | -c write(*,'(i3,4f17.8)') i,(p(j,i),j=0,3) |
2670 | - enddo |
2671 | - ipstart=1 |
2672 | - ipstop =nfinal |
2673 | - np =nfinal |
2674 | -c |
2675 | -c First do all the s-channel |
2676 | -c |
2677 | - do ncycle=2,nfinal-1 |
2678 | - do ip1 = ipstart,ipstop-1 |
2679 | - do ip2=int((real(imom(ip1))/10.-imom(ip1)/10)*10+.1)+1 |
2680 | - $ ,nfinal |
2681 | - np=np+1 |
2682 | - if (np .gt. maxinvar) then |
2683 | - print*,'Sorry too many invarients',np,ip1,ip2,ncycle |
2684 | - stop |
2685 | - endif |
2686 | - imom(np)=imom(ip1)*10+imom(ip2) |
2687 | - do j=0,3 |
2688 | - p(j,np) = p(j,ip1)+p(j,ip2) |
2689 | - enddo |
2690 | - xx(np-nfinal) = dot(p(0,np),p(0,np))/s |
2691 | -c call hfill(100+np-nfinal, |
2692 | -c & real(dot(p(0,np),p(0,np))/s),0.,wgt) |
2693 | -c write(*,'(i4,3f20.8)') np-nfinal, |
2694 | -c & real(dot(p(0,np),p(0,np))/s) |
2695 | - enddo |
2696 | - enddo |
2697 | - ipstart=ipstop+1 |
2698 | - ipstop = np |
2699 | - enddo |
2700 | -c |
2701 | -c Now do the t-channel |
2702 | -c |
2703 | - ipstop = np |
2704 | - do ip1 = 1,ipstop |
2705 | - do j = 0,3 |
2706 | - ptemp(j)=p1(j,1)-p(j,ip1) |
2707 | - enddo |
2708 | - xx(np-nfinal+ip1)= .5d0*(dot(ptemp,ptemp)/s+1d0) |
2709 | -c call hfill(100+np-nfinal+ip1,real(-dot(ptemp,ptemp)/s),0.,wgt) |
2710 | -c write(*,'(i4,3f20.8)') np-nfinal+ip1, |
2711 | -c & real(-dot(ptemp,ptemp)/s) |
2712 | - enddo |
2713 | - end |
2714 | - |
2715 | - |
2716 | - subroutine map_invarients(Minvar,nconfigs,ninvar,mincfig,maxcfig,nexternal,nincoming) |
2717 | -c**************************************************************************** |
2718 | -c Determines mappings for each structure of invarients onto integration |
2719 | -c variables. Input: Ninvar, iforest. Output: Minvar, ninvar |
2720 | -c**************************************************************************** |
2721 | - implicit none |
2722 | -c |
2723 | -c Constants |
2724 | -c |
2725 | - include 'genps.inc' |
2726 | -c |
2727 | -c Arguments |
2728 | -c |
2729 | - integer Minvar(maxdim,lmaxconfigs),nconfigs,ninvar,nexternal,nincoming |
2730 | - integer mincfig,maxcfig |
2731 | -c |
2732 | -c Local |
2733 | -c |
2734 | - integer iconfig, jgrid,j, nbranch |
2735 | - logical found,tchannel |
2736 | -c |
2737 | -c Global |
2738 | -c |
2739 | - integer imom(maxinvar),ninvarients |
2740 | - common/to_invarients/imom ,ninvarients |
2741 | - integer iforest(2,-max_branch:-1,lmaxconfigs) |
2742 | - common/to_forest/ iforest |
2743 | - |
2744 | -c----- |
2745 | -c Begin Code |
2746 | -c---- |
2747 | - |
2748 | - nbranch = nexternal-2 |
2749 | - jgrid=0 |
2750 | -c |
2751 | -c |
2752 | -c Try simple mapping if nconfigs = 1 |
2753 | -c |
2754 | - |
2755 | - if (nconfigs .eq. 1) then |
2756 | - do j=1,3*nbranch-4+2 |
2757 | - minvar(j,mincfig)=j |
2758 | - enddo |
2759 | - jgrid=j-1 |
2760 | - else |
2761 | -c if (ep) jgrid=1 |
2762 | -c if (pp) jgrid=2 |
2763 | - do iconfig=mincfig,maxcfig |
2764 | - tchannel = .false. |
2765 | - do j=1,nbranch-1 |
2766 | - if (iforest(1,-j,iconfig) .eq. 1) then |
2767 | - tchannel=.true. |
2768 | - endif |
2769 | - jgrid=jgrid+1 |
2770 | - minvar(j,iconfig) = jgrid |
2771 | - if (tchannel .and. j .lt. nbranch-1) then |
2772 | - jgrid=jgrid+1 |
2773 | - minvar(nbranch-1+2*j,iconfig)=jgrid |
2774 | - endif |
2775 | - enddo !Each Branch |
2776 | - if (.not. tchannel .and. nincoming.eq.2) then !Don't need last s-channel |
2777 | - jgrid=jgrid-1 |
2778 | - minvar(nbranch-1,iconfig)=0 |
2779 | - endif |
2780 | -c if (pp) then |
2781 | -c jgrid=jgrid+1 |
2782 | -c minvar(3*nbranch-3,iconfig)=jgrid |
2783 | -c jgrid=jgrid+1 |
2784 | -c minvar(3*nbranch-2,iconfig)=jgrid |
2785 | -c elseif (ep) then |
2786 | -c jgrid=jgrid+1 |
2787 | -c minvar(3*nbranch-3,iconfig)=jgrid |
2788 | -c endif |
2789 | - enddo !Each configurations |
2790 | - endif |
2791 | - ninvar = jgrid |
2792 | - end |
2793 | - |
2794 | - subroutine sortint(n,ra) |
2795 | - integer ra(n) |
2796 | - l=n/2+1 |
2797 | - ir=n |
2798 | -10 continue |
2799 | - if(l.gt.1)then |
2800 | - l=l-1 |
2801 | - rra=ra(l) |
2802 | - else |
2803 | - rra=ra(ir) |
2804 | - ra(ir)=ra(1) |
2805 | - ir=ir-1 |
2806 | - if(ir.eq.1)then |
2807 | - ra(1)=rra |
2808 | - return |
2809 | - endif |
2810 | - endif |
2811 | - i=l |
2812 | - j=l+l |
2813 | -20 if(j.le.ir)then |
2814 | - if(j.lt.ir)then |
2815 | - if(ra(j).lt.ra(j+1))j=j+1 |
2816 | - endif |
2817 | - if(rra.lt.ra(j))then |
2818 | - ra(i)=ra(j) |
2819 | - i=j |
2820 | - j=j+j |
2821 | - else |
2822 | - j=ir+1 |
2823 | - endif |
2824 | - go to 20 |
2825 | - endif |
2826 | - ra(i)=rra |
2827 | - go to 10 |
2828 | - end |
2829 | - |
2830 | - |
2831 | |
2832 | === removed file 'Template/NLO/Source/leshouche.inc' |
2833 | --- Template/NLO/Source/leshouche.inc 2012-08-28 21:06:34 +0000 |
2834 | +++ Template/NLO/Source/leshouche.inc 1970-01-01 00:00:00 +0000 |
2835 | @@ -1,8 +0,0 @@ |
2836 | - DATA (IDUP(I,1),I=1,5)/-1,2,-11,12,21/ |
2837 | - DATA (MOTHUP(1,I, 1),I=1, 5)/ 0, 0, 1, 1, 1/ |
2838 | - DATA (MOTHUP(2,I, 1),I=1, 5)/ 0, 0, 2, 2, 2/ |
2839 | - DATA (ICOLUP(1,I, 1),I=1, 5)/ 0,502, 0, 0,502/ |
2840 | - DATA (ICOLUP(2,I, 1),I=1, 5)/501, 0, 0, 0,501/ |
2841 | - DATA (IDUP(I,2),I=1,5)/-3,4,-11,12,21/ |
2842 | - DATA (MOTHUP(1,I, 2),I=1, 5)/ 0, 0, 1, 1, 1/ |
2843 | - DATA (MOTHUP(2,I, 2),I=1, 5)/ 0, 0, 2, 2, 2/ |
2844 | |
2845 | === modified file 'Template/NLO/Source/makefile' |
2846 | --- Template/NLO/Source/makefile 2015-07-14 18:21:29 +0000 |
2847 | +++ Template/NLO/Source/makefile 2017-05-24 22:17:46 +0000 |
2848 | @@ -8,33 +8,19 @@ |
2849 | IREGIDIR= ./IREGI/src/ |
2850 | STDHEPDIR= ./StdHEP/ |
2851 | |
2852 | -PROCESS= hfill.o matrix.o myamp.o |
2853 | - |
2854 | -HBOOK = hfill.o hcurve.o hbook1.o hbook2.o |
2855 | - |
2856 | -GENERIC = $(alfas_functions).o invarients.o hfill.o pawgraphs.o ran1.o rw_events.o rw_routines.o kin_functions.o \ |
2857 | - open_file.o basecode.o setrun.o run_printout.o dgauss.o ranmar.o getissud.o |
2858 | - |
2859 | -INCLUDEF= coupl.inc genps.inc hbook.inc psample.inc pmass.inc nexternal.inc cluster.inc |
2860 | - |
2861 | -BANNER = write_banner.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o |
2862 | - |
2863 | -COMBINE = combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o |
2864 | - |
2865 | - |
2866 | +PROCESS= matrix.o myamp.o |
2867 | + |
2868 | +GENERIC = $(alfas_functions).o rw_routines.o kin_functions.o setrun.o \ |
2869 | + run_printout.o dgauss.o ranmar.o getissud.o |
2870 | + |
2871 | +INCLUDEF = coupl.inc pmass.inc cluster.inc |
2872 | |
2873 | .f.o: ; $(FC) $(FFLAGS) -c $*.f |
2874 | |
2875 | -all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a \ |
2876 | - param_card.inc |
2877 | +all: $(LIBDIR)libdhelas.a $(LIBDIR)libgeneric.a $(LIBDIR)libpdf.a \ |
2878 | + $(LIBDIR)libmodel.a $(LIBDIR)libcernlib.a param_card.inc |
2879 | rm -f PDF/*.o |
2880 | |
2881 | -scaled.dat: |
2882 | - combine_events |
2883 | - |
2884 | -$(BINDIR)sum_html: sum_html.o |
2885 | - $(FC) $(FFLAGS) -o sum_html sum_html.o |
2886 | - mv sum_html $(BINDIR) |
2887 | |
2888 | $(LIBDIR)libdhelas.a: DHELAS |
2889 | rm -f $(LIBDIR)libdhelas.a |
2890 | @@ -62,23 +48,12 @@ |
2891 | rm -f $(LIBDIR)libmodel.a |
2892 | cd MODEL; make |
2893 | |
2894 | -genps.inc: nexternal.inc |
2895 | - touch genps.inc |
2896 | - |
2897 | run_card.inc: ../Cards/run_card.dat |
2898 | ../bin/aMCatNLO treatcards run |
2899 | |
2900 | param_card.inc: ../Cards/param_card.dat |
2901 | ../bin/aMCatNLO treatcards param |
2902 | |
2903 | -$(BINDIR)gen_ximprove: gen_ximprove.o ranmar.o rw_routines.o open_file.o |
2904 | - $(FC) $(FFLAGS) -o gen_ximprove gen_ximprove.o ranmar.o rw_routines.o open_file.o |
2905 | - mv gen_ximprove $(BINDIR) |
2906 | - |
2907 | -$(BINDIR)combine_events: $(COMBINE) |
2908 | - $(FC) $(FFLAGS) -o combine_events $(COMBINE) $(LIBDIR)/libmodel.a $(LIBDIR)/libpdf.a |
2909 | - mv combine_events $(BINDIR) |
2910 | - |
2911 | CutTools: $(LIBDIR)libcts.a |
2912 | libcuttools: $(LIBDIR)libcts.a |
2913 | |
2914 | @@ -128,4 +103,3 @@ |
2915 | if [ -d $(CUTTOOLSDIR) ]; then cd $(CUTTOOLSDIR); make clean; cd ..; fi |
2916 | if [ -d $(IREGIDIR) ]; then cd $(IREGIDIR); make clean; cd ..; fi |
2917 | if [ -d $(STDHEPDIR) ]; then cd $(STDHEPDIR); make clean; cd ..; fi |
2918 | - rm -f $(BINDIR)/combine_events $(BINDIR)/gen_ximprove |
2919 | |
2920 | === modified file 'Template/NLO/Source/nexternal.inc' |
2921 | --- Template/NLO/Source/nexternal.inc 2012-08-28 21:06:34 +0000 |
2922 | +++ Template/NLO/Source/nexternal.inc 2017-05-24 22:17:46 +0000 |
2923 | @@ -1,4 +0,0 @@ |
2924 | - INTEGER NEXTERNAL |
2925 | - PARAMETER (NEXTERNAL=5) |
2926 | - INTEGER NINCOMING |
2927 | - PARAMETER (NINCOMING=2) |
2928 | |
2929 | === removed file 'Template/NLO/Source/open_file.f' |
2930 | --- Template/NLO/Source/open_file.f 2012-08-28 21:06:34 +0000 |
2931 | +++ Template/NLO/Source/open_file.f 1970-01-01 00:00:00 +0000 |
2932 | @@ -1,46 +0,0 @@ |
2933 | - subroutine open_file(lun,filename,fopened) |
2934 | -c*********************************************************************** |
2935 | -c opens file input-card.dat in current directory or above |
2936 | -c*********************************************************************** |
2937 | - implicit none |
2938 | -c |
2939 | -c Arguments |
2940 | -c |
2941 | - integer lun |
2942 | - logical fopened |
2943 | - character*(*) filename |
2944 | - character*90 tempname |
2945 | - integer fine |
2946 | - integer i |
2947 | - |
2948 | -c----- |
2949 | -c Begin Code |
2950 | -c----- |
2951 | -c |
2952 | -c first check that we will end in the main directory |
2953 | -c |
2954 | - |
2955 | -c |
2956 | -c if I have to read a card |
2957 | -c |
2958 | - |
2959 | - tempname=filename |
2960 | - fine=index(tempname,' ') |
2961 | - if(fine.eq.0) fine=len(tempname) |
2962 | - |
2963 | - if(index(filename,"_card").gt.0) then |
2964 | - tempname='Cards/'//tempname(1:fine) |
2965 | - fine=fine+6 |
2966 | - endif |
2967 | - |
2968 | - fopened=.false. |
2969 | - do i=0,5 |
2970 | - open(unit=lun,file=tempname,status='old',ERR=30) |
2971 | - fopened=.true. |
2972 | - exit |
2973 | - 30 tempname='../'//tempname |
2974 | - if (i.eq.5)then |
2975 | - write(*,*) 'Warning: file ',filename,' not found' |
2976 | - endif |
2977 | - enddo |
2978 | - end |
2979 | |
2980 | === removed file 'Template/NLO/Source/pawgraphs.f' |
2981 | --- Template/NLO/Source/pawgraphs.f 2012-08-28 21:06:34 +0000 |
2982 | +++ Template/NLO/Source/pawgraphs.f 1970-01-01 00:00:00 +0000 |
2983 | @@ -1,83 +0,0 @@ |
2984 | - subroutine graph_init |
2985 | -c************************************************************************* |
2986 | -c Set up graphing |
2987 | -c************************************************************************* |
2988 | - implicit none |
2989 | -c |
2990 | -c Local |
2991 | -c |
2992 | - real xmin,xmax |
2993 | -c |
2994 | -c Global |
2995 | -c |
2996 | - real h(80000) |
2997 | - common/pawc/h |
2998 | -c----- |
2999 | -c Begin Code |
3000 | -c----- |
3001 | -c call hlimit(80000) |
3002 | -c |
3003 | -c Total |
3004 | -c |
3005 | -c print*,'Setting up graphs' |
3006 | -c call hbook1(1,'s hat',100,0.,500.,0.) |
3007 | - end |
3008 | - |
3009 | - subroutine graph_point2(x,y) |
3010 | - double precision x,y |
3011 | - end |
3012 | - |
3013 | - |
3014 | - subroutine graph_point(p,dwgt) |
3015 | -c*************************************************************************** |
3016 | -c fill historgrams |
3017 | -c*************************************************************************** |
3018 | - implicit none |
3019 | -c |
3020 | -c Constants |
3021 | -c |
3022 | - double precision pi , to_deg |
3023 | - parameter (pi = 3.1415927d0, to_deg=180d0/pi) |
3024 | -c |
3025 | -c Arguments |
3026 | -c |
3027 | - double precision dwgt |
3028 | - REAL*8 P(0:3,7) |
3029 | -c |
3030 | -c Local |
3031 | -c |
3032 | - real*4 wgt |
3033 | - real*8 ptot(0:3),maxamp, shat |
3034 | - integer i,iconfig, imax |
3035 | -c |
3036 | -c Global |
3037 | -c |
3038 | - include 'run.inc' |
3039 | - |
3040 | -c |
3041 | -c External |
3042 | -c |
3043 | - double precision dot,et,eta,r2 |
3044 | -c----- |
3045 | -c Begin Code |
3046 | -c----- |
3047 | - wgt=dwgt |
3048 | -c call hfill(1,real(et(p(0,4))),0.,wgt) |
3049 | - end |
3050 | - |
3051 | - subroutine graph_store |
3052 | -c************************************************************************* |
3053 | -c Stores graphs |
3054 | -c************************************************************************* |
3055 | - implicit none |
3056 | - |
3057 | -c----- |
3058 | -c Begin Code |
3059 | -c----- |
3060 | -c call hcurve(1,'shat.dat') |
3061 | -c call hrput(0,'wg.paw','N') |
3062 | - end |
3063 | - |
3064 | - |
3065 | - |
3066 | - |
3067 | |
3068 | === removed file 'Template/NLO/Source/psample.inc' |
3069 | --- Template/NLO/Source/psample.inc 2012-08-28 21:06:34 +0000 |
3070 | +++ Template/NLO/Source/psample.inc 1970-01-01 00:00:00 +0000 |
3071 | @@ -1,9 +0,0 @@ |
3072 | -c |
3073 | -c Global variables used by psample |
3074 | -c |
3075 | - integer ihost(max_host),npnts,nans,icpu(max_host) |
3076 | - integer ierror(max_host) |
3077 | - character*30 hostname(max_host),program |
3078 | - common /sample_machine/ ihost,icpu,ierror,npnts,nans, |
3079 | - & hostname,program |
3080 | - |
3081 | |
3082 | === removed file 'Template/NLO/Source/ran1.f' |
3083 | --- Template/NLO/Source/ran1.f 2012-08-28 21:06:34 +0000 |
3084 | +++ Template/NLO/Source/ran1.f 1970-01-01 00:00:00 +0000 |
3085 | @@ -1,33 +0,0 @@ |
3086 | - function xran1(idum) |
3087 | - dimension r(97) |
3088 | - parameter (m1=259200,ia1=7141,ic1=54773,rm1=3.8580247e-6) |
3089 | - parameter (m2=134456,ia2=8121,ic2=28411,rm2=7.4373773e-6) |
3090 | - parameter (m3=243000,ia3=4561,ic3=51349) |
3091 | - data iff /0/ |
3092 | - save r, ix1,ix2,ix3 |
3093 | - if (idum.lt.0.or.iff.eq.0) then |
3094 | - iff=1 |
3095 | - ix1=mod(ic1-idum,m1) |
3096 | - ix1=mod(ia1*ix1+ic1,m1) |
3097 | - ix2=mod(ix1,m2) |
3098 | - ix1=mod(ia1*ix1+ic1,m1) |
3099 | - ix3=mod(ix1,m3) |
3100 | - do 11 j=1,97 |
3101 | - ix1=mod(ia1*ix1+ic1,m1) |
3102 | - ix2=mod(ia2*ix2+ic2,m2) |
3103 | - r(j)=(float(ix1)+float(ix2)*rm2)*rm1 |
3104 | -11 continue |
3105 | - idum=1 |
3106 | - endif |
3107 | - ix1=mod(ia1*ix1+ic1,m1) |
3108 | - ix2=mod(ia2*ix2+ic2,m2) |
3109 | - ix3=mod(ia3*ix3+ic3,m3) |
3110 | - j=1+(97*ix3)/m3 |
3111 | - if(j.gt.97.or.j.lt.1)then |
3112 | - write(*,*) 'j is bad in ran1.f',j, 97d0*ix3/m3 |
3113 | - STOP |
3114 | - endif |
3115 | - xran1=r(j) |
3116 | - r(j)=(float(ix1)+float(ix2)*rm2)*rm1 |
3117 | - return |
3118 | - end |
3119 | |
3120 | === removed file 'Template/NLO/Source/rw_events.f' |
3121 | --- Template/NLO/Source/rw_events.f 2012-08-28 21:06:34 +0000 |
3122 | +++ Template/NLO/Source/rw_events.f 1970-01-01 00:00:00 +0000 |
3123 | @@ -1,159 +0,0 @@ |
3124 | - subroutine read_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff2,done) |
3125 | -c******************************************************************** |
3126 | -c Reads one event from data file #lun |
3127 | -c ic(*,1) = Particle ID |
3128 | -c ic(*,2) = Mothup(1) |
3129 | -c ic(*,3) = Mothup(2) |
3130 | -c ic(*,4) = ICOLUP(1) |
3131 | -c ic(*,5) = ICOLUP(2) |
3132 | -c ic(*,6) = ISTUP -1=initial state +1=final +2=decayed |
3133 | -c ic(*,7) = Helicity |
3134 | -c******************************************************************** |
3135 | - implicit none |
3136 | - |
3137 | - double precision pi |
3138 | - parameter (pi = 3.1415926d0) |
3139 | -c |
3140 | -c Arguments |
3141 | -c |
3142 | - integer lun |
3143 | - integer nexternal, ic(7,*) |
3144 | - logical done |
3145 | - double precision P(0:4,*),wgt,aqcd,aqed,scale |
3146 | - integer ievent |
3147 | - character*140 buff2 |
3148 | -c |
3149 | -c Local |
3150 | -c |
3151 | - integer i,j,k |
3152 | - character*(256) buff |
3153 | - double precision xdum1,xdum2 |
3154 | -c |
3155 | -c Global |
3156 | -c |
3157 | - logical banner_open |
3158 | - integer lun_ban |
3159 | - common/to_banner/banner_open, lun_ban |
3160 | - |
3161 | - data lun_ban/37/ |
3162 | - data banner_open/.false./ |
3163 | -c----- |
3164 | -c Begin Code |
3165 | -c----- |
3166 | - buff2=' ' |
3167 | - done=.false. |
3168 | - if (.not. banner_open) then |
3169 | - open (unit=lun_ban, status='scratch') |
3170 | - banner_open=.true. |
3171 | - endif |
3172 | - 11 read(lun,'(a256)',end=99,err=99) buff |
3173 | - do while(index(buff,"<event") .eq. 0) |
3174 | - write(lun_ban,'(a)') buff |
3175 | - read(lun,'(a256)',end=99,err=99) buff |
3176 | - enddo |
3177 | - read(lun,*,err=11, end=11) nexternal,ievent,wgt,scale,aqed,aqcd |
3178 | - do i=1,nexternal |
3179 | - read(lun,*,err=99,end=99) ic(1,i),ic(6,i),(ic(j,i),j=2,5), |
3180 | - $ (p(j,i),j=1,3),p(0,i),p(4,i),xdum1,xdum2 |
3181 | - ic(7,i)=xdum2 |
3182 | - enddo |
3183 | - do while(index(buff,"</event") .eq. 0) |
3184 | - read(lun,'(a256)',end=99,err=99) buff |
3185 | - if(buff(1:1).eq.'#') buff2=buff(1:140) |
3186 | - enddo |
3187 | -c gal(1) = sqrt(4d0*pi*aqed) |
3188 | -c g = sqrt(4d0*pi*aqcd) |
3189 | - return |
3190 | - 99 done=.true. |
3191 | - return |
3192 | - 55 format(i3,5e19.11) |
3193 | - end |
3194 | - |
3195 | - subroutine write_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,buff) |
3196 | -c******************************************************************** |
3197 | -c Writes one event from data file #lun according to LesHouches |
3198 | -c ic(1,*) = Particle ID |
3199 | -c ic(2.*) = Mothup(1) |
3200 | -c ic(3,*) = Mothup(2) |
3201 | -c ic(4,*) = ICOLUP(1) |
3202 | -c ic(5,*) = ICOLUP(2) |
3203 | -c ic(6,*) = ISTUP -1=initial state +1=final +2=decayed |
3204 | -c ic(7,*) = Helicity |
3205 | -c******************************************************************** |
3206 | - implicit none |
3207 | -c |
3208 | -c parameters |
3209 | -c |
3210 | - double precision pi |
3211 | - parameter (pi = 3.1415926d0) |
3212 | -c |
3213 | -c Arguments |
3214 | -c |
3215 | - integer lun, ievent |
3216 | - integer nexternal, ic(7,*) |
3217 | - double precision P(0:4,*),wgt |
3218 | - double precision aqcd, aqed, scale |
3219 | - character*140 buff |
3220 | -c |
3221 | -c Local |
3222 | -c |
3223 | - integer i,j,k |
3224 | -c |
3225 | -c Global |
3226 | -c |
3227 | - |
3228 | -c----- |
3229 | -c Begin Code |
3230 | -c----- |
3231 | -c aqed= gal(1)*gal(1)/4d0/pi |
3232 | -c aqcd = g*g/4d0/pi |
3233 | - |
3234 | - write(lun,'(a)') '<event>' |
3235 | - write(lun,'(i2,i4,4e15.7)') nexternal,ievent,wgt,scale,aqed,aqcd |
3236 | - do i=1,nexternal |
3237 | - write(lun,51) ic(1,i),ic(6,i),(ic(j,i),j=2,5), |
3238 | - $ (p(j,i),j=1,3),p(0,i),p(4,i),0.,real(ic(7,i)) |
3239 | - enddo |
3240 | - if(buff(1:1).eq.'#') write(lun,'(a)') buff(1:len_trim(buff)) |
3241 | - write(lun,'(a)') '</event>' |
3242 | - return |
3243 | - 51 format(i9,5i5,5e19.11,f3.0,f4.0) |
3244 | - end |
3245 | - |
3246 | - subroutine write_comments(lun) |
3247 | -c******************************************************************** |
3248 | -c Outputs all of the banner comment lines back at the top of |
3249 | -c the file lun. |
3250 | -c******************************************************************** |
3251 | - implicit none |
3252 | -c |
3253 | -c Arguments |
3254 | -c |
3255 | - integer lun |
3256 | -c |
3257 | -c Local |
3258 | -c |
3259 | - character*(80) buff |
3260 | -c |
3261 | -c Global |
3262 | -c |
3263 | - logical banner_open |
3264 | - integer lun_ban |
3265 | - common/to_banner/banner_open, lun_ban |
3266 | - |
3267 | -c----- |
3268 | -c Begin Code |
3269 | -c----- |
3270 | -c write(*,*) 'Writing comments' |
3271 | - if (banner_open) then |
3272 | - rewind(lun_ban) |
3273 | - do while (.true.) |
3274 | - read(lun_ban,'(a79)',end=99,err=99) buff |
3275 | - write(lun,'(a79)') buff |
3276 | -c write(*,*) buff |
3277 | - enddo |
3278 | - 99 close(lun_ban) |
3279 | - banner_open = .false. |
3280 | - endif |
3281 | - end |
3282 | - |
3283 | |
3284 | === removed file 'Template/NLO/Source/rw_events.short.f' |
3285 | --- Template/NLO/Source/rw_events.short.f 2012-08-28 21:06:34 +0000 |
3286 | +++ Template/NLO/Source/rw_events.short.f 1970-01-01 00:00:00 +0000 |
3287 | @@ -1,162 +0,0 @@ |
3288 | - subroutine read_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,done) |
3289 | -c******************************************************************** |
3290 | -c Reads one event from data file #lun |
3291 | -c ic(*,1) = Particle ID |
3292 | -c ic(*,2) = Mothup(1) |
3293 | -c ic(*,3) = Mothup(2) |
3294 | -c ic(*,4) = ICOLUP(1) |
3295 | -c ic(*,5) = ICOLUP(2) |
3296 | -c ic(*,6) = ISTUP -1=initial state +1=final +2=decayed |
3297 | -c ic(*,7) = Helicity |
3298 | -c******************************************************************** |
3299 | - implicit none |
3300 | -c |
3301 | -c parameters |
3302 | -c |
3303 | - integer MaxParticles |
3304 | - parameter (MaxParticles=15) |
3305 | - double precision pi |
3306 | - parameter (pi = 3.1415926d0) |
3307 | -c |
3308 | -c Arguments |
3309 | -c |
3310 | - integer lun |
3311 | - integer nexternal, ic(7,MaxParticles) |
3312 | - logical done |
3313 | - double precision P(0:3,MaxParticles),wgt,aqcd,aqed,scale |
3314 | - integer ievent |
3315 | -c |
3316 | -c Local |
3317 | -c |
3318 | - integer i,j,k |
3319 | - character*(132) buff |
3320 | -c |
3321 | -c Global |
3322 | -c |
3323 | -c include 'coupl.inc' |
3324 | -c real*8 scale |
3325 | -c logical fixed_ren_scale,fixed_fac_scale |
3326 | -c common/to_scale/scale,fixed_ren_scale,fixed_fac_scale |
3327 | - |
3328 | - logical banner_open |
3329 | - integer lun_ban |
3330 | - common/to_banner/banner_open, lun_ban |
3331 | - |
3332 | - data lun_ban/37/ |
3333 | - data banner_open/.false./ |
3334 | -c----- |
3335 | -c Begin Code |
3336 | -c----- |
3337 | - done=.false. |
3338 | - if (.not. banner_open) then |
3339 | - open (unit=lun_ban, status='scratch') |
3340 | - banner_open=.true. |
3341 | - endif |
3342 | - 11 read(lun,'(a132)',end=99,err=99) buff |
3343 | - do while(index(buff,"#") .ne. 0) |
3344 | - write(lun_ban,'(a)') buff |
3345 | - read(lun,'(a132)',end=99,err=99) buff |
3346 | - enddo |
3347 | - read(buff,*,err=11, end=11) nexternal,k,wgt,scale,aqed,aqcd |
3348 | - do j=1,7 |
3349 | - read(lun,*,err=99,end=99) (ic(j,i),i=1,nexternal)!This is info |
3350 | - enddo |
3351 | - do j=1,nexternal |
3352 | - read(lun,55,err=99,end=99) k,(p(i,j),i=0,3) |
3353 | - enddo |
3354 | -c gal(1) = sqrt(4d0*pi*aqed) |
3355 | -c g = sqrt(4d0*pi*aqcd) |
3356 | - return |
3357 | - 99 done=.true. |
3358 | - return |
3359 | - 55 format(i3,4e19.11) |
3360 | - end |
3361 | - |
3362 | - subroutine write_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed) |
3363 | -c******************************************************************** |
3364 | -c Writes one event from data file #lun according to LesHouches |
3365 | -c ic(*,1) = Particle ID |
3366 | -c ic(*,2) = Mothup(1) |
3367 | -c ic(*,3) = Mothup(2) |
3368 | -c ic(*,4) = ICOLUP(1) |
3369 | -c ic(*,5) = ICOLUP(2) |
3370 | -c ic(*,6) = ISTUP -1=initial state +1=final +2=decayed |
3371 | -c ic(*,7) = Helicity |
3372 | -c******************************************************************** |
3373 | - implicit none |
3374 | -c |
3375 | -c parameters |
3376 | -c |
3377 | - integer MaxParticles |
3378 | - parameter (MaxParticles=15) |
3379 | - double precision pi |
3380 | - parameter (pi = 3.1415926d0) |
3381 | -c |
3382 | -c Arguments |
3383 | -c |
3384 | - integer lun, ievent |
3385 | - integer nexternal, ic(7,MaxParticles) |
3386 | - double precision P(0:3,MaxParticles),wgt |
3387 | - double precision aqcd, aqed, scale |
3388 | -c |
3389 | -c Local |
3390 | -c |
3391 | - integer i,j,k |
3392 | -c |
3393 | -c Global |
3394 | -c |
3395 | - |
3396 | -c----- |
3397 | -c Begin Code |
3398 | -c----- |
3399 | -c aqed= gal(1)*gal(1)/4d0/pi |
3400 | -c aqcd = g*g/4d0/pi |
3401 | - write(lun,'(2i8,4e15.7)') nexternal,ievent,wgt,scale,aqed,aqcd |
3402 | - do j=1,7 |
3403 | - write(lun,51) (ic(j,i),i=1,nexternal) !This is info |
3404 | - enddo |
3405 | - do j=1,nexternal |
3406 | - write(lun,55) j,(p(i,j),i=0,3) |
3407 | - enddo |
3408 | - return |
3409 | - 51 format(19i5) |
3410 | - 55 format(i3,4e19.11) |
3411 | - end |
3412 | - |
3413 | - subroutine write_comments(lun) |
3414 | -c******************************************************************** |
3415 | -c Outputs all of the banner comment lines back at the top of |
3416 | -c the file lun. |
3417 | -c******************************************************************** |
3418 | - implicit none |
3419 | -c |
3420 | -c Arguments |
3421 | -c |
3422 | - integer lun |
3423 | -c |
3424 | -c Local |
3425 | -c |
3426 | - character*(80) buff |
3427 | -c |
3428 | -c Global |
3429 | -c |
3430 | - logical banner_open |
3431 | - integer lun_ban |
3432 | - common/to_banner/banner_open, lun_ban |
3433 | - |
3434 | -c----- |
3435 | -c Begin Code |
3436 | -c----- |
3437 | -c write(*,*) 'Writing comments' |
3438 | - if (banner_open) then |
3439 | - rewind(lun_ban) |
3440 | - do while (.true.) |
3441 | - read(lun_ban,'(a79)',end=99,err=99) buff |
3442 | - write(lun,'(a79)') buff |
3443 | -c write(*,*) buff |
3444 | - enddo |
3445 | - 99 close(lun_ban) |
3446 | - banner_open = .false. |
3447 | - endif |
3448 | - end |
3449 | - |
3450 | |
3451 | === modified file 'Template/NLO/Source/rw_routines.f' |
3452 | --- Template/NLO/Source/rw_routines.f 2015-01-06 11:33:59 +0000 |
3453 | +++ Template/NLO/Source/rw_routines.f 2017-05-24 22:17:46 +0000 |
3454 | @@ -1,391 +1,3 @@ |
3455 | - subroutine load_para(npara,param,value) |
3456 | -c---------------------------------------------------------------------- |
3457 | -c Read the params from the run_card.dat file |
3458 | -c---------------------------------------------------------------------- |
3459 | - implicit none |
3460 | -c |
3461 | -c arguments |
3462 | -c |
3463 | - character*20 param(*),value(*) |
3464 | - integer npara |
3465 | -c |
3466 | -c local |
3467 | -c |
3468 | - logical fopened,done |
3469 | - integer iunit |
3470 | - character*20 ctemp |
3471 | - integer k,i,l1,l2,iproc |
3472 | - character*132 buff |
3473 | - data iunit/21/ |
3474 | -c |
3475 | -c global |
3476 | -c |
3477 | - integer ngroup |
3478 | - common/to_group/ngroup |
3479 | -c |
3480 | -c---------- |
3481 | -c start |
3482 | -c---------- |
3483 | -c |
3484 | -c read the run_card.dat |
3485 | -c |
3486 | - npara=0 |
3487 | - param(1)=' ' |
3488 | - value(1)=' ' |
3489 | -c |
3490 | -c open file |
3491 | -c |
3492 | - call open_file(iunit,'run_card.dat',fopened) |
3493 | - if(.not.fopened) then |
3494 | - write(*,*) 'Error: File run_card.dat not found' |
3495 | - stop |
3496 | - else |
3497 | -c |
3498 | -c first look for process-specific parameters |
3499 | -c |
3500 | - done=.false. |
3501 | - do while(.not.done) |
3502 | - read(iunit,'(a132)',end=20,err=20) buff |
3503 | - if(buff(1:1).ne.'#' .and. index(buff,"=").gt.0 |
3504 | - $ .and. index(buff,"@").gt.0) then |
3505 | - l1=index(buff,"@") |
3506 | - l2=index(buff,"!") |
3507 | - if(l2.eq.0) l2=l1+20 !maybe there is no comment... |
3508 | - read(buff(l1+1:l2),*,err=11) iproc |
3509 | - if(iproc.ne.ngroup) cycle |
3510 | - |
3511 | - l1=index(buff,"=") |
3512 | - l2=index(buff,"@") |
3513 | - if(l2-l1.lt.0) cycle |
3514 | - npara=npara+1 |
3515 | -c |
3516 | - value(npara)=buff(1:l1-1) |
3517 | - ctemp=value(npara) |
3518 | - call case_trap2(ctemp) |
3519 | - value(npara)=ctemp |
3520 | -c |
3521 | - param(npara)=" "//buff(l1+1:l2-1) |
3522 | - ctemp=param(npara) |
3523 | - call case_trap2(ctemp) |
3524 | - param(npara)=ctemp |
3525 | -c |
3526 | - 11 cycle |
3527 | - endif |
3528 | - enddo |
3529 | - 20 rewind(iunit) |
3530 | -c |
3531 | -c read in values |
3532 | -c |
3533 | - done=.false. |
3534 | - do while(.not.done) |
3535 | - read(iunit,'(a132)',end=96,err=96) buff |
3536 | - if(buff(1:1).ne.'#' .and. index(buff,"=").gt.0 |
3537 | - $ .and. index(buff,"@").le.0) then |
3538 | - l1=index(buff,"=") |
3539 | - l2=index(buff,"!") |
3540 | - if(l2.eq.0) l2=l1+20 !maybe there is no comment... |
3541 | - if(l2-l1.lt.0) cycle |
3542 | - npara=npara+1 |
3543 | -c |
3544 | - value(npara)=buff(1:l1-1) |
3545 | - ctemp=value(npara) |
3546 | - call case_trap2(ctemp) |
3547 | - value(npara)=ctemp |
3548 | -c |
3549 | - param(npara)=" "//buff(l1+1:l2-1) |
3550 | - ctemp=param(npara) |
3551 | - call case_trap2(ctemp) |
3552 | - param(npara)=ctemp |
3553 | -c |
3554 | - endif |
3555 | - enddo |
3556 | - 96 close(iunit) |
3557 | - endif |
3558 | -c |
3559 | -c open file |
3560 | -c |
3561 | -c |
3562 | -c tjs modified 11-16-07 to include grid_card.dat |
3563 | -c |
3564 | - call open_file(iunit,'grid_card.dat',fopened) |
3565 | - if(fopened) then |
3566 | -c |
3567 | -c first look for process-specific parameters |
3568 | -c |
3569 | - done=.false. |
3570 | - do while(.not.done) |
3571 | - read(iunit,'(a132)',end=30,err=30) buff |
3572 | - if(buff(1:1).ne.'#' .and. index(buff,"=").gt.0 |
3573 | - $ .and. index(buff,"@").gt.0) then |
3574 | - l1=index(buff,"@") |
3575 | - l2=index(buff,"!") |
3576 | - if(l2.eq.0) l2=l1+20 !maybe there is no comment... |
3577 | - read(buff(l1+1:l2),*,err=21) iproc |
3578 | - if(iproc.ne.ngroup) cycle |
3579 | - |
3580 | - l1=index(buff,"=") |
3581 | - l2=index(buff,"@") |
3582 | - if(l2-l1.lt.0) cycle |
3583 | - npara=npara+1 |
3584 | -c |
3585 | - value(npara)=buff(1:l1-1) |
3586 | - ctemp=value(npara) |
3587 | - call case_trap2(ctemp) |
3588 | - value(npara)=ctemp |
3589 | -c |
3590 | - param(npara)=" "//buff(l1+1:l2-1) |
3591 | - ctemp=param(npara) |
3592 | - call case_trap2(ctemp) |
3593 | - param(npara)=ctemp |
3594 | -c |
3595 | - 21 cycle |
3596 | - endif |
3597 | - enddo |
3598 | - 30 rewind(iunit) |
3599 | -c |
3600 | -c read in values |
3601 | -c |
3602 | - done=.false. |
3603 | - do while(.not.done) |
3604 | - read(iunit,'(a132)',end=99,err=99) buff |
3605 | - if(buff(1:1).ne.'#' .and. index(buff,"=").gt.0 |
3606 | - $ .and. index(buff,"@").le.0) then |
3607 | - l1=index(buff,"=") |
3608 | - l2=index(buff,"!") |
3609 | - if(l2.eq.0) l2=l1+20 !maybe there is no comment... |
3610 | - if(l2-l1.lt.0) cycle |
3611 | - npara=npara+1 |
3612 | -c |
3613 | - value(npara)=buff(1:l1-1) |
3614 | - ctemp=value(npara) |
3615 | - call case_trap2(ctemp) |
3616 | - value(npara)=ctemp |
3617 | -c |
3618 | - param(npara)=" "//buff(l1+1:l2-1) |
3619 | -c write (*,*) param(npara),l1,l2 |
3620 | - ctemp=param(npara) |
3621 | - call case_trap2(ctemp) |
3622 | - param(npara)=ctemp |
3623 | -c write(*,*) "New param:",param(npara)," = ", value(npara) |
3624 | -c |
3625 | - endif |
3626 | - enddo |
3627 | - 99 close(iunit) |
3628 | - endif |
3629 | - |
3630 | - return |
3631 | - end |
3632 | - |
3633 | - |
3634 | - |
3635 | - subroutine get_real(npara,param,value,name,var,def_value) |
3636 | -c---------------------------------------------------------------------------------- |
3637 | -c finds the parameter named "name" in param and associate to "value" in value |
3638 | -c---------------------------------------------------------------------------------- |
3639 | - implicit none |
3640 | - |
3641 | -c |
3642 | -c arguments |
3643 | -c |
3644 | - integer npara |
3645 | - character*20 param(*),value(*) |
3646 | - character*(*) name |
3647 | - real*8 var,def_value |
3648 | - character*20 c_param,c_name |
3649 | -c |
3650 | -c local |
3651 | -c |
3652 | - logical found |
3653 | - integer i |
3654 | -c |
3655 | -c start |
3656 | -c |
3657 | - i=1 |
3658 | - found=.false. |
3659 | - do while(.not.found.and.i.le.npara) |
3660 | - call firststring(c_param,param(i)) |
3661 | - call firststring(c_name,name) |
3662 | - found = (c_param .eq. c_name) |
3663 | - if (found) read(value(i),*) var |
3664 | -c if (found) write (*,*) name,var |
3665 | - i=i+1 |
3666 | - enddo |
3667 | - if (.not.found) then |
3668 | - write (*,*) "Warning: parameter ",name," not found" |
3669 | - write (*,*) " setting it to default value ",def_value |
3670 | - var=def_value |
3671 | - endif |
3672 | - return |
3673 | - |
3674 | - end |
3675 | -c |
3676 | - |
3677 | - subroutine get_integer(npara,param,value,name,var,def_value) |
3678 | -c---------------------------------------------------------------------------------- |
3679 | -c finds the parameter named "name" in param and associate to "value" in value |
3680 | -c---------------------------------------------------------------------------------- |
3681 | - implicit none |
3682 | -c |
3683 | -c arguments |
3684 | -c |
3685 | - integer npara |
3686 | - character*20 param(*),value(*) |
3687 | - character*(*) name |
3688 | - integer var,def_value |
3689 | - character*20 c_param,c_name |
3690 | -c |
3691 | -c local |
3692 | -c |
3693 | - logical found |
3694 | - integer i |
3695 | -c |
3696 | -c start |
3697 | -c |
3698 | - i=1 |
3699 | - found=.false. |
3700 | - do while(.not.found.and.i.le.npara) |
3701 | - call firststring(c_param,param(i)) |
3702 | - call firststring(c_name,name) |
3703 | - found = (c_param .eq. c_name) |
3704 | - if (found) read(value(i),*) var |
3705 | -c if (found) write (*,*) name,var |
3706 | - i=i+1 |
3707 | - enddo |
3708 | - if (.not.found) then |
3709 | - write (*,*) "Warning: parameter ",name," not found" |
3710 | - write (*,*) " setting it to default value ",def_value |
3711 | - var=def_value |
3712 | - endif |
3713 | - return |
3714 | - |
3715 | - end |
3716 | -c |
3717 | - subroutine get_int8(npara,param,value,name,var,def_value) |
3718 | -c---------------------------------------------------------------------------------- |
3719 | -c finds the parameter named "name" in param and associate to "value" in value |
3720 | -c---------------------------------------------------------------------------------- |
3721 | - implicit none |
3722 | -c |
3723 | -c arguments |
3724 | -c |
3725 | - integer npara |
3726 | - character*20 param(*),value(*) |
3727 | - character*(*) name |
3728 | - integer def_value |
3729 | - integer*8 var |
3730 | - character*20 c_param,c_name |
3731 | -c |
3732 | -c local |
3733 | -c |
3734 | - logical found |
3735 | - integer i |
3736 | -c |
3737 | -c start |
3738 | -c |
3739 | - i=1 |
3740 | - found=.false. |
3741 | - do while(.not.found.and.i.le.npara) |
3742 | - call firststring(c_param,param(i)) |
3743 | - call firststring(c_name,name) |
3744 | - found = (c_param .eq. c_name) |
3745 | - if (found) read(value(i),*) var |
3746 | -c if (found) write (*,*) name,var |
3747 | - i=i+1 |
3748 | - enddo |
3749 | - if (.not.found) then |
3750 | - write (*,*) "Warning: parameter ",name," not found" |
3751 | - write (*,*) " setting it to default value ",def_value |
3752 | - var=def_value |
3753 | - endif |
3754 | - return |
3755 | - |
3756 | - end |
3757 | -c |
3758 | - subroutine get_string(npara,param,value,name,var,def_value) |
3759 | -c---------------------------------------------------------------------------------- |
3760 | -c finds the parameter named "name" in param and associate to "value" in value |
3761 | -c---------------------------------------------------------------------------------- |
3762 | - implicit none |
3763 | - |
3764 | -c |
3765 | -c arguments |
3766 | -c |
3767 | - integer npara |
3768 | - character*20 param(*),value(*) |
3769 | - character*(*) name |
3770 | - character*(*) var,def_value |
3771 | - character*20 c_param,c_name |
3772 | -c |
3773 | -c local |
3774 | -c |
3775 | - logical found |
3776 | - integer i |
3777 | -c |
3778 | -c start |
3779 | -c |
3780 | - i=1 |
3781 | - found=.false. |
3782 | - do while(.not.found.and.i.le.npara) |
3783 | - call firststring(c_param,param(i)) |
3784 | - call firststring(c_name,name) |
3785 | - found = (c_param .eq. c_name) |
3786 | - if (found) read(value(i),*) var |
3787 | -c if (found) write (*,*) name,var |
3788 | - i=i+1 |
3789 | - enddo |
3790 | - if (.not.found) then |
3791 | - write (*,*) "Warning: parameter ",name," not found" |
3792 | - write (*,*) " setting it to default value ",def_value |
3793 | - var=def_value |
3794 | - endif |
3795 | - return |
3796 | - |
3797 | - end |
3798 | -c |
3799 | - subroutine get_logical(npara,param,value,name,var,def_value) |
3800 | -c---------------------------------------------------------------------------------- |
3801 | -c finds the parameter named "name" in param and associate to "value" in value |
3802 | -c---------------------------------------------------------------------------------- |
3803 | - implicit none |
3804 | - |
3805 | -c |
3806 | -c arguments |
3807 | -c |
3808 | - integer npara |
3809 | - character*20 param(*),value(*) |
3810 | - character*(*) name |
3811 | - logical var,def_value |
3812 | - character*20 c_param,c_name |
3813 | -c |
3814 | -c local |
3815 | -c |
3816 | - logical found |
3817 | - integer i |
3818 | -c |
3819 | -c start |
3820 | -c |
3821 | - i=1 |
3822 | - found=.false. |
3823 | - do while(.not.found.and.i.le.npara) |
3824 | - call firststring(c_param,param(i)) |
3825 | - call firststring(c_name,name) |
3826 | - found = (c_param .eq. c_name) |
3827 | - if (found) read(value(i),*) var |
3828 | -c if (found) write (*,*) name,var |
3829 | - i=i+1 |
3830 | - enddo |
3831 | - if (.not.found) then |
3832 | - write (*,*) "Warning: parameter ",name," not found" |
3833 | - write (*,*) " setting it to default value ",def_value |
3834 | - var=def_value |
3835 | - endif |
3836 | - return |
3837 | - |
3838 | - end |
3839 | -c |
3840 | - |
3841 | - |
3842 | - |
3843 | subroutine case_trap2(name) |
3844 | c********************************************************** |
3845 | c change the string to lowercase if the input is not |
3846 | @@ -436,27 +48,3 @@ |
3847 | |
3848 | return |
3849 | end |
3850 | - |
3851 | -c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3852 | -c ++ |
3853 | -c ++ firststring -> return the first "word" of string |
3854 | -c ++ & remove whitespaces around |
3855 | -c ++ Needed to correct a bug in "get_" routines |
3856 | -c ++ Michel Herquet - CP3 - 05-04-2006 |
3857 | -c ++ |
3858 | -c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3859 | - |
3860 | - subroutine firststring(first,string) |
3861 | - |
3862 | - implicit none |
3863 | - character*(*) string |
3864 | - character*20 first |
3865 | - character*20 temp |
3866 | - |
3867 | - temp=string |
3868 | - do while(temp(1:1) .eq. ' ') |
3869 | - temp=temp(2:len(temp)) |
3870 | - end do |
3871 | - first=temp(1:index(temp,' ')-1) |
3872 | - |
3873 | - end |
3874 | |
3875 | === modified file 'Template/NLO/Source/setrun.f' |
3876 | --- Template/NLO/Source/setrun.f 2016-09-08 23:15:34 +0000 |
3877 | +++ Template/NLO/Source/setrun.f 2017-05-24 22:17:46 +0000 |
3878 | @@ -20,7 +20,6 @@ |
3879 | c |
3880 | c include |
3881 | c |
3882 | - include 'genps.inc' |
3883 | include 'PDF/pdf.inc' |
3884 | include 'run.inc' |
3885 | include 'alfas.inc' |
3886 | @@ -56,7 +55,6 @@ |
3887 | & idwtup,nprup,xsecup(maxpup),xerrup(maxpup), |
3888 | & xmaxup(maxpup),lprup(maxpup) |
3889 | c |
3890 | - include 'nexternal.inc' |
3891 | logical gridrun,gridpack |
3892 | integer iseed |
3893 | common /to_seed/ iseed |
3894 | @@ -65,13 +63,8 @@ |
3895 | common /event_normalisation/event_norm |
3896 | integer iappl |
3897 | common /for_applgrid/ iappl |
3898 | + integer idum |
3899 | C |
3900 | - integer maxflow |
3901 | - parameter (maxflow=999) |
3902 | - integer idup(nexternal,maxproc) |
3903 | - integer mothup(2,nexternal,maxproc) |
3904 | - integer icolup(2,nexternal,maxflow) |
3905 | - include 'born_leshouche.inc' |
3906 | c |
3907 | c---------- |
3908 | c start |
3909 | @@ -192,7 +185,10 @@ |
3910 | elseif(lpp(i).eq.-3) then |
3911 | idbmup(i)=-11 |
3912 | elseif(lpp(i).eq.0) then |
3913 | - idbmup(i)=idup(i,1) |
3914 | + open (unit=71,status='old',file='initial_states_map.dat') |
3915 | + read (71,*,err=100)idum,idum,idbmup(1),idbmup(2) |
3916 | + close (71) |
3917 | +c idbmup(i)=idup(i,1) |
3918 | else |
3919 | idbmup(i)=lpp(i) |
3920 | endif |
3921 | @@ -206,7 +202,7 @@ |
3922 | call numberPDFm(1,nmemPDF(1)) |
3923 | if (nmemPDF(1).eq.1) then |
3924 | nmemPDF(1)=0 |
3925 | - lpdfvar(1)=0 |
3926 | + lpdfvar(1)=.False. |
3927 | endif |
3928 | else |
3929 | nmemPDF(1)=0 |
3930 | @@ -215,6 +211,9 @@ |
3931 | return |
3932 | 99 write(*,*) 'error in reading' |
3933 | return |
3934 | + 100 write(*,*) '"initial_states_map.dat" not found (or incorrect'/ |
3935 | + $ /' format) by "Source/setrun"' |
3936 | + stop 1 |
3937 | end |
3938 | |
3939 | C------------------------------------------------- |
3940 | |
3941 | === removed file 'Template/NLO/Source/sum.f' |
3942 | --- Template/NLO/Source/sum.f 2012-08-28 21:06:34 +0000 |
3943 | +++ Template/NLO/Source/sum.f 1970-01-01 00:00:00 +0000 |
3944 | @@ -1,55 +0,0 @@ |
3945 | - program sum |
3946 | -c******************************************************************************** |
3947 | -c Program to combine results from all of the different sub amplitudes |
3948 | -c and given total |
3949 | -c cross section and error. |
3950 | -c***************************************************************************** |
3951 | - implicit none |
3952 | -c |
3953 | -c Constants |
3954 | -c |
3955 | - character*(*) rfile |
3956 | - parameter (rfile='result') |
3957 | - character*(*) symfile |
3958 | - parameter (symfile='symfact.dat') |
3959 | - integer max_amps |
3960 | - parameter (max_amps=999) |
3961 | -c |
3962 | -c local |
3963 | -c |
3964 | - double precision xsec(max_amps), xerr(max_amps) |
3965 | - character*80 fname |
3966 | - integer i,j |
3967 | - double precision xtot,errtot |
3968 | -c----- |
3969 | -c Begin Code |
3970 | -c----- |
3971 | - xtot=0d0 |
3972 | - errtot=0d0 |
3973 | - open(unit=15,file=symfile,status='old',err=999) |
3974 | - do while (.true.) |
3975 | - read(15,*,err=99) i,j |
3976 | - if (j .gt. 0) then |
3977 | - if (i .lt. 10) then |
3978 | - write(fname,'(a,i1,a,a)') 'G',i,'/',rfile |
3979 | -c write(*,*) fname |
3980 | - else if (i .lt. 100) then |
3981 | - write(fname,'(a,i2,a,a)') 'G',i,'/',rfile |
3982 | -c write(*,*) fname |
3983 | - else if (i .lt. 1000) then |
3984 | - write(fname,'(a,i3,a,a)') 'G',i,'/',rfile |
3985 | -c write(*,*) fname |
3986 | - endif |
3987 | - open(unit=25,file=fname,status='old',err=95) |
3988 | - read(25,*) xsec(i), xerr(i) |
3989 | - xtot = xtot+xsec(i)*j |
3990 | - errtot=errtot+j*xerr(i)**2 |
3991 | - write(*,'(2i4,2e12.4)') i,j, xsec(i),xerr(i) |
3992 | - 95 close(25) |
3993 | - endif |
3994 | - enddo |
3995 | - 99 write(*,*) 'done',xtot,sqrt(errtot) |
3996 | - close(15) |
3997 | - stop |
3998 | - 999 write(*,*) 'error' |
3999 | - end |
4000 | |
4001 | === removed file 'Template/NLO/Source/write_banner.f' |
4002 | --- Template/NLO/Source/write_banner.f 2012-08-28 21:06:34 +0000 |
4003 | +++ Template/NLO/Source/write_banner.f 1970-01-01 00:00:00 +0000 |
4004 | @@ -1,116 +0,0 @@ |
4005 | - program write_banner |
4006 | - implicit none |
4007 | -c |
4008 | -c parameters |
4009 | -c |
4010 | - integer MaxParticles |
4011 | - parameter (MaxParticles=15) |
4012 | -c |
4013 | -c Local |
4014 | -c |
4015 | - integer lunr, lunw,luni |
4016 | - data luni,lunr,lunw/14,15,16/ ! unit numbers for reading and writing |
4017 | - integer ic(7,MaxParticles),next |
4018 | - double precision P(0:4,MaxParticles),wgt |
4019 | - real*8 sum,mxwgt |
4020 | - logical done |
4021 | - integer i,imax,j |
4022 | - integer nevent,nfound |
4023 | - character*25 infile,outfile |
4024 | - integer iseed |
4025 | - data iseed/9999/ |
4026 | - character*30 process,QED,QCD |
4027 | - double precision scale,aqcd,aqed |
4028 | - integer ievent |
4029 | -c--cuts |
4030 | -c double precision etmin(3:nexternal),etamax(3:nexternal) |
4031 | -c double precision r2min(3:nexternal,3:nexternal) |
4032 | -c double precision s_min(nexternal,nexternal) |
4033 | -c common/to_cuts/ etmin ,etamax , r2min, s_min |
4034 | -c |
4035 | -c open the event file |
4036 | -c |
4037 | - write(*,*) 'input the event file (e.g. Events/events.dat)' |
4038 | - read(*,'(a)') infile |
4039 | - open(unit=lunr,file=infile,status='old') |
4040 | -c |
4041 | -c open banner file |
4042 | -c |
4043 | - write(*,*) 'input the banner file name (e.g. banner-events.dat)' |
4044 | - read(*,'(a)') outfile |
4045 | - open(lunw,file=outfile,status='unknown') |
4046 | -c |
4047 | -c gather the info |
4048 | -c |
4049 | - call setpara('param_card.dat') |
4050 | -c call setcuts |
4051 | -c call get_seed(iseed) |
4052 | -c |
4053 | -c All the info is gathered. Now start writing it out. |
4054 | -c |
4055 | - call write_para(lunw) |
4056 | - write(lunw,'(a70)') '## ' |
4057 | - write(lunw,'(a70)') '##------------------- ' |
4058 | - write(lunw,'(a70)') '## Run-time options ' |
4059 | - write(lunw,'(a70)') '##------------------- ' |
4060 | - write(lunw,'(a70)') '## ' |
4061 | -c write(lunw,'(a70)') '##********************************************************************' |
4062 | -c write(lunw,'(a70)') '## Standard Cuts *' |
4063 | -c write(lunw,'(a70)') '##********************************************************************' |
4064 | -c write(lunw,'(a13,8i8)') '## Particle ',(i,i=3,nexternal) |
4065 | -c write(lunw,'(a13,8f8.1)') '## Et >',(etmin(i),i=3,nexternal) |
4066 | -c write(lunw,'(a13,8f8.1)') '## Eta <',(etamax(i),i=3,nexternal) |
4067 | -c do j=3,nexternal-1 |
4068 | -c write(lunw,'(a,i2,a,8f8.1)') '## d R #',j,' >',(-0.0,i=3,j), |
4069 | -c & (r2min(i,j),i=j+1,nexternal) |
4070 | -c do i=j+1,nexternal |
4071 | -c r2min(i,j)=r2min(i,j)**2 !Since r2 returns distance squared |
4072 | -c enddo |
4073 | -c enddo |
4074 | -c do j=3,nexternal-1 |
4075 | -c write(lunw,'(a,i2,a,8f8.1)') '## s min #',j,'>', |
4076 | -c & (s_min(i,j),i=3,nexternal) |
4077 | -c enddo |
4078 | - write(lunw,'(a70)') '##********************************************************************' |
4079 | -c |
4080 | -c Now write out specific information on the event set |
4081 | -c |
4082 | - done=.false. |
4083 | - nevent=0 |
4084 | - nfound=0 |
4085 | - sum=0d0 |
4086 | - mxwgt=-1d0 |
4087 | - do while (.not. done) |
4088 | - call read_event(lunr,P,wgt,next,ic,ievent,scale,aqcd,aqed,done) |
4089 | - sum=sum+wgt |
4090 | - mxwgt = max(wgt,mxwgt) |
4091 | - nevent=nevent+1 |
4092 | - enddo |
4093 | - |
4094 | - write(lunw,'(a70)') '## ' |
4095 | - write(lunw,'(a70)') '##------------------- ' |
4096 | - write(lunw,'(a70)') '## Event information ' |
4097 | - write(lunw,'(a70)') '##------------------- ' |
4098 | - write(lunw,'(a70)') '## ' |
4099 | - write(lunw,'(a70)') '##********************************************************************' |
4100 | - write(lunw,'(a30,i10)') '## Number of Events : ',nevent |
4101 | - write(lunw,'(a30,e10.5)') '## Integrated weight (pb) : ',sum |
4102 | - write(lunw,'(a30,e10.5)') '## Max wgt : ',mxwgt |
4103 | - write(lunw,'(a30,e10.5)') '## Average wgt : ',sum/nevent |
4104 | - write(lunw,'(a70)') '##********************************************************************' |
4105 | - |
4106 | - rewind(lunr) |
4107 | - done = .false. |
4108 | - nevent=0 |
4109 | - do while (.not. done) |
4110 | - call read_event(lunr,P,wgt,next,ic,ievent,scale,aqcd,aqed,done) |
4111 | - nevent=nevent+1 |
4112 | - if (.not. done) then |
4113 | - call write_event(lunw,p,wgt,next,ic,nevent,scale,aqcd,aqed) |
4114 | - endif |
4115 | - enddo |
4116 | - |
4117 | - close(lunw) |
4118 | - close(lunr) |
4119 | - |
4120 | - end |
4121 | |
4122 | === modified file 'Template/NLO/SubProcesses/add_write_info.f' |
4123 | --- Template/NLO/SubProcesses/add_write_info.f 2015-12-16 16:13:10 +0000 |
4124 | +++ Template/NLO/SubProcesses/add_write_info.f 2017-05-24 22:17:46 +0000 |
4125 | @@ -39,7 +39,7 @@ |
4126 | external ran2 |
4127 | |
4128 | c Jamp amplitudes of the Born (to be filled with a call the sborn()) |
4129 | - double Precision amp2(maxamps), jamp2(0:maxamps) |
4130 | + double Precision amp2(ngraphs), jamp2(0:ncolor) |
4131 | common/to_amps/ amp2, jamp2 |
4132 | |
4133 | C iforest and other configuration info. Read once and saved. |
4134 | @@ -70,8 +70,6 @@ |
4135 | logical OnBW(-nexternal:0) |
4136 | |
4137 | c LesHouches info |
4138 | - integer maxflow |
4139 | - parameter (maxflow=999) |
4140 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4141 | & icolup(2,nexternal,maxflow),niprocs |
4142 | c include "leshouche.inc" |
4143 | @@ -540,15 +538,15 @@ |
4144 | do i=-ns,nexpart |
4145 | jpart(4,i)=icolalt(1,i) |
4146 | jpart(5,i)=icolalt(2,i) |
4147 | - if(i.eq.1.or.i.eq.2) then |
4148 | + if(i.ge.1.and.i.le.nincoming) then |
4149 | ito(i)=i ! initial state particle |
4150 | - elseif(i.ge.3) then |
4151 | + elseif(i.ge.nincoming+1) then |
4152 | ito(i)=i+nres ! final state particle |
4153 | elseif(i.le.-1.and.jpart(6,i).eq.2) then |
4154 | ires=ires+1 |
4155 | ito(i)=2+ires ! s-channel resonances |
4156 | else |
4157 | - ito(i)=0 |
4158 | + ito(i)=i |
4159 | if(i.eq.0) cycle |
4160 | endif |
4161 | if(jpart(2,i).lt.0.and.jpart(6,jpart(2,i)).ne.2) then |
4162 | @@ -983,8 +981,6 @@ |
4163 | implicit none |
4164 | include 'genps.inc' |
4165 | include 'nexternal.inc' |
4166 | - integer maxflow |
4167 | - parameter (maxflow=999) |
4168 | integer i |
4169 | integer idup(nexternal,maxproc) |
4170 | integer mothup(2,nexternal,maxproc) |
4171 | |
4172 | === modified file 'Template/NLO/SubProcesses/check_poles.f' |
4173 | --- Template/NLO/SubProcesses/check_poles.f 2016-09-08 23:15:34 +0000 |
4174 | +++ Template/NLO/SubProcesses/check_poles.f 2017-05-24 22:17:46 +0000 |
4175 | @@ -14,7 +14,7 @@ |
4176 | integer return_code |
4177 | double precision tolerance, tolerance_default |
4178 | double precision, allocatable :: accuracies(:) |
4179 | - double precision accuracy |
4180 | + double precision accuracy2 |
4181 | double precision ren_scale, energy |
4182 | include 'genps.inc' |
4183 | include 'nexternal.inc' |
4184 | @@ -54,6 +54,7 @@ |
4185 | logical first_time |
4186 | data first_time/.TRUE./ |
4187 | include 'FKSParams.inc' |
4188 | + include 'mint.inc' |
4189 | |
4190 | C----- |
4191 | C BEGIN CODE |
4192 | @@ -100,6 +101,9 @@ |
4193 | pmass_rambo(i-nincoming) = pmass(i) |
4194 | enddo |
4195 | |
4196 | + iconfig=1 |
4197 | + ichan=1 |
4198 | + iconfigs(1)=iconfig |
4199 | c Find the nFKSprocess for which we compute the Born-like contributions, |
4200 | c ie. which is a Born+g real-emission process |
4201 | do nFKSprocess=1,fks_configs |
4202 | @@ -182,7 +186,7 @@ |
4203 | call sborn(p_born, born) |
4204 | call sloopmatrix_thres(p_born,virt_wgts,tolerance, |
4205 | 1 accuracies,return_code) |
4206 | - accuracy=accuracies(0) |
4207 | + accuracy2=accuracies(0) |
4208 | |
4209 | finite = virt_wgts(1,0) |
4210 | single = virt_wgts(2,0) |
4211 | @@ -190,7 +194,7 @@ |
4212 | |
4213 | C If MadLoop was still in initialization mode, then skip this |
4214 | C point for the checks |
4215 | - if (accuracy.lt.0.0d0) goto 200 |
4216 | + if (accuracy2.lt.0.0d0) goto 200 |
4217 | C Otherwise, perform the check |
4218 | npointsChecked = npointsChecked +1 |
4219 | |
4220 | |
4221 | === modified file 'Template/NLO/SubProcesses/cluster.f' |
4222 | --- Template/NLO/SubProcesses/cluster.f 2015-12-16 16:13:10 +0000 |
4223 | +++ Template/NLO/SubProcesses/cluster.f 2017-05-24 22:17:46 +0000 |
4224 | @@ -213,7 +213,7 @@ |
4225 | if(prwidth(k,ignum).gt.ZERO) then |
4226 | if(btest(mlevel,4)) |
4227 | $ write(*,*)'Adding resonance ',ignum,icmp(l) |
4228 | - resmap(icmp(l),ignum)=.true. |
4229 | + resmap(icmp(l),ignum,nFKSprocess)=.true. |
4230 | endif |
4231 | enddo |
4232 | c proceed w/ next table, since there is no possibility, |
4233 | @@ -278,8 +278,6 @@ |
4234 | integer tprid(-max_branch:-1,n_max_cg) |
4235 | integer mapconfig(0:n_max_cg) |
4236 | common/c_configs_inc/iforest,sprop,tprid,mapconfig |
4237 | - integer maxflow |
4238 | - parameter (maxflow=999) |
4239 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4240 | & icolup(2,nexternal,maxflow),niprocs |
4241 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4242 | @@ -341,8 +339,6 @@ |
4243 | double precision prwidth(-max_branch:-1,n_max_cg) |
4244 | integer prow(-max_branch:-1,n_max_cg) |
4245 | common/c_props_inc/prmass,prwidth,prow |
4246 | - integer maxflow |
4247 | - parameter (maxflow=999) |
4248 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4249 | & icolup(2,nexternal,maxflow),niprocs |
4250 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4251 | @@ -458,7 +454,8 @@ |
4252 | c check if we have constraint from onshell resonances |
4253 | foundbw=.true. |
4254 | do j=1,nbw |
4255 | - if(resmap(ibwlist(1,j),id_cl(nFKSprocess,idij,i)))then |
4256 | + if(resmap(ibwlist(1,j),id_cl(nFKSprocess,idij,i) |
4257 | + $ ,nFKSprocess))then |
4258 | cycle |
4259 | endif |
4260 | foundbw=.false. |
4261 | @@ -520,15 +517,18 @@ |
4262 | include 'message.inc' |
4263 | include 'real_from_born_configs.inc' |
4264 | include 'run.inc' |
4265 | + include 'fks_info.inc' |
4266 | c Argument |
4267 | double precision p(0:3,nexternal) |
4268 | c Local |
4269 | integer i,j,k,n,idi,idj,idij,icgs(0:n_max_cg),nleft,iwin,jwin |
4270 | - $ ,iwinp,imap(nexternal,2) |
4271 | + $ ,iwinp,imap(nexternal,2),i_fks,j_fks |
4272 | double precision pcmsp(0:3),p1(0:3),pi(0:3),nr(0:3),nn2,ct,st |
4273 | $ ,minpt2ij,pt2ij(n_max_cl),zij(n_max_cl) |
4274 | double precision pz(0:3) |
4275 | data (pz(i),i=0,3)/1d0,0d0,0d0,1d0/ |
4276 | + integer igraphscounter |
4277 | + data igraphscounter/149/ |
4278 | c Common |
4279 | INTEGER NFKSPROCESS |
4280 | COMMON/C_NFKSPROCESS/NFKSPROCESS |
4281 | @@ -540,6 +540,9 @@ |
4282 | double precision dj, pydj, djb, pyjb, dot, SumDot, zclus |
4283 | external findmt,dj, pydj, djb, pyjb, dot, SumDot, zclus, combid |
4284 | |
4285 | + i_fks=fks_i_d(nFKSprocess) |
4286 | + j_fks=fks_j_d(nFKSprocess) |
4287 | + |
4288 | if (btest(mlevel,1)) |
4289 | $ write (*,*)'New event' |
4290 | |
4291 | @@ -626,7 +629,10 @@ |
4292 | endif |
4293 | endif |
4294 | c Check if smallest pt2 ("winner") |
4295 | - if (pt2ij(idij).lt.minpt2ij) then |
4296 | + if (pt2ij(idij).lt.minpt2ij .or. |
4297 | + & (pt2ij(idij).eq.minpt2ij .and. |
4298 | + & (i.eq.i_fks .or. i.eq.j_fks) .and. |
4299 | + & (j.eq.i_fks .or. j.eq.j_fks)) ) then |
4300 | iwin=j |
4301 | jwin=i |
4302 | minpt2ij=pt2ij(idij) |
4303 | @@ -799,6 +805,11 @@ |
4304 | exit |
4305 | endif |
4306 | enddo |
4307 | + if (igraphs(0).ge.2) then ! "randomize" the graph taken |
4308 | + igraphscounter=igraphscounter+1 |
4309 | + igraphs(0)=1 |
4310 | + igraphs(1)=igraphs(mod(igraphscounter,igraphs(0))+1) |
4311 | + endif |
4312 | zcl(n+1)=1 |
4313 | cluster=.true. |
4314 | clustered=.true. |
4315 | @@ -866,7 +877,10 @@ |
4316 | write(*,*)' cf. djb: ',djb(pcl(0,idi)) |
4317 | endif |
4318 | endif |
4319 | - if (pt2ij(idij).lt.minpt2ij) then |
4320 | + if (pt2ij(idij).lt.minpt2ij .or. |
4321 | + & (pt2ij(idij).eq.minpt2ij .and. |
4322 | + & (i.eq.i_fks .or. i.eq.j_fks) .and. |
4323 | + & (j.eq.i_fks .or. j.eq.j_fks)) ) then |
4324 | iwin=j |
4325 | jwin=i |
4326 | minpt2ij=pt2ij(idij) |
4327 | |
4328 | === modified file 'Template/NLO/SubProcesses/cluster.inc' |
4329 | --- Template/NLO/SubProcesses/cluster.inc 2013-03-22 14:03:58 +0000 |
4330 | +++ Template/NLO/SubProcesses/cluster.inc 2017-05-24 22:17:46 +0000 |
4331 | @@ -9,7 +9,7 @@ |
4332 | logical heavyrad(n_max_cg) |
4333 | common/cl_map/id_cl,heavyrad |
4334 | c resmap gives potential resonances for diagrams |
4335 | - logical resmap(n_max_cl,n_max_cg) |
4336 | + logical resmap(n_max_cl,n_max_cg,fks_configs) |
4337 | common/res_map/resmap |
4338 | double precision pt2ijcl(nexternal),zcl(nexternal),mt2ij(nexternal),mt2last |
4339 | double precision pcl(0:4,n_max_cl) ! 4 is mass**2 |
4340 | |
4341 | === modified file 'Template/NLO/SubProcesses/cuts.f' |
4342 | --- Template/NLO/SubProcesses/cuts.f 2015-12-16 16:13:10 +0000 |
4343 | +++ Template/NLO/SubProcesses/cuts.f 2017-05-24 22:17:46 +0000 |
4344 | @@ -428,8 +428,6 @@ |
4345 | double precision pmass(nexternal) |
4346 | common/to_mass/pmass |
4347 | c PDG codes of particles |
4348 | - integer maxflow |
4349 | - parameter (maxflow=999) |
4350 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4351 | & icolup(2,nexternal,maxflow),niprocs |
4352 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4353 | @@ -868,8 +866,6 @@ |
4354 | implicit none |
4355 | include "genps.inc" |
4356 | include 'nexternal.inc' |
4357 | - integer maxflow |
4358 | - parameter (maxflow=999) |
4359 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4360 | & icolup(2,nexternal,maxflow),niprocs |
4361 | c include 'leshouche.inc' |
4362 | @@ -887,8 +883,6 @@ |
4363 | implicit none |
4364 | include "genps.inc" |
4365 | include 'nexternal.inc' |
4366 | - integer maxflow |
4367 | - parameter (maxflow=999) |
4368 | integer idup(nexternal,maxproc) |
4369 | integer mothup(2,nexternal,maxproc) |
4370 | integer icolup(2,nexternal,maxflow) |
4371 | |
4372 | === modified file 'Template/NLO/SubProcesses/driver_mintFO.f' |
4373 | --- Template/NLO/SubProcesses/driver_mintFO.f 2017-03-08 10:26:43 +0000 |
4374 | +++ Template/NLO/SubProcesses/driver_mintFO.f 2017-05-24 22:17:46 +0000 |
4375 | @@ -22,20 +22,10 @@ |
4376 | c |
4377 | c Global |
4378 | c |
4379 | - integer nsteps |
4380 | - character*40 result_file,where_file |
4381 | - common /sample_status/result_file,where_file,nsteps |
4382 | - integer ngroup |
4383 | - common/to_group/ngroup |
4384 | - data ngroup/0/ |
4385 | cc |
4386 | include 'run.inc' |
4387 | include 'coupl.inc' |
4388 | |
4389 | - double precision twgt, maxwgt,swgt(maxevents) |
4390 | - integer lun, nw |
4391 | - common/to_unwgt/twgt, maxwgt, swgt, lun, nw |
4392 | - |
4393 | c Vegas stuff |
4394 | common/tosigint/ndim |
4395 | |
4396 | @@ -136,18 +126,6 @@ |
4397 | n1(i)=0 |
4398 | enddo |
4399 | |
4400 | - open (unit=lun+1,file='../dname.mg',status='unknown',err=11) |
4401 | - read (lun+1,'(a130)',err=11,end=11) buf |
4402 | - l1=index(buf,'P') |
4403 | - l2=index(buf,'_') |
4404 | - if(l1.ne.0.and.l2.ne.0.and.l1.lt.l2-1) |
4405 | - $ read(buf(l1+1:l2-1),*,err=11) ngroup |
4406 | - 11 print *,'Process in group number ',ngroup |
4407 | - |
4408 | - lun = 27 |
4409 | - twgt = -2d0 !determine wgt after first iteration |
4410 | - open(unit=lun,status='scratch') |
4411 | - nsteps=2 |
4412 | call setrun !Sets up run parameters |
4413 | call setpara('param_card.dat') !Sets up couplings and masses |
4414 | call setcuts !Sets up cuts and particle masses |
4415 | @@ -430,7 +408,7 @@ |
4416 | nbody=.true. |
4417 | calculatedBorn=.false. |
4418 | call get_born_nFKSprocess(nFKS_picked,nFKS_born) |
4419 | - call update_fks_dir(nFKS_born,iconfig) |
4420 | + call update_fks_dir(nFKS_born) |
4421 | jac=1d0 |
4422 | call generate_momenta(ndim,iconfig,jac,x,p) |
4423 | if (p_born(0,1).lt.0d0) goto 12 |
4424 | @@ -465,7 +443,7 @@ |
4425 | wgt_me_born=0d0 |
4426 | wgt_me_real=0d0 |
4427 | jac=MC_int_wgt |
4428 | - call update_fks_dir(iFKS,iconfig) |
4429 | + call update_fks_dir(iFKS) |
4430 | call generate_momenta(ndim,iconfig,jac,x,p) |
4431 | if (p_born(0,1).lt.0d0) cycle |
4432 | call compute_prefactors_n1body(vegas_wgt,jac) |
4433 | @@ -525,16 +503,16 @@ |
4434 | return |
4435 | end |
4436 | |
4437 | - subroutine update_fks_dir(nFKS,iconfig) |
4438 | + subroutine update_fks_dir(nFKS) |
4439 | implicit none |
4440 | - integer nFKS,iconfig |
4441 | + integer nFKS |
4442 | integer nFKSprocess |
4443 | common/c_nFKSprocess/nFKSprocess |
4444 | nFKSprocess=nFKS |
4445 | call fks_inc_chooser() |
4446 | call leshouche_inc_chooser() |
4447 | call setcuts |
4448 | - call setfksfactor(iconfig,.false.) |
4449 | + call setfksfactor(.false.) |
4450 | return |
4451 | end |
4452 | |
4453 | |
4454 | === modified file 'Template/NLO/SubProcesses/driver_mintMC.f' |
4455 | --- Template/NLO/SubProcesses/driver_mintMC.f 2017-01-30 15:18:32 +0000 |
4456 | +++ Template/NLO/SubProcesses/driver_mintMC.f 2017-05-24 22:17:46 +0000 |
4457 | @@ -383,7 +383,7 @@ |
4458 | endif |
4459 | c Randomly pick the contribution that will be written in the event file |
4460 | call pick_unweight_contr(iFKS_picked) |
4461 | - call update_fks_dir(iFKS_picked,iconfig) |
4462 | + call update_fks_dir(iFKS_picked) |
4463 | call fill_rwgt_lines |
4464 | call finalize_event(x,weight,lunlhe,putonshell) |
4465 | enddo |
4466 | @@ -724,16 +724,12 @@ |
4467 | write(*,*) 'Not subdividing B.W.' |
4468 | lbw(0)=0 |
4469 | else |
4470 | - lbw(0)=1 |
4471 | - jconfig=dconfig*1000.1 |
4472 | - write(*,*) 'Using dconfig=',jconfig |
4473 | - call DeCode(jconfig,lbw(1),3,nexternal) |
4474 | - write(*,*) 'BW Setting ', (lbw(j),j=1,nexternal-2) |
4475 | + write(*,*) 'Error BW setting: not supported at NLO' |
4476 | + stop 1 |
4477 | endif |
4478 | 10 format( a) |
4479 | 12 format( a,i4) |
4480 | end |
4481 | -c $E$ get_user_params $E$ ! tag for MadWeight |
4482 | c change this routine to read the input in a file |
4483 | c |
4484 | |
4485 | @@ -830,7 +826,7 @@ |
4486 | call get_born_nFKSprocess(nFKS_in,nFKS_out) |
4487 | nFKS_picked_nbody=nFKS_out |
4488 | endif |
4489 | - call update_fks_dir(nFKS_picked_nbody,iconfig) |
4490 | + call update_fks_dir(nFKS_picked_nbody) |
4491 | jac=1d0 |
4492 | call generate_momenta(ndim,iconfig,jac,x,p) |
4493 | if (p_born(0,1).lt.0d0) goto 12 |
4494 | @@ -865,7 +861,7 @@ |
4495 | wgt_me_real=0d0 |
4496 | wgt_me_born=0d0 |
4497 | iFKS=proc_map(proc_map(0,1),i) |
4498 | - call update_fks_dir(iFKS,iconfig) |
4499 | + call update_fks_dir(iFKS) |
4500 | jac=1d0/vol1 |
4501 | probne=1d0 |
4502 | gfactsf=1.d0 |
4503 | @@ -1175,8 +1171,6 @@ |
4504 | common/event_attributes/nattr,npNLO,npLO |
4505 | integer nFKSprocess |
4506 | common/c_nFKSprocess/nFKSprocess |
4507 | - integer maxflow |
4508 | - parameter (maxflow=999) |
4509 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4510 | & icolup(2,nexternal,maxflow),niprocs |
4511 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4512 | @@ -1211,16 +1205,16 @@ |
4513 | end |
4514 | |
4515 | |
4516 | - subroutine update_fks_dir(nFKS,iconfig) |
4517 | + subroutine update_fks_dir(nFKS) |
4518 | implicit none |
4519 | - integer nFKS,iconfig |
4520 | + integer nFKS |
4521 | integer nFKSprocess |
4522 | common/c_nFKSprocess/nFKSprocess |
4523 | nFKSprocess=nFKS |
4524 | call fks_inc_chooser() |
4525 | call leshouche_inc_chooser() |
4526 | call setcuts |
4527 | - call setfksfactor(iconfig,.true.) |
4528 | + call setfksfactor(.true.) |
4529 | return |
4530 | end |
4531 | |
4532 | |
4533 | === modified file 'Template/NLO/SubProcesses/fks_singular.f' |
4534 | --- Template/NLO/SubProcesses/fks_singular.f 2017-01-25 15:41:36 +0000 |
4535 | +++ Template/NLO/SubProcesses/fks_singular.f 2017-05-24 22:17:46 +0000 |
4536 | @@ -649,7 +649,7 @@ |
4537 | & fkssymmetryfactorDeg,ngluons,nquarks |
4538 | integer mapconfig(0:lmaxconfigs), iconfig |
4539 | common/to_mconfigs/mapconfig, iconfig |
4540 | - Double Precision amp2(maxamps), jamp2(0:maxamps) |
4541 | + Double Precision amp2(ngraphs), jamp2(0:ncolor) |
4542 | common/to_amps/ amp2, jamp2 |
4543 | double precision diagramsymmetryfactor |
4544 | common /dsymfactor/diagramsymmetryfactor |
4545 | @@ -797,7 +797,7 @@ |
4546 | & fkssymmetryfactorDeg,ngluons,nquarks |
4547 | integer mapconfig(0:lmaxconfigs), iconfig |
4548 | common/to_mconfigs/mapconfig, iconfig |
4549 | - Double Precision amp2(maxamps), jamp2(0:maxamps) |
4550 | + Double Precision amp2(ngraphs), jamp2(0:ncolor) |
4551 | common/to_amps/ amp2, jamp2 |
4552 | double precision diagramsymmetryfactor |
4553 | common /dsymfactor/diagramsymmetryfactor |
4554 | @@ -1612,8 +1612,6 @@ |
4555 | include 'fks_info.inc' |
4556 | include 'genps.inc' |
4557 | integer k,ict,iFKS |
4558 | - integer maxflow |
4559 | - parameter (maxflow=999) |
4560 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4561 | $ icolup(2,nexternal,maxflow),niprocs |
4562 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4563 | |
4564 | === modified file 'Template/NLO/SubProcesses/genps_fks.f' |
4565 | --- Template/NLO/SubProcesses/genps_fks.f 2016-09-30 08:53:12 +0000 |
4566 | +++ Template/NLO/SubProcesses/genps_fks.f 2017-05-24 22:17:46 +0000 |
4567 | @@ -1838,6 +1838,7 @@ |
4568 | $ ,dum3,dum3,jac,s) |
4569 | else |
4570 | write (*,*) 'ERROR #39 in genps_fks.f',s_mass,smin |
4571 | + jac=-1d0 |
4572 | endif |
4573 | tau=s/stot |
4574 | jac=jac/stot |
4575 | |
4576 | === modified file 'Template/NLO/SubProcesses/iproc_map.f' |
4577 | --- Template/NLO/SubProcesses/iproc_map.f 2015-12-16 16:13:10 +0000 |
4578 | +++ Template/NLO/SubProcesses/iproc_map.f 2017-05-24 22:17:46 +0000 |
4579 | @@ -12,8 +12,6 @@ |
4580 | COMMON /SUBPROC/ PD, IPROC |
4581 | INTEGER NFKSPROCESS |
4582 | COMMON/C_NFKSPROCESS/NFKSPROCESS |
4583 | - integer maxflow |
4584 | - parameter (maxflow=999) |
4585 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4586 | & icolup(2,nexternal,maxflow),niprocs |
4587 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4588 | @@ -224,8 +222,6 @@ |
4589 | common/c_flavour_map/flavour_map |
4590 | INTEGER NFKSPROCESS |
4591 | COMMON/C_NFKSPROCESS/NFKSPROCESS |
4592 | - integer maxflow |
4593 | - parameter (maxflow=999) |
4594 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4595 | & icolup(2,nexternal,maxflow),niprocs |
4596 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4597 | |
4598 | === modified file 'Template/NLO/SubProcesses/leshouche_inc_chooser.f' |
4599 | --- Template/NLO/SubProcesses/leshouche_inc_chooser.f 2015-12-16 16:13:10 +0000 |
4600 | +++ Template/NLO/SubProcesses/leshouche_inc_chooser.f 2017-05-24 22:17:46 +0000 |
4601 | @@ -7,8 +7,6 @@ |
4602 | integer i,j,k |
4603 | INTEGER NFKSPROCESS |
4604 | COMMON/C_NFKSPROCESS/NFKSPROCESS |
4605 | - integer maxflow |
4606 | - parameter (maxflow=999) |
4607 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4608 | & icolup(2,nexternal,maxflow),niprocs |
4609 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4610 | |
4611 | === modified file 'Template/NLO/SubProcesses/makefile_fks_dir' |
4612 | --- Template/NLO/SubProcesses/makefile_fks_dir 2016-06-28 14:44:52 +0000 |
4613 | +++ Template/NLO/SubProcesses/makefile_fks_dir 2017-05-24 22:17:46 +0000 |
4614 | @@ -37,25 +37,18 @@ |
4615 | MC_integer.o $(reweight_xsec_events_pdf_dummy) \ |
4616 | $(applgrid_interface) |
4617 | |
4618 | -# Files needed for vegas, mint & mintMC |
4619 | +# Files needed for mintFO & mintMC |
4620 | RUN= $(FO_ANALYSE) $(FILES) cuts.o pythia_unlops.o recluster.o \ |
4621 | fill_MC_mshell.o born_hel.o open_output_files.o \ |
4622 | add_write_info.o BinothLHA.o madfks_plot.o |
4623 | |
4624 | -# Files for vegas |
4625 | -VEGAS= $(RUN) driver_vegas.o vegas2.o handling_lhe_events.o |
4626 | - |
4627 | -# Files for vegas |
4628 | +# Files for mintFO |
4629 | MINTFO= $(RUN) driver_mintFO.o mint-integrator2.o handling_lhe_events.o |
4630 | |
4631 | # Files for mintMC |
4632 | MINTMC= $(RUN) mint-integrator2.o driver_mintMC.o write_event.o \ |
4633 | handling_lhe_events.o |
4634 | |
4635 | -# Files for Born reweighting |
4636 | -BORN_REWEIGHT= $(RUN) driver_reweight.o handling_lhe_events.o \ |
4637 | - write_event.o |
4638 | - |
4639 | # Files for check_poles |
4640 | POLES= $(FILES) cuts.o pythia_unlops.o recluster.o check_poles.o \ |
4641 | BinothLHA.o born_hel.o |
4642 | @@ -96,10 +89,6 @@ |
4643 | rm fks_singular.o |
4644 | strip gensym |
4645 | |
4646 | -test_Sij: symmetry_fks_test_Sij.o $(TEST) |
4647 | - $(FC) $(LDFLAGS) -o test_Sij symmetry_fks_test_Sij.o $(TEST) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) |
4648 | - strip test_Sij |
4649 | - |
4650 | test_ME: symmetry_fks_test_ME.o $(TEST) |
4651 | $(FC) $(LDFLAGS) -o test_ME symmetry_fks_test_ME.o $(TEST) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) |
4652 | rm symmetry_fks_test_ME.o |
4653 | @@ -114,11 +103,6 @@ |
4654 | $(FC) -o check_poles $(POLES) $(NLOLIBS) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) $(LDFLAGS) |
4655 | strip check_poles |
4656 | |
4657 | -madevent_vegas: $(VEGAS) $(libmadloop) makefile $(LIBS) |
4658 | - $(FC) -o madevent_vegas $(VEGAS) $(NLOLIBS) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) $(FO_EXTRAPATHS) $(FO_EXTRALIBS) $(LDFLAGS) |
4659 | - rm handling_lhe_events.o |
4660 | - strip madevent_vegas |
4661 | - |
4662 | madevent_mintMC: $(MINTMC) $(libmadloop) makefile $(LIBS) |
4663 | $(FC) -o madevent_mintMC $(MINTMC) $(NLOLIBS) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) $(FO_EXTRAPATHS) $(FO_EXTRALIBS) $(LDFLAGS) |
4664 | rm handling_lhe_events.o |
4665 | @@ -129,10 +113,6 @@ |
4666 | rm handling_lhe_events.o |
4667 | strip madevent_mintFO |
4668 | |
4669 | -madevent_reweight: $(BORN_REWEIGHT) $(libmadloop) makefile $(LIBS) |
4670 | - $(FC) -o madevent_reweight $(BORN_REWEIGHT) $(APPLLIBS) $(LINKLIBS) $(FJLIBS) $(FO_EXTRAPATHS) $(FO_EXTRALIBS) $(LDFLAGS) |
4671 | - rm handling_lhe_events.o |
4672 | - |
4673 | reweight_xsec_events: $(RWGFILES) makefile $(LIBS) |
4674 | $(FC) -o reweight_xsec_events $(RWGFILES) $(LINKLIBS) $(FJLIBS) $(LDFLAGS) |
4675 | rm handling_lhe_events.o |
4676 | |
4677 | === modified file 'Template/NLO/SubProcesses/mint-integrator2.f' |
4678 | --- Template/NLO/SubProcesses/mint-integrator2.f 2017-03-03 23:30:52 +0000 |
4679 | +++ Template/NLO/SubProcesses/mint-integrator2.f 2017-05-24 22:17:46 +0000 |
4680 | @@ -163,7 +163,9 @@ |
4681 | do kchan=1,nchans |
4682 | do kint=0,nint_used |
4683 | xgrid(kint,kdim,kchan)=dble(kint)/nint_used |
4684 | - nhits(kint,kdim,kchan)=0 |
4685 | + if(kint.gt.0) then |
4686 | + nhits(kint,kdim,kchan)=0 |
4687 | + endif |
4688 | enddo |
4689 | regridded(kchan)=.true. |
4690 | enddo |
4691 | |
4692 | === modified file 'Template/NLO/SubProcesses/montecarlocounter.f' |
4693 | --- Template/NLO/SubProcesses/montecarlocounter.f 2017-03-03 23:36:24 +0000 |
4694 | +++ Template/NLO/SubProcesses/montecarlocounter.f 2017-05-24 22:17:46 +0000 |
4695 | @@ -984,7 +984,7 @@ |
4696 | double precision p_born(0:3,nexternal-1) |
4697 | common/pborn/p_born |
4698 | |
4699 | - double Precision amp2(maxamps), jamp2(0:maxamps) |
4700 | + double Precision amp2(ngraphs), jamp2(0:ncolor) |
4701 | common/to_amps/ amp2, jamp2 |
4702 | |
4703 | integer i_fks,j_fks |
4704 | |
4705 | === modified file 'Template/NLO/SubProcesses/pythia_unlops.f' |
4706 | --- Template/NLO/SubProcesses/pythia_unlops.f 2015-12-16 16:13:10 +0000 |
4707 | +++ Template/NLO/SubProcesses/pythia_unlops.f 2017-05-24 22:17:46 +0000 |
4708 | @@ -18,8 +18,6 @@ |
4709 | double precision p(0:3,nexternal),eCM |
4710 | logical passUNLOPScuts |
4711 | INTEGER I, J |
4712 | - integer maxflow |
4713 | - parameter (maxflow=999) |
4714 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4715 | & icolup(2,nexternal,maxflow),niprocs |
4716 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4717 | |
4718 | === modified file 'Template/NLO/SubProcesses/reweight.f' |
4719 | --- Template/NLO/SubProcesses/reweight.f 2015-12-16 16:13:10 +0000 |
4720 | +++ Template/NLO/SubProcesses/reweight.f 2017-05-24 22:17:46 +0000 |
4721 | @@ -73,7 +73,7 @@ |
4722 | if (iimode.eq.2) then |
4723 | gamma=gamma+CF*alphasq0**2*log(Q1/q0)*kappa/(2d0*pi**2) ! A2 |
4724 | endif |
4725 | - if (iipdg.gt.NF) then ! include mass effects |
4726 | + if (abs(iipdg).gt.NF) then ! include mass effects |
4727 | qom=q0/mass(iipdg) |
4728 | gamma=gamma+CF*alphasq0/pi/2d0*( 0.5d0 - qom*atan(1d0/qom) - |
4729 | $ (1d0-0.5d0*qom**2)*log(1d0+1d0/qom**2) ) |
4730 | @@ -490,10 +490,10 @@ |
4731 | if((ipart(1,ida1).ge.1.and.ipart(1,ida1).le.2).or. |
4732 | $ (ipart(1,ida2).ge.1.and.ipart(1,ida2).le.2))then |
4733 | c Check if ida1 is outgoing parton or ida2 is outgoing parton |
4734 | - if(.not.islast.and.ipart(1,ida2).ge.1 |
4735 | - $ .and.ipart(1,ida2).le.2.and.isparton(idda1).or.ipart(1 |
4736 | - $ ,ida1).ge.1.and.ipart(1 |
4737 | - $ ,ida1).le.2.and.isparton(idda2))then |
4738 | + if((.not.islast) .and. ((ipart(1,ida2).ge.1 .and. ipart(1 |
4739 | + $ ,ida2).le.2 .and. isparton(idda1)) .or. (ipart(1 |
4740 | + $ ,ida1).ge.1 .and. ipart(1,ida1).le.2 .and. |
4741 | + $ isparton(idda2))))then |
4742 | ispartonvx=.true. |
4743 | else |
4744 | ispartonvx=.false. |
4745 | @@ -1222,8 +1222,6 @@ |
4746 | $ ,fks_configs,lmaxconfigs),jlast(2) |
4747 | real*8 q2bck(2) |
4748 | common /to_rw/jlast,njetstore,iqjetstore,q2bck |
4749 | - integer maxflow |
4750 | - parameter (maxflow=999) |
4751 | integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc), |
4752 | & icolup(2,nexternal,maxflow),niprocs |
4753 | common /c_leshouche_inc/idup,mothup,icolup,niprocs |
4754 | |
4755 | === removed file 'Template/NLO/SubProcesses/reweight_events.f' |
4756 | --- Template/NLO/SubProcesses/reweight_events.f 2012-09-18 09:48:33 +0000 |
4757 | +++ Template/NLO/SubProcesses/reweight_events.f 1970-01-01 00:00:00 +0000 |
4758 | @@ -1,375 +0,0 @@ |
4759 | -C*************************************************************** |
4760 | -c Program that reads an Les Houches event file (with unweighted |
4761 | -c Born events) and calculates the virtual corrections for each |
4762 | -c event. The weights in the event file should sum to the total |
4763 | -c cross section. |
4764 | -c |
4765 | -c It must be run from a P* directory, because nexternal.inc, |
4766 | -c coupl.inc, fks.inc, pmass.inc and run.inc should all be there. |
4767 | -c |
4768 | -c Call to virtual is via the BinothLHA() interface subroutine |
4769 | -c (in the corresponding file.) |
4770 | -c |
4771 | -C*************************************************************** |
4772 | -c The virt_wgt coming from BinothLHA() should have the same |
4773 | -c adjusted identical particle symmetry factor as the Born in |
4774 | -c the MadFKS framework (i.e. divided by dble(ngluons)). |
4775 | -c This is also needed for normal inclusion of the virtual, so |
4776 | -c in general, nothing needs to be changed in BinothLHA(). |
4777 | -C*************************************************************** |
4778 | -c |
4779 | - program reweight_events |
4780 | - implicit none |
4781 | - include "nexternal.inc" |
4782 | - include "coupl.inc" |
4783 | - include "run.inc" |
4784 | - integer MaxParticles |
4785 | - parameter (MaxParticles=20) |
4786 | - integer lun,lun2,lun3 |
4787 | - parameter (lun=99,lun2=98,lun3=97) |
4788 | - integer npart, ic(7,MaxParticles),i,j,k,l |
4789 | - logical done,firsttime(2) |
4790 | - data firsttime/.true.,.true./ |
4791 | - double precision P(0:4,MaxParticles),wgt,aqcd,aqed,xscale,virt_wgt |
4792 | - integer ievent,nevent,unwgt,mxevt,unw_eventp,unw_eventn |
4793 | - character*140 buff2,filename_in, filename_out,filename_unw |
4794 | - double precision sumw,sumw_abs,mxwgt,p_born(0:3,nexternal-1) |
4795 | - double precision born_wgt,pdf_wgt |
4796 | - external dlum |
4797 | - integer ID_save(MaxParticles) |
4798 | - double complex wgt1(2) |
4799 | - integer iseed |
4800 | - data iseed/1/ |
4801 | - double precision rnd,ran2 |
4802 | - external ran2 |
4803 | - logical calculatedBorn |
4804 | - common/ccalculatedBorn/calculatedBorn |
4805 | - character*1 proceed |
4806 | - |
4807 | - write (*,*) 'Give Les Houches event file with unweighted'// |
4808 | - & ' Born events' |
4809 | - read (*,'(a)') filename_in |
4810 | - write (*,*) 'Unweight the reweighted events? (0: no, 1: yes)' |
4811 | - read (*,*) unwgt |
4812 | - if (unwgt.eq.0) then |
4813 | - write (*,*) 'No unweighting' |
4814 | - elseif (unwgt.eq.1) then |
4815 | - write (*,*) 'Also unweighting the events' |
4816 | - else |
4817 | - write (*,*) 'Error: did not understand input',unwgt |
4818 | - endif |
4819 | - |
4820 | - filename_out="rwgt_events.lhe" |
4821 | - filename_unw="unwgt_events.lhe" |
4822 | - |
4823 | - open (unit=lun,file='nbodyonly.fks',status='old',err=96) |
4824 | - read (lun,'(a)') proceed |
4825 | - close(lun) |
4826 | - if (proceed.eq.'N') then |
4827 | - write (*,*) 'Can only reweight in a "nbodyonly" directory' |
4828 | - stop |
4829 | - endif |
4830 | - |
4831 | - call setpara('param_card.dat') !Sets up couplings and masses |
4832 | - call setrun |
4833 | - |
4834 | - open (unit=lun,file=filename_in,status='old',err=99) |
4835 | - |
4836 | - done = .false. |
4837 | - sumw=0d0 |
4838 | - mxwgt=0d0 |
4839 | - nevent=0 |
4840 | - write (*,*) '' |
4841 | - write (*,*) 'Parsing events to do some simple tests...' |
4842 | - do while (.not.done) |
4843 | - call read_event(lun,P,wgt,npart,ic,ievent, |
4844 | - & xscale,aqcd,aqed,buff2,done) |
4845 | - if (done) cycle |
4846 | - nevent=nevent+1 |
4847 | - if(mod(nevent,5000).eq.0) print *,'At event ',nevent |
4848 | - if(npart.gt.20) then |
4849 | - write (*,*) 'Error: Too many particles in event: ',npart |
4850 | - stop |
4851 | - endif |
4852 | - sumw=sumw+wgt |
4853 | - mxwgt = max(wgt,mxwgt) |
4854 | - if (mxwgt.ne.wgt) then |
4855 | - write (*,*) 'Error: not all events have equal weights' |
4856 | - stop |
4857 | - endif |
4858 | - j=0 |
4859 | - do i=1,npart |
4860 | - if (abs(ic(6,i)).eq.1) then |
4861 | - j=j+1 |
4862 | - if (nevent.eq.1) then |
4863 | - id_save(j)=ic(1,i) |
4864 | - else |
4865 | - if (ic(1,i).ne.id_save(j) .and. firsttime(1)) then |
4866 | - firsttime(1)=.false. |
4867 | - write (*,*) '* Warning: not all events'// |
4868 | - & 'have the same final state partons' |
4869 | - endif |
4870 | - endif |
4871 | - endif |
4872 | - if (ic(7,i).ne.0 .and. firsttime(2)) then |
4873 | - firsttime(2)=.false. |
4874 | - write (*,*) '* Warning: helicity info in Born events'// |
4875 | - & ' will be ignored' |
4876 | - endif |
4877 | - enddo |
4878 | - enddo |
4879 | - |
4880 | - write (*,*) '...',nevent,' events parsed' |
4881 | - write (*,*) '' |
4882 | - write (*,*) 'Reweighting events...' |
4883 | - |
4884 | - rewind(lun) |
4885 | - |
4886 | - open (unit=lun2,file=filename_out,status='unknown',err=98) |
4887 | - |
4888 | - sumw=0d0 |
4889 | - sumw_abs=0d0 |
4890 | - mxwgt=0d0 |
4891 | - call fill_common_blocks() |
4892 | - |
4893 | - do i=1,nevent |
4894 | - do j=1,140 |
4895 | - buff2(j:j)=' ' |
4896 | - enddo |
4897 | - if (nevent.gt.50000) then |
4898 | - if(mod(i,10000).eq.0) print *,'At event ',i |
4899 | - elseif (nevent.gt.5000) then |
4900 | - if(mod(i,1000).eq.0) print *,'At event ',i |
4901 | - else |
4902 | - if(mod(i,100).eq.0) print *,'At event ',i |
4903 | - endif |
4904 | -c Read event |
4905 | - call read_event(lun,P,wgt,npart,ic,ievent, |
4906 | - & xscale,aqcd,aqed,buff2,done) |
4907 | - if (done) then |
4908 | - write (*,*) 'ERROR, some events are missing '// |
4909 | - & 'from event file',i,nevent |
4910 | - stop |
4911 | - endif |
4912 | - j=0 |
4913 | - do l=1,npart |
4914 | - if (abs(ic(6,l)).eq.1) then |
4915 | - j=j+1 |
4916 | - do k=0,3 |
4917 | - p_born(k,j)=p(k,l) |
4918 | - enddo |
4919 | - endif |
4920 | - enddo |
4921 | - calculatedBorn=.false. |
4922 | -c Set scale and couplings (on an event-by-event basis) |
4923 | - call set_alphaS(p_born) |
4924 | - if (abs((aqcd-g**2/(16d0*atan(1d0)))/aqcd).gt.1d-5) then |
4925 | - write (*,*) "Error: inconsistency in strong coupling" |
4926 | - write (*,*) aqcd,g**2/(16d0*atan(1d0)),scale |
4927 | - stop |
4928 | - endif |
4929 | - call get_helicity_simplified() |
4930 | -c Compute Born |
4931 | - call sborn(p_born,wgt1) |
4932 | - born_wgt=dble(wgt1(1)) |
4933 | -c Compute Virtual |
4934 | - call BinothLHA(p_born,born_wgt,virt_wgt) |
4935 | -c Reweight the events |
4936 | - wgt=wgt * virt_wgt/born_wgt |
4937 | -c Write event |
4938 | - call write_event(lun2,P,wgt,npart,ic,ievent, |
4939 | - & xscale,aqcd,aqed,buff2) |
4940 | - sumw=sumw+wgt |
4941 | - sumw_abs=sumw_abs+abs(wgt) |
4942 | - if (abs(wgt).gt.abs(mxwgt)) then |
4943 | - mxwgt = wgt |
4944 | - mxevt=i |
4945 | - endif |
4946 | - enddo |
4947 | - |
4948 | - |
4949 | - write (*,*) |
4950 | - & 'Reweighted events are written to file ',filename_out |
4951 | - write (*,*) 'Cross section:',sumw |
4952 | - write (*,*) 'average abs. of weights:',sumw_abs/dble(nevent) |
4953 | - write (*,*) 'max wgt:',mxwgt,' for event',mxevt |
4954 | - write (lun2,'(a)')'</LesHouchesEvents>' |
4955 | -c Do the unweighting |
4956 | - if (unwgt.eq.1) then |
4957 | - write (*,*) '' |
4958 | - write (*,*) 'Unweighting...' |
4959 | - rewind(lun2) |
4960 | - open(unit=lun3,file=filename_unw,status='unknown',err=97) |
4961 | - |
4962 | - unw_eventp=0 |
4963 | - unw_eventn=0 |
4964 | - do i=1,nevent |
4965 | - call read_event(lun2,P,wgt,npart,ic,ievent, |
4966 | - & xscale,aqcd,aqed,buff2,done) |
4967 | - if (done) then |
4968 | - write (*,*) 'ERROR, some events are missing '// |
4969 | - & 'from event file',i,nevent |
4970 | - stop |
4971 | - endif |
4972 | - rnd=ran2() |
4973 | - if (rnd.lt.abs(wgt/mxwgt)) then |
4974 | - if (wgt.gt.0) then |
4975 | - wgt=1d0 |
4976 | - unw_eventp=unw_eventp+1 |
4977 | - else |
4978 | - wgt=-1d0 |
4979 | - unw_eventn=unw_eventn+1 |
4980 | - endif |
4981 | - call write_event(lun3,P,wgt,npart,ic,ievent, |
4982 | - & xscale,aqcd,aqed,buff2) |
4983 | - endif |
4984 | - enddo |
4985 | - |
4986 | - write (*,*) |
4987 | - & 'Unweighted events are written to file ',filename_unw |
4988 | - write (*,*) 'Number of events written is',unw_eventp+unw_eventn |
4989 | - write (*,*) 'positive:',unw_eventp |
4990 | - write (*,*) 'negative:',unw_eventn |
4991 | - write (*,*) 'Unweighting efficiency (in %):', |
4992 | - & dble(unw_eventp+unw_eventn)/dble(nevent)*100d0 |
4993 | - write(lun3,'(a)')'</LesHouchesEvents>' |
4994 | - close(lun3) |
4995 | - endif |
4996 | - |
4997 | - |
4998 | - close(lun) |
4999 | - close(lun2) |
5000 | - return |
Hi Olivier,
Hasn't this always been the case? I thought that the gridpacks became too large when all the grids are saved. I thought that the only really important information to safe was the relative contributions of all the channels, so that one exactly knows how many events each channel should give.
Best,
Rikkert