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
TrackingVertex::clearDaughterTracks
void clearDaughterTracks()
Definition: TrackingVertex.cc:31
SimVertex
Definition: SimVertex.h:5
TrackingVertex::g4Vertices_end
g4v_iterator g4Vertices_end() const
Definition: TrackingVertex.cc:40
TrackingVertex::nGenVertices
unsigned int nGenVertices() const
Definition: TrackingVertex.h:52
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
TrackingVertex::daughterTracks_begin
tp_iterator daughterTracks_begin() const
Definition: TrackingVertex.cc:42
TrackingVertex::g4v_iterator
std::vector< SimVertex >::const_iterator g4v_iterator
Definition: TrackingVertex.h:30
TrackingVertex::position
const LorentzVector & position() const
Definition: TrackingVertex.h:71
g4v_iterator
TrackingVertex::g4v_iterator g4v_iterator
Definition: TrackingTruthValid.cc:27
TrackingVertex::daughterTracks_end
tp_iterator daughterTracks_end() const
Definition: TrackingVertex.cc:43
TrackingVertex::tp_iterator
TrackingParticleRefVector::iterator tp_iterator
Definition: TrackingVertex.h:31
TrackingVertex::addGenVertex
void addGenVertex(const GenVertexRef &)
Definition: TrackingVertex.cc:23
edm::RefVector< edm::HepMCProduct, HepMC::GenVertex >
edm::Ref
Definition: AssociativeIterator.h:58
TrackingVertex::g4Vertices
const std::vector< SimVertex > & g4Vertices() const
Definition: TrackingVertex.cc:49
EncodedEventId
Definition: EncodedEventId.h:11
TrackingVertex::TrackingVertex
TrackingVertex()
Definition: TrackingVertex.cc:10
alignCSCRings.s
s
Definition: alignCSCRings.py:92
TrackingVertex::GenVertexRef
edm::Ref< edm::HepMCProduct, HepMC::GenVertex > GenVertexRef
Definition: TrackingVertex.h:27
TrackingVertex::GenVertexRefVector
edm::RefVector< edm::HepMCProduct, HepMC::GenVertex > GenVertexRefVector
Definition: TrackingVertex.h:26
TrackingVertex::clearParentTracks
void clearParentTracks()
Definition: TrackingVertex.cc:33
TrackingVertex::nSourceTracks
unsigned int nSourceTracks() const
Definition: TrackingVertex.h:54
TrackingVertex::nG4Vertices
unsigned int nG4Vertices() const
Definition: TrackingVertex.h:51
TrackingVertex::daughterTracks_
TrackingParticleRefVector daughterTracks_
Definition: TrackingVertex.h:84
TrackingVertex::inVolume_
bool inVolume_
Definition: TrackingVertex.h:77
TrackingVertex::daughterTracks
const TrackingParticleRefVector & daughterTracks() const
Definition: TrackingVertex.cc:52
TrackingVertex::addG4Vertex
void addG4Vertex(const SimVertex &)
Definition: TrackingVertex.cc:21
TrackingVertex::position_
LorentzVector position_
Definition: TrackingVertex.h:73
TrackingVertex::eventId
const EncodedEventId & eventId() const
Definition: TrackingVertex.h:72
TrackingVertex::sourceTracks
const TrackingParticleRefVector & sourceTracks() const
Definition: TrackingVertex.cc:51
TrackingVertex::inVolume
const bool inVolume() const
Definition: TrackingVertex.h:73
TrackingVertex::sourceTracks_
TrackingParticleRefVector sourceTracks_
Definition: TrackingVertex.h:85
TrackingVertex::sourceTracks_end
tp_iterator sourceTracks_end() const
Definition: TrackingVertex.cc:45
RefVector.h
TrackingVertex::genVertices_
GenVertexRefVector genVertices_
Definition: TrackingVertex.h:83
TrackingVertex
Definition: TrackingVertex.h:22
TrackingVertex::g4Vertices_begin
g4v_iterator g4Vertices_begin() const
Definition: TrackingVertex.cc:39
TrackingVertex::setEventId
void setEventId(EncodedEventId e)
Definition: TrackingVertex.h:38
TrackingVertex::eId_
EncodedEventId eId_
Definition: TrackingVertex.h:78
LorentzVector.h
TrackingVertex::genv_iterator
GenVertexRefVector::iterator genv_iterator
Definition: TrackingVertex.h:29
TrackingVertex::operator<<
friend std::ostream & operator<<(std::ostream &s, const TrackingVertex &tv)
Definition: TrackingVertex.cc:54
TrackingVertex::nDaughterTracks
unsigned int nDaughterTracks() const
Definition: TrackingVertex.h:53
TrackingParticleFwd.h
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
TrackingVertex::genVertices_begin
genv_iterator genVertices_begin() const
Definition: TrackingVertex.cc:37
TrackingVertex::genVertices
const GenVertexRefVector & genVertices() const
Definition: TrackingVertex.cc:50
TrackingVertex::addDaughterTrack
void addDaughterTrack(const TrackingParticleRef &)
Definition: TrackingVertex.cc:27
edm::RefVectorIterator
Definition: EDProductfwd.h:33
Point3D.h
TrackingVertex::genVertices_end
genv_iterator genVertices_end() const
Definition: TrackingVertex.cc:38
HepMCProduct.h
TrackingVertex::g4Vertices_
std::vector< SimVertex > g4Vertices_
Definition: TrackingVertex.h:82
edm::RefVector::size
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
SimTrackContainer.h
SimVertexContainer.h
TrackingVertex::sourceTracks_begin
tp_iterator sourceTracks_begin() const
Definition: TrackingVertex.cc:44
TrackingVertex::LorentzVector
math::XYZTLorentzVectorD LorentzVector
Definition: TrackingVertex.h:28
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EncodedEventId.h
TrackingVertex::addParentTrack
void addParentTrack(const TrackingParticleRef &)
Definition: TrackingVertex.cc:29