Classes | |
struct | calo_particles |
struct | OutputCollections |
Public Member Functions | |
CaloTruthAccumulator (const edm::ParameterSet &config, edm::ProducesCollector, edm::ConsumesCollector &iC) | |
Public Member Functions inherited from DigiAccumulatorMixMod | |
virtual void | beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) |
virtual void | beginRun (edm::Run const &run, edm::EventSetup const &setup) |
DigiAccumulatorMixMod () | |
DigiAccumulatorMixMod (DigiAccumulatorMixMod const &)=delete | |
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 PileupMixingContent * | getEventPileupInfo () |
virtual void | initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing) |
DigiAccumulatorMixMod const & | operator= (DigiAccumulatorMixMod const &)=delete |
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... | |
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 |
Definition at line 126 of file CaloTruthAccumulator.cc.
|
explicit |
Definition at line 361 of file CaloTruthAccumulator.cc.
References collectionTags_, edm::ConsumesCollector::consumes(), genParticleLabel_, hepMCproductLabel_, premixStage1_, edm::ProducesCollector::produces(), simTrackLabel_, simVertexLabel_, and triggerMatcherToHLTDebug_cfi::tags.
|
overrideprivatevirtual |
Create handle to edm::HepMCProduct here because event.getByLabel with edm::HepMCProduct only works for edm::Event but not for PileUpEventPrincipal; PileUpEventPrincipal::getByLabel tries to call T::value_type and T::iterator (where T is the type of the object one wants to get a handle to) which is only implemented for container-like objects like std::vector but not for edm::HepMCProduct!
Implements DigiAccumulatorMixMod.
Definition at line 456 of file CaloTruthAccumulator.cc.
References accumulateEvent(), hepMCproductLabel_, messageCategory_, and singleTopDQM_cfi::setup.
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 464 of file CaloTruthAccumulator.cc.
References accumulateEvent(), maximumPreviousBunchCrossing_, maximumSubsequentBunchCrossing_, messageCategory_, and singleTopDQM_cfi::setup.
|
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 534 of file CaloTruthAccumulator.cc.
References funct::abs(), gather_cfg::cout, EdgeProperty::cumulative_simHits, DEBUG, PA_ZEESkim_cff::decay, fillSimHits(), genParticleLabel_, hSimTracks, hSimVertices, mps_fire::i, heavyIonCSV_trainingSettings::idx, IfLogDebug, m_caloParticles, m_simHitBarcodeToIndex, maxPseudoRapidity_, messageCategory_, minEnergy_, CoreSimTrack::momentum(), SimTrack::noGenpart(), hltrates_dqm_sourceclient-live_cfg::offset, output_, put(), edm::second(), singleTopDQM_cfi::setup, EdgeProperty::simTrack, simTrackLabel_, simVertexLabel_, findQualityFiles::size, submitPVValidationJobs::t, pwdgSkimBPark_cfi::tracks, findQualityFiles::v, AlignmentTracksFromVertexSelector_cfi::vertices, and runTauDisplay::vis.
Referenced by accumulate().
|
private |
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required.
Definition at line 676 of file CaloTruthAccumulator.cc.
References collectionTags_, doHGCAL, geometryType_, HcalEndcap, hcddd_, hgddd_, hgtopo_, l1ctLayer2EG_cff::id, pixelTopology::layer, m_detIdToTotalSimEnergy, HcalHitRelabeller::relabel(), fileinputsource_cfi::sec, rpcPointValidation_cfi::simHit, HGCalDDDConstants::simToReco(), HcalDetId::subdet(), and HGCalTestNumbering::unpackHexagonIndex().
Referenced by accumulateEvent().
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 479 of file CaloTruthAccumulator.cc.
References filterCSVwithJSON::copy, HLT_2022v15_cff::fraction, mps_fire::i, dqmiolumiharvest::j, m_caloParticles, m_detIdToTotalSimEnergy, m_simHitBarcodeToIndex, messageCategory_, eostools::move(), output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, premixStage1_, CaloTruthAccumulator::OutputCollections::pSimClusters, CaloTruthAccumulator::calo_particles::sc_start_, CaloTruthAccumulator::calo_particles::sc_stop_, jetUpdater_cfi::sort, edm::swap(), and CaloTruthAccumulator::calo_particles::swap().
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 404 of file CaloTruthAccumulator.cc.
References edm::ESWatcher< T >::check(), HGCalTopology::dddConstants(), HcalTopology::dddConstants(), doHGCAL, EcalMappingRecord_cfi::eegeom, DetId::Forward, ForwardEmpty, relativeConstraints::geom, geometryType_, geomToken_, geomWatcher_, DetId::Hcal, HcalEndcap, hcddd_, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEF, hgddd_, hgtopo_, mps_fire::i, m_detIdToTotalSimEnergy, output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, CaloTruthAccumulator::OutputCollections::pSimClusters, singleTopDQM_cfi::setup, and HcalGeometry::topology().
|
private |
Definition at line 173 of file CaloTruthAccumulator.cc.
Referenced by CaloTruthAccumulator(), and fillSimHits().
|
private |
Definition at line 212 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), and initializeEvent().
|
private |
Definition at line 174 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 211 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), and initializeEvent().
|
private |
Definition at line 177 of file CaloTruthAccumulator.cc.
Referenced by initializeEvent().
|
private |
Definition at line 178 of file CaloTruthAccumulator.cc.
Referenced by initializeEvent().
|
private |
Definition at line 207 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), and initializeEvent().
|
private |
Needed to add HepMC::GenVertex to SimVertex.
Definition at line 176 of file CaloTruthAccumulator.cc.
Referenced by accumulate(), and CaloTruthAccumulator().
|
private |
Definition at line 206 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), and initializeEvent().
|
private |
Definition at line 205 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), and initializeEvent().
|
private |
Definition at line 170 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 171 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 209 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and finalizeEvent().
|
private |
Definition at line 152 of file CaloTruthAccumulator.cc.
Referenced by fillSimHits(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 153 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 160 of file CaloTruthAccumulator.cc.
Referenced by accumulate().
|
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 166 of file CaloTruthAccumulator.cc.
Referenced by accumulate().
|
private |
Definition at line 180 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 150 of file CaloTruthAccumulator.cc.
Referenced by accumulate(), accumulateEvent(), and finalizeEvent().
|
private |
Definition at line 180 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent().
|
private |
Definition at line 208 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 181 of file CaloTruthAccumulator.cc.
Referenced by CaloTruthAccumulator(), and finalizeEvent().
|
private |
Definition at line 168 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 169 of file CaloTruthAccumulator.cc.
Referenced by accumulateEvent(), and CaloTruthAccumulator().