CMS 3D CMS Logo

FortranCallback.h
Go to the documentation of this file.
1 #ifndef gen_FortranCallback_h
2 #define gen_FortranCallback_h
3 
5 
8 
9 namespace HepMC {
10  class GenEvent;
11 }
12 
13 namespace gen {
14 
16  public:
17  static FortranCallback* getInstance();
18 
19  //void setLHEEvent(lhef::LHEEvent* lhev) { fPartonLevel = lhev; }
20  void setLHERunInfo(lhef::LHERunInfo* lheri) { fRunBlock = lheri; }
21  void setLHEEvent(lhef::LHEEvent* lhee) { fEventBlock = lhee; }
22 
24 
25  void fillHeader();
26  void fillEvent();
27 
29 
30  private:
31  // ctor
32 
34 
35  // data member(s)
36 
40 
42  };
43 
44  // --** Implementation **---
45 
47  // : fPartonLevel(0)
48  : fRunBlock(nullptr), fEventBlock(nullptr), fIterationsPerEvent(0) {}
49 
51  if (fRunBlock == nullptr)
52  return;
53 
54  //const lhef::HEPRUP* heprup = &(fRunBlock->heprup());
55  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
56 
58 
59  return;
60  }
61 
63  //if ( fPartonLevel == 0 ) return;
64  //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP();
65 
66  if (fEventBlock == nullptr)
67  return;
68 
69  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
70 
71  if (fIterationsPerEvent++) {
72  hepeup_.nup = 0;
73  return;
74  }
75 
77 
78  return;
79  }
80 
81 } // namespace gen
82 
83 #endif
lhef::LHEEvent::getHEPEUP
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
gen::FortranCallback
Definition: FortranCallback.h:15
gen::FortranCallback::fEventBlock
lhef::LHEEvent * fEventBlock
Definition: FortranCallback.h:38
gen::FortranCallback::getInstance
static FortranCallback * getInstance()
Definition: FortranCallback.cc:6
gen::FortranCallback::fillHeader
void fillHeader()
Definition: FortranCallback.h:50
lhef::CommonBlocks::fillHEPEUP
static void fillHEPEUP(const HEPEUP *hepeup)
Definition: LHECommonBlocks.h:60
hepeup_
struct HEPEUP_ hepeup_
gen::FortranCallback::setLHEEvent
void setLHEEvent(lhef::LHEEvent *lhee)
Definition: FortranCallback.h:21
gen
Definition: PythiaDecays.h:13
gen::FortranCallback::FortranCallback
FortranCallback()
Definition: FortranCallback.h:46
gen::FortranCallback::resetIterationsPerEvent
void resetIterationsPerEvent()
Definition: FortranCallback.h:23
lhef::LHERunInfo
Definition: LHERunInfo.h:25
LHERunInfo.h
gen::FortranCallback::setLHERunInfo
void setLHERunInfo(lhef::LHERunInfo *lheri)
Definition: FortranCallback.h:20
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
lhef::HEPEUP
Definition: LesHouches.h:138
lhef::LHERunInfo::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
gen::FortranCallback::fInstance
static FortranCallback * fInstance
Definition: FortranCallback.h:41
HepMC
Definition: GenParticle.h:15
HEPEUP_::nup
int nup
Definition: LHECommonBlocks.h:21
LHEEvent.h
gen::FortranCallback::fRunBlock
lhef::LHERunInfo * fRunBlock
Definition: FortranCallback.h:37
gen::FortranCallback::fillEvent
void fillEvent()
Definition: FortranCallback.h:62
gen::FortranCallback::getIterationsPerEvent
int getIterationsPerEvent() const
Definition: FortranCallback.h:28
gen::FortranCallback::fIterationsPerEvent
int fIterationsPerEvent
Definition: FortranCallback.h:39
LHECommonBlocks.h