CMS 3D CMS Logo

Functions
MtdSimLayerCluster.cc File Reference
#include "SimDataFormats/CaloAnalysis/interface/MtdSimLayerCluster.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <numeric>

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 27 of file MtdSimLayerCluster.cc.

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

27  {
28  s << "CP momentum, q, ID, & Event #: " << tp.p4() << " " << tp.charge() << " " << tp.pdgId() << " "
29  << tp.eventId().bunchCrossing() << "." << tp.eventId().event() << std::endl;
30 
31  for (MtdSimLayerCluster::genp_iterator hepT = tp.genParticle_begin(); hepT != tp.genParticle_end(); ++hepT) {
32  s << " HepMC Track Momentum " << (*hepT)->momentum().rho() << std::endl;
33  }
34 
35  for (MtdSimLayerCluster::g4t_iterator g4T = tp.g4Track_begin(); g4T != tp.g4Track_end(); ++g4T) {
36  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
37  s << " Geant Track ID & type " << g4T->trackId() << " " << g4T->type() << std::endl;
38  if (g4T->type() != tp.pdgId()) {
39  s << " Mismatch b/t MtdSimLayerCluster and Geant types" << std::endl;
40  }
41  }
42  s << " # of cells = " << tp.hits_.size()
43  << ", effective cells = " << std::accumulate(tp.fractions_.begin(), tp.fractions_.end(), 0.f) << std::endl;
44  return s;
45 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: SimCluster.h:41