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  virtual ~JetMatchingHook();
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  virtual bool canVetoPartonLevel() { return true; }
34  virtual bool doVetoPartonLevel( const Pythia8::Event& event );
35 
36  void setEventNumber( int ievt ) { fEventNumber = ievt; return ; }
37 
38  virtual void init( lhef::LHERunInfo* runInfo );
39  virtual bool initAfterBeams() { 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 == 0 ) return;
51  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
53  return;
54  }
55  void setLHEEvent( lhef::LHEEvent* lhee ) {
56  fEventBlock=lhee;
57  if ( fEventBlock == 0 ) 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
lhef::LHEEvent * fEventBlock
Pythia8::Info * fInfoPtr
virtual ~JetMatchingHook()
void setLHEEvent(lhef::LHEEvent *lhee)
Py8toJetInput * fJetInputFill
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:43
virtual void beforeHadronization(lhef::LHEEvent *lhee)
virtual bool initAfterBeams()
virtual bool canVetoPartonLevel()
void resetMatchingStatus()
Definition: JetMatching.h:75
static void fillHEPEUP(const HEPEUP *hepeup)
virtual bool doVetoPartonLevel(const Pythia8::Event &event)
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
return(e1-e2)*(e1-e2)+dp *dp
gen::JetMatching * fJetMatching
void resetMatchingStatus()
static void fillHEPRUP(const HEPRUP *heprup)
Definition: event.py:1
lhef::LHERunInfo * fRunBlock