CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
JetMatchingHook Class Reference

#include <JetMatchingHook.h>

Inheritance diagram for JetMatchingHook:

Public Member Functions

virtual void beforeHadronization (lhef::LHEEvent *lhee)
 
virtual bool canVetoPartonLevel ()
 
virtual bool doVetoPartonLevel (const Pythia8::Event &event)
 
virtual void init (lhef::LHERunInfo *runInfo)
 
virtual bool initAfterBeams ()
 
 JetMatchingHook (const edm::ParameterSet &, Pythia8::Info *)
 
void resetMatchingStatus ()
 
void setEventNumber (int ievt)
 
virtual ~JetMatchingHook ()
 

Protected Member Functions

 JetMatchingHook ()
 
void setLHEEvent (lhef::LHEEvent *lhee)
 
void setLHERunInfo (lhef::LHERunInfo *lheri)
 

Protected Attributes

lhef::LHEEventfEventBlock
 
int fEventNumber
 
Pythia8::Info * fInfoPtr
 
bool fIsInitialized
 
Py8toJetInputfJetInputFill
 
gen::JetMatchingfJetMatching
 
lhef::LHERunInfofRunBlock
 

Detailed Description

Definition at line 18 of file JetMatchingHook.h.

Constructor & Destructor Documentation

JetMatchingHook::JetMatchingHook ( const edm::ParameterSet ,
Pythia8::Info *   
)
JetMatchingHook::~JetMatchingHook ( )
virtual

Definition at line 64 of file JetMatchingHook.cc.

References fJetMatching.

65 {
66  if ( fJetMatching ) delete fJetMatching;
67 }
gen::JetMatching * fJetMatching
JetMatchingHook::JetMatchingHook ( )
inlineprotected

Definition at line 46 of file JetMatchingHook.h.

46 : UserHooks() {}

Member Function Documentation

void JetMatchingHook::beforeHadronization ( lhef::LHEEvent lhee)
virtual

Definition at line 86 of file JetMatchingHook.cc.

References gen::JetMatching::beforeHadronisation(), gen::JetMatching::beforeHadronisationExec(), fJetMatching, and setLHEEvent().

87 {
88 
89  setLHEEvent( lhee );
91 
92  // here we'll have to adjust, if needed, for "massless" particles
93  // from earlier Madgraph version(s)
94  // also, we'll have to setup elements of the Py6 fortran array
95  // VINT(357), VINT(358), VINT(360) and VINT(390)
96  // if ( fJetMatching->getMatchingScheme() == "Madgraph" )
97  // {
98  //
99  // }
100 
102 
103  return;
104 
105 }
void setLHEEvent(lhef::LHEEvent *lhee)
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:31
virtual void beforeHadronisationExec()
Definition: JetMatching.cc:35
gen::JetMatching * fJetMatching
virtual bool JetMatchingHook::canVetoPartonLevel ( )
inlinevirtual

Definition at line 33 of file JetMatchingHook.h.

33 { return true; }
bool JetMatchingHook::doVetoPartonLevel ( const Pythia8::Event &  event)
virtual

Definition at line 108 of file JetMatchingHook.cc.

References fEventBlock, Py8toJetInput::fillJetAlgoInput(), fJetInputFill, fJetMatching, gen::JetMatching::getPartonList(), hepeup_, gen::JetMatching::isMatchingDone(), gen::JetMatching::match(), and HEPEUP_::nup.

110 {
111 
112  // event.list();
113 
114  // extract "hardest" event - the output will go into workEvent,
115  // which is a data mamber of base class UserHooks
116  //
117  subEvent(event,true);
118 
119  if ( !hepeup_.nup || fJetMatching->isMatchingDone() )
120  {
121  return true;
122  }
123 
124  //
125  // bool jmtch = fJetMatching->match( 0, 0, true ); // true if veto-ed, false if accepted (not veto-ed)
126  std::vector<fastjet::PseudoJet> jetInput = fJetInputFill->fillJetAlgoInput( event, workEvent,
127  fEventBlock,
129  bool jmtch = fJetMatching->match( fEventBlock, &jetInput );
130  if ( jmtch )
131  {
132  return true;
133  }
134 
135  // Do not veto events that got this far
136  //
137  return false;
138 
139 }
lhef::LHEEvent * fEventBlock
struct HEPEUP_ hepeup_
Py8toJetInput * fJetInputFill
virtual int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)=0
virtual const std::vector< fastjet::PseudoJet > fillJetAlgoInput(const Event &, const Event &, const lhef::LHEEvent *lhee=0, const std::vector< int > *partonList=0)
Definition: Py8toJetInput.cc:8
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual const std::vector< int > * getPartonList()
Definition: JetMatching.h:78
bool isMatchingDone()
Definition: JetMatching.h:76
gen::JetMatching * fJetMatching
void JetMatchingHook::init ( lhef::LHERunInfo runInfo)
virtual

