ATLAS Offline Software
MultiPy8Pileup.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef FASTCHAINPILEUP_MULTIPY8_PILEUP_H
6 #define FASTCHAINPILEUP_MULTIPY8_PILEUP_H
7 
8 // MultiPy8Pileup.h - extension of Pythia8_i to generate multiple
9 // pileup events in one go for fast simulaton chain
10 // Inherits from Pythia8_i, following example of Pythia8B_i
11 
12 // Richard Hawkings, started 20/2/15
13 
14 #include <string>
15 #include <TROOT.h>
16 #include <TFile.h>
17 #include <TH1D.h>
18 
19 #include "Pythia8_i/Pythia8_i.h"
20 
22 
23 class MultiPy8Pileup : public Pythia8_i {
24 
25  public:
26  MultiPy8Pileup( const std::string &name, ISvcLocator *pSvcLocator );
28 
29  virtual StatusCode genInitialize();
30  virtual StatusCode genFinalize();
31 
32  virtual StatusCode callGenerator();
33  virtual StatusCode fillEvt( HepMC::GenEvent *event );
34 
35  private:
36  int nPileupEvents(CLHEP::HepRandomEngine* rndmEngine); // decide how much pileup events will be generated
37  // parameters
38  int m_ncollevent; // fixed number of collisions per event
39  std::vector< int > m_pileupProfile; // pileup mu-profile
40  std::vector< float > m_multbcid; // mu multipliers per BCID
41  std::string m_filename; // filename for histogram output
42 
43  int m_ngen; // total number of events generated
44  int m_nbad; // total number of failed events
45  // int m_evnumber; // event sequence number
46 
47  std::vector< HepMC::GenEvent * > m_evts; // vector of generated minbias events
48 
49  std::vector< double > m_pileupProfileIntegral;
50 
51  TFile *m_file;
53 };
54 
55 #endif
MultiPy8Pileup::m_pileupProfileIntegral
std::vector< double > m_pileupProfileIntegral
Definition: MultiPy8Pileup.h:49
MultiPy8Pileup::m_multbcid
std::vector< float > m_multbcid
Definition: MultiPy8Pileup.h:40
MultiPy8Pileup
Definition: MultiPy8Pileup.h:23
MultiPy8Pileup::m_evts
std::vector< HepMC::GenEvent * > m_evts
Definition: MultiPy8Pileup.h:47
MultiPy8Pileup::m_file
TFile * m_file
Definition: MultiPy8Pileup.h:51
MultiPy8Pileup::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: MultiPy8Pileup.cxx:143
Pythia8_i.h
MultiPy8Pileup::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: MultiPy8Pileup.cxx:37
MultiPy8Pileup::m_filename
std::string m_filename
Definition: MultiPy8Pileup.h:41
MultiPy8Pileup::m_htgPileupProfile
TH1D * m_htgPileupProfile
Definition: MultiPy8Pileup.h:52
MultiPy8Pileup::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: MultiPy8Pileup.cxx:76
MultiPy8Pileup::MultiPy8Pileup
MultiPy8Pileup(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MultiPy8Pileup.cxx:17
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Pythia8_i
Definition: Pythia8_i.h:62
MultiPy8Pileup::~MultiPy8Pileup
~MultiPy8Pileup()
Definition: MultiPy8Pileup.cxx:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GenEvent_fwd.h
MultiPy8Pileup::m_nbad
int m_nbad
Definition: MultiPy8Pileup.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MultiPy8Pileup::m_ngen
int m_ngen
Definition: MultiPy8Pileup.h:43
MultiPy8Pileup::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *event)
For filling the HepMC event object.
Definition: MultiPy8Pileup.cxx:126
MultiPy8Pileup::m_pileupProfile
std::vector< int > m_pileupProfile
Definition: MultiPy8Pileup.h:39
MultiPy8Pileup::m_htgPileupEvents
TH1D * m_htgPileupEvents
Definition: MultiPy8Pileup.h:52
MultiPy8Pileup::m_htgPileupMu
TH1D * m_htgPileupMu
Definition: MultiPy8Pileup.h:52
MultiPy8Pileup::m_ncollevent
int m_ncollevent
Definition: MultiPy8Pileup.h:38
MultiPy8Pileup::nPileupEvents
int nPileupEvents(CLHEP::HepRandomEngine *rndmEngine)
Definition: MultiPy8Pileup.cxx:156