CMS 3D CMS Logo

TmpSimEvent.h
Go to the documentation of this file.
1 #ifndef SimG4Core_TmpSimEvent_H
2 #define SimG4Core_TmpSimEvent_H
3 
6 
9 
10 #include "HepMC/GenEvent.h"
11 
12 #include <vector>
13 
14 class TmpSimEvent {
15 public:
16  TmpSimEvent();
17  ~TmpSimEvent();
18  void load(edm::SimTrackContainer& c) const;
19  void load(edm::SimVertexContainer& c) const;
20  unsigned int nTracks() const { return g4tracks_.size(); }
21  unsigned int nVertices() const { return g4vertices_.size(); }
22  unsigned int nGenParts() const { return hepMCEvent_->particles_size(); }
23  void hepEvent(const HepMC::GenEvent* r) { hepMCEvent_ = r; }
24  const HepMC::GenEvent* hepEvent() const { return hepMCEvent_; }
25  void weight(float w) { weight_ = w; }
26  float weight() const { return weight_; }
29  void nparam(int n) { nparam_ = n; }
30  const int nparam() const { return nparam_; }
31  void param(const std::vector<float>& p) { param_ = p; }
32  const std::vector<float>& param() const { return param_; }
33  void add(TmpSimTrack* t) { g4tracks_.push_back(t); }
34  void add(TmpSimVertex* v) { g4vertices_.push_back(v); }
35  void clear();
36 
37 private:
38  const HepMC::GenEvent* hepMCEvent_{nullptr};
39  float weight_{0.f};
41  int nparam_{0};
42  std::vector<float> param_;
43  std::vector<TmpSimTrack*> g4tracks_;
44  std::vector<TmpSimVertex*> g4vertices_;
45 };
46 
47 #endif
unsigned int nTracks() const
Definition: TmpSimEvent.h:20
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
void hepEvent(const HepMC::GenEvent *r)
Definition: TmpSimEvent.h:23
std::vector< TmpSimTrack * > g4tracks_
Definition: TmpSimEvent.h:43
unsigned int nVertices() const
Definition: TmpSimEvent.h:21
void clear()
Definition: TmpSimEvent.cc:18
T w() const
void weight(float w)
Definition: TmpSimEvent.h:25
std::vector< TmpSimVertex * > g4vertices_
Definition: TmpSimEvent.h:44
std::vector< float > param_
Definition: TmpSimEvent.h:42
const HepMC::GenEvent * hepEvent() const
Definition: TmpSimEvent.h:24
float weight() const
Definition: TmpSimEvent.h:26
float weight_
Definition: TmpSimEvent.h:39
const math::XYZTLorentzVectorD & collisionPoint() const
Definition: TmpSimEvent.h:28
void nparam(int n)
Definition: TmpSimEvent.h:29
math::XYZTLorentzVectorD collisionPoint_
Definition: TmpSimEvent.h:40
void add(TmpSimTrack *t)
Definition: TmpSimEvent.h:33
const int nparam() const
Definition: TmpSimEvent.h:30
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: TmpSimEvent.h:27
void load(edm::SimTrackContainer &c) const
Definition: TmpSimEvent.cc:29
const HepMC::GenEvent * hepMCEvent_
Definition: TmpSimEvent.h:38
unsigned int nGenParts() const
Definition: TmpSimEvent.h:22
const std::vector< float > & param() const
Definition: TmpSimEvent.h:32
std::vector< SimVertex > SimVertexContainer
void param(const std::vector< float > &p)
Definition: TmpSimEvent.h:31
std::vector< SimTrack > SimTrackContainer
void add(TmpSimVertex *v)
Definition: TmpSimEvent.h:34