#include <CaloTruthAccumulator.h>
Classes | |
struct | calo_particles |
struct | OutputCollections |
When counting hits, allows hits in different detectors to have a different process type. More... | |
Public Member Functions | |
CaloTruthAccumulator (const edm::ParameterSet &config, edm::stream::EDProducerBase &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... | |
std::unique_ptr< SimHitInfoPerSimTrack_t > | allAttachedSimHitInfo (Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool markUsed=false) |
std::unique_ptr< SimHitInfoPerSimTrack_t > | attachedSimHitInfo (Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool includeOwn=true, bool includeOther=false, bool markUsed=false) |
void | beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override |
bool | consideredBarcode (Barcode_t barcode) |
std::unique_ptr< SimHitInfoPerSimTrack_t > | descendantOnlySimHitInfo (Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool markUsed=false) |
SimClusterCollection | descendantSimClusters (Barcode_t barcode, const std::vector< std::pair< DetId, const PCaloHit * > > &hits) |
std::vector< Barcode_t > | descendantTrackBarcodes (Barcode_t barcode) |
template<class T > | |
void | fillSimHits (std::vector< std::pair< DetId, const PCaloHit * > > &returnValue, 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 |
void | setConsideredBarcode (Barcode_t barcode) |
Definition at line 44 of file CaloTruthAccumulator.h.
|
explicit |
Definition at line 41 of file CaloTruthAccumulator.cc.
References barcodeLogicWarningAlready_, collectionTags_, edm::ConsumesCollector::consumes(), genParticleLabel_, edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), hepMCproductLabel_, simTrackLabel_, and simVertexLabel_.
|
overrideprivate |
Referenced by initializeEvent().
|
overrideprivate |
|
private |
Both forms of accumulate() delegate to this templated method.
Definition at line 193 of file CaloTruthAccumulator.cc.
References funct::abs(), descendantSimClusters(), reco::tau::disc::Eta(), fillSimHits(), genParticleLabel_, hSimTracks, hSimVertices, mps_fire::i, edm::HandleBase::isValid(), m_caloParticles, m_genBarcodeToSimTrackIndex, m_genParticleBarcodeToIndex, m_simHitBarcodeToIndex, m_simTrackBarcodeToIndex, m_simTrackBarcodeToSimVertexParentBarcode, m_simTracksConsideredForSimClusters, m_simTrackToSimVertex, m_simVertexBarcodes, m_simVertexBarcodeToIndex, m_simVertexBarcodeToSimTrackBarcode, m_simVertexToSimTrackParent, maxPseudoRapidity_, minEnergy_, output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, CaloTruthAccumulator::OutputCollections::pSimClusters, CaloTruthAccumulator::calo_particles::sc_start_, CaloTruthAccumulator::calo_particles::sc_stop_, edm::second(), simTrackLabel_, tkConvValidator_cfi::simTracks, simVertexLabel_, and groupFilesInBlocks::temp.
Referenced by initializeEvent().
|
private |
Definition at line 418 of file CaloTruthAccumulator.cc.
References attachedSimHitInfo(), and hfClusterShapes_cfi::hits.
Referenced by attachedSimHitInfo(), and descendantSimClusters().
|
private |
Definition at line 355 of file CaloTruthAccumulator.cc.
References funct::abs(), allAttachedSimHitInfo(), barcodeLogicWarningAlready_, caloStartZ, consideredBarcode(), hfClusterShapes_cfi::hits, hSimTracks, m_simHitBarcodeToIndex, m_simTrackBarcodeToIndex, m_simTrackToSimVertex, m_simVertexBarcodes, m_simVertexBarcodeToSimTrackBarcode, messageCategory_, eostools::move(), gen::n, mps_fire::result, setConsideredBarcode(), simTrackMatching_cfi::simTrack, and tkConvValidator_cfi::simTracks.
Referenced by allAttachedSimHitInfo(), descendantOnlySimHitInfo(), and descendantSimClusters().
|
overrideprivatevirtual |
Reimplemented from DigiAccumulatorMixMod.
Definition at line 79 of file CaloTruthAccumulator.cc.
References caloStartZ, HGCalTopology::dddConstants(), HcalTopology::dddConstants(), DetId::Forward, relativeConstraints::geom, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalEndcap, hcddd_, HGCEE, HGCHEF, hgddd_, hgtopo_, mps_fire::i, HGCalGeometry::topology(), HcalGeometry::topology(), and HGCalDDDConstants::waferZ().
|
inlineprivate |
Definition at line 69 of file CaloTruthAccumulator.h.
Referenced by attachedSimHitInfo(), and descendantSimClusters().
|
private |
Definition at line 411 of file CaloTruthAccumulator.cc.
References attachedSimHitInfo(), and hfClusterShapes_cfi::hits.
|
private |
Definition at line 292 of file CaloTruthAccumulator.cc.
References funct::abs(), allAttachedSimHitInfo(), attachedSimHitInfo(), caloStartZ, consideredBarcode(), hfClusterShapes_cfi::hits, hSimTracks, hSimVertices, LogDebug, m_simTrackBarcodeToIndex, m_simTrackBarcodeToSimVertexParentBarcode, m_simTrackToSimVertex, m_simVertexBarcodes, m_simVertexBarcodeToIndex, m_simVertexBarcodeToSimTrackBarcode, eostools::move(), mps_fire::result, simTrackMatching_cfi::simTrack, tkConvValidator_cfi::simTracks, and badGlobalMuonTaggersAOD_cff::vtx.
Referenced by accumulateEvent().
Definition at line 274 of file CaloTruthAccumulator.cc.
References m_simTrackToSimVertex, m_simVertexBarcodes, m_simVertexBarcodeToSimTrackBarcode, and mps_fire::result.
|
private |
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required.
Definition at line 424 of file CaloTruthAccumulator.cc.
References collectionTags_, DEFINE_DIGI_ACCUMULATOR, 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 139 of file CaloTruthAccumulator.cc.
References SimCluster::addRecHitAndFraction(), CaloParticle::addSimCluster(), SimCluster::clearHitsAndFractions(), SimDataFormats::CaloAnalysis::cp, dedxEstimators_cff::fraction, SimCluster::hits_and_fractions(), mps_fire::i, m_caloParticles, m_detIdToCluster, m_detIdToTotalSimEnergy, m_genBarcodeToSimTrackIndex, m_genParticleBarcodeToIndex, m_simHitBarcodeToIndex, m_simTrackBarcodeToIndex, m_simTrackBarcodeToSimVertexParentBarcode, m_simTrackToSimVertex, m_simVertexBarcodes, m_simVertexBarcodeToIndex, m_simVertexBarcodeToSimTrackBarcode, m_simVertexToSimTrackParent, eostools::move(), output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, CaloTruthAccumulator::OutputCollections::pSimClusters, SimDataFormats::CaloAnalysis::sc, CaloTruthAccumulator::calo_particles::sc_start_, CaloTruthAccumulator::calo_particles::sc_stop_, CaloTruthAccumulator::calo_particles::swap(), and edm::swap().
|
overrideprivate |
Definition at line 101 of file CaloTruthAccumulator.cc.
References accumulate(), accumulateEvent(), PileUpEventPrincipal::bunchCrossing(), hepMCproductLabel_, m_detIdToCluster, m_detIdToTotalSimEnergy, maximumPreviousBunchCrossing_, maximumSubsequentBunchCrossing_, messageCategory_, output_, CaloTruthAccumulator::OutputCollections::pCaloParticles, CaloTruthAccumulator::OutputCollections::pSimClusters, and GeneralSetup::setup().
|
inlineprivate |
Definition at line 68 of file CaloTruthAccumulator.h.
Referenced by attachedSimHitInfo().
|
private |
Definition at line 147 of file CaloTruthAccumulator.h.
Referenced by attachedSimHitInfo(), and CaloTruthAccumulator().
|
private |
Definition at line 92 of file CaloTruthAccumulator.h.
Referenced by attachedSimHitInfo(), beginLuminosityBlock(), and descendantSimClusters().
|
private |
Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first.
Definition at line 143 of file CaloTruthAccumulator.h.
|
private |
Definition at line 134 of file CaloTruthAccumulator.h.
Referenced by CaloTruthAccumulator(), and fillSimHits().
|
private |
Definition at line 135 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 171 of file CaloTruthAccumulator.h.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Needed to add HepMC::GenVertex to SimVertex.
Definition at line 137 of file CaloTruthAccumulator.h.
Referenced by CaloTruthAccumulator(), and initializeEvent().
|
private |
Definition at line 170 of file CaloTruthAccumulator.h.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Definition at line 169 of file CaloTruthAccumulator.h.
Referenced by beginLuminosityBlock(), and fillSimHits().
|
private |
Definition at line 131 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), and descendantSimClusters().
|
private |
Definition at line 132 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and descendantSimClusters().
|
private |
Definition at line 91 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and finalizeEvent().
Definition at line 99 of file CaloTruthAccumulator.h.
Referenced by finalizeEvent(), and initializeEvent().
|
private |
Definition at line 94 of file CaloTruthAccumulator.h.
Referenced by fillSimHits(), finalizeEvent(), and initializeEvent().
Definition at line 97 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and finalizeEvent().
Definition at line 95 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and finalizeEvent().
Definition at line 100 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), and finalizeEvent().
Definition at line 96 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), descendantSimClusters(), and finalizeEvent().
|
private |
Definition at line 102 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), descendantSimClusters(), and finalizeEvent().
|
private |
Definition at line 67 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent().
Definition at line 103 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), descendantSimClusters(), descendantTrackBarcodes(), and finalizeEvent().
|
private |
Definition at line 107 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), descendantSimClusters(), descendantTrackBarcodes(), and finalizeEvent().
Definition at line 98 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), descendantSimClusters(), and finalizeEvent().
|
private |
Definition at line 101 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), attachedSimHitInfo(), descendantSimClusters(), descendantTrackBarcodes(), and finalizeEvent().
|
private |
Definition at line 104 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and finalizeEvent().
|
private |
maximum distance for HepMC::GenVertex to be added to SimVertex
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 117 of file CaloTruthAccumulator.h.
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 120 of file CaloTruthAccumulator.h.
Referenced by initializeEvent().
|
private |
Definition at line 139 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
The message category used to send messages to MessageLogger.
Definition at line 74 of file CaloTruthAccumulator.h.
Referenced by attachedSimHitInfo(), and initializeEvent().
|
private |
Definition at line 139 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 172 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 141 of file CaloTruthAccumulator.h.
|
private |
Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first.
Definition at line 145 of file CaloTruthAccumulator.h.
|
private |
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not.
Whether or not to create a separate collection for just the initial interaction vertices Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection.
Definition at line 129 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and CaloTruthAccumulator().
|
private |
Definition at line 130 of file CaloTruthAccumulator.h.
Referenced by accumulateEvent(), and CaloTruthAccumulator().