Definition at line 69 of file JetMatchingHook.cc.

References HLT_25ns10e33_v2_cff::etaMax, Exception, fJetInputFill, fJetMatching, fRunBlock, gen::JetMatching::getJetEtaMax(), gen::JetMatching::init(), Py8toJetInput::setJetEtaMax(), and setLHERunInfo().

70 {
71 
72  setLHERunInfo( runInfo );
73  if ( !fRunBlock )
74  {
75  throw cms::Exception("JetMatching")
76  << "Invalid RunInfo" << std::endl;
77 
78  }
79  fJetMatching->init( runInfo );
80  double etaMax = fJetMatching->getJetEtaMax();
81  fJetInputFill->setJetEtaMax( etaMax );
82  return;
83 
84 }
void setJetEtaMax(double max)
Definition: Py8toJetInput.h:25
Py8toJetInput * fJetInputFill
virtual double getJetEtaMax() const =0
void setLHERunInfo(lhef::LHERunInfo *lheri)
gen::JetMatching * fJetMatching
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:27
lhef::LHERunInfo * fRunBlock
virtual bool JetMatchingHook::initAfterBeams ( )
inlinevirtual

Definition at line 39 of file JetMatchingHook.h.

References fIsInitialized, fJetMatching, and gen::JetMatching::initAfterBeams().

39 { if ( fIsInitialized ) return true; fJetMatching->initAfterBeams(); fIsInitialized=true; return true; }
virtual bool initAfterBeams()
Definition: JetMatching.h:61
gen::JetMatching * fJetMatching
void JetMatchingHook::resetMatchingStatus ( )
inline

Definition at line 40 of file JetMatchingHook.h.

References fJetMatching, and gen::JetMatching::resetMatchingStatus().

40 { fJetMatching->resetMatchingStatus(); return; }
void resetMatchingStatus()
Definition: JetMatching.h:75
gen::JetMatching * fJetMatching
void JetMatchingHook::setEventNumber ( int  ievt)
inline

Definition at line 36 of file JetMatchingHook.h.

References fEventNumber, and reco::return().

36 { fEventNumber = ievt; return ; }
return(e1-e2)*(e1-e2)+dp *dp
void JetMatchingHook::setLHEEvent ( lhef::LHEEvent lhee)
inlineprotected

Definition at line 55 of file JetMatchingHook.h.

References fEventBlock, lhef::CommonBlocks::fillHEPEUP(), and lhef::LHEEvent::getHEPEUP().

Referenced by beforeHadronization().

55  {
56  fEventBlock=lhee;
57  if ( fEventBlock == 0 ) return;
58  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
60  return;
61  }
lhef::LHEEvent * fEventBlock
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:43
static void fillHEPEUP(const HEPEUP *hepeup)
void JetMatchingHook::setLHERunInfo ( lhef::LHERunInfo lheri)
inlineprotected

Definition at line 48 of file JetMatchingHook.h.

References lhef::CommonBlocks::fillHEPRUP(), fRunBlock, and lhef::LHERunInfo::getHEPRUP().

Referenced by init().

48  {
49  fRunBlock=lheri;
50  if ( fRunBlock == 0 ) return;
51  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
53  return;
54  }
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:52
static void fillHEPRUP(const HEPRUP *heprup)
lhef::LHERunInfo * fRunBlock

Member Data Documentation

lhef::LHEEvent* JetMatchingHook::fEventBlock
protected

Definition at line 66 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and setLHEEvent().

int JetMatchingHook::fEventNumber
protected

Definition at line 67 of file JetMatchingHook.h.

Referenced by setEventNumber().

Pythia8::Info* JetMatchingHook::fInfoPtr
protected

Definition at line 69 of file JetMatchingHook.h.

bool JetMatchingHook::fIsInitialized
protected

Definition at line 77 of file JetMatchingHook.h.

Referenced by initAfterBeams().

Py8toJetInput* JetMatchingHook::fJetInputFill
protected

Definition at line 72 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and init().

gen::JetMatching* JetMatchingHook::fJetMatching
protected
lhef::LHERunInfo* JetMatchingHook::fRunBlock
protected

Definition at line 65 of file JetMatchingHook.h.

Referenced by init(), and setLHERunInfo().