#include <TrackingVertex.h>
A simulated Vertex with links to TrackingParticles for analysis of track and vertex reconstruction
Definition at line 23 of file TrackingVertex.h.
typedef std::vector<SimVertex>::const_iterator TrackingVertex::g4v_iterator |
Definition at line 34 of file TrackingVertex.h.
Definition at line 33 of file TrackingVertex.h.
typedef edm::Ref<edm::HepMCProduct, HepMC::GenVertex > TrackingVertex::GenVertexRef |
Definition at line 31 of file TrackingVertex.h.
typedef edm::RefVector<edm::HepMCProduct, HepMC::GenVertex > TrackingVertex::GenVertexRefVector |
Definition at line 30 of file TrackingVertex.h.
Definition at line 32 of file TrackingVertex.h.
Definition at line 35 of file TrackingVertex.h.
TrackingVertex::TrackingVertex | ( | ) |
Definition at line 9 of file TrackingVertex.cc.
: position_(LorentzVector(0,0,0,0)), eId_(0) { // daughterTracks_.clear(); }
TrackingVertex::TrackingVertex | ( | const LorentzVector & | position, |
const bool | inVolume, | ||
const EncodedEventId | e = EncodedEventId(0) |
||
) |
void TrackingVertex::addDaughterTrack | ( | const TrackingParticleRef & | ref | ) |
Definition at line 34 of file TrackingVertex.cc.
References daughterTracks_, and edm::RefVector< C, T, F >::push_back().
Referenced by TrackingTruthProducer::mergeBremsstrahlung().
{ daughterTracks_.push_back(ref); }
void TrackingVertex::addG4Vertex | ( | const SimVertex & | v | ) |
Definition at line 22 of file TrackingVertex.cc.
References g4Vertices_.
Referenced by TrackingTruthProducer::setTrackingVertex().
{ g4Vertices_.push_back(v); }
void TrackingVertex::addGenVertex | ( | const GenVertexRef & | ref | ) |
Definition at line 27 of file TrackingVertex.cc.
References genVertices_, and edm::RefVector< C, T, F >::push_back().
Referenced by TrackingTruthProducer::addCloseGenVertexes().
{ genVertices_.push_back(ref); }
void TrackingVertex::addParentTrack | ( | const TrackingParticleRef & | ref | ) |
Definition at line 39 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::push_back(), and sourceTracks_.
Referenced by TrackingTruthProducer::mergeBremsstrahlung().
{ sourceTracks_.push_back(ref); }
void TrackingVertex::clearDaughterTracks | ( | ) |
Definition at line 44 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::clear(), and daughterTracks_.
Referenced by TrackingTruthProducer::mergeBremsstrahlung().
{ daughterTracks_.clear(); }
void TrackingVertex::clearParentTracks | ( | ) |
Definition at line 49 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::clear(), and sourceTracks_.
Referenced by TrackingTruthProducer::mergeBremsstrahlung().
{ sourceTracks_.clear(); }
const TrackingParticleRefVector & TrackingVertex::daughterTracks | ( | ) | const |
Definition at line 105 of file TrackingVertex.cc.
References daughterTracks_.
Referenced by VertexFitterResult::fill(), and operator<<().
{ return daughterTracks_; }
TrackingVertex::tp_iterator TrackingVertex::daughterTracks_begin | ( | ) | const |
Definition at line 74 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::begin(), and daughterTracks_.
Referenced by VertexFitterResult::fill(), TrackingTruthProducer::isBremsstrahlungVertex(), and operator<<().
{ return daughterTracks_.begin(); }
TrackingVertex::tp_iterator TrackingVertex::daughterTracks_end | ( | ) | const |
Definition at line 78 of file TrackingVertex.cc.
References daughterTracks_, and edm::RefVector< C, T, F >::end().
Referenced by VertexFitterResult::fill(), TrackingTruthProducer::isBremsstrahlungVertex(), and operator<<().
{ return daughterTracks_.end(); }
const EncodedEventId& TrackingVertex::eventId | ( | ) | const [inline] |
Definition at line 95 of file TrackingVertex.h.
References eId_.
Referenced by TrackingTruthProducer::addCloseGenVertexes(), PrimaryVertexAnalyzer4PU::getSimEvents(), and operator<<().
{ return eId_; };
const std::vector< SimVertex > & TrackingVertex::g4Vertices | ( | ) | const |
TrackingVertex::g4v_iterator TrackingVertex::g4Vertices_begin | ( | ) | const |
Definition at line 65 of file TrackingVertex.cc.
References g4Vertices_.
Referenced by operator<<().
{ return g4Vertices_.begin(); }
TrackingVertex::g4v_iterator TrackingVertex::g4Vertices_end | ( | ) | const |
Definition at line 69 of file TrackingVertex.cc.
References g4Vertices_.
Referenced by operator<<().
{ return g4Vertices_.end(); }
const GenVertexRefVector & TrackingVertex::genVertices | ( | ) | const |
TrackingVertex::genv_iterator TrackingVertex::genVertices_begin | ( | ) | const |
Definition at line 57 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::begin(), and genVertices_.
Referenced by operator<<().
{ return genVertices_.begin(); }
TrackingVertex::genv_iterator TrackingVertex::genVertices_end | ( | ) | const |
Definition at line 61 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::end(), and genVertices_.
Referenced by operator<<().
{ return genVertices_.end(); }
const bool TrackingVertex::inVolume | ( | ) | const [inline] |
unsigned int TrackingVertex::nDaughterTracks | ( | ) | const [inline] |
Definition at line 67 of file TrackingVertex.h.
References daughterTracks_, and edm::RefVector< C, T, F >::size().
{ return daughterTracks_.size(); };
unsigned int TrackingVertex::nG4Vertices | ( | ) | const [inline] |
Definition at line 59 of file TrackingVertex.h.
References g4Vertices_.
{ return g4Vertices_.size(); };
unsigned int TrackingVertex::nGenVertices | ( | ) | const [inline] |
Definition at line 63 of file TrackingVertex.h.
References genVertices_, and edm::RefVector< C, T, F >::size().
{ return genVertices_.size(); };
unsigned int TrackingVertex::nSourceTracks | ( | ) | const [inline] |
Definition at line 71 of file TrackingVertex.h.
References edm::RefVector< C, T, F >::size(), and sourceTracks_.
{ return sourceTracks_.size(); };
const LorentzVector& TrackingVertex::position | ( | void | ) | const [inline] |
Definition at line 91 of file TrackingVertex.h.
References position_.
Referenced by TrackingTruthProducer::addCloseGenVertexes(), FWTrackingVertexProxyBuilder::build(), VertexFitterResult::fill(), PrimaryVertexAnalyzer4PU::getSimEvents(), operator<<(), PrimaryVertexAnalyzer4PU::printPVTrks(), and ShallowSimTracksProducer::produce().
{ return position_; };
void TrackingVertex::setEventId | ( | EncodedEventId | e | ) | [inline] |
Definition at line 43 of file TrackingVertex.h.
References ExpressReco_HICollisions_FallBack::e, and eId_.
const TrackingParticleRefVector & TrackingVertex::sourceTracks | ( | ) | const |
Definition at line 101 of file TrackingVertex.cc.
References sourceTracks_.
Referenced by TrackingTruthProducer::isBremsstrahlungVertex(), and TrackingTruthProducer::mergeBremsstrahlung().
{ return sourceTracks_; }
TrackingVertex::tp_iterator TrackingVertex::sourceTracks_begin | ( | ) | const |
Definition at line 82 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::begin(), and sourceTracks_.
Referenced by operator<<().
{ return sourceTracks_.begin(); }
TrackingVertex::tp_iterator TrackingVertex::sourceTracks_end | ( | ) | const |
Definition at line 86 of file TrackingVertex.cc.
References edm::RefVector< C, T, F >::end(), and sourceTracks_.
Referenced by operator<<().
{ return sourceTracks_.end(); }
std::ostream& operator<< | ( | std::ostream & | s, |
const TrackingVertex & | tv | ||
) | [friend] |
Definition at line 110 of file TrackingVertex.cc.
{ using std::endl; typedef GenVertexRefVector::iterator genv_iterator; typedef std::vector<SimVertex>::const_iterator g4v_iterator; typedef TrackingParticleRefVector::iterator tp_iterator; typedef std::vector<SimTrack>::const_iterator g4t_iterator; s << "Vertex Position & Event #" << v.position() << " " << v.eventId().bunchCrossing() << "." << v.eventId().event() << endl; s << " Associated with " << v.daughterTracks().size() << " tracks" << endl; for (genv_iterator genV = v.genVertices_begin(); genV != v.genVertices_end(); ++genV) { s << " HepMC vertex position " << (*(*genV)).position().x() << ","<< (*(*genV)).position().y() << (*(*genV)).position().z() << endl; } for (g4v_iterator g4V = v.g4Vertices_begin(); g4V != v.g4Vertices_end(); ++g4V) { s << " Geant vertex position " << (*g4V).position() << endl; // Probably empty all the time, currently } // Loop over daughter track(s) for (tp_iterator iTP = v.daughterTracks_begin(); iTP != v.daughterTracks_end(); ++iTP) { s << " Daughter starts: " << (*(*iTP)).vertex(); for (g4t_iterator g4T = (*(*iTP)).g4Track_begin(); g4T != (*(*iTP)).g4Track_end(); ++g4T) { s << " p " << g4T->momentum(); } s << endl; } // Loop over source track(s) (can be multiple since vertices are collapsed) for (tp_iterator iTP = v.sourceTracks_begin(); iTP != v.sourceTracks_end(); ++iTP) { s << " Source starts: " << (*(*iTP)).vertex(); for (g4t_iterator g4T = (*iTP)->g4Track_begin(); g4T != (*iTP)->g4Track_end(); ++g4T) { s << ", p " << g4T ->momentum(); } s << endl; } return s; }
Definition at line 114 of file TrackingVertex.h.
Referenced by addDaughterTrack(), clearDaughterTracks(), daughterTracks(), daughterTracks_begin(), daughterTracks_end(), and nDaughterTracks().
EncodedEventId TrackingVertex::eId_ [private] |
Definition at line 108 of file TrackingVertex.h.
Referenced by eventId(), and setEventId().
std::vector<SimVertex> TrackingVertex::g4Vertices_ [private] |
Definition at line 112 of file TrackingVertex.h.
Referenced by addG4Vertex(), g4Vertices(), g4Vertices_begin(), g4Vertices_end(), and nG4Vertices().
Definition at line 113 of file TrackingVertex.h.
Referenced by addGenVertex(), genVertices(), genVertices_begin(), genVertices_end(), and nGenVertices().
bool TrackingVertex::inVolume_ [private] |
Definition at line 107 of file TrackingVertex.h.
Referenced by inVolume().
LorentzVector TrackingVertex::position_ [private] |
Definition at line 102 of file TrackingVertex.h.
Referenced by position().
Definition at line 115 of file TrackingVertex.h.
Referenced by addParentTrack(), clearParentTracks(), nSourceTracks(), sourceTracks(), sourceTracks_begin(), and sourceTracks_end().