Monte Carlo truth information used for tracking validation. More...
#include <SimCluster.h>
Public Types | |
typedef int | Charge |
electric charge type More... | |
typedef std::vector< SimTrack >::const_iterator | g4t_iterator |
typedef reco::GenParticleRefVector::iterator | genp_iterator |
reference to reco::GenParticle More... | |
typedef math::XYZTLorentzVectorD | LorentzVector |
Lorentz vector. More... | |
typedef math::XYZPointD | Point |
point in the space More... | |
typedef math::PtEtaPhiMLorentzVector | PolarLorentzVector |
Lorentz vector. More... | |
typedef math::XYZVectorD | Vector |
point in the space More... | |
Public Member Functions | |
void | addG4Track (const SimTrack &t) |
void | addGenParticle (const reco::GenParticleRef &ref) |
void | addHitEnergy (float energy) |
add rechit energy More... | |
void | addRecHitAndFraction (uint32_t hit, float fraction) |
add rechit with fraction More... | |
void | addSimHit (const PCaloHit &hit) |
add simhit's energy to cluster More... | |
std::vector< std::pair< uint32_t, float > > | barrel_hits_and_fractions () const |
Returns list of rechit IDs and fractions in the barrel for this SimCluster. More... | |
math::XYZVectorF | boostToCM () const |
Vector to boost to the particle centre of mass frame. More... | |
float | charge () const |
Electric charge. Note this is taken from the first SimTrack only. More... | |
void | clearHitsAndFractions () |
clear the hits and fractions list More... | |
void | clearHitsEnergy () |
clear the energies list More... | |
std::vector< std::pair< uint32_t, float > > | endcap_hits_and_fractions () const |
Returns list of rechit IDs and fractions in the endcap for this SimCluster. More... | |
float | energy () const |
Energy. Note this is taken from the first SimTrack only. More... | |
float | et () const |
Transverse energy. Note this is taken from the first SimTrack only. More... | |
float | eta () const |
Momentum pseudorapidity. Note this is taken from the simtrack before the calorimeter. More... | |
EncodedEventId | eventId () const |
Signal source, crossing number. More... | |
g4t_iterator | g4Track_begin () const |
g4t_iterator | g4Track_end () const |
const std::vector< SimTrack > & | g4Tracks () const |
genp_iterator | genParticle_begin () const |
iterators More... | |
genp_iterator | genParticle_end () const |
const reco::GenParticleRefVector & | genParticles () const |
std::vector< std::pair< uint32_t, float > > | hits_and_energies () const |
Returns list of rechit IDs and energies for this SimCluster. More... | |
std::vector< std::pair< uint32_t, float > > | hits_and_fractions () const |
Returns list of rechit IDs and fractions for this SimCluster. More... | |
bool | longLived () const |
is long lived? More... | |
float | mass () const |
Mass. Note this is taken from the first SimTrack only. More... | |
float | massSqr () const |
Mass squared. Note this is taken from the first SimTrack only. More... | |
math::XYZVectorF | momentum () const |
spatial momentum vector More... | |
float | mt () const |
Transverse mass. Note this is taken from the first SimTrack only. More... | |
float | mtSqr () const |
Transverse mass squared. Note this is taken from the first SimTrack only. More... | |
int | numberOfRecHits () const |
Gives the total number of SimHits, in the cluster. More... | |
int | numberOfSimHits () const |
Gives the total number of SimHits, in the cluster. More... | |
float | p () const |
Magnitude of momentum vector. Note this is taken from the first SimTrack only. More... | |
const math::XYZTLorentzVectorF & | p4 () const |
Four-momentum Lorentz vector. Note this is taken from the first SimTrack only. More... | |
uint64_t | particleId () const |
int | pdgId () const |
PDG ID. More... | |
float | phi () const |
Momentum azimuthal angle. Note this is taken from the first SimTrack only. More... | |
float | pt () const |
Transverse momentum. Note this is taken from the first SimTrack only. More... | |
float | px () const |
x coordinate of momentum vector. Note this is taken from the first SimTrack only. More... | |
float | py () const |
y coordinate of momentum vector. Note this is taken from the first SimTrack only. More... | |
float | pz () const |
z coordinate of momentum vector. Note this is taken from the first SimTrack only. More... | |
float | rapidity () const |
Rapidity. Note this is taken from the simtrack before the calorimeter. More... | |
SimCluster () | |
SimCluster (const SimTrack &simtrk) | |
SimCluster (EncodedEventId eventID, uint32_t particleID) | |
float | simEnergy () const |
returns the accumulated sim energy in the cluster More... | |
int | status () const |
Status word. More... | |
float | theta () const |
Momentum polar angle. Note this is taken from the first SimTrack only. More... | |
int | threeCharge () const |
Gives charge in unit of quark charge (should be 3 times "charge()") More... | |
float | y () const |
Same as rapidity(). More... | |
~SimCluster () | |
Static Public Attributes | |
static const unsigned int | longLivedTag = 65536 |
long lived flag More... | |
Protected Attributes | |
std::vector< float > | energies_ |
EncodedEventId | event_ |
std::vector< float > | fractions_ |
std::vector< SimTrack > | g4Tracks_ |
references to G4 and reco::GenParticle tracks More... | |
reco::GenParticleRefVector | genParticles_ |
std::vector< uint32_t > | hits_ |
uint64_t | nsimhits_ {0} |
uint32_t | particleId_ {0} |
float | simhit_energy_ {0.f} |
math::XYZTLorentzVectorF | theMomentum_ |
Friends | |
std::ostream & | operator<< (std::ostream &s, SimCluster const &tp) |
Monte Carlo truth information used for tracking validation.
Object with references to the original SimTrack and parent and daughter TrackingVertices. Simulation with high (~100) pileup was taking too much memory so the class was slimmed down and copies of the SimHits were removed.
Definition at line 33 of file SimCluster.h.
typedef int SimCluster::Charge |
electric charge type
Definition at line 37 of file SimCluster.h.
typedef std::vector<SimTrack>::const_iterator SimCluster::g4t_iterator |
Definition at line 45 of file SimCluster.h.
reference to reco::GenParticle
Definition at line 44 of file SimCluster.h.
Lorentz vector.
Definition at line 38 of file SimCluster.h.
typedef math::XYZPointD SimCluster::Point |
point in the space
Definition at line 40 of file SimCluster.h.
Lorentz vector.
Definition at line 39 of file SimCluster.h.
typedef math::XYZVectorD SimCluster::Vector |
point in the space
Definition at line 41 of file SimCluster.h.
SimCluster::SimCluster | ( | ) |
Definition at line 11 of file SimCluster.cc.
SimCluster::SimCluster | ( | const SimTrack & | simtrk | ) |
Definition at line 15 of file SimCluster.cc.
References addG4Track(), event_, CoreSimTrack::eventId(), CoreSimTrack::momentum(), particleId_, theMomentum_, and CoreSimTrack::trackId().
SimCluster::SimCluster | ( | EncodedEventId | eventID, |
uint32_t | particleID | ||
) |
Definition at line 24 of file SimCluster.cc.
References event_, EgammaObjectsElectrons_cfi::particleID, and particleId_.
SimCluster::~SimCluster | ( | ) |
Definition at line 29 of file SimCluster.cc.
|
inline |
Definition at line 76 of file SimCluster.h.
References g4Tracks_, and submitPVValidationJobs::t.
Referenced by MtdSimCluster::MtdSimCluster(), MtdSimLayerCluster::MtdSimLayerCluster(), MtdSimTrackster::MtdSimTrackster(), and SimCluster().
|
inline |
Definition at line 75 of file SimCluster.h.
References genParticles_, and edm::RefVector< C, T, F >::push_back().
|
inline |
add rechit energy
Definition at line 185 of file SimCluster.h.
References energies_, and energy().
|
inline |
add rechit with fraction
Definition at line 179 of file SimCluster.h.
References HLT_2024v14_cff::fraction, fractions_, and hits_.
|
inline |
add simhit's energy to cluster
Definition at line 244 of file SimCluster.h.
References nsimhits_, and simhit_energy_.
|
inline |
Returns list of rechit IDs and fractions in the barrel for this SimCluster.
Definition at line 197 of file SimCluster.h.
References EcalBarrel, fractions_, HcalBarrel, HcalOuter, hits_, mps_fire::i, mps_fire::result, and DetId::subdetId().
Referenced by LCToCPAssociatorByEnergyScoreImpl< HIT >::makeConnections().
|
inline |
Vector to boost to the particle centre of mass frame.
Definition at line 101 of file SimCluster.h.
References p4().
|
inline |
Electric charge. Note this is taken from the first SimTrack only.
Definition at line 89 of file SimCluster.h.
References g4Tracks_.
Referenced by threeCharge().
|
inline |
clear the hits and fractions list
Definition at line 232 of file SimCluster.h.
References fractions_, hits_, and edm::swap().
|
inline |
clear the energies list
Definition at line 238 of file SimCluster.h.
References energies_, and edm::swap().
Referenced by MtdSimCluster::clear().
|
inline |
Returns list of rechit IDs and fractions in the endcap for this SimCluster.
Definition at line 209 of file SimCluster.h.
References EcalBarrel, fractions_, HcalBarrel, HcalOuter, hits_, mps_fire::i, mps_fire::result, and DetId::subdetId().
Referenced by LCToCPAssociatorByEnergyScoreImpl< HIT >::makeConnections().
|
inline |
Energy. Note this is taken from the first SimTrack only.
Definition at line 108 of file SimCluster.h.
References p4().
Referenced by MtdSimLayerCluster::addCluEnergy(), addHitEnergy(), HGCalShowerSeparation::analyze(), HGCalHitCalibration::analyze(), and Jet.Jet::rawEnergy().
|
inline |
Transverse energy. Note this is taken from the first SimTrack only.
Definition at line 111 of file SimCluster.h.
References p4().
|
inline |
Momentum pseudorapidity. Note this is taken from the simtrack before the calorimeter.
Definition at line 152 of file SimCluster.h.
References p4().
Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), Jet.Jet::jetID(), datamodel.Object::p4(), and Jet.Jet::puJetId().
|
inline |
Signal source, crossing number.
Note this is taken from the first SimTrack only, but there shouldn't be any SimTracks from different crossings in the SimCluster.
Definition at line 70 of file SimCluster.h.
References event_.
Referenced by ntupleDataFormat.Event::eventIdStr().
|
inline |
Definition at line 80 of file SimCluster.h.
References g4Tracks_.
|
inline |
Definition at line 81 of file SimCluster.h.
References g4Tracks_.
|
inline |
Definition at line 86 of file SimCluster.h.
References g4Tracks_.
Referenced by MtdSimTrackster::MtdSimTrackster().
|
inline |
iterators
Definition at line 78 of file SimCluster.h.
References edm::RefVector< C, T, F >::begin(), and genParticles_.
|
inline |
Definition at line 79 of file SimCluster.h.
References edm::RefVector< C, T, F >::end(), and genParticles_.
|
inline |
|
inline |
Returns list of rechit IDs and energies for this SimCluster.
Definition at line 221 of file SimCluster.h.
References cms::cuda::assert(), energies_, hits_, mps_fire::i, and mps_fire::result.
|
inline |
Returns list of rechit IDs and fractions for this SimCluster.
Definition at line 188 of file SimCluster.h.
References fractions_, hits_, mps_fire::i, and mps_fire::result.
Referenced by HGCalShowerSeparation::analyze(), HGCalHitCalibration::analyze(), and MultiClusterAssociatorByEnergyScoreImpl::makeConnections().
|
inline |
is long lived?
Definition at line 170 of file SimCluster.h.
References longLivedTag, and status().
|
inline |
Mass. Note this is taken from the first SimTrack only.
Definition at line 114 of file SimCluster.h.
References p4().
Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), massSqr(), and datamodel.Object::p4().
|
inline |
Mass squared. Note this is taken from the first SimTrack only.
Definition at line 117 of file SimCluster.h.
References mass(), and funct::pow().
|
inline |
spatial momentum vector
Definition at line 98 of file SimCluster.h.
References p4().
|
inline |
Transverse mass. Note this is taken from the first SimTrack only.
Definition at line 120 of file SimCluster.h.
References p4().
|
inline |
Transverse mass squared. Note this is taken from the first SimTrack only.
Definition at line 124 of file SimCluster.h.
References p4().
|
inline |
Gives the total number of SimHits, in the cluster.
Definition at line 176 of file SimCluster.h.
References hits_.
|
inline |
Gives the total number of SimHits, in the cluster.
Definition at line 173 of file SimCluster.h.
References nsimhits_.
|
inline |
Magnitude of momentum vector. Note this is taken from the first SimTrack only.
Definition at line 105 of file SimCluster.h.
References p4().
Referenced by Electron.Electron::ptErr().
|
inline |
Four-momentum Lorentz vector. Note this is taken from the first SimTrack only.
Definition at line 95 of file SimCluster.h.
References theMomentum_.
Referenced by boostToCM(), Tau.Tau::dxy_approx(), Tau.Tau::dz(), energy(), et(), eta(), mass(), momentum(), mt(), mtSqr(), p(), Lepton.Lepton::p4WithFSR(), phi(), pt(), px(), py(), pz(), rapidity(), and theta().
|
inline |
|
inline |
PDG ID.
Returns the PDG ID of the first associated gen particle. If there are no gen particles associated then it returns type() from the first SimTrack.
Definition at line 59 of file SimCluster.h.
References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::empty(), g4Tracks_, and genParticles_.
Referenced by Particle.Particle::__str__().
|
inline |
Momentum azimuthal angle. Note this is taken from the first SimTrack only.
Definition at line 144 of file SimCluster.h.
References p4().
Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), datamodel.Object::p4(), and ntupleDataFormat.Track::phiPull().
|
inline |
Transverse momentum. Note this is taken from the first SimTrack only.
Definition at line 140 of file SimCluster.h.
References p4().
Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), Photon.Photon::calScaledIsoValueExp(), Photon.Photon::calScaledIsoValueLin(), Photon.Photon::calScaledIsoValueQuadr(), Electron.Electron::mvaIDLoose(), Electron.Electron::mvaIDRun2(), Electron.Electron::mvaIDTight(), datamodel.Object::p4(), Electron.Electron::ptErr(), ntupleDataFormat.Track::ptPull(), Lepton.Lepton::relIso(), Lepton.Lepton::relIsoFromEA(), Lepton.Lepton::relIsoR(), and Jet.Jet::setCorrP4().
|
inline |
x coordinate of momentum vector. Note this is taken from the first SimTrack only.
Definition at line 128 of file SimCluster.h.
References p4().
|
inline |
y coordinate of momentum vector. Note this is taken from the first SimTrack only.
Definition at line 132 of file SimCluster.h.
References p4().
|
inline |
z coordinate of momentum vector. Note this is taken from the first SimTrack only.
Definition at line 136 of file SimCluster.h.
References p4().
|
inline |
Rapidity. Note this is taken from the simtrack before the calorimeter.
Definition at line 156 of file SimCluster.h.
References p4().
Referenced by y().
|
inline |
returns the accumulated sim energy in the cluster
Definition at line 241 of file SimCluster.h.
References simhit_energy_.
Referenced by HGCalShowerSeparation::analyze(), and HGCalHitCalibration::analyze().
|
inline |
Status word.
Returns status() from the first gen particle, or -99 if there are no gen particles attached.
Definition at line 165 of file SimCluster.h.
References edm::RefVector< C, T, F >::empty(), genParticles_, and status().
Referenced by longLived(), and status().
|
inline |
Momentum polar angle. Note this is taken from the first SimTrack only.
Definition at line 148 of file SimCluster.h.
References p4().
Referenced by Tau.Tau::zImpact().
|
inline |
Gives charge in unit of quark charge (should be 3 times "charge()")
Definition at line 91 of file SimCluster.h.
|
inline |
Same as rapidity().
Definition at line 159 of file SimCluster.h.
References rapidity().
Referenced by svgfig.Ellipse::__repr__(), geometryXMLparser.Alignable::pos(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().
|
friend |
Definition at line 31 of file SimCluster.cc.
|
protected |
Definition at line 257 of file SimCluster.h.
Referenced by addHitEnergy(), clearHitsEnergy(), MtdSimLayerCluster::computeClusterTime(), MtdSimCluster::hits_and_energies(), and hits_and_energies().
|
protected |
Definition at line 251 of file SimCluster.h.
Referenced by eventId(), MtdSimCluster::MtdSimCluster(), MtdSimLayerCluster::MtdSimLayerCluster(), MtdSimTrackster::MtdSimTrackster(), and SimCluster().
|
protected |
Definition at line 256 of file SimCluster.h.
Referenced by MtdSimCluster::addHitAndFraction(), addRecHitAndFraction(), barrel_hits_and_fractions(), MtdSimCluster::clearHitsAndFractions(), clearHitsAndFractions(), endcap_hits_and_fractions(), MtdSimCluster::hits_and_fractions(), and hits_and_fractions().
|
protected |
references to G4 and reco::GenParticle tracks
Definition at line 262 of file SimCluster.h.
Referenced by addG4Track(), charge(), g4Track_begin(), g4Track_end(), g4Tracks(), and pdgId().
|
protected |
Definition at line 263 of file SimCluster.h.
Referenced by addGenParticle(), genParticle_begin(), genParticle_end(), genParticles(), pdgId(), and status().
|
protected |
Definition at line 255 of file SimCluster.h.
Referenced by addRecHitAndFraction(), barrel_hits_and_fractions(), clearHitsAndFractions(), endcap_hits_and_fractions(), hits_and_energies(), hits_and_fractions(), and numberOfRecHits().
|
static |
|
protected |
Definition at line 250 of file SimCluster.h.
Referenced by MtdSimCluster::addHitTime(), MtdSimCluster::addSimHit(), addSimHit(), and numberOfSimHits().
|
protected |
Definition at line 253 of file SimCluster.h.
Referenced by MtdSimCluster::MtdSimCluster(), MtdSimLayerCluster::MtdSimLayerCluster(), MtdSimTrackster::MtdSimTrackster(), particleId(), and SimCluster().
|
protected |
Definition at line 254 of file SimCluster.h.
Referenced by MtdSimCluster::addSimHit(), addSimHit(), and simEnergy().
|
protected |
Definition at line 259 of file SimCluster.h.
Referenced by MtdSimCluster::MtdSimCluster(), MtdSimLayerCluster::MtdSimLayerCluster(), MtdSimTrackster::MtdSimTrackster(), p4(), and SimCluster().