CMS 3D CMS Logo

Typedefs | Functions
TrackingParticleFwd.h File Reference
#include <vector>
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/Common/interface/RefVector.h"
#include "DataFormats/Common/interface/RefProd.h"

Go to the source code of this file.

Typedefs

typedef std::vector< TrackingParticleTrackingParticleCollection
 
typedef edm::RefVector< TrackingParticleCollectionTrackingParticleContainer
 
typedef edm::Ref< TrackingParticleCollectionTrackingParticleRef
 
typedef edm::RefProd< TrackingParticleCollectionTrackingParticleRefProd
 
typedef edm::RefVector< TrackingParticleCollectionTrackingParticleRefVector
 

Functions

std::ostream & operator<< (std::ostream &s, TrackingParticle const &tp)
 

Typedef Documentation

Definition at line 8 of file TrackingParticleFwd.h.

Definition at line 13 of file TrackingParticleFwd.h.

Definition at line 10 of file TrackingParticleFwd.h.

Definition at line 12 of file TrackingParticleFwd.h.

Definition at line 11 of file TrackingParticleFwd.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
TrackingParticle const &  tp 
)

Definition at line 97 of file TrackingParticle.cc.

References EncodedEventId::bunchCrossing(), TrackingParticle::charge(), TrackingParticle::decayVertices(), TrackingParticle::decayVertices_begin(), TrackingParticle::decayVertices_end(), EncodedEventId::event(), TrackingParticle::eventId(), TrackingParticle::g4Track_begin(), TrackingParticle::g4Track_end(), TrackingParticle::genParticle_begin(), TrackingParticle::genParticle_end(), TrackingParticle::p4(), TrackingParticle::parentVertex(), TrackingParticle::pdgId(), alignCSCRings::s, edm::RefVector< C, T, F >::size(), and TrackingParticle::vertex().

98 {
99  s << "TP momentum, q, ID, & Event #: "
100  << tp.p4() << " " << tp.charge() << " " << tp.pdgId() << " "
101  << tp.eventId().bunchCrossing() << "." << tp.eventId().event() << std::endl;
102 
103  for (TrackingParticle::genp_iterator hepT = tp.genParticle_begin(); hepT != tp.genParticle_end(); ++hepT)
104  {
105  s << " HepMC Track Momentum " << (*hepT)->momentum().rho() << std::endl;
106  }
107 
108  for (TrackingParticle::g4t_iterator g4T = tp.g4Track_begin(); g4T != tp.g4Track_end(); ++g4T)
109  {
110  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
111  s << " Geant Track ID & type " << g4T->trackId() << " " << g4T->type() << std::endl;
112  if (g4T->type() != tp.pdgId())
113  {
114  s << " Mismatch b/t TrackingParticle and Geant types" << std::endl;
115  }
116  }
117  // Loop over decay vertices
118  s << " TP Vertex " << tp.vertex() << std::endl;
119  s << " Source vertex: " << tp.parentVertex()->position() << std::endl;
120  s << " " << tp.decayVertices().size() << " Decay vertices" << std::endl;
121  for (tv_iterator iTV = tp.decayVertices_begin(); iTV != tp.decayVertices_end(); ++iTV)
122  {
123  s << " Decay vertices: " << (**iTV).position() << std::endl;
124  }
125 
126  return s;
127 }
std::vector< SimTrack >::const_iterator g4t_iterator