CMS 3D CMS Logo

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)
 
bool canVetoPartonLevel () override
 
bool doVetoPartonLevel (const Pythia8::Event &event) override
 
virtual void init (lhef::LHERunInfo *runInfo)
 
bool initAfterBeams () override
 
 JetMatchingHook (const edm::ParameterSet &, const Pythia8::Info *)
 
void resetMatchingStatus ()
 
void setEventNumber (int ievt)
 
 ~JetMatchingHook () override
 

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() [1/2]

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

◆ ~JetMatchingHook()

JetMatchingHook::~JetMatchingHook ( )
override

Definition at line 56 of file JetMatchingHook.cc.

56  {
57  if (fJetMatching)
58  delete fJetMatching;
59 }

References fJetMatching.

◆ JetMatchingHook() [2/2]

JetMatchingHook::JetMatchingHook ( )
inlineprotected

Definition at line 53 of file JetMatchingHook.h.

53 : UserHooks() {}

Member Function Documentation

◆ beforeHadronization()

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

Definition at line 72 of file JetMatchingHook.cc.

72  {
73  setLHEEvent(lhee);
75 
76  // here we'll have to adjust, if needed, for "massless" particles
77  // from earlier Madgraph version(s)
78  // also, we'll have to setup elements of the Py6 fortran array
79  // VINT(357), VINT(358), VINT(360) and VINT(390)
80  // if ( fJetMatching->getMatchingScheme() == "Madgraph" )
81  // {
82  //
83  // }
84 
86 
87  return;
88 }

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

◆ canVetoPartonLevel()

bool JetMatchingHook::canVetoPartonLevel ( )
inlineoverride

Definition at line 30 of file JetMatchingHook.h.

30 { return true; }

◆ doVetoPartonLevel()

bool JetMatchingHook::doVetoPartonLevel ( const Pythia8::Event &  event)
override

Definition at line 90 of file JetMatchingHook.cc.

92 {
93  // event.list();
94 
95  // extract "hardest" event - the output will go into workEvent,
96  // which is a data mamber of base class UserHooks
97  //
98  subEvent(event, true);
99 
100  if (!hepeup_.nup || fJetMatching->isMatchingDone()) {
101  return true;
102  }
103 
104  //
105  // bool jmtch = fJetMatching->match( 0, 0, true ); // true if veto-ed, false if accepted (not veto-ed)
106  std::vector<fastjet::PseudoJet> jetInput =
108  bool jmtch = fJetMatching->match(fEventBlock, &jetInput);
109  if (jmtch) {
110  return true;
111  }
112 
113  // Do not veto events that got this far
114  //
115  return false;
116 }

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

◆ init()

void JetMatchingHook::init ( lhef::LHERunInfo runInfo)
virtual

◆ initAfterBeams()

bool JetMatchingHook::initAfterBeams ( )
inlineoverride

Definition at line 39 of file JetMatchingHook.h.

39  {
40  if (fIsInitialized)
41  return true;
43  fIsInitialized = true;
44  return true;
45  }

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

◆ resetMatchingStatus()

void JetMatchingHook::resetMatchingStatus ( )
inline

Definition at line 46 of file JetMatchingHook.h.

46  {
48  return;
49  }

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

◆ setEventNumber()

void JetMatchingHook::setEventNumber ( int  ievt)
inline

Definition at line 33 of file JetMatchingHook.h.

33  {
34  fEventNumber = ievt;
35  return;
36  }

References fEventNumber.

◆ setLHEEvent()

void JetMatchingHook::setLHEEvent ( lhef::LHEEvent lhee)
inlineprotected

Definition at line 63 of file JetMatchingHook.h.

63  {
64  fEventBlock = lhee;
65  if (fEventBlock == nullptr)
66  return;
67  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
69  return;
70  }

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

Referenced by beforeHadronization().

◆ setLHERunInfo()

void JetMatchingHook::setLHERunInfo ( lhef::LHERunInfo lheri)
inlineprotected

Definition at line 55 of file JetMatchingHook.h.

55  {
56  fRunBlock = lheri;
57  if (fRunBlock == nullptr)
58  return;
59  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
61  return;
62  }

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

