CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Typedefs | Functions
SimClusterFwd.h File Reference
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/Common/interface/RefProd.h"
#include "DataFormats/Common/interface/RefVector.h"
#include <vector>

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 31 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.

31  {
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 (SimCluster::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 (SimCluster::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 SimCluster and Geant types" << std::endl;
44  }
45  }
46  s << " # of cells = " << tp.hits_.size()
47  << ", effective cells = " << std::accumulate(tp.fractions_.begin(), tp.fractions_.end(), 0.f) << std::endl;
48  return s;
49 }
std::vector< SimTrack >::const_iterator g4t_iterator
Definition: SimCluster.h:41