CMS 3D CMS Logo

Typedefs | Functions
TrackingVertex.cc File Reference
#include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingVertex.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.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 Documentation

◆ GenVertexRef

typedef edm::Ref<edm::HepMCProduct, HepMC::GenVertex> GenVertexRef

Definition at line 6 of file TrackingVertex.cc.

◆ GenVertexRefVector

Definition at line 5 of file TrackingVertex.cc.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const TrackingVertex v 
)

Definition at line 54 of file TrackingVertex.cc.

54  {
55  using std::endl;
57  typedef std::vector<SimVertex>::const_iterator g4v_iterator;
59  typedef std::vector<SimTrack>::const_iterator g4t_iterator;
60 
61  s << "Vertex Position & Event #" << v.position() << " " << v.eventId().bunchCrossing() << "." << v.eventId().event()
62  << endl;
63  s << " Associated with " << v.daughterTracks().size() << " tracks" << endl;
64  for (genv_iterator genV = v.genVertices_begin(); genV != v.genVertices_end(); ++genV) {
65  s << " HepMC vertex position " << (*(*genV)).position().x() << "," << (*(*genV)).position().y()
66  << (*(*genV)).position().z() << endl;
67  }
68 
69  for (g4v_iterator g4V = v.g4Vertices_begin(); g4V != v.g4Vertices_end(); ++g4V) {
70  s << " Geant vertex position " << (*g4V).position() << endl;
71  // Probably empty all the time, currently
72  }
73 
74  // Loop over daughter track(s)
75  for (tp_iterator iTP = v.daughterTracks_begin(); iTP != v.daughterTracks_end(); ++iTP) {
76  s << " Daughter starts: " << (*(*iTP)).vertex();
77  for (g4t_iterator g4T = (*(*iTP)).g4Track_begin(); g4T != (*(*iTP)).g4Track_end(); ++g4T) {
78  s << " p " << g4T->momentum();
79  }
80  s << endl;
81  }
82 
83  // Loop over source track(s) (can be multiple since vertices are collapsed)
84  for (tp_iterator iTP = v.sourceTracks_begin(); iTP != v.sourceTracks_end(); ++iTP) {
85  s << " Source starts: " << (*(*iTP)).vertex();
86  for (g4t_iterator g4T = (*iTP)->g4Track_begin(); g4T != (*iTP)->g4Track_end(); ++g4T) {
87  s << ", p " << g4T->momentum();
88  }
89  s << endl;
90  }
91  return s;
92 }

References position, alignCSCRings::s, findQualityFiles::v, and bphysicsOniaDQM_cfi::vertex.

g4t_iterator
TrackingParticle::g4t_iterator g4t_iterator
Definition: TrackingTruthValid.cc:24
g4v_iterator
TrackingVertex::g4v_iterator g4v_iterator
Definition: TrackingTruthValid.cc:27
findQualityFiles.v
v
Definition: findQualityFiles.py:179
genv_iterator
TrackingVertex::genv_iterator genv_iterator
Definition: TrackingTruthValid.cc:26
alignCSCRings.s
s
Definition: alignCSCRings.py:92
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::RefVectorIterator
Definition: EDProductfwd.h:33
tp_iterator
TrackingParticleRefVector::iterator tp_iterator
Definition: TrackingTruthValid.cc:23