CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
tp_iterator daughterTracks_begin() const
const TrackingParticleRefVector & sourceTracks() const
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_
const std::vector< SimVertex > & g4Vertices() const
g4v_iterator g4Vertices_end() const
const GenVertexRefVector & genVertices() const
void addDaughterTrack(const TrackingParticleRef &)
EncodedEventId eId_
void clearDaughterTracks()
void addParentTrack(const TrackingParticleRef &)
const bool inVolume() const
g4v_iterator g4Vertices_begin() const
void addG4Vertex(const SimVertex &)
math::XYZTLorentzVectorD LorentzVector
genv_iterator genVertices_end() const
TrackingParticleRefVector daughterTracks_
edm::RefVector< edm::HepMCProduct, HepMC::GenVertex > GenVertexRefVector
friend std::ostream & operator<<(std::ostream &s, const TrackingVertex &tv)
GenVertexRefVector genVertices_
math::XYZTLorentzVector LorentzVector
tp_iterator daughterTracks_end() const
unsigned int nG4Vertices() const
tp_iterator sourceTracks_begin() const
unsigned int nGenVertices() const
unsigned int nDaughterTracks() const
tp_iterator sourceTracks_end() const
void clearParentTracks()
std::vector< SimVertex > g4Vertices_
void addGenVertex(const GenVertexRef &)
const EncodedEventId & eventId() const
const TrackingParticleRefVector & daughterTracks() const
TrackingParticleRefVector::iterator tp_iterator
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
TrackingParticleRefVector sourceTracks_
edm::Ref< edm::HepMCProduct, HepMC::GenVertex > GenVertexRef
genv_iterator genVertices_begin() const
unsigned int nSourceTracks() const
const LorentzVector & position() const