CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SetNumberOfPartonsDynamically.h
Go to the documentation of this file.
1 // This program is written by Stefan Prestel.
2 // It illustrates how to do run PYTHIA with LHEF input, allowing a
3 // sample-by-sample generation of
4 // a) Non-matched/non-merged events
5 // b) MLM jet-matched events (kT-MLM, shower-kT, FxFx)
6 // c) CKKW-L and UMEPS-merged events
7 // d) UNLOPS (and NL3) NLO merged events
8 // see the respective sections in the online manual for details.
9 
10 #ifndef Pythia8_SetNumberOfPartonsDynamically_H
11 #define Pythia8_SetNumberOfPartonsDynamically_H
12 
13 #include "Pythia8/Pythia.h"
14 #include "Pythia8/Pythia8ToHepMC.h"
15 #include <unistd.h>
16 
17 #include "HepMC/GenEvent.h"
18 #include "HepMC/IO_GenEvent.h"
19 // Following line to be used with HepMC 2.04 onwards.
20 #include "HepMC/Units.h"
21 
22 // Include UserHooks for Jet Matching.
24 
25 //==========================================================================
26 
27 // Use userhooks to set the number of requested partons dynamically, as
28 // needed when running CKKW-L or UMEPS on a single input file that contains
29 // all parton multiplicities.
30 
31 class SetNumberOfPartonsDynamically : public Pythia8::UserHooks {
32 
33 public:
34 
35  // Constructor and destructor.
38 
39  // Allow to set the number of partons.
40  bool canVetoProcessLevel() { return true; }
41  // Set the number of partons.
42  bool doVetoProcessLevel(Pythia8::Event& process);
43 
44 private:
45 
46 };
47 #endif
bool doVetoProcessLevel(Pythia8::Event &process)
tuple process
Definition: LaserDQM_cfg.py:3