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 {
20 
21 public:
22 
23  JetMatchingHook( const edm::ParameterSet&, Pythia8::Info* );
24  ~JetMatchingHook() override;
25 
26  //
27  // Julia Yarba, Jan.8, 2013
28  // The "Early" option will work with Pythia8.170 or higher;
29  // for lower versions, please use just VetoPartonLevel
30  //
31  // virtual bool canVetoPartonLevelEarly() { return true; }
32  // virtual bool doVetoPartonLevelEarly( const Pythia8::Event& event );
33  bool canVetoPartonLevel() override { return true; }
34  bool doVetoPartonLevel( const Pythia8::Event& event ) override;
35 
36  void setEventNumber( int ievt ) { fEventNumber = ievt; return ; }
37 
38  virtual void init( lhef::LHERunInfo* runInfo );
39  bool initAfterBeams() override { if ( fIsInitialized ) return true; fJetMatching->initAfterBeams(); fIsInitialized=true; return true; }
41  virtual void beforeHadronization( lhef::LHEEvent* lhee );
42 
43 protected:
44 
45 
46  JetMatchingHook() : UserHooks() {}
47 
48  void setLHERunInfo( lhef::LHERunInfo* lheri ) {
49  fRunBlock=lheri;
50  if ( fRunBlock == nullptr ) return;
51  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
53  return;
54  }
55  void setLHEEvent( lhef::LHEEvent* lhee ) {
56  fEventBlock=lhee;
57  if ( fEventBlock == nullptr ) return;
58  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
60  return;
61  }
62 
63 // private:
64 
68 
69  Pythia8::Info* fInfoPtr;
70 
73 
74  //void setJetAlgoInput( const Pythia8::Event& );
75  //int getAncestor( int, const Pythia8::Event& );
76 
78 
79 };
80 
81 #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:41
virtual void beforeHadronization(lhef::LHEEvent *lhee)
return((rh^lh)&mask)
void resetMatchingStatus()
Definition: JetMatching.h:75
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:52
virtual bool initAfterBeams()
Definition: JetMatching.h:61
gen::JetMatching * fJetMatching
void resetMatchingStatus()
bool initAfterBeams() override
static void fillHEPRUP(const HEPRUP *heprup)
Definition: event.py:1
lhef::LHERunInfo * fRunBlock