CMS 3D CMS Logo

Typedefs | Functions
CaloParticleFwd.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< CaloParticleCaloParticleCollection
 
typedef edm::RefVector< CaloParticleCollectionCaloParticleContainer
 
typedef edm::Ref< CaloParticleCollectionCaloParticleRef
 
typedef edm::RefProd< CaloParticleCollectionCaloParticleRefProd
 
typedef edm::RefVector< CaloParticleCollectionCaloParticleRefVector
 

Functions

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

Typedef Documentation

typedef std::vector<CaloParticle> CaloParticleCollection

Definition at line 8 of file CaloParticleFwd.h.

Definition at line 13 of file CaloParticleFwd.h.

Definition at line 10 of file CaloParticleFwd.h.

Definition at line 12 of file CaloParticleFwd.h.

Definition at line 11 of file CaloParticleFwd.h.

Function Documentation

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

Definition at line 37 of file CaloParticle.cc.

References edm::RefVector< C, T, F >::begin(), EncodedEventId::bunchCrossing(), CaloParticle::charge(), edm::RefVector< C, T, F >::end(), EncodedEventId::event(), CaloParticle::eventId(), CaloParticle::g4Track_begin(), CaloParticle::g4Track_end(), CaloParticle::genParticle_begin(), CaloParticle::genParticle_end(), CaloParticle::p4(), CaloParticle::pdgId(), alignCSCRings::s, and CaloParticle::simClusters_.

38 {
39  s << "Calo Particle:" << std::endl;
40  s << "CP momentum, q, ID, & Event #: "
41  << tp.p4() << " " << tp.charge() << " " << tp.pdgId() << " "
42  << tp.eventId().bunchCrossing() << "." << tp.eventId().event() << std::endl;
43 
44  for (CaloParticle::genp_iterator hepT = tp.genParticle_begin(); hepT != tp.genParticle_end(); ++hepT)
45  {
46  s << " HepMC Track Momentum " << (*hepT)->momentum().rho() << std::endl;
47  }
48 
49  for (CaloParticle::g4t_iterator g4T = tp.g4Track_begin(); g4T != tp.g4Track_end(); ++g4T)
50  {
51  s << " Geant Track Momentum " << g4T->momentum() << std::endl;
52  s << " Geant Track ID & type " << g4T->trackId() << " " << g4T->type() << std::endl;
53  if (g4T->type() != tp.pdgId())
54  {
55  s << " Mismatch b/t CaloParticle and Geant types" << std::endl;
56  }
57  }
58  s << "SimClusters in this CaloParticle: " << std::endl;
59  for( auto itr = tp.simClusters_.begin(); itr != tp.simClusters_.end(); ++itr ) {
60  s << **itr;
61  }
62  s << std::endl;
63  return s;
64 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: CaloParticle.h:28