ATLAS Offline Software
Loading...
Searching...
No Matches
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
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14
virtual StatusCode genFinalize()
For finalising the generator, if required.
virtual StatusCode genInitialize()
For initializing the generator, if required.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
std::vector< double > m_pileupProfileIntegral
std::vector< HepMC::GenEvent * > m_evts
std::vector< float > m_multbcid
int nPileupEvents(CLHEP::HepRandomEngine *rndmEngine)
MultiParticleGunPileup(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode fillEvt(HepMC::GenEvent *event)
For filling the HepMC event object.
std::vector< int > m_pileupProfile