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::EDProducer &mixMod) | |
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 void | initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing) |
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) |
template<class T > | |
void | accumulateEvent (const T &event, const edm::EventSetup &setup) |
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... | |
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_ |
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... | |
edm::ParameterSet | simHitCollectionConfig_ |
const edm::InputTag | simTrackLabel_ |
const edm::InputTag | simVertexLabel_ |
OutputCollections | unmergedOutput_ |
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 64 of file TrackingTruthAccumulator.h.
|
explicit |
Definition at line 216 of file TrackingTruthAccumulator.cc.
References chargedOnly_, createMergedCollection_, createUnmergedCollection_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), messageCategory_, selector_, selectorFlag_, and signalOnly_.
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 309 of file TrackingTruthAccumulator.cc.
References accumulateEvent().
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 315 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 349 of file TrackingTruthAccumulator.cc.
References addAncestors_, allowDifferentProcessTypeForDifferentDetectors_, EncodedEventId::bunchCrossing(), CoreSimTrack::charge(), chargedOnly_, createMergedCollection_, createUnmergedCollection_, EncodedEventId::event(), CoreSimTrack::eventId(), cppFunctionSkipper::exception, fillSimHits(), genParticleLabel_, ignoreTracksOutsideVolume_, getHLTprescales::index, mergedOutput_, NULL, CoreSimVertex::position(), selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, unmergedOutput_, 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 435 of file TrackingTruthAccumulator.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), and simHitCollectionConfig_.
Referenced by accumulateEvent().
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 326 of file TrackingTruthAccumulator.cc.
References createMergedCollection_, createUnmergedCollection_, mergedOutput_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, and unmergedOutput_.
|
privatevirtual |
Implements DigiAccumulatorMixMod.
Definition at line 290 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 96 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 119 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 108 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 94 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 93 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 103 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 84 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 88 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 91 of file TrackingTruthAccumulator.h.
Referenced by accumulate().
|
private |
Definition at line 132 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
The message category used to send messages to MessageLogger.
Definition at line 80 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 99 of file TrackingTruthAccumulator.h.
|
private |
Definition at line 106 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 105 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 110 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), and TrackingTruthAccumulator().
|
private |
Definition at line 102 of file TrackingTruthAccumulator.h.
Referenced by fillSimHits().
|
private |
Definition at line 100 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 101 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 131 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().
|
private |
Definition at line 82 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().
|
private |
Definition at line 83 of file TrackingTruthAccumulator.h.
Referenced by accumulateEvent().