Referenced by init().

Member Data Documentation

◆ fEventBlock

lhef::LHEEvent* JetMatchingHook::fEventBlock
protected

Definition at line 75 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and setLHEEvent().

◆ fEventNumber

int JetMatchingHook::fEventNumber
protected

Definition at line 76 of file JetMatchingHook.h.

Referenced by setEventNumber().

◆ fInfoPtr

Pythia8::Info* JetMatchingHook::fInfoPtr
protected

Definition at line 78 of file JetMatchingHook.h.

◆ fIsInitialized

bool JetMatchingHook::fIsInitialized
protected

Definition at line 86 of file JetMatchingHook.h.

Referenced by initAfterBeams().

◆ fJetInputFill

Py8toJetInput* JetMatchingHook::fJetInputFill
protected

Definition at line 81 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and init().

◆ fJetMatching

gen::JetMatching* JetMatchingHook::fJetMatching
protected

◆ fRunBlock

lhef::LHERunInfo* JetMatchingHook::fRunBlock
protected

Definition at line 74 of file JetMatchingHook.h.

Referenced by init(), and setLHERunInfo().

lhef::LHEEvent::getHEPEUP
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
gen::JetMatching::getJetEtaMax
virtual double getJetEtaMax() const =0
JetMatchingHook::fJetMatching
gen::JetMatching * fJetMatching
Definition: JetMatchingHook.h:80
JetMatchingHook::fJetInputFill
Py8toJetInput * fJetInputFill
Definition: JetMatchingHook.h:81
Py8toJetInput::setJetEtaMax
void setJetEtaMax(double max)
Definition: Py8toJetInput.h:25
gen::JetMatching::initAfterBeams
virtual bool initAfterBeams()
Definition: JetMatching.h:59
JetMatchingHook::fEventBlock
lhef::LHEEvent * fEventBlock
Definition: JetMatchingHook.h:75
lhef::CommonBlocks::fillHEPEUP
static void fillHEPEUP(const HEPEUP *hepeup)
Definition: LHECommonBlocks.h:60
hepeup_
struct HEPEUP_ hepeup_
gen::JetMatching::getPartonList
virtual const std::vector< int > * getPartonList()
Definition: JetMatching.h:76
JetMatchingHook::fEventNumber
int fEventNumber
Definition: JetMatchingHook.h:76
gen::JetMatching::isMatchingDone
bool isMatchingDone()
Definition: JetMatching.h:74
gen::JetMatching::match
virtual int match(const lhef::LHEEvent *partonLevel, const std::vector< fastjet::PseudoJet > *jetInput)=0
Py8toJetInput::fillJetAlgoInput
virtual const std::vector< fastjet::PseudoJet > fillJetAlgoInput(const Event &, const Event &, const lhef::LHEEvent *lhee=nullptr, const std::vector< int > *partonList=nullptr)
Definition: Py8toJetInput.cc:7
gen::JetMatching::resetMatchingStatus
void resetMatchingStatus()
Definition: JetMatching.h:73
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
lhef::HEPEUP
Definition: LesHouches.h:138
lhef::LHERunInfo::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
JetMatchingHook::fRunBlock
lhef::LHERunInfo * fRunBlock
Definition: JetMatchingHook.h:74
gen::JetMatching::beforeHadronisationExec
virtual void beforeHadronisationExec()
Definition: JetMatching.cc:25
JetMatchingHook::fIsInitialized
bool fIsInitialized
Definition: JetMatchingHook.h:86
Exception
Definition: hltDiff.cc:245
gen::JetMatching::beforeHadronisation
virtual void beforeHadronisation(const lhef::LHEEvent *event)
Definition: JetMatching.cc:23
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
HEPEUP_::nup
int nup
Definition: LHECommonBlocks.h:21
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
JetMatchingHook::setLHERunInfo
void setLHERunInfo(lhef::LHERunInfo *lheri)
Definition: JetMatchingHook.h:55
event
Definition: event.py:1
gen::JetMatching::init
virtual void init(const lhef::LHERunInfo *runInfo)
Definition: JetMatching.cc:21