CMS 3D CMS Logo

Functions
MtdSimTrackster.cc File Reference
#include "SimDataFormats/CaloAnalysis/interface/MtdSimTrackster.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 43 of file MtdSimTrackster.cc.

References alignCSCRings::s, and cmsswSequenceInfo::tp.

43  {
44  s << "CP momentum, q, ID, & Event #: " << tp.p4() << " " << tp.charge() << " " << tp.pdgId() << " "
45  << tp.eventId().bunchCrossing() << "." << tp.eventId().event() << std::endl;
46 
47  for (MtdSimTrackster::genp_iterator hepT = tp.genParticle_begin(); hepT != tp.genParticle_end(); ++hepT) {
48  s << " HepMC Track Momentum " << (*hepT)->momentum().rho() << std::endl;
49  }
50 
51  for (MtdSimTrackster::g4t_iterator g4T = tp.g4Track_begin(); g4T != tp.g4Track_end(); ++g4T) {
52  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
53  s << " Geant Track ID & type " << g4T->trackId() << " " << g4T->type() << std::endl;
54  if (g4T->type() != tp.pdgId()) {
55  s << " Mismatch b/t MtdSimTrackster and Geant types" << std::endl;
56  }
57  }
58  s << " # of clusters = " << tp.clusters_.size() << std::endl;
59  return s;
60 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: SimCluster.h:45