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&, const 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
lhef::LHEEvent::getHEPEUP
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
JetMatchingHook::resetMatchingStatus
void resetMatchingStatus()
Definition: JetMatchingHook.h:46
JetMatching.h
JetMatchingHook::fJetMatching
gen::JetMatching * fJetMatching
Definition: JetMatchingHook.h:80
Py8toJetInput
Definition: Py8toJetInput.h:13
JetMatchingHook::fInfoPtr
Pythia8::Info * fInfoPtr
Definition: JetMatchingHook.h:78
JetMatchingHook::beforeHadronization
virtual void beforeHadronization(lhef::LHEEvent *lhee)
Definition: JetMatchingHook.cc:72
JetMatchingHook::fJetInputFill
Py8toJetInput * fJetInputFill
Definition: JetMatchingHook.h:81
gen::JetMatching::initAfterBeams
virtual bool initAfterBeams()
Definition: JetMatching.h:59
JetMatchingHook::JetMatchingHook
JetMatchingHook()
Definition: JetMatchingHook.h:53
gen::JetMatching
Definition: JetMatching.h:27
JetMatchingHook::fEventBlock
lhef::LHEEvent * fEventBlock
Definition: JetMatchingHook.h:75
lhef::CommonBlocks::fillHEPEUP
static void fillHEPEUP(const HEPEUP *hepeup)
Definition: LHECommonBlocks.h:60
JetMatchingHook::~JetMatchingHook
~JetMatchingHook() override
Definition: JetMatchingHook.cc:56
JetMatchingHook::initAfterBeams
bool initAfterBeams() override
Definition: JetMatchingHook.h:39
JetMatchingHook::fEventNumber
int fEventNumber
Definition: JetMatchingHook.h:76
lhef::LHERunInfo
Definition: LHERunInfo.h:25
edm::ParameterSet
Definition: ParameterSet.h:47
gen::JetMatching::resetMatchingStatus
void resetMatchingStatus()
Definition: JetMatching.h:73
LHERunInfo.h
lhef::LHEEvent
Definition: LHEEvent.h:23
lhef::CommonBlocks::fillHEPRUP
static void fillHEPRUP(const HEPRUP *heprup)
Definition: LHECommonBlocks.h:41
lhef::HEPRUP
Definition: LesHouches.h:22
JetMatchingHook::setLHEEvent
void setLHEEvent(lhef::LHEEvent *lhee)
Definition: JetMatchingHook.h:63
JetMatchingHook::init
virtual void init(lhef::LHERunInfo *runInfo)
Definition: JetMatchingHook.cc:61
lhef::HEPEUP
Definition: LesHouches.h:138
lhef::LHERunInfo::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
JetMatchingHook
Definition: JetMatchingHook.h:18
JetMatchingHook::fRunBlock
lhef::LHERunInfo * fRunBlock
Definition: JetMatchingHook.h:74
JetMatchingHook::setEventNumber
void setEventNumber(int ievt)
Definition: JetMatchingHook.h:33
JetMatchingHook::fIsInitialized
bool fIsInitialized
Definition: JetMatchingHook.h:86
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
JetMatchingHook::setLHERunInfo
void setLHERunInfo(lhef::LHERunInfo *lheri)
Definition: JetMatchingHook.h:55
JetMatchingHook::doVetoPartonLevel
bool doVetoPartonLevel(const Pythia8::Event &event) override
Definition: JetMatchingHook.cc:90
LHEEvent.h
JetMatchingHook::canVetoPartonLevel
bool canVetoPartonLevel() override
Definition: JetMatchingHook.h:30
ParameterSet.h
event
Definition: event.py:1
LHECommonBlocks.h