Classes | |
struct | calo_particles |
struct | OutputCollections |
Public Member Functions | |
CaloTruthAccumulator (const edm::ParameterSet &config, edm::ProducerBase &mixMod, edm::ConsumesCollector &iC) | |
Public Member Functions inherited from DigiAccumulatorMixMod | |
virtual void | accumulate (edm::Event const &event, edm::EventSetup const &setup)=0 |
virtual void | accumulate (PileUpEventPrincipal const &event, edm::EventSetup const &setup, edm::StreamID const &)=0 |
virtual void | beginRun (edm::Run const &run, edm::EventSetup const &setup) |
DigiAccumulatorMixMod () | |
virtual void | endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) |
virtual void | endRun (edm::Run const &run, edm::EventSetup const &setup) |
virtual void | finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing) |
virtual void | finalizeEvent (edm::Event &event, edm::EventSetup const &setup)=0 |
virtual PileupMixingContent * | getEventPileupInfo () |
virtual void | initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing) |
virtual void | initializeEvent (edm::Event const &event, edm::EventSetup const &setup)=0 |
virtual void | StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace) |
virtual | ~DigiAccumulatorMixMod () |
Private Member Functions | |
void | accumulate (const edm::Event &event, const edm::EventSetup &setup) override |
void | accumulate (const PileUpEventPrincipal &event, const edm::EventSetup &setup, edm::StreamID const &) override |
template<class T > | |
void | accumulateEvent (const T &event, const edm::EventSetup &setup, const edm::Handle< edm::HepMCProduct > &hepMCproduct) |
Both forms of accumulate() delegate to this templated method. More... | |
void | beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override |
template<class T > | |
void | fillSimHits (std::vector< std::pair< DetId, const PCaloHit * > > &returnValue, std::unordered_map< int, std::map< int, float > > &simTrackDetIdEnergyMap, const T &event, const edm::EventSetup &setup) |
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required. More... | |
void | finalizeEvent (edm::Event &event, const edm::EventSetup &setup) override |
void | initializeEvent (const edm::Event &event, const edm::EventSetup &setup) override |
Private Attributes | |
std::vector< edm::InputTag > | collectionTags_ |
edm::InputTag | genParticleLabel_ |
int | geometryType_ |
const HcalDDDRecConstants * | hcddd_ = 0 |
edm::InputTag | hepMCproductLabel_ |
Needed to add HepMC::GenVertex to SimVertex. More... | |
const HGCalDDDConstants * | hgddd_ [3] = { 0 , 0 , 0 } |
const HGCalTopology * | hgtopo_ [3] = { 0 , 0 , 0 } |
edm::Handle< std::vector< SimTrack > > | hSimTracks |
edm::Handle< std::vector< SimVertex > > | hSimVertices |
calo_particles | m_caloParticles |
std::unordered_map< Index_t, float > | m_detIdToTotalSimEnergy |
std::unordered_multimap< Barcode_t, Index_t > | m_simHitBarcodeToIndex |
const unsigned int | maximumPreviousBunchCrossing_ |
const unsigned int | maximumSubsequentBunchCrossing_ |
const double | maxPseudoRapidity_ |
const std::string | messageCategory_ |
const double | minEnergy_ |
OutputCollections | output_ |
const bool | premixStage1_ |
const edm::InputTag | simTrackLabel_ |
const edm::InputTag | simVertexLabel_ |
Definition at line 124 of file CaloTruthAccumulator.cc.
|
explicit |
Definition at line 366 of file CaloTruthAccumulator.cc.
References collectionTags_, edm::ConsumesCollector::consumes(), genParticleLabel_, edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), hepMCproductLabel_, premixStage1_, edm::ProductRegistryHelper::produces(), simTrackLabel_, and simVertexLabel_.
|
overrideprivate |
Referenced by initializeEvent().
|
overrideprivate |
|
private |
Both forms of accumulate() delegate to this templated method.
Build the main decay graph and assign the SimTrack to each edge. The graph built here will only contain the particles that have a decay vertex associated to them. In order to recover also the particles that will not decay, we need to keep track of the SimTrack used here and add, a-posteriori, the ones not used, associating a ghost vertex (starting from the highest simulated vertex number), in order to build the edge and identify them immediately as stable (i.e. not decayed).
To take into account the multi-bremsstrahlung effects in which a single particle is emitting photons in different vertices keeping the same track index, we also collapsed those vertices into 1 unique vertex. The other approach of fully representing the decay chain keeping the same track index would have the problem of over-counting the contributions of that track, especially in terms of hits.
The 2 auxiliary vectors are structured as follow:
Definition at line 536 of file CaloTruthAccumulator.cc.
References funct::abs(), gather_cfg::cout, EdgeProperty::cumulative_simHits, DEBUG, SelectingProcedure_cff::decay, fillSimHits(), genParticleLabel_, hSimTracks, hSimVertices, mps_fire::i, training_settings::idx, IfLogDebug, m_caloParticles, m_simHitBarcodeToIndex, maxPseudoRapidity_, messageCategory_, minEnergy_, CoreSimTrack::momentum(), SimTrack::noGenpart(), PFRecoTauDiscriminationByIsolation_cfi::offset, output_, put(), edm::second(), EdgeProperty::simTrack, simTrackLabel_, simVertexLabel_, findQualityFiles::size, lumiQTWidget::t, l1t::tracks, findQualityFiles::v, electrons_cff::vertices, and runTauDisplay::vis.
Referenced by initializeEvent().
|
overrideprivatevirtual |
Reimplemented from DigiAccumulatorMixMod.
Definition at line 411 of file CaloTruthAccumulator.cc.
References HGCalTopology::dddConstants(), HcalTopology::dddConstants(), DetId::Forward, ForwardEmpty, relativeConstraints::geom, geometryType_, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalEndcap, hcddd_, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEF, hgddd_, hgtopo_, mps_fire::i, HGCalGeometry::topology(), and HcalGeometry::topology().
|
private |
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required.
Definition at line 674 of file CaloTruthAccumulator.cc.
References collectionTags_, DEFINE_DIGI_ACCUMULATOR, geometryType_, HcalEndcap, hcddd_, hgddd_, hgtopo_, triggerObjects_cff::id, m_detIdToTotalSimEnergy, HcalHitRelabeller::relabel(), rpcPointValidation_cfi::simHit, HGCalDDDConstants::simToReco(), HcalDetId::subdet(), and HGCalTestNumbering::unpackHexagonIndex().
Referenced by accumulateEvent().
|
overrideprivate |
Definition at line 482 of file CaloTruthAccumulator.cc.
References SimCluster::addRecHitAndFraction(), CaloParticle::addSimCluster(), SimCluster::clearHitsAndFractions(), popcon2dropbox::copy(), SimDataFormats::CaloAnalysis::cp, dedxEstimators_cff::fraction, SimCluster::hits_and_fractions(), mps_fire::i, m_caloParticles, m_detIdToTotalSimEnergy, m_simHitBarcodeToIndex, messageCategory_, eostools::move(), output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, premixStage1_, CaloTruthAccumulator::OutputCollections::pSimClusters, SimDataFormats::CaloAnalysis::sc, CaloTruthAccumulator::calo_particles::sc_start_, CaloTruthAccumulator::calo_particles::sc_stop_, edm::swap(), and CaloTruthAccumulator::calo_particles::swap().
|
overrideprivate |
Definition at line 442 of file CaloTruthAccumulator.cc.
References accumulate(), accumulateEvent(), PileUpEventPrincipal::bunchCrossing(), hepMCproductLabel_, m_detIdToTotalSimEnergy, maximumPreviousBunchCrossing_, maximumSubsequentBunchCrossing_, messageCategory_, output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, CaloTruthAccumulator::OutputCollections::pSimClusters, and GeneralSetup::setup().
|
private |
Definition at line 174 of file CaloTruthAccumulator.cc.
Referenced by CaloTruthAccumulator(), and fillSimHits().
|
private |
Definition at line 175 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 210 of file CaloTruthAccumulator.cc.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Definition at line 206 of file CaloTruthAccumulator.cc.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Needed to add HepMC::GenVertex to SimVertex.
Definition at line 177 of file CaloTruthAccumulator.cc.
Referenced by CaloTruthAccumulator(), and initializeEvent().
|
private |
Definition at line 205 of file CaloTruthAccumulator.cc.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Definition at line 204 of file CaloTruthAccumulator.cc.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Definition at line 171 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 172 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 208 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and finalizeEvent().
|
private |
Definition at line 153 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 154 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and finalizeEvent().
|
private |
The maximum bunch crossing BEFORE the signal crossing to create TrackinParticles for. Use positive values. If set to zero no previous bunches are added and only in-time, signal and after bunches (defined by maximumSubsequentBunchCrossing_) are used.
Definition at line 161 of file CaloTruthAccumulator.cc.
Referenced by initializeEvent().
|
private |
The maximum bunch crossing AFTER the signal crossing to create TrackinParticles for. E.g. if set to zero only uses the signal and in time pileup (and previous bunches defined by the maximumPreviousBunchCrossing_ parameter).
Definition at line 167 of file CaloTruthAccumulator.cc.
Referenced by initializeEvent().
|
private |
Definition at line 179 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 151 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 179 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 207 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 180 of file CaloTruthAccumulator.cc.
Referenced by CaloTruthAccumulator(), and finalizeEvent().
|
private |
Definition at line 169 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 170 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().