CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SetNumberOfPartonsDynamically.cc
Go to the documentation of this file.
2 
3 using namespace Pythia8;
4 
6 
7  int nPartons = 0;
8  // Do not include resonance decay products in the counting.
9  omitResonanceDecays(process);
10  // Get the maximal quark flavour counted as "additional" parton.
11  int nQuarksMerge = settingsPtr->mode("Merging:nQuarksMerge");
12  // Loop through event and count.
13  for(int i=0; i < int(workEvent.size()); ++i)
14  if ( workEvent[i].isFinal()
15  && workEvent[i].colType()!= 0
16  && ( workEvent[i].id() == 21 || workEvent[i].idAbs() <= nQuarksMerge))
17  nPartons++;
18  // Set number of requested partons.
19  settingsPtr->mode("Merging:nRequested", nPartons);
20  // For UMEPS, also remove zero-parton contributions from prospective
21  // subtractive events.
22  bool doSubt = settingsPtr->flag("Merging:doUMEPSSubt")
23  || settingsPtr->flag("Merging:doUNLOPSSubt");
24  if (doSubt && nPartons == 0) return true;
25  // Done
26  return false;
27 
28 }
int i
Definition: DBlmapReader.cc:9
static const unsigned int nPartons
bool doVetoProcessLevel(Pythia8::Event &process)
tuple process
Definition: LaserDQM_cfg.py:3