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 reco::GenParticleCollection& hev);
66 
68  void fill(const std::vector<SimTrack>&, const std::vector<SimVertex>&);
69 
71  void printMCTruth(const HepMC::GenEvent& hev);
72 
74  void addParticles(const HepMC::GenEvent& hev);
75  void addParticles(const reco::GenParticleCollection& myGenParticles);
76 
78  void print() const;
79 
81  void clear();
82 
83 
85  void addChargedTrack(int id);
86 
88  inline unsigned int nTracks() const {
89  return nSimTracks;
90  }
91 
93  inline unsigned int nVertices() const {
94  return nSimVertices;
95  }
96 
98  inline unsigned int nGenParts() const {
99  return nGenParticles;
100  }
101 
103  inline unsigned int nChargedTracks() const {
104  return nChargedParticleTracks;
105  }
106 
108  inline FSimTrack& track(int id) const;
109 
111  inline FSimVertex& vertex(int id) const;
112 
114  inline FSimVertexType& vertexType(int id) const;
115 
117  int chargedTrack(int id) const;
118 
120  inline const SimTrack & embdTrack(int i) const;
121 
123  inline const SimVertex & embdVertex(int i) const;
124 
126  inline const FSimVertexType & embdVertexType(int i) const;
127 
129  const HepMC::GenParticle* embdGenpart(int i) const;
130 
132  int addSimTrack(const RawParticle* p, int iv, int ig=-1,
133  const HepMC::GenVertex* ev=0);
134 
136  int addSimVertex(const XYZTLorentzVector& decayVertex, int im=-1,
138 
139  const KineParticleFilter& filter() const { return *myFilter; }
140 
141  protected:
142 
144  inline std::vector<FSimTrack>* tracks() const {
145  return theSimTracks;
146  }
147 
149  inline std::vector<FSimVertex>* vertices() const {
150  return theSimVertices;
151  }
152 
154  inline std::vector<HepMC::GenParticle*>* genparts() const {
155  return theGenParticles;
156  }
157 
158  private:
159 
160  std::vector<FSimTrack>* theSimTracks;
161  std::vector<FSimVertex>* theSimVertices;
163  std::vector<HepMC::GenParticle*>* theGenParticles;
164 
165  std::vector<unsigned>* theChargedTracks;
166 
167  unsigned int nSimTracks;
168  unsigned int nSimVertices;
169  unsigned int nGenParticles;
171 
172  unsigned int theTrackSize;
173  unsigned int theVertexSize;
174  unsigned int theGenSize;
175  unsigned int theChargedSize;
176  unsigned int initialSize;
177 
180 
181  double sigmaVerteX;
182  double sigmaVerteY;
183  double sigmaVerteZ;
184 
186 
188 
189  // Histos* myHistos;
190 
191 };
192 
193 #include "FastSimulation/Event/interface/FBaseSimEvent.icc"
194 
195 #endif // FBaseSimEvent_H
const ParticleDataTable * pdt
double lateVertexPosition
type
Definition: HCALResponse.h:21
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
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.
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:93
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:88
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:98
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