CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< TrackingParticle
TrackingParticleCollection
 
typedef edm::RefVector
< TrackingParticleCollection
TrackingParticleContainer
 
typedef edm::Ref
< TrackingParticleCollection
TrackingParticleRef
 
typedef edm::RefProd
< TrackingParticleCollection
TrackingParticleRefProd
 
typedef edm::RefVector
< TrackingParticleCollection
TrackingParticleRefVector
 

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 
)

Concrete TrackingParticle. All track parameters are passed in the constructor and stored internally.

Definition at line 12 of file TrackingDataPrint.h.

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::momentum(), TrackingParticle::p4(), TrackingParticle::parentVertex(), TrackingParticle::pdgId(), alignCSCRings::s, edm::RefVector< C, T, F >::size(), and TrackingParticle::vertex().

13 {
14 
15  // Compare momenta from sources
16  s << "T.P. Track Momentum, q , ID, & Event # "
17  << tp.p4() << " " << tp.charge() << " "
18  << tp.pdgId() << " "
19  << tp.eventId().bunchCrossing() << "." << tp.eventId().event()
20  << std::endl;
21  s << " Hits for this track: " << tp.trackPSimHit().size()
22  << std::endl;
23 
24  for (TrackingParticle::genp_iterator hepT = tp.genParticle_begin();
25  hepT != tp.genParticle_end(); ++hepT)
26  {
27  s << " HepMC Track Momentum " << (*hepT)->momentum().mag() << std::endl;
28  }
29  for (TrackingParticle::g4t_iterator g4T = tp.g4Track_begin();
30  g4T != tp.g4Track_end(); ++g4T)
31  {
32  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
33  s << " Geant Track ID & type " << g4T->trackId() << " "
34  << g4T->type() << std::endl;
35  if (g4T->type() != tp.pdgId())
36  {
37  s << " Mismatch b/t TrackingParticle and Geant types"
38  << std::endl;
39  }
40  }
41  return s;
42 }
std::vector< SimTrack >::const_iterator g4t_iterator