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 
48  ~FBaseSimEvent();
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
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:54
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:87
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:81
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:151
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
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:84
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:25
FSimVertexTypeCollection * theFSimVerticesType