Changes between Version 20 and Version 21 of Reweight


Ignore:
Timestamp:
Feb 1, 2016, 3:57:49 PM (9 years ago)
Author:
Olivier Mattelaer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Reweight

    v20 v21  
    2828
    2929 '''NLO reweighting:'''[[BR]][[BR]]
    30 
    31 
    3230
    3331 We use the basis introduced in http://arxiv.org/pdf/1110.4738v1.pdf to decompose the matrix-element component independant of the scale and pdf variation:
     
    5654
    5755= Technical details
    58 === Limitation
     56== Limitation
    5957  1. We do not perform any PDF and/or cut reweighting.
    6058  2. We do not allowed to change the functional form of alpha_S
     
    6765 Since MadGraph5_aMC@NLO.2.3.2, this module relies on '''f2py''' to be installed. The easiest way to install f2py is to install numpy (if not already done).
    6866 
    69 == How to run the code
    70 
    71  How to use the code on the flight.
    72 
    73 --> Add comment: Same for the NLO. Here some examples.
    74 
    75  When running the generation of events (./bin/generate_events from the local directory or "launch" via the mg5 interface)
    76  you will have two questions. The first one is:
    77  {{{
    78 The following switches determine which programs are run:
    79  1 Run the pythia shower/hadronization:                   pythia=NOT INSTALLED
    80  2 Run PGS as detector simulator:                            pgs=NOT INSTALLED
    81  3 Run Delphes as detector simulator:                    delphes=NOT INSTALLED
    82  4 Decay particles with the MadSpin module:              madspin=OFF
    83  5 Add weight to events based on coupling parameters:   reweight=OFF
     67== Running the code
     68 
     69 === Running simultaneously with event generation
     70
     71 When running event generation at LO or NLO (either via ./bin/generate_events from the local directory or "launch" via the mg5 interface). You will be asked two questions. The phrasing/options of those two questions depends if you run at LO or NLO but both follow the same strategy. Here we will take the example of a NLO generation.
     72 In that case, the first question is:
     73 {{{
     74The following switches determine which operations are executed:
     75 1 Perturbative order of the calculation:                               order=NLO
     76 2 Fixed order (no event generation and no MC@[N]LO matching):    fixed_order=OFF
     77 3 Shower the generated events:                                        shower=ON
     78 4 Decay particles with the MadSpin module:                           madspin=OFF
     79 5 Add weights to the events based on changing model parameters:     reweight=OFF
    8480  Either type the switch number (1 to 5) to change its default setting,
    85   or set any switch explicitly (e.g. type 'madspin=ON' at the prompt)
     81  or set any switch explicitly (e.g. type 'order=LO' at the prompt)
    8682  Type '0', 'auto', 'done' or just press enter when you are done.
    87  [0, 4, 5, auto, done, madspin=ON, madspin=OFF, madspin, reweight=ON, ... ][60s to answer]
    88 >
    89 }}}
    90  As you can see the reweight options is OFF by default, to set it on you can either type "5" (not adviced if you script) or "reweight=ON".
    91  Then you should have:
    92  {{{
    93 The following switches determine which programs are run:
    94  1 Run the pythia shower/hadronization:                   pythia=NOT INSTALLED
    95  2 Run PGS as detector simulator:                            pgs=NOT INSTALLED
    96  3 Run Delphes as detector simulator:                    delphes=NOT INSTALLED
    97  4 Decay particles with the MadSpin module:              madspin=OFF
    98  5 Add weight to events based on coupling parameters:   reweight=ON
     83 [0, 1, 2, 3, 4, 5, auto, done, order=LO, ... ][60s to answer]
     84}}}
     85
     86 As you can see, the question presents a series of switch which can take different value (in the example "NLO", "ON", "OFF"). In order to perform the reweighting, you need to put the reweight switch to "ON".
     87 Type
     88{{{
     89reweight=ON
     90}}}
     91 You can also just type "5" but please avoid to use this mode in scripts.
     92 After pressing enter the question is reasked and you now should have:
     93 {{{
     94The following switches determine which operations are executed:
     95 1 Perturbative order of the calculation:                               order=NLO
     96 2 Fixed order (no event generation and no MC@[N]LO matching):    fixed_order=OFF
     97 3 Shower the generated events:                                        shower=ON
     98 4 Decay particles with the MadSpin module:                           madspin=OFF
     99 5 Add weights to the events based on changing model parameters:     reweight=ON
    99100  Either type the switch number (1 to 5) to change its default setting,
    100   or set any switch explicitly (e.g. type 'madspin=ON' at the prompt)
     101  or set any switch explicitly (e.g. type 'order=LO' at the prompt)
    101102  Type '0', 'auto', 'done' or just press enter when you are done.
    102  [0, 4, 5, auto, done, madspin=ON, madspin=OFF, madspin, reweight=ON, ... ][60s to answer]
    103  }}}
    104  Then the second question is (after that you just press enter on that question):
    105    {{{
     103 [0, 1, 2, 3, 4, 5, auto, done, order=LO, ... ][60s to answer]
     104}}}
     105 This allow you to change any other switch (note that "fixed_order" needs to stay on OFF). You can type enter when you want to pass to the next question:
     106 {{{
    106107Do you want to edit a card (press enter to bypass editing)?
    107   1 / param     : param_card.dat
    108   2 / run       : run_card.dat
    109   3 / reweight  : reweight_card.dat
     108  1 / param      : param_card.dat
     109  2 / run        : run_card.dat
     110  3 / reweight   : reweight_card.dat
     111  4 / shower     : shower_card.dat
    110112 you can also
    111113   - enter the path to a valid card or banner.
     
    113115     The set option works only for param_card and run_card.
    114116     Type 'help set' for more information on this command.
    115  [0, done, 1, param, 2, run, 3, reweight, enter path][60s to answer]
    116    }}}
    117  You '''HAVE TO define/edit''' the reweight_card.dat, the syntax is explained in the file.
    118  The default file is basically empty and will make the re-weighting to crash since both theoretical hypothesis are identical.
    119 
    120  == How to use the code after the generation of events as been completed.
    121 
    122 --> Add for the NLO
    123 
    124  You can also use the madevent interface as explained below:
    125  
    126  1. go to the process directory.
    127  2. launch the '''./bin/madevent''' script 
    128  3. type '''reweight RUN_NAME'''
    129  4. then you will see the following question:
    130 {{{
    131 Do you want to edit one cards (press enter to bypass editing)?
    132   1 / reweight  : reweight_card.dat
    133  you can also
    134    - enter the path to a valid card.
    135  [0, done, 1, reweight, enter path][60s to answer]
    136 }}}
    137     If you didn't define the content of reweight_card.dat already. You need to do it. The syntax is explained inside the file, and you can see example below (validation section). The '''important''' point, is that the first line should be launch, and then you specify which parameter, you want to modify. This is the exact same syntax has for scripting a scan over parameter.
    138  5. exit the file and you are done (the script will run).
    139 
    140 '''If the file Cards/reweight_card.dat is already defined''', you can launch the script with
     117   - call an external program (ASperGE/MadWidth/...).
     118     Type 'help' for the list of available command
     119 [0, done, 1, param, 2, run, 3, reweight, 4, enter path, ... ][60s to answer]
     120}}}
     121
     122 For a NLO accurate reweighting, type
     123 {{{
     124set keep_rwgt_info True
     125 }}}
     126 This can also be done via the manual edition of the run_card (by typing 2). With this option on False (the default) the kamikaze reweighting will be performed.
     127
     128 Then type
     129 {{{
     1303
     131}}}
     132 to open an editor (in most system this use vi) where you can edit the content of the reweight_card. The format/options of that file are describe below.
     133 It allows you to specify which model/benchmark you want to use.
     134 When you are done, exit the file and press enter.
     135
     136 == Running the code after the generation of events as been completed.
     137
     138 In order to run the reweighting on previously generated samples. You need to go to the associated process directory and run either '''./bin/madevent''' or '''./bin/aMC@NLO'''script for  respectively LO/NLO event generation.
     139 You can then type  '''reweight RUN_NAME''' (RUN_NAME is typically run_01) and you will be asked the same questions as above.
     140
     141 Another options is to manually edit the Cards/reweight_card.dat file and then run one of the two following command:
    141142{{{
    142143./bin/madevent reweight RUN_NAME -f
    143 }}}
    144 The '''-f''' options prevent the question to be asked.
    145 
    146  == Options of the code:
     144./bin/aMC@NLO reweight RUN_NAME -f
     145}}}
     146 The first sample is available in case of LO event generation, while the second is present in the case of NLO event generation.
     147
     148 == Content of the reweight_card
     149 
     150 === Description of the cards:
     151 
     152 The cards is compose of two sections:
     153 1. '''Options'': those are options which change the behaviour of the reweighting. Those line starts by "change" a list of all available options are available in next section.
     154 2. '''benchmark definition''': starting one benchmark starts with the line
     155    {{{
     156launch
     157    }}}
     158    then you can have either a series of "set command" to specify how to edit the param_card from the original one. Are a couple of equivalent options:
     159    {{{
     160    set mt 150
     161    set mass 6 150
     162    }}} 
     163    For a scan over parameter, you can use one of the following options (all are equivalent):
     164    {{{
     165    set mt 6 scan:range(100,200,20)
     166    set mass 6 scan:[100,120,140,160,180]
     167    }}}
     168    instead of using the "set command" you can also specify the path to a (valid) param_card
     169    {{{
     170    PATH
     171    }}}
     172
     173 === Options of the code:
    147174  Note all the following options will be available in Madgraph5_aMC@NLO since version 2.3.2.
    148175  They have to be included in the reweighting_card before the first launch command.
     
    153180   5. "change helicity <True|False>": perform reweighting for the given helicity (True --default--) or do the sum over helicity.
    154181   6. "change rwgt_dir <PATH>": change directory where the computation is performed. This can be use to avoid to recreate/recompile the fortran executable if pointing to a previously existing directory.
    155    7. change mode LO: For NLO sample, this flag force to use the kamikaze reweighting (Leading Order type rew
    156 
     182   7. change mode LO: For NLO sample, this flag force to use the kamikaze reweighting
    157183
    158184 = Input/Output format
     
    226252}}}
    227253
    228  = Validation
     254= LO Validation
    229255
    230256  1. The comparison for the full cross-section are done like this:
     
    292318 1. For CWWW
    293319
    294     ||   Coupling value ($TeV^{-2}$)   ||    Reweight cross-section (pb)   ||      MadEvent cross-section (pb)   ||   Status   ||
     320    ||   Coupling value ($TeV^{-2}$)   ||    Reweight cross-section (pb)   ||      MG5_aMC cross-section (pb)   ||   Status   ||
    295321    ||    0.01                ||  0.800810008029             ||  0.7973 ± 0.0023  || OK ||
    296322    ||    0.1                 ||  0.800903791291             ||  0.799 ± 0.0026   || OK ||
     
    298324    ||    10                  ||  0.85200014698              ||  0.8584 ± 0.00092 || OK ||
    299325    ||    100                 ||  5.0238030968               ||  6.09 ± 0.0082    || '''FAIL''' ||
    300     ||    100                 ||  5.04763                    ||  6.09 ± 0.0082    || '''FAIL'''  (make with a sample of 100k events) ||
     326    ||    100                 ||  5.04763                    ||  6.09 ± 0.0082    || '''FAIL'''  (done with a sample of 100k events) ||
    301327    The last entry fails since the expected distribution for such value of the coupling is too different from the distribution of the Standard Model. Such discrepancy are expected in this case. One hint is that the cross-section is an order of magnitude higher than the original one (Looking at the distribution confirm this).
    302328    The inversed reweight (i.e. starting from the CWW=100 sample of events and reweight to find back the SM) is working properly. It returned: 0.803341120226
     
    3073332. For CW
    308334
    309     ||   Coupling value ($TeV^{-2}$)   ||   Reweight cross-section (pb)    ||   MadEvent cross-section (pb)  ||  Status  ||
     335    ||   Coupling value ($TeV^{-2}$)   ||   Reweight cross-section (pb)    ||   MG5_aMC cross-section (pb)  ||  Status  ||
    310336    ||    0.01                ||  0.800798262059             ||  0.7953 +- 0.002497  || OK ||
    311337    ||    0.1                 ||  0.801379445746             ||  0.7988 ± 0.0023   || OK ||
     
    313339    ||    10                  ||  0.889336417677             ||  0.8832 ± 0.003 || OK ||
    314340    ||    100                 ||  4.46724081967              ||  4.519 ± 0.015    || '''FAIL''' ||
    315     ||    100                 ||  4.44273                    ||  4.519 ± 0.015    || '''FAIL'''  (make with a sample of 100k events) ||
     341    ||    100                 ||  4.44273                    ||  4.519 ± 0.015    || '''FAIL'''  (done with a sample of 100k events) ||
    316342    Same comment as for the previous coupling.
    317343
    3183443. For CB
    319     ||   Coupling value ($TeV^{-2}$)   ||   Reweight cross-section (pb)  ||   MadEvent cross-section (pb)  ||   Status   ||
     345    ||   Coupling value ($TeV^{-2}$)   ||   Reweight cross-section (pb)  ||   MG5_aMC cross-section (pb)  ||   Status   ||
    320346    ||    0.01                ||  0.800798262059             ||  0.7977 ± 0.0027   || OK ||
    321347    ||    0.1                 ||  0.800782626532             ||  0.7985 ± 0.0024    || OK ||
     
    323349    ||    10                  ||  0.799127987884             ||  0.7971 ± 0.0024 || OK ||
    324350    ||    100                 ||  0.790019392142             ||  0.7852 ± 0.0026    || OK ||
    325     ||    100                 ||  0.786698206995             ||  0.7852 ± 0.0026    || OK  (make with a sample of 100k events) ||
     351    ||    100                 ||  0.786698206995             ||  0.7852 ± 0.0026    || OK  (done with a sample of 100k events) ||
    326352   This operator has less impact on the cross-section/distributions, and therefore even a large value of the coupling is still working fine.
    327353