ATLAS Offline Software
MultiParticleGunPileup.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_MULTIPARTICLEGUN8_PILEUP_H
6 #define FASTCHAINPILEUP_MULTIPARTICLEGUN8_PILEUP_H
7 
8 // MultiParticleGunPileup.h - generates multiple
9 // pileup events in one go for fast simulaton chain
10 
11 // Olivier Arnaez, started 17/12/15
12 
13 #include <string>
14 #include <TROOT.h>
15 #include <TFile.h>
16 #include <TH1D.h>
17 
20 
22 
24 
25  public:
26  MultiParticleGunPileup( 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 events
48 
49  std::vector< double > m_pileupProfileIntegral;
50 
51  TFile *m_file;
53 
55 };
56 
57 #endif
MultiParticleGunPileup
Definition: MultiParticleGunPileup.h:23
MultiParticleGunPileup::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *event)
For filling the HepMC event object.
Definition: MultiParticleGunPileup.cxx:153
MultiParticleGunPileup::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: MultiParticleGunPileup.cxx:39
MultiParticleGunPileup::m_filename
std::string m_filename
Definition: MultiParticleGunPileup.h:41
MultiParticleGunPileup::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: MultiParticleGunPileup.cxx:84
MultiParticleGunPileup::m_evts
std::vector< HepMC::GenEvent * > m_evts
Definition: MultiParticleGunPileup.h:47
MultiParticleGunPileup::m_htgPileupEvents
TH1D * m_htgPileupEvents
Definition: MultiParticleGunPileup.h:52
MultiParticleGunPileup::m_pileupProfileIntegral
std::vector< double > m_pileupProfileIntegral
Definition: MultiParticleGunPileup.h:49
MultiParticleGunPileup::m_ngen
int m_ngen
Definition: MultiParticleGunPileup.h:43
MultiParticleGunPileup::m_multbcid
std::vector< float > m_multbcid
Definition: MultiParticleGunPileup.h:40
MultiParticleGunPileup::nPileupEvents
int nPileupEvents(CLHEP::HepRandomEngine *rndmEngine)
Definition: MultiParticleGunPileup.cxx:183
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
MultiParticleGunPileup::MultiParticleGunPileup
MultiParticleGunPileup(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MultiParticleGunPileup.cxx:18
ParticleSampler
Definition: Samplers.h:343
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
MultiParticleGunPileup::m_htgPileupMu
TH1D * m_htgPileupMu
Definition: MultiParticleGunPileup.h:52
Samplers.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GenEvent_fwd.h
MultiParticleGunPileup::~MultiParticleGunPileup
~MultiParticleGunPileup()
Definition: MultiParticleGunPileup.cxx:35
MultiParticleGunPileup::m_ncollevent
int m_ncollevent
Definition: MultiParticleGunPileup.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MultiParticleGunPileup::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: MultiParticleGunPileup.cxx:170
MultiParticleGunPileup::m_file
TFile * m_file
Definition: MultiParticleGunPileup.h:51
MultiParticleGunPileup::m_pileupProfile
std::vector< int > m_pileupProfile
Definition: MultiParticleGunPileup.h:39
GenModule.h
MultiParticleGunPileup::m_nbad
int m_nbad
Definition: MultiParticleGunPileup.h:44
MultiParticleGunPileup::m_htgPileupProfile
TH1D * m_htgPileupProfile
Definition: MultiParticleGunPileup.h:52
MultiParticleGunPileup::m_partSampler
ParticleSampler * m_partSampler
Definition: MultiParticleGunPileup.h:54