#include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
Go to the source code of this file.
Typedefs | |
typedef edm::Ref < edm::HepMCProduct, HepMC::GenVertex > | GenVertexRef |
typedef edm::RefVector < edm::HepMCProduct, HepMC::GenVertex > | GenVertexRefVector |
Functions | |
std::ostream & | operator<< (std::ostream &s, const TrackingVertex &v) |
typedef edm::Ref<edm::HepMCProduct, HepMC::GenVertex > GenVertexRef |
Definition at line 5 of file TrackingVertex.cc.
typedef edm::RefVector<edm::HepMCProduct, HepMC::GenVertex > GenVertexRefVector |
Definition at line 4 of file TrackingVertex.cc.
std::ostream& operator<< | ( | std::ostream & | s, | |
const TrackingVertex & | v | |||
) |
Definition at line 66 of file TrackingVertex.cc.
References EncodedEventId::bunchCrossing(), TrackingVertex::daughterTracks(), TrackingVertex::daughterTracks_begin(), TrackingVertex::daughterTracks_end(), lat::endl(), EncodedEventId::event(), TrackingVertex::eventId(), TrackingVertex::g4Vertices_begin(), TrackingVertex::g4Vertices_end(), TrackingVertex::genVertices_begin(), TrackingVertex::genVertices_end(), TrackingVertex::position(), edm::RefVector< C, T, F >::size(), TrackingVertex::sourceTracks_begin(), and TrackingVertex::sourceTracks_end().
00066 { 00067 00068 using std::endl; 00069 typedef GenVertexRefVector::iterator genv_iterator; 00070 typedef std::vector<SimVertex>::const_iterator g4v_iterator; 00071 typedef TrackingParticleRefVector::iterator tp_iterator; 00072 typedef std::vector<SimTrack>::const_iterator g4t_iterator; 00073 00074 s << "Vertex Position & Event #" << v.position() << " " << v.eventId().bunchCrossing() << "." << v.eventId().event() << endl; 00075 s << " Associated with " << v.daughterTracks().size() << " tracks" << endl; 00076 for (genv_iterator genV = v.genVertices_begin(); genV != v.genVertices_end(); ++genV) { 00077 s << " HepMC vertex position " << (*(*genV)).position().x() << ","<< (*(*genV)).position().y() << (*(*genV)).position().z() << endl; 00078 } 00079 00080 for (g4v_iterator g4V = v.g4Vertices_begin(); g4V != v.g4Vertices_end(); ++g4V) { 00081 s << " Geant vertex position " << (*g4V).position() << endl; 00082 // Probably empty all the time, currently 00083 } 00084 00085 // Loop over daughter track(s) 00086 for (tp_iterator iTP = v.daughterTracks_begin(); iTP != v.daughterTracks_end(); ++iTP) { 00087 s << " Daughter starts: " << (*(*iTP)).vertex(); 00088 for (g4t_iterator g4T = (*(*iTP)).g4Track_begin(); g4T != (*(*iTP)).g4Track_end(); ++g4T) { 00089 s << " p " << g4T->momentum(); 00090 } 00091 s << endl; 00092 } 00093 00094 // Loop over source track(s) (can be multiple since vertices are collapsed) 00095 for (tp_iterator iTP = v.sourceTracks_begin(); iTP != v.sourceTracks_end(); ++iTP) { 00096 s << " Source starts: " << (*(*iTP)).vertex(); 00097 for (g4t_iterator g4T = (*iTP)->g4Track_begin(); g4T != (*iTP)->g4Track_end(); ++g4T) { 00098 s << ", p " << g4T ->momentum(); 00099 } 00100 s << endl; 00101 } 00102 return s; 00103 }