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&) const;
19  void load(edm::SimVertexContainer&) 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(); }
24  const HepMC::GenEvent* hepEvent() const { return hepMCEvent_; }
25  void setWeight(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 addTrack(TmpSimTrack* t) { g4tracks_.push_back(t); }
34  void addVertex(TmpSimVertex* v) { g4vertices_.push_back(v); }
35  // std::vector<TrackWithHistory*>* getHistories() { return &g4tracks_; }
36  // std::vector<TmpSimVertex*>* getVertices() { return &g4vertices_; }
37 
38  void clear();
39 
40 private:
41  const HepMC::GenEvent* hepMCEvent_{nullptr};
42  float weight_{0.f};
44  int nparam_{0};
45  std::vector<float> param_;
46  std::vector<TmpSimTrack*> g4tracks_;
47  std::vector<TmpSimVertex*> g4vertices_;
48 };
49 
50 #endif
void setHepEvent(const HepMC::GenEvent *r)
Definition: TmpSimEvent.h:23
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 addTrack(TmpSimTrack *t)
Definition: TmpSimEvent.h:33
std::vector< TmpSimTrack * > g4tracks_
Definition: TmpSimEvent.h:46
void setWeight(float w)
Definition: TmpSimEvent.h:25
unsigned int nVertices() const
Definition: TmpSimEvent.h:21
void clear()
Definition: TmpSimEvent.cc:18
T w() const
std::vector< TmpSimVertex * > g4vertices_
Definition: TmpSimEvent.h:47
void load(edm::SimTrackContainer &) const
Definition: TmpSimEvent.cc:29
std::vector< float > param_
Definition: TmpSimEvent.h:45
const HepMC::GenEvent * hepEvent() const
Definition: TmpSimEvent.h:24
float weight() const
Definition: TmpSimEvent.h:26
float weight_
Definition: TmpSimEvent.h:42
const math::XYZTLorentzVectorD & collisionPoint() const
Definition: TmpSimEvent.h:28
void nparam(int n)
Definition: TmpSimEvent.h:29
math::XYZTLorentzVectorD collisionPoint_
Definition: TmpSimEvent.h:43
const int nparam() const
Definition: TmpSimEvent.h:30
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: TmpSimEvent.h:27
const HepMC::GenEvent * hepMCEvent_
Definition: TmpSimEvent.h:41
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 addVertex(TmpSimVertex *v)
Definition: TmpSimEvent.h:34