CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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=0);
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
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.
int i
Definition: DBlmapReader.cc:9
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=0)
Add a new track to the Event and to the various lists.
const HepMC::GenParticle * embdGenpart(int i) const
return MC track with a given id
HepPDT::ParticleDataTable ParticleDataTable
std::vector< FSimTrack > * theSimTracks
std::vector< unsigned > * theChargedTracks
FBaseSimEvent(const edm::ParameterSet &kine)
Default constructor.
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
void addParticles(const HepMC::GenEvent &hev)
Add the particles and their vertices to the list.
std::vector< FSimVertex > * vertices() const
The pointer to the vector of FSimVertex&#39;s.
void clear()
clear the FBaseSimEvent content before the next event
bool ev
double sigmaVerteY
unsigned int nSimTracks
unsigned int theGenSize
FSimVertex & vertex(int id) const
Return vertex with given Id.
unsigned int nChargedTracks() const
Number of &quot;reconstructed&quot; charged tracks.
Definition: FBaseSimEvent.h:99
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:89
FSimVertexType & vertexType(int id) const
Return vertex with given Id.
std::vector< FSimTrack > * tracks() const
The pointer to the vector of FSimTrack&#39;s.
const FSimVertexType & embdVertexType(int i) const
return embedded vertex type with given id
~FBaseSimEvent()
usual virtual destructor
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
void fill(const HepMC::GenEvent &hev)
fill the FBaseSimEvent from the current HepMC::GenEvent
const SimVertex & embdVertex(int i) const
return embedded vertex with given id
double sigmaVerteX
unsigned int theChargedSize
void addChargedTrack(int id)
Add an id in the vector of charged tracks id&#39;s.
const SimTrack & embdTrack(int i) const
return embedded track with given id
unsigned int nChargedParticleTracks
void initializePdt(const HepPDT::ParticleDataTable *aPdt)
Initialize the particle data table.
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
int chargedTrack(int id) const
return &quot;reconstructed&quot; charged tracks index.
void printMCTruth(const HepMC::GenEvent &hev)
print the original MCTruth event
std::vector< HepMC::GenParticle * > * theGenParticles
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void print() const
print the FBaseSimEvent in an intelligible way
FSimTrack & track(int id) const
Return track with given Id.
FSimVertexTypeCollection * theFSimVerticesType