CMS 3D CMS Logo

TrackingVertex.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_TrackingVertex_h
2 #define SimDataFormats_TrackingVertex_h
3 
15 
21 
23  friend std::ostream& operator<<(std::ostream& s, const TrackingVertex& tv);
24 
25 public:
30  typedef std::vector<SimVertex>::const_iterator g4v_iterator;
32 
33  // Default constructor and constructor from values
36 
37  // Setters
39 
40  // Track and vertex iterators
41  genv_iterator genVertices_begin() const; // Ref's to HepMC and Geant4
42  genv_iterator genVertices_end() const; // vertices associated with
43  g4v_iterator g4Vertices_begin() const; // this vertex, respectively
44  g4v_iterator g4Vertices_end() const; // ....
45 
46  tp_iterator daughterTracks_begin() const; // Ref's to daughter and source
47  tp_iterator daughterTracks_end() const; // tracks associated with
48  tp_iterator sourceTracks_begin() const; // this vertex, respectively
49  tp_iterator sourceTracks_end() const; // ....
50 
51  unsigned int nG4Vertices() const { return g4Vertices_.size(); };
52  unsigned int nGenVertices() const { return genVertices_.size(); };
53  unsigned int nDaughterTracks() const { return daughterTracks_.size(); };
54  unsigned int nSourceTracks() const { return sourceTracks_.size(); };
55 
56  // Add references to TrackingParticles, Geant4, and HepMC vertices to containers
57  void addG4Vertex(const SimVertex&);
58  void addGenVertex(const GenVertexRef&);
61  void clearDaughterTracks();
62  void clearParentTracks();
63 
64  // Getters for RefVectors
65  const std::vector<SimVertex>& g4Vertices() const;
66  const GenVertexRefVector& genVertices() const;
69 
70  // Getters for other info
71  const LorentzVector& position() const { return position_; };
72  const EncodedEventId& eventId() const { return eId_; };
73  const bool inVolume() const { return inVolume_; };
74 
75 private:
76  LorentzVector position_; // Vertex position and time
77  bool inVolume_; // Is it inside tracker volume?
79 
80  // References to G4 and generator vertices and TrackingParticles
81 
82  std::vector<SimVertex> g4Vertices_;
86 };
87 
88 #endif
void setEventId(EncodedEventId e)
GenVertexRefVector::iterator genv_iterator
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
TrackingVertex::g4v_iterator g4v_iterator
std::vector< SimVertex >::const_iterator g4v_iterator
LorentzVector position_
tp_iterator sourceTracks_end() const
unsigned int nSourceTracks() const
void addDaughterTrack(const TrackingParticleRef &)
EncodedEventId eId_
unsigned int nDaughterTracks() const
void clearDaughterTracks()
tp_iterator daughterTracks_begin() const
void addParentTrack(const TrackingParticleRef &)
unsigned int nG4Vertices() const
void addG4Vertex(const SimVertex &)
math::XYZTLorentzVectorD LorentzVector
TrackingParticleRefVector daughterTracks_
edm::RefVector< edm::HepMCProduct, HepMC::GenVertex > GenVertexRefVector
friend std::ostream & operator<<(std::ostream &s, const TrackingVertex &tv)
GenVertexRefVector genVertices_
const EncodedEventId & eventId() const
genv_iterator genVertices_end() const
const bool inVolume() const
math::XYZTLorentzVector LorentzVector
const TrackingParticleRefVector & sourceTracks() const
const LorentzVector & position() const
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
void clearParentTracks()
std::vector< SimVertex > g4Vertices_
const TrackingParticleRefVector & daughterTracks() const
tp_iterator sourceTracks_begin() const
void addGenVertex(const GenVertexRef &)
tp_iterator daughterTracks_end() const
const std::vector< SimVertex > & g4Vertices() const
unsigned int nGenVertices() const
TrackingParticleRefVector::iterator tp_iterator
g4v_iterator g4Vertices_end() const
TrackingParticleRefVector sourceTracks_
genv_iterator genVertices_begin() const
edm::Ref< edm::HepMCProduct, HepMC::GenVertex > GenVertexRef
g4v_iterator g4Vertices_begin() const
const GenVertexRefVector & genVertices() const