CMS 3D CMS Logo

FBaseSimEvent.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Event_FBaseSimEvent_H
2 #define FastSimulation_Event_FBaseSimEvent_H
3 
4 // Data Formats
7 
8 // HepPDT Headers
10 
11 // Famos Headers
15 
16 #include <vector>
17 
24 //class FSimEvent;
25 class FSimTrack;
26 class FSimVertex;
27 class KineParticleFilter;
28 
29 class SimTrack;
30 class SimVertex;
31 
32 namespace edm {
33  class ParameterSet;
34 }
35 
36 namespace HepMC {
37  class GenEvent;
38  class GenParticle;
39  class GenVertex;
40 } // namespace HepMC
41 
43 public:
45  FBaseSimEvent(const edm::ParameterSet& kine);
46 
49 
51  void initializePdt(const HepPDT::ParticleDataTable* aPdt);
52 
54  inline const HepPDT::ParticleDataTable* theTable() const { return pdt; }
55 
57  void fill(const HepMC::GenEvent& hev);
58 
60  void fill(const std::vector<SimTrack>&, const std::vector<SimVertex>&);
61 
63  void printMCTruth(const HepMC::GenEvent& hev);
64 
66  void addParticles(const HepMC::GenEvent& hev);
67 
69  void print() const;
70 
72  void clear();
73 
75  void addChargedTrack(int id);
76 
78  inline unsigned int nTracks() const { return nSimTracks; }
79 
81  inline unsigned int nVertices() const { return nSimVertices; }
82 
84  inline unsigned int nGenParts() const { return nGenParticles; }
85 
87  inline unsigned int nChargedTracks() const { return nChargedParticleTracks; }
88 
90  inline FSimTrack& track(int id) const;
91 
93  inline FSimVertex& vertex(int id) const;
94 
96  inline FSimVertexType& vertexType(int id) const;
97 
99  int chargedTrack(int id) const;
100 
102  inline const SimTrack& embdTrack(int i) const;
103 
105  inline const SimVertex& embdVertex(int i) const;
106 
108  inline const FSimVertexType& embdVertexType(int i) const;
109 
111  const HepMC::GenParticle* embdGenpart(int i) const;
112 
114  int addSimTrack(const RawParticle* p, int iv, int ig = -1, const HepMC::GenVertex* ev = nullptr);
115 
117  int addSimVertex(const XYZTLorentzVector& decayVertex,
118  int im = -1,
120 
121  const KineParticleFilter& filter() const { return *myFilter; }
122 
123 protected:
125  inline std::vector<FSimTrack>* tracks() const { return theSimTracks; }
126 
128  inline std::vector<FSimVertex>* vertices() const { return theSimVertices; }
129 
131  inline std::vector<HepMC::GenParticle*>* genparts() const { return theGenParticles; }
132 
133 private:
134  std::vector<FSimTrack>* theSimTracks;
135  std::vector<FSimVertex>* theSimVertices;
137  std::vector<HepMC::GenParticle*>* theGenParticles;
138 
139  std::vector<unsigned>* theChargedTracks;
140 
141  unsigned int nSimTracks;
142  unsigned int nSimVertices;
143  unsigned int nGenParticles;
145 
146  unsigned int theTrackSize;
147  unsigned int theVertexSize;
148  unsigned int theGenSize;
149  unsigned int theChargedSize;
150  unsigned int initialSize;
151 
154 
155  double sigmaVerteX;
156  double sigmaVerteY;
157  double sigmaVerteZ;
158 
160 
162 
163  // Histos* myHistos;
164 };
165 
166 #include "FastSimulation/Event/interface/FBaseSimEvent.icc"
167 
168 #endif // FBaseSimEvent_H
FBaseSimEvent::genparts
std::vector< HepMC::GenParticle * > * genparts() const
The pointer to the vector of GenParticle's.
Definition: FBaseSimEvent.h:131
RawParticle
Definition: RawParticle.h:37
mps_fire.i
i
Definition: mps_fire.py:355
FSimVertexType
A FSimVertexType hold the information on the vertex origine.
Definition: FSimVertexType.h:18
SimVertex
Definition: SimVertex.h:5
FBaseSimEvent::theFSimVerticesType
FSimVertexTypeCollection * theFSimVerticesType
Definition: FBaseSimEvent.h:136
FBaseSimEvent::theSimVertices
std::vector< FSimVertex > * theSimVertices
Definition: FBaseSimEvent.h:135
FBaseSimEvent::print
void print() const
print the FBaseSimEvent in an intelligible way
Definition: FBaseSimEvent.cc:632
FBaseSimEvent::vertexType
FSimVertexType & vertexType(int id) const
Return vertex with given Id.
FBaseSimEvent::fill
void fill(const HepMC::GenEvent &hev)
fill the FBaseSimEvent from the current HepMC::GenEvent
Definition: FBaseSimEvent.cc:82
FBaseSimEvent::theVertexSize
unsigned int theVertexSize
Definition: FBaseSimEvent.h:147
FSimVertexTypeFwd.h
FBaseSimEvent::initializePdt
void initializePdt(const HepPDT::ParticleDataTable *aPdt)
Initialize the particle data table.
Definition: FBaseSimEvent.cc:80
edm
HLT enums.
Definition: AlignableModifier.h:19
FBaseSimEvent::vertex
FSimVertex & vertex(int id) const
Return vertex with given Id.
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FBaseSimEvent::lateVertexPosition
double lateVertexPosition
Definition: FBaseSimEvent.h:161
FBaseSimEvent::nChargedTracks
unsigned int nChargedTracks() const
Number of "reconstructed" charged tracks.
Definition: FBaseSimEvent.h:87
FBaseSimEvent::clear
void clear()
clear the FBaseSimEvent content before the next event
Definition: FBaseSimEvent.cc:644
FBaseSimEvent::addParticles
void addParticles(const HepMC::GenEvent &hev)
Add the particles and their vertices to the list.
Definition: FBaseSimEvent.cc:311
FBaseSimEvent::nVertices
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:81
FBaseSimEvent::printMCTruth
void printMCTruth(const HepMC::GenEvent &hev)
print the original MCTruth event
Definition: FBaseSimEvent.cc:551
XYZTLorentzVector
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
FBaseSimEvent::sigmaVerteZ
double sigmaVerteZ
Definition: FBaseSimEvent.h:157
FSimVertexType.h
FSimVertex
Definition: FSimVertex.h:19
GenParticle
Definition: GenParticle.py:1
FBaseSimEvent::embdGenpart
const HepMC::GenParticle * embdGenpart(int i) const
return MC track with a given id
Definition: FBaseSimEvent.cc:666
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
FBaseSimEvent::embdVertex
const SimVertex & embdVertex(int i) const
return embedded vertex with given id
FBaseSimEvent::sigmaVerteY
double sigmaVerteY
Definition: FBaseSimEvent.h:156
FBaseSimEvent::track
FSimTrack & track(int id) const
Return track with given Id.
FBaseSimEvent::vertices
std::vector< FSimVertex > * vertices() const
The pointer to the vector of FSimVertex's.
Definition: FBaseSimEvent.h:128
FBaseSimEvent::nSimVertices
unsigned int nSimVertices
Definition: FBaseSimEvent.h:142
GenParticleFwd.h
FBaseSimEvent::initialSize
unsigned int initialSize
Definition: FBaseSimEvent.h:150
FSimVertexType::ANY
Definition: FSimVertexType.h:23
FBaseSimEvent::theTable
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
FSimVertexType::VertexType
VertexType
Definition: FSimVertexType.h:22
FBaseSimEvent::theChargedTracks
std::vector< unsigned > * theChargedTracks
Definition: FBaseSimEvent.h:139
FBaseSimEvent::myFilter
KineParticleFilter * myFilter
The particle filter.
Definition: FBaseSimEvent.h:153
FBaseSimEvent::addSimTrack
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
Add a new track to the Event and to the various lists.
Definition: FBaseSimEvent.cc:484
FBaseSimEvent::~FBaseSimEvent
~FBaseSimEvent()
usual virtual destructor
Definition: FBaseSimEvent.cc:63
edm::ParameterSet
Definition: ParameterSet.h:36
ParticleDataTable.h
ParameterSet
Definition: Functions.h:16
FBaseSimEvent::nGenParts
unsigned int nGenParts() const
Number of generator particles.
Definition: FBaseSimEvent.h:84
FBaseSimEvent::theSimTracks
std::vector< FSimTrack > * theSimTracks
Definition: FBaseSimEvent.h:134
FBaseSimEvent::nSimTracks
unsigned int nSimTracks
Definition: FBaseSimEvent.h:141
FBaseSimEvent::theChargedSize
unsigned int theChargedSize
Definition: FBaseSimEvent.h:149
FBaseSimEvent::chargedTrack
int chargedTrack(int id) const
return "reconstructed" charged tracks index.
Definition: FBaseSimEvent.cc:659
FBaseSimEvent::theTrackSize
unsigned int theTrackSize
Definition: FBaseSimEvent.h:146
FBaseSimEvent::tracks
std::vector< FSimTrack > * tracks() const
The pointer to the vector of FSimTrack's.
Definition: FBaseSimEvent.h:125
type
type
Definition: HCALResponse.h:21
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
FBaseSimEvent::embdVertexType
const FSimVertexType & embdVertexType(int i) const
return embedded vertex type with given id
SimTrack
Definition: SimTrack.h:6
FBaseSimEvent::addChargedTrack
void addChargedTrack(int id)
Add an id in the vector of charged tracks id's.
Definition: FBaseSimEvent.cc:651
RawParticle.h
HepMC
Definition: GenParticle.h:15
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Point3D.h
FBaseSimEvent::nChargedParticleTracks
unsigned int nChargedParticleTracks
Definition: FBaseSimEvent.h:144
KineParticleFilter
Definition: KineParticleFilter.h:11
FBaseSimEvent::nTracks
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
FSimVertexTypeCollection
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
Definition: FSimVertexTypeFwd.h:7
FSimTrack
Definition: FSimTrack.h:30
FBaseSimEvent::addSimVertex
int addSimVertex(const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
Add a new vertex to the Event and to the various lists.
Definition: FBaseSimEvent.cc:526
FBaseSimEvent::filter
const KineParticleFilter & filter() const
Definition: FBaseSimEvent.h:121
FBaseSimEvent::nGenParticles
unsigned int nGenParticles
Definition: FBaseSimEvent.h:143
FBaseSimEvent::embdTrack
const SimTrack & embdTrack(int i) const
return embedded track with given id
FBaseSimEvent::FBaseSimEvent
FBaseSimEvent(const edm::ParameterSet &kine)
Default constructor.
Definition: FBaseSimEvent.cc:32
FBaseSimEvent::pdt
const ParticleDataTable * pdt
Definition: FBaseSimEvent.h:159
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition: ParticleDataTable.h:8
FBaseSimEvent::theGenParticles
std::vector< HepMC::GenParticle * > * theGenParticles
Definition: FBaseSimEvent.h:137
FBaseSimEvent
Definition: FBaseSimEvent.h:42
FBaseSimEvent::theGenSize
unsigned int theGenSize
Definition: FBaseSimEvent.h:148
FBaseSimEvent::sigmaVerteX
double sigmaVerteX
Definition: FBaseSimEvent.h:155