CMS 3D CMS Logo

Functions
MtdCaloParticle.cc File Reference
#include "SimDataFormats/CaloAnalysis/interface/MtdCaloParticle.h"
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include <FWCore/MessageLogger/interface/MessageLogger.h>
#include "SimDataFormats/CaloAnalysis/interface/SimCluster.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 28 of file MtdCaloParticle.cc.

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

28  {
29  s << "Calo Particle:" << std::endl;
30  s << "CP momentum, q, ID, & Event #: " << tp.p4() << " " << tp.charge() << " " << tp.pdgId() << " "
31  << tp.eventId().bunchCrossing() << "." << tp.eventId().event() << std::endl;
32 
33  for (MtdCaloParticle::genp_iterator hepT = tp.genParticle_begin(); hepT != tp.genParticle_end(); ++hepT) {
34  s << " HepMC Track Momentum " << (*hepT)->momentum().rho() << std::endl;
35  }
36 
37  for (MtdCaloParticle::g4t_iterator g4T = tp.g4Track_begin(); g4T != tp.g4Track_end(); ++g4T) {
38  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
39  s << " Geant Track ID & type " << g4T->trackId() << " " << g4T->type() << std::endl;
40  if (g4T->type() != tp.pdgId()) {
41  s << " Mismatch b/t MtdCaloParticle and Geant types" << std::endl;
42  }
43  }
44  s << "SimClusters in this MtdCaloParticle: " << std::endl;
45  for (auto itr = tp.simClusters_.begin(); itr != tp.simClusters_.end(); ++itr) {
46  s << **itr;
47  }
48  s << std::endl;
49  return s;
50 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: CaloParticle.h:28