CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
SetNumberOfPartonsDynamically Class Reference

#include <SetNumberOfPartonsDynamically.h>

Inheritance diagram for SetNumberOfPartonsDynamically:

Public Member Functions

bool canVetoProcessLevel ()
 
bool doVetoProcessLevel (Pythia8::Event &process)
 
 SetNumberOfPartonsDynamically ()
 
 ~SetNumberOfPartonsDynamically ()
 

Detailed Description

Definition at line 31 of file SetNumberOfPartonsDynamically.h.

Constructor & Destructor Documentation

SetNumberOfPartonsDynamically::SetNumberOfPartonsDynamically ( )
inline

Definition at line 36 of file SetNumberOfPartonsDynamically.h.

36 {}
SetNumberOfPartonsDynamically::~SetNumberOfPartonsDynamically ( )
inline

Definition at line 37 of file SetNumberOfPartonsDynamically.h.

37 {}

Member Function Documentation

bool SetNumberOfPartonsDynamically::canVetoProcessLevel ( )
inline

Definition at line 40 of file SetNumberOfPartonsDynamically.h.

40 { return true; }
bool SetNumberOfPartonsDynamically::doVetoProcessLevel ( Pythia8::Event &  process)

Definition at line 5 of file SetNumberOfPartonsDynamically.cc.

References i, and nPartons.

5  {
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
tuple process
Definition: LaserDQM_cfg.py:3