CMS 3D CMS Logo

JetMatchingHook.h
Go to the documentation of this file.
1 #ifndef gen_JetMatchingHook_h
2 #define gen_JetMatchingHook_h
3 
4 #include "Pythia8/Pythia.h"
5 
7 
9 
12 
14 
15 // forward declaration
16 class Py8toJetInput;
17 
18 class JetMatchingHook : public Pythia8::UserHooks {
19 public:
20  JetMatchingHook(const edm::ParameterSet&, Pythia8::Info*);
21  ~JetMatchingHook() override;
22 
23  //
24  // Julia Yarba, Jan.8, 2013
25  // The "Early" option will work with Pythia8.170 or higher;
26  // for lower versions, please use just VetoPartonLevel
27  //
28  // virtual bool canVetoPartonLevelEarly() { return true; }
29  // virtual bool doVetoPartonLevelEarly( const Pythia8::Event& event );
30  bool canVetoPartonLevel() override { return true; }
31  bool doVetoPartonLevel(const Pythia8::Event& event) override;
32 
33  void setEventNumber(int ievt) {
34  fEventNumber = ievt;
35  return;
36  }
37 
38  virtual void init(lhef::LHERunInfo* runInfo);
39  bool initAfterBeams() override {
40  if (fIsInitialized)
41  return true;
43  fIsInitialized = true;
44  return true;
45  }
48  return;
49  }
50  virtual void beforeHadronization(lhef::LHEEvent* lhee);
51 
52 protected:
53  JetMatchingHook() : UserHooks() {}
54 
56  fRunBlock = lheri;
57  if (fRunBlock == nullptr)
58  return;
59  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
61  return;
62  }
64  fEventBlock = lhee;
65  if (fEventBlock == nullptr)
66  return;
67  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
69  return;
70  }
71 
72  // private:
73 
77 
78  Pythia8::Info* fInfoPtr;
79 
82 
83  //void setJetAlgoInput( const Pythia8::Event& );
84  //int getAncestor( int, const Pythia8::Event& );
85 
87 };
88 
89 #endif // gen_JetMatchingHook_h
bool canVetoPartonLevel() override
lhef::LHEEvent * fEventBlock
Pythia8::Info * fInfoPtr
void setLHEEvent(lhef::LHEEvent *lhee)
bool doVetoPartonLevel(const Pythia8::Event &event) override
~JetMatchingHook() override
Py8toJetInput * fJetInputFill
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
virtual void beforeHadronization(lhef::LHEEvent *lhee)
void resetMatchingStatus()
Definition: JetMatching.h:73
static void fillHEPEUP(const HEPEUP *hepeup)
void setEventNumber(int ievt)
void setLHERunInfo(lhef::LHERunInfo *lheri)
virtual void init(lhef::LHERunInfo *runInfo)
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
virtual bool initAfterBeams()
Definition: JetMatching.h:59
gen::JetMatching * fJetMatching
void resetMatchingStatus()
bool initAfterBeams() override
static void fillHEPRUP(const HEPRUP *heprup)
Definition: event.py:1
lhef::LHERunInfo * fRunBlock