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 }
41 
43 {
44 
45 public:
46 
48  FBaseSimEvent(const edm::ParameterSet& kine);
49 
51  ~FBaseSimEvent();
52 
54  void initializePdt(const HepPDT::ParticleDataTable* aPdt);
55 
57  inline const HepPDT::ParticleDataTable* theTable() const {
58  return pdt;
59  }
60 
62  void fill(const HepMC::GenEvent& hev);
63 
65  void fill(const std::vector<SimTrack>&, const std::vector<SimVertex>&);
66 
68  void printMCTruth(const HepMC::GenEvent& hev);
69 
71  void addParticles(const HepMC::GenEvent& hev);
72 
74  void print() const;
75 
77  void clear();
78 
79 
81  void addChargedTrack(int id);
82 
84  inline unsigned int nTracks() const {
85  return nSimTracks;
86  }
87 
89  inline unsigned int nVertices() const {
90  return nSimVertices;
91  }
92 
94  inline unsigned int nGenParts() const {
95  return nGenParticles;
96  }
97 
99  inline unsigned int nChargedTracks() const {
100  return nChargedParticleTracks;
101  }
102 
104  inline FSimTrack& track(int id) const;
105 
107  inline FSimVertex& vertex(int id) const;
108 
110  inline FSimVertexType& vertexType(int id) const;
111 
113  int chargedTrack(int id) const;
114 
116  inline const SimTrack & embdTrack(int i) const;
117 
119  inline const SimVertex & embdVertex(int i) const;
120 
122  inline const FSimVertexType & embdVertexType(int i) const;
123 
125  const HepMC::GenParticle* embdGenpart(int i) const;
126 
128  int addSimTrack(const RawParticle* p, int iv, int ig=-1,
129  const HepMC::GenVertex* ev=nullptr);
130 
132  int addSimVertex(const XYZTLorentzVector& decayVertex, int im=-1,
134 
135  const KineParticleFilter& filter() const { return *myFilter; }
136 
137  protected:
138 
140  inline std::vector<FSimTrack>* tracks() const {
141  return theSimTracks;
142  }
143 
145  inline std::vector<FSimVertex>* vertices() const {
146  return theSimVertices;
147  }
148 
150  inline std::vector<HepMC::GenParticle*>* genparts() const {
151  return theGenParticles;
152  }
153 
154  private:
155 
156  std::vector<FSimTrack>* theSimTracks;
157  std::vector<FSimVertex>* theSimVertices;
159  std::vector<HepMC::GenParticle*>* theGenParticles;
160 
161  std::vector<unsigned>* theChargedTracks;
162 
163  unsigned int nSimTracks;
164  unsigned int nSimVertices;
165  unsigned int nGenParticles;
167 
168  unsigned int theTrackSize;
169  unsigned int theVertexSize;
170  unsigned int theGenSize;
171  unsigned int theChargedSize;
172  unsigned int initialSize;
173 
176 
177  double sigmaVerteX;
178  double sigmaVerteY;
179  double sigmaVerteZ;
180 
182 
184 
185  // Histos* myHistos;
186 
187 };
188 
189 #include "FastSimulation/Event/interface/FBaseSimEvent.icc"
190 
191 #endif // FBaseSimEvent_H
const ParticleDataTable * pdt
double lateVertexPosition
type
Definition: HCALResponse.h:21
HepPDT::ParticleDataTable ParticleDataTable
std::vector< FSimTrack > * theSimTracks
std::vector< unsigned > * theChargedTracks
unsigned int theTrackSize
unsigned int theVertexSize
KineParticleFilter * myFilter
The particle filter.
double sigmaVerteZ
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:57
std::vector< FSimVertex > * vertices() const
The pointer to the vector of FSimVertex&#39;s.
bool ev
double sigmaVerteY
unsigned int nSimTracks
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
unsigned int theGenSize
unsigned int nChargedTracks() const
Number of "reconstructed" charged tracks.
Definition: FBaseSimEvent.h:99
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:89
std::vector< FSimTrack > * tracks() const
The pointer to the vector of FSimTrack&#39;s.
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:84
unsigned int nSimVertices
A FSimVertexType hold the information on the vertex origine.
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
unsigned int nGenParticles
unsigned int initialSize
std::vector< FSimVertex > * theSimVertices
double sigmaVerteX
unsigned int theChargedSize
unsigned int nChargedParticleTracks
HLT enums.
unsigned int nGenParts() const
Number of generator particles.
Definition: FBaseSimEvent.h:94
std::vector< HepMC::GenParticle * > * genparts() const
The pointer to the vector of GenParticle&#39;s.
const KineParticleFilter & filter() const
std::vector< HepMC::GenParticle * > * theGenParticles
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:27
FSimVertexTypeCollection * theFSimVerticesType