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::one::EDProducerBase &mixMod, 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 () | |
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) |
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 | |
virtual void | accumulate (const edm::Event &event, const edm::EventSetup &setup) |
virtual void | accumulate (const PileUpEventPrincipal &event, const edm::EventSetup &setup, edm::StreamID const &) |
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... | |
virtual void | finalizeEvent (edm::Event &event, const edm::EventSetup &setup) |
virtual void | initializeEvent (const edm::Event &event, const edm::EventSetup &setup) |
Private Attributes | |
const bool | addAncestors_ |
Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection. More... | |
bool | allowDifferentProcessTypeForDifferentDetectors_ |
When counting hits, allows hits in different detectors to have a different process type. More... | |
bool | chargedOnly_ |
Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first. More... | |
std::vector< edm::InputTag > | collectionTags_ |
const bool | createMergedCollection_ |
const bool | createUnmergedCollection_ |
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not. More... | |
edm::InputTag | genParticleLabel_ |
edm::InputTag | hepMCproductLabel_ |
Needed to add HepMC::GenVertex to SimVertex. More... | |
const bool | ignoreTracksOutsideVolume_ |
const unsigned int | maximumPreviousBunchCrossing_ |
const unsigned int | maximumSubsequentBunchCrossing_ |
OutputCollections | mergedOutput_ |
const std::string | messageCategory_ |
The message category used to send messages to MessageLogger. More... | |
const bool | removeDeadModules_ |
As of 11/Feb/2013 this option hasn't been implemented yet. More... | |
TrackingParticleSelector | selector_ |
bool | selectorFlag_ |
bool | signalOnly_ |
Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first. More... | |
const edm::InputTag | simTrackLabel_ |
const edm::InputTag | simVertexLabel_ |
OutputCollections | unmergedOutput_ |
const double | vertexDistanceCut_ |
maximum distance for HepMC::GenVertex to be added to SimVertex More... | |
const double | volumeRadius_ |
const double | volumeZ_ |
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. |
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 68 of file TrackingTruthAccumulator.h.
|
explicit |
Definition at line 224 of file TrackingTruthAccumulator.cc.
References chargedOnly_, collectionTags_, edm::ConsumesCollector::consumes(), createMergedCollection_, createUnmergedCollection_, edm::ParameterSet::exists(), genParticleLabel_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), hepMCproductLabel_, messageCategory_, selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, and o2o::tags.
|
privatevirtual |
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 343 of file TrackingTruthAccumulator.cc.
References accumulateEvent(), and hepMCproductLabel_.
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 353 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 390 of file TrackingTruthAccumulator.cc.
References addAncestors_, allowDifferentProcessTypeForDifferentDetectors_, EncodedEventId::bunchCrossing(), CoreSimTrack::charge(), chargedOnly_, createMergedCollection_, createUnmergedCollection_, EncodedEventId::event(), CoreSimTrack::eventId(), cppFunctionSkipper::exception, fillSimHits(), genParticleLabel_, ignoreTracksOutsideVolume_, cmsHarvester::index, mergedOutput_, NULL, CoreSimVertex::position(), selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, unmergedOutput_, vertexDistanceCut_, 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 476 of file TrackingTruthAccumulator.cc.
References collectionTags_.
Referenced by accumulateEvent().
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 367 of file TrackingTruthAccumulator.cc.
References createMergedCollection_, createUnmergedCollection_, mergedOutput_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, and unmergedOutput_.
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 319 of file TrackingTruthAccumulator.cc.
References createMergedCollection_, createUnmergedCollection_, event(), mergedOutput_, 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 102 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 127 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 116 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 108 of file TrackingTruthAccumulator.h.
Referenced by fillSimHits(), and TrackingTruthAccumulator().
|
private |
Definition at line 100 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 99 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 109 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Needed to add HepMC::GenVertex to SimVertex.
Definition at line 111 of file TrackingTruthAccumulator.h.
Referenced by accumulate(), and TrackingTruthAccumulator().
|
private |
Definition at line 90 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 94 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 97 of file TrackingTruthAccumulator.h.
Referenced by accumulate().
|
private |
Definition at line 140 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
The message category used to send messages to MessageLogger.
Definition at line 84 of file TrackingTruthAccumulator.h.
Referenced by accumulate(), and TrackingTruthAccumulator().
|
private |
As of 11/Feb/2013 this option hasn't been implemented yet.
Definition at line 105 of file TrackingTruthAccumulator.h.
|
private |
Definition at line 114 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 113 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 118 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 106 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 107 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 139 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
maximum distance for HepMC::GenVertex to be added to SimVertex
Definition at line 89 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 86 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 87 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().