PYTHIA  8.311
MergingHooks.h
1 // MergingHooks.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // This file is written by Stefan Prestel.
7 // Header file to allow user access to program at different stages.
8 // HardProcess: Container class for the hard process to be merged. Holds the
9 // bookkeeping of particles not be be reclustered
10 // MergingHooks: Steering class for matrix element merging. Some functions can
11 // be redefined in a derived class to have access to the merging
12 
13 #ifndef Pythia8_MergingHooks_H
14 #define Pythia8_MergingHooks_H
15 
16 #include "Pythia8/Basics.h"
17 #include "Pythia8/BeamParticle.h"
18 #include "Pythia8/Event.h"
19 #include "Pythia8/Info.h"
20 #include "Pythia8/ParticleData.h"
21 #include "Pythia8/PartonSystems.h"
22 #include "Pythia8/PhysicsBase.h"
23 #include "Pythia8/PythiaStdlib.h"
24 #include "Pythia8/Settings.h"
25 
26 
27 namespace Pythia8 {
28 
29 class PartonLevel;
30 
31 //==========================================================================
32 
33 // Declaration of hard process class
34 // This class holds information on the desired hard 2->2 process
35 // for the merging.
36 // This class is a container class for History class use.
37 
38 class HardProcess {
39 
40 public:
41 
42  // Flavour of the first incoming particle
44  // Flavour of the second incoming particle
46  // Flavours of the outgoing particles
47  vector<int> hardOutgoing1;
48  vector<int> hardOutgoing2;
49  // Flavour of intermediate bosons in the hard 2->2
50  vector<int> hardIntermediate;
51 
52  // Current reference event
54  // Potential positions of outgoing particles in reference event
55  vector<int> PosOutgoing1;
56  vector<int> PosOutgoing2;
57  // Potential positions of intermediate bosons in reference event
58  vector<int> PosIntermediate;
59 
60  // Information on merging scale read from LHE file
61  double tms;
62 
63  // Default constructor
64  HardProcess() : hardIncoming1(), hardIncoming2(), tms(){}
65  // Default destructor
66  virtual ~HardProcess(){}
67 
68  // Copy constructor
69  HardProcess( const HardProcess& hardProcessIn )
70  : state(hardProcessIn.state),
71  tms(hardProcessIn.tms) {
72  hardIncoming1 = hardProcessIn.hardIncoming1;
73  hardIncoming2 = hardProcessIn.hardIncoming2;
74  for(int i =0; i < int(hardProcessIn.hardOutgoing1.size());++i)
75  hardOutgoing1.push_back( hardProcessIn.hardOutgoing1[i]);
76  for(int i =0; i < int(hardProcessIn.hardOutgoing2.size());++i)
77  hardOutgoing2.push_back( hardProcessIn.hardOutgoing2[i]);
78  for(int i =0; i < int(hardProcessIn.hardIntermediate.size());++i)
79  hardIntermediate.push_back( hardProcessIn.hardIntermediate[i]);
80  for(int i =0; i < int(hardProcessIn.PosOutgoing1.size());++i)
81  PosOutgoing1.push_back( hardProcessIn.PosOutgoing1[i]);
82  for(int i =0; i < int(hardProcessIn.PosOutgoing2.size());++i)
83  PosOutgoing2.push_back( hardProcessIn.PosOutgoing2[i]);
84  for(int i =0; i < int(hardProcessIn.PosIntermediate.size());++i)
85  PosIntermediate.push_back( hardProcessIn.PosIntermediate[i]);
86  }
87 
88  // Constructor with path to LHE file
89  HardProcess( string LHEfile, ParticleData* particleData) : hardIncoming1(),
90  hardIncoming2(), tms() {
91  state = Event();
92  state.init("(hard process)", particleData);
93  translateLHEFString(LHEfile);
94  }
95 
96  // Constructor with core process input
97  virtual void initOnProcess( string process, ParticleData* particleData);
98 
99  // Constructor with path to LHE file input
100  void initOnLHEF( string LHEfile, ParticleData* particleData);
101 
102  // Function to access the LHE file and read relevant information
103  void translateLHEFString( string LHEpath);
104 
105  // Function to translate the process string (in MG/ME notation)
106  virtual void translateProcessString( string process);
107 
108  // Function to clear hard process information
109  void clear();
110 
111  // Function to check whether the sets of candidates Pos1, Pos2, together
112  // with the proposed candidate iPos give an allowed hard process state
113  virtual bool allowCandidates(int iPos, vector<int> Pos1, vector<int> Pos2,
114  const Event& event);
115  // Function to identify the hard subprocess in the current event
116  virtual void storeCandidates( const Event& event, string process);
117  // Function to check if the particle event[iPos] matches any of
118  // the stored outgoing particles of the hard subprocess
119  virtual bool matchesAnyOutgoing(int iPos, const Event& event);
120  // Function to check if instead of the particle event[iCandidate], another
121  // particle could serve as part of the hard process. Assumes that iCandidate
122  // is already stored as part of the hard process.
123  virtual bool findOtherCandidates(int iPos, const Event& event,
124  bool doReplace);
125  // Function to exchange a stored hard process candidate with another choice.
126  virtual bool exchangeCandidates( vector<int> candidates1,
127  vector<int> candidates2,
128  unordered_map<int,int> further1, unordered_map<int,int> further2);
129 
130  // Function to get the number of coloured final state partons in the
131  // hard process
132  int nQuarksOut();
133  // Function to get the number of uncoloured final state particles in the
134  // hard process
135  int nLeptonOut();
136  // Function to get the number of electroweak final state bosons in the
137  // hard process
138  int nBosonsOut();
139 
140  // Function to get the number of coloured initial state partons in the
141  // hard process
142  int nQuarksIn();
143  // Function to get the number of uncoloured initial state particles in the
144  // hard process
145  int nLeptonIn();
146  // Function to report if a resonace decay was found in the 2->2 sub-process
147  // of the current state
148  int hasResInCurrent();
149  // Function to report the number of resonace decays in the 2->2 sub-process
150  // of the current state
151  int nResInCurrent();
152  // Function to report if a resonace decay was found in the 2->2 hard process
153  bool hasResInProc();
154  // Function to print the hard process (for debug)
155  void list() const;
156  // Function to print the hard process candidates in the
157  // Matrix element state (for debug)
158  void listCandidates() const;
159 
160 };
161 
162 //==========================================================================
163 
164 // MergingHooks is base class for user input to the merging procedure.
165 
166 class MergingHooks : public PhysicsBase {
167 
168 public:
169 
170  // Constructor.
171  MergingHooks() : useShowerPluginSave(), showers(),
172  doUserMergingSave(false),
173  doMGMergingSave(false),
174  doKTMergingSave(false),
175  doPTLundMergingSave(false),
176  doCutBasedMergingSave(false), includeMassiveSave(),
177  enforceStrongOrderingSave(),
178  orderInRapiditySave(), pickByFullPSave(), pickByPoPT2Save(),
179  includeRedundantSave(), pickBySumPTSave(), allowColourShufflingSave(),
180  resetHardQRenSave(), resetHardQFacSave(), unorderedScalePrescipSave(),
181  unorderedASscalePrescipSave(), unorderedPDFscalePrescipSave(),
182  incompleteScalePrescipSave(), ktTypeSave(), nReclusterSave(),
183  nQuarksMergeSave(), nRequestedSave(), scaleSeparationFactorSave(),
184  nonJoinedNormSave(), fsrInRecNormSave(), herwigAcollFSRSave(),
185  herwigAcollISRSave(), pT0ISRSave(), pTcutSave(),
186  doNL3TreeSave(false),
187  doNL3LoopSave(false),
188  doNL3SubtSave(false),
189  doUNLOPSTreeSave(false),
190  doUNLOPSLoopSave(false),
191  doUNLOPSSubtSave(false),
192  doUNLOPSSubtNLOSave(false),
193  doUMEPSTreeSave(false),
194  doUMEPSSubtSave(false),
195  doEstimateXSection(false),
196  doRuntimeAMCATNLOInterfaceSave(false),
197  applyVeto(),
198  doRemoveDecayProducts(false), muMISave(), kFactor0jSave(), kFactor1jSave(),
199  kFactor2jSave(), tmsValueSave(), tmsValueNow(), DparameterSave(),
200  nJetMaxSave(), nJetMaxNLOSave(),
201  doOrderHistoriesSave(true),
202  doCutOnRecStateSave(false),
203  doWeakClusteringSave(false),
204  doSQCDClusteringSave(false), muFSave(), muRSave(), muFinMESave(),
205  muRinMESave(),
206  doIgnoreEmissionsSave(true),
207  doIgnoreStepSave(true), pTsave(), weightCKKWL1Save(), weightCKKWL2Save(),
208  nMinMPISave(), weightCKKWLSave(), weightFIRSTSave(),
209  doVariations(false), nWgts(0), nJetMaxLocal(), nJetMaxNLOLocal(),
210  hasJetMaxLocal(false),
211  includeWGTinXSECSave(false), nHardNowSave(), nJetNowSave(),
212  tmsHardNowSave(), tmsNowSave() {
213  inputEvent = Event(); resonances.resize(0);
214  useOwnHardProcess = false; hardProcess = 0; stopScaleSave= 0.0;
215  nVetoedInMainShower = 0;}
216 
217  // Make History class friend to allow access to advanced switches
218  friend class History;
219  // Make Pythia class friend
220  friend class Pythia;
221  // Make PartonLevel class friend
222  friend class PartonLevel;
223  // Make SpaceShower class friend
224  friend class SpaceShower;
225  // Make TimeShower class friend
226  friend class TimeShower;
227  // Make Merging class friend
228  friend class Merging;
229 
230  // Destructor.
231  virtual ~MergingHooks();
232  // Function encoding the functional definition of the merging scale
233  virtual double tmsDefinition( const Event& event){ return event[0].e();}
234  // Function to dampen weights calculated from histories with lowest
235  // multiplicity reclustered events that do not pass the ME cuts
236  virtual double dampenIfFailCuts( const Event& inEvent ) {
237  // Dummy statement to avoid compiler warnings
238  if(false) cout << inEvent[0].e();
239  return 1.;
240  }
241  // Hooks to disallow states in the construction of all histories, e.g.
242  // because jets are below the merging scale or fail the matrix element cuts
243  // Function to allow interference in the construction of histories
244  virtual bool canCutOnRecState() { return doCutOnRecStateSave; }
245  // Function to check reclustered state while generating all possible
246  // histories
247  // Function implementing check of reclustered events while constructing
248  // all possible histories
249  virtual bool doCutOnRecState( const Event& event ) {
250  // Dummy statement to avoid compiler warnings.
251  if(false) cout << event[0].e();
252  // Count number of final state partons.
253  int nPartons = 0;
254  for( int i=0; i < int(event.size()); ++i)
255  if( event[i].isFinal()
256  && (event[i].isGluon() || event[i].isQuark()) )
257  nPartons++;
258  // For gg -> h, allow only histories with gluons in initial state
259  if( hasEffectiveG2EW() && nPartons < 2){
260  if(event[3].id() != 21 && event[4].id() != 21)
261  return true;
262  }
263  return false;
264  }
265  // Function to allow not counting a trial emission.
266  virtual bool canVetoTrialEmission() { return false;}
267  // Function to check if trial emission should be rejected.
268  virtual bool doVetoTrialEmission( const Event&, const Event& ) {
269  return false; }
270 
271  // Function to calculate the hard process matrix element.
272  virtual double hardProcessME( const Event& inEvent ) {
273  // Dummy statement to avoid compiler warnings.
274  if ( false ) cout << inEvent[0].e();
275  return 1.; }
276 
277  // Functions for internal use inside Pythia source code
278  // Initialize.
279  virtual void init();
280 
281  // Function returning the value of the merging scale.
282  double tms() {
283  if(doCutBasedMergingSave) return 0.;
284  //else return tmsValueSave;
285  else return tmsValueNow;
286  }
287  double tmsCut() {
288  if(doCutBasedMergingSave) return 0.;
289  else return tmsValueSave;
290  }
291  void tms( double tmsIn ) { tmsValueNow = tmsIn; }
292 
293  // Function returning the value of the Delta R_{ij} cut for
294  // cut based merging scale definition.
295  double dRijMS() {
296  return ((tmsListSave.size() == 3) ? tmsListSave[0] : 0.);
297  }
298  // Function returning the value of the pT_{i} cut for
299  // cut based merging scale definition.
300  double pTiMS() {
301  return ((tmsListSave.size() == 3) ? tmsListSave[1] : 0.);
302  }
303  // Function returning the value of the pT_{i} cut for
304  // cut based merging scale definition.
305  double QijMS() {
306  return ((tmsListSave.size() == 3) ? tmsListSave[2] : 0.);
307  }
308  // Function returning the value of the maximal number of merged jets.
309  int nMaxJets() { return (hasJetMaxLocal) ? nJetMaxLocal : nJetMaxSave;}
310  // Function returning the value of the maximal number of merged jets,
311  // for which NLO corrections are available.
313  { return (hasJetMaxLocal) ? nJetMaxNLOLocal : nJetMaxNLOSave;}
314  // Function to return hard process string.
315  string getProcessString() { return processNow;}
316  // Function to return the number of outgoing partons in the core process
317  int nHardOutPartons(){ return hardProcess->nQuarksOut();}
318  // Function to return the number of outgoing leptons in the core process
319  int nHardOutLeptons(){ return hardProcess->nLeptonOut();}
320  // Function to return the number of outgoing electroweak bosons in the core
321  // process.
322  int nHardOutBosons(){ return hardProcess->nBosonsOut();}
323  // Function to return the number of incoming partons (hadrons) in the core
324  // process.
325  int nHardInPartons(){ return hardProcess->nQuarksIn();}
326  // Function to return the number of incoming leptons in the core process.
327  int nHardInLeptons(){ return hardProcess->nLeptonIn();}
328  // Function to report the number of resonace decays in the 2->2 sub-process
329  // of the current state.
330  int nResInCurrent(){ return hardProcess->nResInCurrent();}
331  // Function to determine if user defined merging should be applied.
332  bool doUserMerging(){ return doUserMergingSave;}
333  // Function to determine if automated MG/ME merging should be applied.
334  bool doMGMerging() { return doMGMergingSave;}
335  // Function to determine if KT merging should be applied.
336  bool doKTMerging() { return doKTMergingSave;}
337  // Function to determine if PTLund merging should be applied.
338  bool doPTLundMerging() { return doPTLundMergingSave;}
339  // Function to determine if cut based merging should be applied.
340  bool doCutBasedMerging() { return doCutBasedMergingSave;}
341  bool doCKKWLMerging() { return (doUserMergingSave || doMGMergingSave
342  || doKTMergingSave || doPTLundMergingSave || doCutBasedMergingSave); }
343  // Functions to determine if and which part of UMEPS merging
344  // should be applied
345  bool doUMEPSTree() { return doUMEPSTreeSave;}
346  bool doUMEPSSubt() { return doUMEPSSubtSave;}
347  bool doUMEPSMerging() { return (doUMEPSTreeSave || doUMEPSSubtSave);}
348  // Functions to determine if and which part of NL3 merging
349  // should be applied
350  bool doNL3Tree() { return doNL3TreeSave;}
351  bool doNL3Loop() { return doNL3LoopSave;}
352  bool doNL3Subt() { return doNL3SubtSave;}
353  bool doNL3Merging() { return (doNL3TreeSave || doNL3LoopSave
354  || doNL3SubtSave); }
355  // Functions to determine if and which part of UNLOPS merging
356  // should be applied
357  bool doUNLOPSTree() { return doUNLOPSTreeSave;}
358  bool doUNLOPSLoop() { return doUNLOPSLoopSave;}
359  bool doUNLOPSSubt() { return doUNLOPSSubtSave;}
360  bool doUNLOPSSubtNLO() { return doUNLOPSSubtNLOSave;}
361  bool doUNLOPSMerging() { return (doUNLOPSTreeSave || doUNLOPSLoopSave
362  || doUNLOPSSubtSave || doUNLOPSSubtNLOSave); }
363 
364  // Function to determine if we have a runtime interface to aMC@NLO.
365  bool doRuntimeAMCATNLOInterface() { return doRuntimeAMCATNLOInterfaceSave;}
366 
367  // Return the number clustering steps that have actually been done.
368  int nRecluster() { return nReclusterSave;}
369 
370  // Return number of requested additional jets on top of the Born process.
371  int nRequested() { return nRequestedSave;}
372 
373  //----------------------------------------------------------------------//
374  // Output functions to analyse/prepare event for merging
375  //----------------------------------------------------------------------//
376 
377  // Function to check if event contains an emission not present in the hard
378  // process.
379  bool isFirstEmission(const Event& event);
380 
381  // Function to allow effective gg -> EW boson couplings.
383  if ( getProcessString().compare("pp>h") == 0 ) return true;
384  return false; }
385 
386  // Function to allow effective gg -> EW boson couplings.
387  bool allowEffectiveVertex( vector<int> in, vector<int> out) {
388  if ( getProcessString().compare("ta+ta->jj") == 0
389  || getProcessString().compare("ta-ta+>jj") == 0 ) {
390  int nInFermions(0), nOutFermions(0);
391  for (int i=0; i < int(in.size()); ++i)
392  if (abs(in[i])<20) nInFermions++;
393  for (int i=0; i < int(out.size()); ++i)
394  if (abs(out[i])<20) nOutFermions++;
395  return (nInFermions%2==0 && nOutFermions%2==0);
396  }
397  return false;
398  }
399 
400  // Return event stripped from decay products.
401  Event bareEvent( const Event& inputEventIn, bool storeInputEvent );
402  // Write event with decay products attached to argument.
403  bool reattachResonanceDecays( Event& process );
404 
405  // Check if particle at position iPos is part of the hard sub-system
406  bool isInHard( int iPos, const Event& event);
407 
408  // Function to return the number of clustering steps for the current event
409  virtual int getNumberOfClusteringSteps(const Event& event,
410  bool resetNjetMax = false);
411 
412  //----------------------------------------------------------------------//
413  // Functions to steer construction of histories
414  //----------------------------------------------------------------------//
415 
416  // Function to force preferred picking of ordered histories. By default,
417  // unordered histories will only be considered if no ordered histories
418  // were found.
419  void orderHistories( bool doOrderHistoriesIn) {
420  doOrderHistoriesSave = doOrderHistoriesIn; }
421  // Function to force cut on reconstructed states internally, as needed
422  // for gg -> Higgs to ensure that e.g. uu~ -> Higgs is not constructed.
423  void allowCutOnRecState( bool doCutOnRecStateIn) {
424  doCutOnRecStateSave = doCutOnRecStateIn; }
425 
426  // Function to allow final state clusterings of weak bosons
427  void doWeakClustering( bool doWeakClusteringIn ) {
428  doWeakClusteringSave = doWeakClusteringIn; }
429 
430  //----------------------------------------------------------------------//
431  // Functions used as default merging scales
432  //----------------------------------------------------------------------//
433 
434  // Function to check if the input particle is a light jet, i.e. should be
435  // checked against the merging scale defintion.
436  bool checkAgainstCut( const Particle& particle);
437  // Function to return the value of the merging scale function in the
438  // current event.
439  virtual double tmsNow( const Event& event );
440  // Find the minimal Lund pT between coloured partons in the event
441  double rhoms( const Event& event, bool withColour);
442  // Function to calculate the minimal kT in the event
443  double kTms(const Event & event);
444  // Find the if the event passes the Delta R_{ij}, pT_{i} and Q_{ij} cuts on
445  // the matrix element, as needed for cut-based merging scale definition
446  double cutbasedms( const Event& event );
447 
448  //----------------------------------------------------------------------//
449  // Functions to steer shower evolution (public to allow for PS plugin)
450  //----------------------------------------------------------------------//
451 
452  // Flag to indicate trial shower usage.
453  void doIgnoreEmissions( bool doIgnoreIn ) {
454  doIgnoreEmissionsSave = doIgnoreIn;
455  }
456  // Function to allow not counting a trial emission.
457  virtual bool canVetoEmission() { return !doIgnoreEmissionsSave; }
458  // Function to check if emission should be rejected.
459  virtual bool doVetoEmission( const Event& );
460  virtual bool usesVincia() {return false;}
461 
462  //----------------------------------------------------------------------//
463  // Functions used as clusterings / probabilities
464  //----------------------------------------------------------------------//
465 
467  virtual bool useShowerPlugin() { return useShowerPluginSave; }
468 
469  //----------------------------------------------------------------------//
470  // Functions to retrieve if merging weight should countin the internal
471  // cross section and the event weight.
472  //----------------------------------------------------------------------//
473 
474  bool includeWGTinXSEC() { return includeWGTinXSECSave;}
475 
476  //----------------------------------------------------------------------//
477  // Functions to retrieve event veto information
478  //----------------------------------------------------------------------//
479 
480  int nHardNow() { return nHardNowSave; }
481  double tmsHardNow() { return tmsHardNowSave; }
482  int nJetsNow() { return nJetNowSave; }
483  double tmsNow() { return tmsNowSave;}
484 
485  void setHardProcessPtr(HardProcess* hardProcIn) { hardProcess = hardProcIn; }
486 
487  //----------------------------------------------------------------------//
488  // Functions related to renormalization scale variations
489  //----------------------------------------------------------------------//
490 
491  int nMuRVar() { return muRVarFactors.size(); }
492  void printIndividualWeights();
493 
494  //----------------------------------------------------------------------//
495  // The members, switches etc.
496  //----------------------------------------------------------------------//
497 
498  // Helper class doing all the core process book-keeping
500  HardProcess* hardProcess;
501 
502  PartonLevel* showers;
503  void setShowerPointer(PartonLevel* psIn ) {showers = psIn;}
504 
505  // AlphaS objects for alphaS reweighting use
507  AlphaStrong AlphaS_ISRSave;
508  AlphaEM AlphaEM_FSRSave;
509  AlphaEM AlphaEM_ISRSave;
510 
511  // Saved path to LHE file for more automated merging
512  string lheInputFile;
513 
514  // Flags for merging procedure definition.
515  bool doUserMergingSave, doMGMergingSave, doKTMergingSave,
516  doPTLundMergingSave, doCutBasedMergingSave,
517  includeMassiveSave, enforceStrongOrderingSave, orderInRapiditySave,
518  pickByFullPSave, pickByPoPT2Save, includeRedundantSave,
519  pickBySumPTSave, allowColourShufflingSave, resetHardQRenSave,
520  resetHardQFacSave;
521  int unorderedScalePrescipSave, unorderedASscalePrescipSave,
522  unorderedPDFscalePrescipSave, incompleteScalePrescipSave,
523  ktTypeSave, nReclusterSave, nQuarksMergeSave, nRequestedSave;
524 
525  double scaleSeparationFactorSave, nonJoinedNormSave,
526  fsrInRecNormSave, herwigAcollFSRSave, herwigAcollISRSave,
527  pT0ISRSave, pTcutSave, pTminISRSave, pTminFSRSave;
528  bool doNL3TreeSave, doNL3LoopSave, doNL3SubtSave;
529  bool doUNLOPSTreeSave, doUNLOPSLoopSave, doUNLOPSSubtSave,
530  doUNLOPSSubtNLOSave;
531  bool doUMEPSTreeSave, doUMEPSSubtSave;
532 
533  // Flag to only do phase space cut, rejecting events below the tms cut.
535 
536  // Flag for runtime aMC@NLO interface. Needed for aMC@NLO-Delta.
538 
539  // Flag for postponing event vetos. If false, events are not vetoed
540  // based on the merging scale in CKKW-L merging, but have to be
541  // vetoed by the user in the main program.
542  bool applyVeto;
543 
544  // Save input event in case decay products need to be detached.
546  vector< pair<int,int> > resonances;
547  bool doRemoveDecayProducts;
548 
549  // Starting scale for attaching MPI.
550  double muMISave;
551 
552  // Precalculated K-factors.
554  double kFactor1jSave;
555  double kFactor2jSave;
556 
557  // Saved members.
558  double tmsValueSave, tmsValueNow, DparameterSave;
559  int nJetMaxSave;
560  int nJetMaxNLOSave;
561 
562  string processSave, processNow;
563 
564  // List of cut values to used to define a merging scale. Ordering:
565  // 0: DeltaR_{jet_i,jet_j,min}
566  // 1: p_{T,jet_i,min}
567  // 2: Q_{jet_i,jet_j,min}
568  vector<double> tmsListSave;
569 
570  // INTERNAL Hooks to allow construction of all histories,
571  // including un-ordered ones
573 
574  // INTERNAL Hooks to disallow states in the construction of all histories,
575  // e.g. because jets are below the merging scale, of to avoid the
576  // construction of uu~ -> Higgs histories.
578 
579  // INTERNAL Hooks to allow clustering W bosons.
580  bool doWeakClusteringSave, doSQCDClusteringSave;
581 
582  // Store / get first scale in PDF's that Pythia should have used
583  double muFSave;
584  double muRSave;
585 
586  // Store / get factorisation scale used in matrix element calculation.
587  double muFinMESave;
588  double muRinMESave;
589 
590  // Flag to indicate trial shower usage.
592  // Flag to indicate if events should be vetoed.
594  // Stored weights in case veot needs to be revoked
595  double pTsave;
596  vector<double> weightCKKWL1Save, weightCKKWL2Save;
597  int nMinMPISave;
598  // Save CKKW-L weight / O(\alpha_s) weight.
599  vector<double> weightCKKWLSave, weightFIRSTSave;
600 
601  // Struct to save individual weights
603  vector<double> wtSave;
604  vector<double> pdfWeightSave;
605  vector<double> mpiWeightSave;
606  vector<double> asWeightSave;
607  vector<double> aemWeightSave;
608  vector<double> bornAsVarFac;
609  };
610 
611  IndividualWeights individualWeights;
612 
613  // Flag to indicate whether renormalization scale variations are performed
615  // Vector of variation factors applied to renormalization scale
616  vector<double> muRVarFactors;
617  // Number of weights, nominal + variations
618  int nWgts;
619 
620  // Local copies of nJetMax inputs, if recalculation is necessary.
622  int nJetMaxNLOLocal;
623  bool hasJetMaxLocal;
624 
625  // Event veto and hard process information, if veto should not applied be
626  // directly, but is up to the user.
628  int nHardNowSave, nJetNowSave;
629  double tmsHardNowSave, tmsNowSave;
630 
631  //----------------------------------------------------------------------//
632  // Generic setup functions
633  //----------------------------------------------------------------------//
634 
635  // Function storing candidates for the hard process in the current event
636  // Needed in order not to cluster members of the core process
637  void storeHardProcessCandidates(const Event& event){
638  hardProcess->storeCandidates(event,getProcessString());
639  }
640 
641  // Function to set the path to the LHE file, so that more automated merging
642  // can be used.
643  // Remove "_1.lhe" suffix from LHE file name.
644  // This is done so that the HarsProcess class can access both the +0 and +1
645  // LHE files to find both the merging scale and the core process string
646  // Store.
647  void setLHEInputFile( string lheFile) {
648  lheInputFile = lheFile.substr(0,lheFile.size()-6); }
649 
650  //----------------------------------------------------------------------//
651  // Functions for output of class members.
652  //----------------------------------------------------------------------//
653 
654  // Return AlphaStrong objects
655  AlphaStrong* AlphaS_FSR() { return &AlphaS_FSRSave;}
656  AlphaStrong* AlphaS_ISR() { return &AlphaS_ISRSave;}
657  AlphaEM* AlphaEM_FSR() { return &AlphaEM_FSRSave;}
658  AlphaEM* AlphaEM_ISR() { return &AlphaEM_ISRSave;}
659 
660  // Functions to return advanced merging switches
661  // Include masses in definition of evolution pT and splitting kernels
662  bool includeMassive() { return includeMassiveSave;}
663  // Prefer strongly ordered histories
664  bool enforceStrongOrdering() { return enforceStrongOrderingSave;}
665  // Prefer histories ordered in rapidity and evolution pT
666  bool orderInRapidity() { return orderInRapiditySave;}
667  // Pick history probabilistically by full (correct) splitting probabilities
668  bool pickByFull() { return pickByFullPSave;}
669  // Pick history probabilistically, with easier form of probabilities
670  bool pickByPoPT2() { return pickByPoPT2Save;}
671  // Include redundant terms (e.g. PDF ratios) in the splitting probabilities
672  bool includeRedundant(){ return includeRedundantSave;}
673  // Pick by winner-takes-it-all, with minimum sum of scalar evolution pT
674  bool pickBySumPT(){ return pickBySumPTSave;}
675 
676  // Prescription for combined scale of unordered emissions
677  // 0 : use larger scale
678  // 1 : use smaller scale
679  int unorderedScalePrescip() { return unorderedScalePrescipSave;}
680  // Prescription for combined scale used in alpha_s for unordered emissions
681  // 0 : use combined emission scale in alpha_s weight for both (!) splittings
682  // 1 : use original reclustered scales of each emission in alpha_s weight
683  int unorderedASscalePrescip() { return unorderedASscalePrescipSave;}
684  // Prescription for combined scale used in PDF ratios for unordered
685  // emissions
686  // 0 : use combined emission scale in PDFs for both (!) splittings
687  // 1 : use original reclustered scales of each emission in PDF ratiost
688  int unorderedPDFscalePrescip() { return unorderedPDFscalePrescipSave;}
689  // Prescription for starting scale of incomplete histories
690  // 0: use factorization scale
691  // 1: use sHat
692  // 2: use s
693  int incompleteScalePrescip() { return incompleteScalePrescipSave;}
694 
695  // Allow swapping one colour index while reclustering
696  bool allowColourShuffling() { return allowColourShufflingSave;}
697 
698  // Allow use of dynamical renormalisation scale of the core 2-> 2 process.
699  bool resetHardQRen() { return resetHardQRenSave; }
700  // Allow use of dynamical factorisation scale of the core 2-> 2 process.
701  bool resetHardQFac() { return resetHardQFacSave; }
702 
703  // Factor by which two scales should differ to be classified strongly
704  // ordered.
705  double scaleSeparationFactor() { return scaleSeparationFactorSave;}
706  // Absolute normalization of splitting probability for non-joined
707  // evolution.
708  double nonJoinedNorm() { return nonJoinedNormSave;}
709  // Absolute normalization of splitting probability for final state
710  // splittings with initial state recoiler
711  double fsrInRecNorm() { return fsrInRecNormSave;}
712  // Factor multiplying scalar evolution pT for FSR splitting, when picking
713  // history by minimum scalar pT (see Jonathan Tully's thesis)
714  double herwigAcollFSR() { return herwigAcollFSRSave;}
715  // Factor multiplying scalar evolution pT for ISR splitting, when picking
716  // history by minimum scalar pT (see Jonathan Tully's thesis)
717  double herwigAcollISR() { return herwigAcollISRSave;}
718  // ISR regularisation scale
719  double pT0ISR() { return pT0ISRSave;}
720  // Shower cut-off scale
721  double pTcut() { return pTcutSave;}
722 
723  // MI starting scale.
724  void muMI( double mu) { muMISave = mu; }
725  double muMI() { return muMISave;}
726 
727  // Full k-Factor for current event
728  double kFactor(int njet = 0) {
729  return (njet == 0) ? kFactor0jSave
730  :(njet == 1) ? kFactor1jSave
731  : kFactor2jSave;
732  }
733  // O(\alhpa_s)-term of the k-Factor for current event
734  double k1Factor( int njet = 0) {
735  return (kFactor(njet) - 1)/infoPtr->alphaS();
736  }
737 
738  // Function to return if construction of histories is biased towards ordered
739  // histories.
740  bool orderHistories() { return doOrderHistoriesSave;}
741 
742  // INTERNAL Hooks to disallow states in the construction of all histories,
743  // e.g. because jets are below the merging scale, of to avoid the
744  // construction of uu~ -> Higgs histories.
745  bool allowCutOnRecState() { return doCutOnRecStateSave;}
746 
747  // INTERNAL Hooks to allow clustering W bosons.
748  bool doWeakClustering() { return doWeakClusteringSave;}
749  // INTERNAL Hooks to allow clustering clustering of gluons to squarks.
750  bool doSQCDClustering() { return doSQCDClusteringSave;}
751 
752  // Store / get first scale in PDF's that Pythia should have used
753  double muF() { return (muFSave > 0.) ? muFSave : infoPtr->QFac();}
754  double muR() { return (muRSave > 0.) ? muRSave : infoPtr->QRen();}
755  // Store / get factorisation scale used in matrix element calculation.
756  double muFinME() {
757  // Start with checking the event attribute called "muf".
758  string mus = infoPtr->getEventAttribute("muf2",true);
759  double mu = (mus.empty()) ? 0. : atof((char*)mus.c_str());
760  mu = sqrt(mu);
761  // Check the scales tag of the event.
762  if (infoPtr->scales) mu = infoPtr->getScalesAttribute("muf");
763  return (mu > 0.) ? mu : (muFinMESave > 0.) ? muFinMESave
764  : infoPtr->QFac();
765  }
766  double muRinME() {
767  // Start with checking the event attribute called "mur2".
768  string mus = infoPtr->getEventAttribute("mur2",true);
769  double mu = (mus.empty()) ? 0. : atof((char*)mus.c_str());
770  mu = sqrt(mu);
771  // Check the scales tag of the event.
772  if (infoPtr->scales) mu = infoPtr->getScalesAttribute("mur");
773  return (mu > 0.) ? mu : (muRinMESave > 0.) ? muRinMESave
774  : infoPtr->QRen();
775  }
776 
777 
778  //----------------------------------------------------------------------//
779  // Functions to steer merging code
780  //----------------------------------------------------------------------//
781 
782  // Flag to indicate if events should be vetoed.
783  void doIgnoreStep(bool doIgnoreIn) {doIgnoreStepSave = doIgnoreIn;}
784  // Function to allow event veto.
785  virtual bool canVetoStep() {return !doIgnoreStepSave;}
786 
787  // Stored weights in case veto needs to be revoked
788  void storeWeights(vector<double> weight) {
789  weightCKKWL1Save = weightCKKWL2Save = weight;}
790 
791  // Function to check event veto.
792  virtual bool doVetoStep(const Event& process, const Event& event,
793  bool doResonance = false);
794 
795  // Set starting scales
796  virtual bool setShowerStartingScales( bool isTrial, bool doMergeFirstEmm,
797  double& pTscaleIn, const Event& event,
798  double& pTmaxFSRIn, bool& limitPTmaxFSRin,
799  double& pTmaxISRIn, bool& limitPTmaxISRin,
800  double& pTmaxMPIIn, bool& limitPTmaxMPIin );
801 
802  // Set shower stopping scale. Necessary to e.g. avoid accumulation of
803  // incorrect (low-pT) shower weights through trial showering.
805  void setShowerStoppingScale(double scale = 0.) {stopScaleSave = scale;}
806  double getShowerStoppingScale() {return stopScaleSave;}
807 
808  void nMinMPI(int nMinMPIIn) {nMinMPISave = nMinMPIIn; }
809  int nMinMPI() {return nMinMPISave;}
810 
811  //----------------------------------------------------------------------//
812  // Functions for internal merging scale definions
813  //----------------------------------------------------------------------//
814 
815  // Function to calculate the kT separation between two particles
816  double kTdurham(const Particle& RadAfterBranch,
817  const Particle& EmtAfterBranch, int Type, double D );
818  // Function to compute "pythia pT separation" from Particle input
819  double rhoPythia(const Event& event, int rad, int emt, int rec,
820  int ShowerType);
821 
822  // Function to find a colour (anticolour) index in the input event,
823  // used to find colour-connected recoilers
824  int findColour(int col, int iExclude1, int iExclude2,
825  const Event& event, int type, bool isHardIn);
826  // Function to compute Delta R separation from 4-vector input
827  double deltaRij(Vec4 jet1, Vec4 jet2);
828 
829  //----------------------------------------------------------------------//
830  // Functions for weight management
831  //----------------------------------------------------------------------//
832 
833  // Function to get the CKKW-L weight for the current event
834  double getWeightNLO(int i=0) { return (weightCKKWLSave[i]
835  - weightFIRSTSave[i]);}
836  // Return CKKW-L weight.
837  vector<double> getWeightCKKWL() { return weightCKKWLSave; }
838  // Return O(\alpha_s) weight.
839  vector<double> getWeightFIRST() { return weightFIRSTSave; }
840  // Set CKKW-L weight.
841  void setWeightCKKWL( vector<double> weightIn){
842  weightCKKWLSave = weightIn;
843  infoPtr->weightContainerPtr
844  ->weightsMerging.setValueVector(weightIn); }
845  // Set O(\alpha_s) weight.
846  void setWeightFIRST( vector<double> weightIn){
847  weightFIRSTSave = weightIn;
848  infoPtr->weightContainerPtr->weightsMerging
849  .setValueFirstVector(weightIn); }
850  // Function to return Sudakov weight as calculated before, also include MPI
851  // weight. Only call after regular weight functions, since it is calculated
852  // there.
853  vector<double> getSudakovWeight() {
854  vector<double> ret = individualWeights.wtSave;
855  for (int i = 0; i < nWgts; ++i) {
856  ret[i] *= individualWeights.pdfWeightSave[i] *
857  individualWeights.mpiWeightSave[i];
858  }
859  return ret;
860  }
861  // Function to return coupling weight.
862  vector<double> getCouplingWeight() {
863  vector<double> ret = individualWeights.asWeightSave;
864  for (int i = 0; i < nWgts; ++i) {
865  ret[i] *= individualWeights.aemWeightSave[i];
866  }
867  return ret;
868  }
869 
870 //--------------------------------------------------------------------------
871 
872 
873 
874  //----------------------------------------------------------------------//
875  // Functions and members to store the event veto information
876  //----------------------------------------------------------------------//
877 
878  // Set CKKWL veto information.
879  void setEventVetoInfo(int nJetNowIn, double tmsNowIn) {
880  nJetNowSave = nJetNowIn; tmsNowSave = tmsNowIn; }
881 
882  // Set the hard process information.
883  void setHardProcessInfo(int nHardNowIn, double tmsHardNowIn) {
884  nHardNowSave = nHardNowIn; tmsHardNowSave = tmsHardNowIn; }
885 
886  // Statistics.
888  void addVetoInMainShower() {++nVetoedInMainShower;}
889  int getNumberVetoedInMainShower() {return nVetoedInMainShower;}
890 
891 };
892 
893 //==========================================================================
894 
895 } // end namespace Pythia8
896 
897 #endif // Pythia8_MergingHooks_H
vector< int > hardIntermediate
Flavour of intermediate bosons in the hard 2->2.
Definition: MergingHooks.h:50
bool resetHardQRen()
Allow use of dynamical renormalisation scale of the core 2-> 2 process.
Definition: MergingHooks.h:699
bool pickByFull()
Pick history probabilistically by full (correct) splitting probabilities.
Definition: MergingHooks.h:668
bool doKTMerging()
Function to determine if KT merging should be applied.
Definition: MergingHooks.h:336
double pTiMS()
Definition: MergingHooks.h:300
bool applyVeto
Definition: MergingHooks.h:542
Event state
Current reference event.
Definition: MergingHooks.h:53
Definition: StandardModel.h:23
vector< int > hardOutgoing1
Flavours of the outgoing particles.
Definition: MergingHooks.h:47
vector< double > getWeightFIRST()
Return O() weight.
Definition: MergingHooks.h:839
int unorderedASscalePrescip()
Definition: MergingHooks.h:683
bool orderInRapidity()
Prefer histories ordered in rapidity and evolution pT.
Definition: MergingHooks.h:666
int nHardInLeptons()
Function to return the number of incoming leptons in the core process.
Definition: MergingHooks.h:327
int nHardOutPartons()
Function to return the number of outgoing partons in the core process.
Definition: MergingHooks.h:317
void setLHEInputFile(string lheFile)
Definition: MergingHooks.h:647
bool pickByPoPT2()
Pick history probabilistically, with easier form of probabilities.
Definition: MergingHooks.h:670
Definition: PhysicsBase.h:27
Struct to save individual weights.
Definition: MergingHooks.h:602
virtual bool allowCandidates(int iPos, vector< int > Pos1, vector< int > Pos2, const Event &event)
Definition: MergingHooks.cc:915
int nVetoedInMainShower
Statistics.
Definition: MergingHooks.h:887
vector< double > getWeightCKKWL()
Return CKKW-L weight.
Definition: MergingHooks.h:837
virtual void translateProcessString(string process)
Function to translate the process string (in MG/ME notation)
Definition: MergingHooks.cc:554
virtual bool canVetoStep()
Function to allow event veto.
Definition: MergingHooks.h:785
double muFinME()
Store / get factorisation scale used in matrix element calculation.
Definition: MergingHooks.h:756
The Event class holds all info on the generated event.
Definition: Event.h:453
int hardIncoming2
Flavour of the second incoming particle.
Definition: MergingHooks.h:45
The TimeShower class does timelike showers.
Definition: TimeShower.h:33
MergingHooks()
Constructor.
Definition: MergingHooks.h:171
AlphaStrong AlphaS_FSRSave
AlphaS objects for alphaS reweighting use.
Definition: MergingHooks.h:506
double kFactor0jSave
Precalculated K-factors.
Definition: MergingHooks.h:553
bool useShowerPluginSave
Functions used as clusterings / probabilities.
Definition: MergingHooks.h:466
bool doUserMergingSave
Flags for merging procedure definition.
Definition: MergingHooks.h:515
bool doIgnoreStepSave
Flag to indicate if events should be vetoed.
Definition: MergingHooks.h:593
double nonJoinedNorm()
Definition: MergingHooks.h:708
HardProcess(const HardProcess &hardProcessIn)
Copy constructor.
Definition: MergingHooks.h:69
double stopScaleSave
Definition: MergingHooks.h:804
bool doIgnoreEmissionsSave
Flag to indicate trial shower usage.
Definition: MergingHooks.h:591
bool doWeakClusteringSave
INTERNAL Hooks to allow clustering W bosons.
Definition: MergingHooks.h:580
double muF()
Store / get first scale in PDF&#39;s that Pythia should have used.
Definition: MergingHooks.h:753
void allowCutOnRecState(bool doCutOnRecStateIn)
Definition: MergingHooks.h:423
vector< double > muRVarFactors
Vector of variation factors applied to renormalization scale.
Definition: MergingHooks.h:616
HardProcess()
Default constructor.
Definition: MergingHooks.h:64
virtual bool matchesAnyOutgoing(int iPos, const Event &event)
Definition: MergingHooks.cc:1559
int nJetMaxLocal
Local copies of nJetMax inputs, if recalculation is necessary.
Definition: MergingHooks.h:621
int nWgts
Number of weights, nominal + variations.
Definition: MergingHooks.h:618
int nHardNow()
Functions to retrieve event veto information.
Definition: MergingHooks.h:480
void doIgnoreEmissions(bool doIgnoreIn)
Functions to steer shower evolution (public to allow for PS plugin)
Definition: MergingHooks.h:453
bool doUMEPSTree()
Definition: MergingHooks.h:345
virtual double hardProcessME(const Event &inEvent)
Function to calculate the hard process matrix element.
Definition: MergingHooks.h:272
Event inputEvent
Save input event in case decay products need to be detached.
Definition: MergingHooks.h:545
double muFSave
Store / get first scale in PDF&#39;s that Pythia should have used.
Definition: MergingHooks.h:583
bool hasResInProc()
Function to report if a resonace decay was found in the 2->2 hard process.
Definition: MergingHooks.cc:1948
bool allowEffectiveVertex(vector< int > in, vector< int > out)
Function to allow effective gg -> EW boson couplings.
Definition: MergingHooks.h:387
bool resetHardQFac()
Allow use of dynamical factorisation scale of the core 2-> 2 process.
Definition: MergingHooks.h:701
virtual bool doVetoTrialEmission(const Event &, const Event &)
Function to check if trial emission should be rejected.
Definition: MergingHooks.h:268
int nQuarksIn()
Definition: MergingHooks.cc:1878
void list() const
Function to print the hard process (for debug)
Definition: MergingHooks.cc:1970
void clear()
Function to clear hard process information.
Definition: MergingHooks.cc:2007
AlphaStrong * AlphaS_FSR()
Functions for output of class members.
Definition: MergingHooks.h:655
Definition: StandardModel.h:106
bool doOrderHistoriesSave
Definition: MergingHooks.h:572
int unorderedScalePrescip()
Definition: MergingHooks.h:679
bool pickBySumPT()
Pick by winner-takes-it-all, with minimum sum of scalar evolution pT.
Definition: MergingHooks.h:674
double pTsave
Stored weights in case veot needs to be revoked.
Definition: MergingHooks.h:595
virtual bool canVetoTrialEmission()
Function to allow not counting a trial emission.
Definition: MergingHooks.h:266
bool doUNLOPSTree()
Definition: MergingHooks.h:357
void storeWeights(vector< double > weight)
Stored weights in case veto needs to be revoked.
Definition: MergingHooks.h:788
bool hasEffectiveG2EW()
Function to allow effective gg -> EW boson couplings.
Definition: MergingHooks.h:382
double muFinMESave
Store / get factorisation scale used in matrix element calculation.
Definition: MergingHooks.h:587
Definition: Merging.h:33
int nMaxJetsNLO()
Definition: MergingHooks.h:312
vector< double > weightCKKWLSave
Save CKKW-L weight / O() weight.
Definition: MergingHooks.h:599
virtual double dampenIfFailCuts(const Event &inEvent)
Definition: MergingHooks.h:236
double fsrInRecNorm()
Definition: MergingHooks.h:711
double scaleSeparationFactor()
Definition: MergingHooks.h:705
void doWeakClustering(bool doWeakClusteringIn)
Function to allow final state clusterings of weak bosons.
Definition: MergingHooks.h:427
virtual bool canVetoEmission()
Function to allow not counting a trial emission.
Definition: MergingHooks.h:457
bool doCutBasedMerging()
Function to determine if cut based merging should be applied.
Definition: MergingHooks.h:340
string getProcessString()
Function to return hard process string.
Definition: MergingHooks.h:315
bool includeWGTinXSECSave
Definition: MergingHooks.h:627
double kFactor(int njet=0)
Full k-Factor for current event.
Definition: MergingHooks.h:728
int nHardInPartons()
Definition: MergingHooks.h:325
double tms
Information on merging scale read from LHE file.
Definition: MergingHooks.h:61
int incompleteScalePrescip()
Definition: MergingHooks.h:693
bool includeRedundant()
Include redundant terms (e.g. PDF ratios) in the splitting probabilities.
Definition: MergingHooks.h:672
int hasResInCurrent()
Definition: MergingHooks.cc:1902
bool doMGMerging()
Function to determine if automated MG/ME merging should be applied.
Definition: MergingHooks.h:334
Definition: PartonLevel.h:45
int nResInCurrent()
Definition: MergingHooks.cc:1924
vector< int > PosOutgoing1
Potential positions of outgoing particles in reference event.
Definition: MergingHooks.h:55
bool doNL3Tree()
Definition: MergingHooks.h:350
double dRijMS()
Definition: MergingHooks.h:295
int nResInCurrent()
Definition: MergingHooks.h:330
int nBosonsOut()
Definition: MergingHooks.cc:1861
double tmsValueSave
Saved members.
Definition: MergingHooks.h:558
double tms()
Function returning the value of the merging scale.
Definition: MergingHooks.h:282
void listCandidates() const
Definition: MergingHooks.cc:1989
void initOnLHEF(string LHEfile, ParticleData *particleData)
Constructor with path to LHE file input.
Definition: MergingHooks.cc:36
Definition: MergingHooks.h:38
void setWeightFIRST(vector< double > weightIn)
Set O() weight.
Definition: MergingHooks.h:846
int nHardOutLeptons()
Function to return the number of outgoing leptons in the core process.
Definition: MergingHooks.h:319
double muRinME()
Definition: MergingHooks.h:766
void doIgnoreStep(bool doIgnoreIn)
Functions to steer merging code.
Definition: MergingHooks.h:783
void orderHistories(bool doOrderHistoriesIn)
Functions to steer construction of histories.
Definition: MergingHooks.h:419
int size() const
Event record size.
Definition: Event.h:504
Definition: Event.h:32
bool orderHistories()
Definition: MergingHooks.h:740
int nMaxJets()
Function returning the value of the maximal number of merged jets.
Definition: MergingHooks.h:309
bool doPTLundMerging()
Function to determine if PTLund merging should be applied.
Definition: MergingHooks.h:338
bool doSQCDClustering()
INTERNAL Hooks to allow clustering clustering of gluons to squarks.
Definition: MergingHooks.h:750
void setEventVetoInfo(int nJetNowIn, double tmsNowIn)
Functions and members to store the event veto information.
Definition: MergingHooks.h:879
vector< double > getCouplingWeight()
Function to return coupling weight.
Definition: MergingHooks.h:862
double k1Factor(int njet=0)
O()-term of the k-Factor for current event.
Definition: MergingHooks.h:734
bool doUserMerging()
Function to determine if user defined merging should be applied.
Definition: MergingHooks.h:332
string lheInputFile
Saved path to LHE file for more automated merging.
Definition: MergingHooks.h:512
void setHardProcessInfo(int nHardNowIn, double tmsHardNowIn)
Set the hard process information.
Definition: MergingHooks.h:883
bool doCutOnRecStateSave
Definition: MergingHooks.h:577
int nMuRVar()
Functions related to renormalization scale variations.
Definition: MergingHooks.h:491
bool doRuntimeAMCATNLOInterfaceSave
Flag for runtime aMC interface. Needed for aMC-Delta.
Definition: MergingHooks.h:537
bool doVariations
Flag to indicate whether renormalization scale variations are performed.
Definition: MergingHooks.h:614
virtual bool findOtherCandidates(int iPos, const Event &event, bool doReplace)
Definition: MergingHooks.cc:1631
vector< double > tmsListSave
Definition: MergingHooks.h:568
double pT0ISR()
ISR regularisation scale.
Definition: MergingHooks.h:719
bool includeWGTinXSEC()
Definition: MergingHooks.h:474
virtual void storeCandidates(const Event &event, string process)
Function to identify the hard subprocess in the current event.
Definition: MergingHooks.cc:986
void setWeightCKKWL(vector< double > weightIn)
Set CKKW-L weight.
Definition: MergingHooks.h:841
int nRecluster()
Return the number clustering steps that have actually been done.
Definition: MergingHooks.h:368
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The Pythia class contains the top-level routines to generate an event.
Definition: Pythia.h:71
virtual double tmsDefinition(const Event &event)
Function encoding the functional definition of the merging scale.
Definition: MergingHooks.h:233
double pTcut()
Shower cut-off scale.
Definition: MergingHooks.h:721
vector< double > getSudakovWeight()
Definition: MergingHooks.h:853
void storeHardProcessCandidates(const Event &event)
Generic setup functions.
Definition: MergingHooks.h:637
int nQuarksOut()
Definition: MergingHooks.cc:1786
double herwigAcollISR()
Definition: MergingHooks.h:717
double herwigAcollFSR()
Definition: MergingHooks.h:714
void init(string headerIn="", ParticleData *particleDataPtrIn=0, int startColTagIn=100)
Initialize header for event listing, particle data table, and colour.
Definition: Event.h:467
bool allowColourShuffling()
Allow swapping one colour index while reclustering.
Definition: MergingHooks.h:696
double QijMS()
Definition: MergingHooks.h:305
bool doRuntimeAMCATNLOInterface()
Function to determine if we have a runtime interface to aMC.
Definition: MergingHooks.h:365
virtual bool canCutOnRecState()
Definition: MergingHooks.h:244
int nHardOutBosons()
Definition: MergingHooks.h:322
The SpaceShower class does spacelike showers.
Definition: SpaceShower.h:33
int nLeptonIn()
Definition: MergingHooks.cc:1890
bool includeMassive()
Definition: MergingHooks.h:662
vector< int > PosIntermediate
Potential positions of intermediate bosons in reference event.
Definition: MergingHooks.h:58
HardProcess(string LHEfile, ParticleData *particleData)
Constructor with path to LHE file.
Definition: MergingHooks.h:89
bool allowCutOnRecState()
Definition: MergingHooks.h:745
virtual void initOnProcess(string process, ParticleData *particleData)
Constructor with core process input.
Definition: MergingHooks.cc:27
bool enforceStrongOrdering()
Prefer strongly ordered histories.
Definition: MergingHooks.h:664
MergingHooks is base class for user input to the merging procedure.
Definition: MergingHooks.h:166
bool useOwnHardProcess
The members, switches etc.
Definition: MergingHooks.h:499
int nLeptonOut()
Definition: MergingHooks.cc:1814
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
virtual bool exchangeCandidates(vector< int > candidates1, vector< int > candidates2, unordered_map< int, int > further1, unordered_map< int, int > further2)
Function to exchange a stored hard process candidate with another choice.
Definition: MergingHooks.cc:1751
int nRequested()
Return number of requested additional jets on top of the Born process.
Definition: MergingHooks.h:371
virtual bool doCutOnRecState(const Event &event)
Definition: MergingHooks.h:249
Definition: Basics.h:32
int hardIncoming1
Flavour of the first incoming particle.
Definition: MergingHooks.h:43
virtual ~HardProcess()
Default destructor.
Definition: MergingHooks.h:66
int unorderedPDFscalePrescip()
Definition: MergingHooks.h:688
bool doEstimateXSection
Flag to only do phase space cut, rejecting events below the tms cut.
Definition: MergingHooks.h:534
double muMISave
Starting scale for attaching MPI.
Definition: MergingHooks.h:550
Definition: History.h:116
double getWeightNLO(int i=0)
Functions for weight management.
Definition: MergingHooks.h:834
bool doWeakClustering()
INTERNAL Hooks to allow clustering W bosons.
Definition: MergingHooks.h:748
void translateLHEFString(string LHEpath)
Function to access the LHE file and read relevant information.
Definition: MergingHooks.cc:52
void muMI(double mu)
MI starting scale.
Definition: MergingHooks.h:724