Replacement for TrackingTruthProducer in the new pileup mixing setup. More...
#include <TrackingTruthAccumulator.h>
Classes | |
struct | OutputCollections |
Public Member Functions | |
TrackingTruthAccumulator (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< const PSimHit * > &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 |
Replacement for TrackingTruthProducer in the new pileup mixing setup.
The configuration parameters are:
Parameter name | Type | Description |
---|---|---|
volumeRadius | double | The volume radius in cm used if ignoreTracksOutsideVolume is true. |
volumeZ | double | The volume z in cm used if ignoreTracksOutsideVolume is true. |
ignoreTracksOutsideVolume | bool | If true, sim tracks that have a production vertex outside the volume specified by volumeRadius and volumeZ won't be turned into TrackingParticles. Doesn't make much difference to be honest, over a huge range of volume sizes so there must be a cut earlier in the simulation. |
maximumPreviousBunchCrossing | unsigned int | Bunch crossings before this number (inclusive; use positive integer) won't be included. Setting to zero means only in-time. |
maximumSubsequentBunchCrossing | unsigned int | Bunch crossings after this won't create any TrackingParticles. |
createUnmergedCollection | bool | Whether to create the TrackingParticle collection without bremsstrahlung merged. |
createMergedBremsstrahlung | bool | Whether to create the TrackingParticle collection with bremsstrahlung merged. At least one of createUnmergedCollection or createMergedBremsstrahlung should be true otherwise nothing will be produced. |
createInitialVertexCollection | bool | Whether to create a collection of just the initial vertices. You can usually get this information from one of the other collections (merged or unmerged bremsstrahlung), but for this collection no selection is applied. Hence you will always have all of the initial vertices regardless of how tightly you select TrackingParticles with the "select" parameter. Note that the collection will have no links to the products of these vertices. If you want to know what came off these vertices you will have to look in one of the other collections. The name of the collection will be "InitialVertices". |
alwaysAddAncestors | bool | If a sim track passes selection and is turned into a TrackingParticle, all of it's parents will also be created even if they fail the selection. This was the default behaviour for the old TrackingParticleProducer. |
removeDeadModules | bool | Hasn't been implemented yet (as of 22/May/2013). |
simTrackCollection | edm::InputTag | The input SimTrack collection |
simVertexCollection | edm::InputTag | The input SimVerted collection |
simHitCollections | edm::ParameterSet | A ParameterSet of vectors of InputTags that are the input PSimHits |
genParticleCollection | edm::InputTag | The input reco::GenParticle collection. Note that there's a difference between reco::GenParticle and HepMC::GenParticle; the old TrackingTruthProducer used to use HepMC::GenParticle. |
allowDifferentSimHitProcesses | bool | Should be false for FullSim and true for FastSim. There's more documentation in the code if you're really interested. |
select | edm::ParameterSet | A ParameterSet used to configure a TrackingParticleSelector. If the TrackingParticle doesn't pass this selector then it's not added to the output. |
Definition at line 85 of file TrackingTruthAccumulator.h.
|
explicit |
Definition at line 257 of file TrackingTruthAccumulator.cc.
References chargedOnly_, collectionTags_, edm::ConsumesCollector::consumes(), createInitialVertexCollection_, createMergedCollection_, createUnmergedCollection_, edm::ParameterSet::exists(), genParticleLabel_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), hepMCproductLabel_, messageCategory_, edm::ProducesCollector::produces(), selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, and getPayloadData::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 386 of file TrackingTruthAccumulator.cc.
References accumulateEvent(), and hepMCproductLabel_.
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 396 of file TrackingTruthAccumulator.cc.
References accumulateEvent(), PileUpEventPrincipal::bunchCrossing(), maximumPreviousBunchCrossing_, maximumSubsequentBunchCrossing_, and messageCategory_.
|
private |
Both forms of accumulate() delegate to this templated method.
Definition at line 441 of file TrackingTruthAccumulator.cc.
References addAncestors_, allowDifferentProcessTypeForDifferentDetectors_, EncodedEventId::bunchCrossing(), CoreSimTrack::charge(), chargedOnly_, createInitialVertexCollection_, createMergedCollection_, createUnmergedCollection_, EncodedEventId::event(), CoreSimTrack::eventId(), cppFunctionSkipper::exception, fillSimHits(), genParticleLabel_, edm::EventSetup::getData(), ignoreTracksOutsideVolume_, mergedOutput_, pInitialVertices_, CoreSimVertex::position(), selector_, selectorFlag_, signalOnly_, cscDigiValidation_cfi::simTrack, simTrackLabel_, cscDigiValidation_cfi::simVertex, simVertexLabel_, tTopoToken_, unmergedOutput_, vertexDistanceCut_, SimVertex::vertexId(), volumeRadius_, and volumeZ_.
Referenced by accumulate().
|
private |
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required.
Definition at line 569 of file TrackingTruthAccumulator.cc.
References a, b, collectionTags_, edm::isFinite(), SiStripPI::max, and PSimHit::timeOfFlight().
Referenced by accumulateEvent().
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 413 of file TrackingTruthAccumulator.cc.
References createInitialVertexCollection_, createMergedCollection_, createUnmergedCollection_, mergedOutput_, eostools::move(), pInitialVertices_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, and unmergedOutput_.
|
overrideprivatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 356 of file TrackingTruthAccumulator.cc.
References createInitialVertexCollection_, createMergedCollection_, createUnmergedCollection_, edmPickEvents::event, mergedOutput_, pInitialVertices_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, TrackingTruthAccumulator::OutputCollections::refTrackingParticles, TrackingTruthAccumulator::OutputCollections::refTrackingVertexes, and unmergedOutput_.
|
private |
Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection.
Definition at line 136 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
When counting hits, allows hits in different detectors to have a different process type.
Fast sim PSimHits seem to have a peculiarity where the process type (as reported by PSimHit::processType()) is different for the tracker than the muons. When counting how many hits there are, the code usually only counts the number of hits that have the same process type as the first hit. Setting this to true will also count hits that have the same process type as the first hit in the second detector.
Definition at line 167 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
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 152 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 142 of file TrackingTruthAccumulator.h.
Referenced by fillSimHits(), and TrackingTruthAccumulator().
|
private |
Whether or not to create a separate collection for just the initial interaction vertices
Definition at line 133 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 130 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().
|
private |
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not.
Definition at line 129 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 143 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Needed to add HepMC::GenVertex to SimVertex.
Definition at line 145 of file TrackingTruthAccumulator.h.
Referenced by accumulate(), and TrackingTruthAccumulator().
|
private |
Definition at line 115 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
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 121 of file TrackingTruthAccumulator.h.
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 126 of file TrackingTruthAccumulator.h.
Referenced by accumulate().
|
private |
Definition at line 181 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
The message category used to send messages to MessageLogger
Definition at line 108 of file TrackingTruthAccumulator.h.
Referenced by accumulate(), and TrackingTruthAccumulator().
|
private |
Definition at line 182 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
As of 11/Feb/2013 this option hasn't been implemented yet.
Definition at line 139 of file TrackingTruthAccumulator.h.
|
private |
Definition at line 149 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 148 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
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 155 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 140 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 141 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 146 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 180 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
maximum distance for HepMC::GenVertex to be added to SimVertex
Definition at line 114 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 111 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 112 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().