CMS 3D CMS Logo

G4SimEvent.h
Go to the documentation of this file.
1 #ifndef SimG4Core_G4SimEvent_H
2 #define SimG4Core_G4SimEvent_H
3 
6 
9 
10 #include "HepMC/GenEvent.h"
11 
12 #include <vector>
13 
14 class G4SimEvent {
15 public:
16  G4SimEvent();
17  virtual ~G4SimEvent();
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(G4SimTrack* t) { g4tracks.push_back(t); }
34  void add(G4SimVertex* v) { g4vertices.push_back(v); }
35  const G4SimTrack& g4track(int i) const { return *g4tracks[i - 1]; }
36  const G4SimVertex& g4vertex(int i) const { return *g4vertices[i - 1]; }
37 
38 protected:
40  float weight_;
42  int nparam_;
43  std::vector<float> param_;
44  std::vector<G4SimTrack*> g4tracks;
45  std::vector<G4SimVertex*> g4vertices;
46 };
47 
48 #endif
G4SimEvent::hepEvent
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:23
G4SimEvent::~G4SimEvent
virtual ~G4SimEvent()
Definition: G4SimEvent.cc:18
G4SimEvent::collisionPoint
const math::XYZTLorentzVectorD & collisionPoint() const
Definition: G4SimEvent.h:28
G4SimEvent::g4tracks
std::vector< G4SimTrack * > g4tracks
Definition: G4SimEvent.h:44
mps_fire.i
i
Definition: mps_fire.py:355
G4SimVertex
Definition: G4SimVertex.h:9
G4SimEvent::add
void add(G4SimTrack *t)
Definition: G4SimEvent.h:33
G4SimEvent
Definition: G4SimEvent.h:14
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
G4SimEvent::nVertices
unsigned int nVertices() const
Definition: G4SimEvent.h:21
G4SimEvent::G4SimEvent
G4SimEvent()
Definition: G4SimEvent.cc:11
G4SimEvent::weight_
float weight_
Definition: G4SimEvent.h:40
G4SimEvent::hepMCEvent
const HepMC::GenEvent * hepMCEvent
Definition: G4SimEvent.h:39
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
G4SimEvent::g4vertex
const G4SimVertex & g4vertex(int i) const
Definition: G4SimEvent.h:36
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
G4SimEvent::load
void load(edm::SimTrackContainer &c) const
Definition: G4SimEvent.cc:37
findQualityFiles.v
v
Definition: findQualityFiles.py:179
G4SimEvent::param_
std::vector< float > param_
Definition: G4SimEvent.h:43
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
G4SimTrack
Definition: G4SimTrack.h:9
G4SimEvent::nTracks
unsigned int nTracks() const
Definition: G4SimEvent.h:20
G4SimEvent::add
void add(G4SimVertex *v)
Definition: G4SimEvent.h:34
G4SimEvent::nparam_
int nparam_
Definition: G4SimEvent.h:42
G4SimVertex.h
G4SimEvent::nparam
void nparam(int n)
Definition: G4SimEvent.h:29
w
const double w
Definition: UKUtility.cc:23
G4SimTrack.h
G4SimEvent::nGenParts
unsigned int nGenParts() const
Definition: G4SimEvent.h:22
OrderedSet.t
t
Definition: OrderedSet.py:90
G4SimEvent::collisionPoint_
math::XYZTLorentzVectorD collisionPoint_
Definition: G4SimEvent.h:41
G4SimEvent::param
const std::vector< float > & param() const
Definition: G4SimEvent.h:32
G4SimEvent::g4vertices
std::vector< G4SimVertex * > g4vertices
Definition: G4SimEvent.h:45
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
G4SimEvent::nparam
const int nparam() const
Definition: G4SimEvent.h:30
G4SimEvent::weight
float weight() const
Definition: G4SimEvent.h:26
G4SimEvent::collisionPoint
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:27
G4SimEvent::g4track
const G4SimTrack & g4track(int i) const
Definition: G4SimEvent.h:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
G4SimEvent::hepEvent
const HepMC::GenEvent * hepEvent() const
Definition: G4SimEvent.h:24
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
G4SimEvent::weight
void weight(float w)
Definition: G4SimEvent.h:25
G4SimEvent::param
void param(const std::vector< float > &p)
Definition: G4SimEvent.h:31
SimTrackContainer.h
edm::SimVertexContainer
std::vector< SimVertex > SimVertexContainer
Definition: SimVertexContainer.h:12
SimVertexContainer.h