CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
SimClusterFwd.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< SimClusterSimClusterCollection
 
typedef edm::RefVector
< SimClusterCollection
SimClusterContainer
 
typedef edm::Ref
< SimClusterCollection
SimClusterRef
 
typedef edm::RefProd
< SimClusterCollection
SimClusterRefProd
 
typedef edm::RefVector
< SimClusterCollection
SimClusterRefVector
 

Functions

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

Typedef Documentation

typedef std::vector<SimCluster> SimClusterCollection

Definition at line 8 of file SimClusterFwd.h.

Definition at line 13 of file SimClusterFwd.h.

Definition at line 10 of file SimClusterFwd.h.

Definition at line 12 of file SimClusterFwd.h.

Definition at line 11 of file SimClusterFwd.h.

Function Documentation

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

Definition at line 38 of file SimCluster.cc.

References EncodedEventId::bunchCrossing(), SimCluster::charge(), EncodedEventId::event(), SimCluster::eventId(), SimCluster::fractions_, SimCluster::g4Track_begin(), SimCluster::g4Track_end(), SimCluster::genParticle_begin(), SimCluster::genParticle_end(), SimCluster::hits_, SimCluster::p4(), SimCluster::pdgId(), and alignCSCRings::s.

39 {
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 (SimCluster::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 (SimCluster::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 SimCluster and Geant types" << std::endl;
56  }
57  }
58  s << " # of cells = " << tp.hits_.size()
59  << ", effective cells = " << std::accumulate(tp.fractions_.begin(),tp.fractions_.end(),0.f) << std::endl;
60  return s;
61 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: SimCluster.h:40