CMS 3D CMS Logo

Functions
CaloParticle.cc File Reference
#include "SimDataFormats/CaloAnalysis/interface/CaloParticle.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, CaloParticle const &tp)
 

Function Documentation

◆ operator<<()

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

Definition at line 30 of file CaloParticle.cc.

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

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

alignCSCRings.s
s
Definition: alignCSCRings.py:92
CaloParticle::g4t_iterator
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: CaloParticle.h:28
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
edm::RefVectorIterator
Definition: EDProductfwd.h:33