CMS 3D CMS Logo

TrackingTruthAccumulator.h
Go to the documentation of this file.
1 #ifndef TrackingAnalysis_TrackingTruthAccumulator_h
2 #define TrackingAnalysis_TrackingTruthAccumulator_h
3 
9 #include <memory> // required for std::unique_ptr
10 
11 // Forward declarations
12 namespace edm {
13  class ParameterSet;
14  class ConsumesCollector;
15  class Event;
16  class EventSetup;
17  class StreamID;
18 } // namespace edm
20 class PSimHit;
21 
90 public:
94 
95 private:
96  void initializeEvent(const edm::Event &event, const edm::EventSetup &setup) override;
97  void accumulate(const edm::Event &event, const edm::EventSetup &setup) override;
98  void accumulate(const PileUpEventPrincipal &event, const edm::EventSetup &setup, edm::StreamID const &) override;
99  void finalizeEvent(edm::Event &event, const edm::EventSetup &setup) override;
100 
102  template <class T>
103  void accumulateEvent(const T &event,
104  const edm::EventSetup &setup,
105  const edm::Handle<edm::HepMCProduct> &hepMCproduct);
106 
109  template <class T>
110  void fillSimHits(std::vector<const PSimHit *> &returnValue, const T &event, const edm::EventSetup &setup);
111 
113 
115  const double volumeRadius_;
116  const double volumeZ_;
118  const double vertexDistanceCut_;
120 
125  const unsigned int maximumPreviousBunchCrossing_;
140  const bool addAncestors_;
141 
143  const bool removeDeadModules_;
146  std::vector<edm::InputTag> collectionTags_;
150 
159 
171 
172 public:
173  // These always go hand in hand, and I need to pass them around in the
174  // internal functions, so I might as well package them up in a struct.
176  std::unique_ptr<TrackingParticleCollection> pTrackingParticles;
177  std::unique_ptr<TrackingVertexCollection> pTrackingVertices;
180  };
181 
182 private:
185  std::unique_ptr<TrackingVertexCollection> pInitialVertices_;
186 };
187 
188 #endif // end of "#ifndef TrackingAnalysis_TrackingTruthAccumulator_h"
edm::RefProd< TrackingParticleCollection >
edm::StreamID
Definition: StreamID.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackingTruthAccumulator::OutputCollections
Definition: TrackingTruthAccumulator.h:175
TrackingParticleSelector.h
TrackingTruthAccumulator
Replacement for TrackingTruthProducer in the new pileup mixing setup.
Definition: TrackingTruthAccumulator.h:89
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
TrackingTruthAccumulator::accumulate
void accumulate(const edm::Event &event, const edm::EventSetup &setup) override
Definition: TrackingTruthAccumulator.cc:388
TrackingParticleSelector
Definition: TrackingParticleSelector.h:16
edm::Handle< edm::HepMCProduct >
TrackingTruthAccumulator::vertexDistanceCut_
const double vertexDistanceCut_
maximum distance for HepMC::GenVertex to be added to SimVertex
Definition: TrackingTruthAccumulator.h:118
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
TrackingTruthAccumulator::chargedOnly_
bool chargedOnly_
Definition: TrackingTruthAccumulator.h:155
ProducesCollector.h
TrackingTruthAccumulator::mergedOutput_
OutputCollections mergedOutput_
Definition: TrackingTruthAccumulator.h:184
TrackingTruthAccumulator::selectorFlag_
bool selectorFlag_
Definition: TrackingTruthAccumulator.h:151
config
Definition: config.py:1
TrackingTruthAccumulator::accumulateEvent
void accumulateEvent(const T &event, const edm::EventSetup &setup, const edm::Handle< edm::HepMCProduct > &hepMCproduct)
Both forms of accumulate() delegate to this templated method.
Definition: TrackingTruthAccumulator.cc:443
TrackingTruthAccumulator::signalOnly_
bool signalOnly_
Definition: TrackingTruthAccumulator.h:158
TrackingVertexContainer.h
DigiAccumulatorMixMod.h
TrackingTruthAccumulator::OutputCollections::refTrackingParticles
TrackingParticleRefProd refTrackingParticles
Definition: TrackingTruthAccumulator.h:178
TrackingTruthAccumulator::createUnmergedCollection_
const bool createUnmergedCollection_
Definition: TrackingTruthAccumulator.h:133
Event
TrackingTruthAccumulator::OutputCollections::pTrackingVertices
std::unique_ptr< TrackingVertexCollection > pTrackingVertices
Definition: TrackingTruthAccumulator.h:177
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
TrackingTruthAccumulator::TrackingTruthAccumulator
TrackingTruthAccumulator(const edm::ParameterSet &config, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: TrackingTruthAccumulator.cc:260
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingTruthAccumulator::simVertexLabel_
const edm::InputTag simVertexLabel_
Definition: TrackingTruthAccumulator.h:145
edm::ParameterSet
Definition: ParameterSet.h:47
TrackingTruthAccumulator::messageCategory_
const std::string messageCategory_
Definition: TrackingTruthAccumulator.h:112
ParameterSet
Definition: Functions.h:16
TrackingTruthAccumulator::pInitialVertices_
std::unique_ptr< TrackingVertexCollection > pInitialVertices_
Definition: TrackingTruthAccumulator.h:185
TrackingTruthAccumulator::OutputCollections::refTrackingVertexes
TrackingVertexRefProd refTrackingVertexes
Definition: TrackingTruthAccumulator.h:179
TrackingTruthAccumulator::finalizeEvent
void finalizeEvent(edm::Event &event, const edm::EventSetup &setup) override
Definition: TrackingTruthAccumulator.cc:415
TrackingTruthAccumulator::collectionTags_
std::vector< edm::InputTag > collectionTags_
Definition: TrackingTruthAccumulator.h:146
TrackingTruthAccumulator::fillSimHits
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.
Definition: TrackingTruthAccumulator.cc:573
TrackingTruthAccumulator::maximumPreviousBunchCrossing_
const unsigned int maximumPreviousBunchCrossing_
Definition: TrackingTruthAccumulator.h:125
TrackingTruthAccumulator::maximumSubsequentBunchCrossing_
const unsigned int maximumSubsequentBunchCrossing_
Definition: TrackingTruthAccumulator.h:130
TrackingTruthAccumulator::initializeEvent
void initializeEvent(const edm::Event &event, const edm::EventSetup &setup) override
Definition: TrackingTruthAccumulator.cc:358
TrackingTruthAccumulator::allowDifferentProcessTypeForDifferentDetectors_
bool allowDifferentProcessTypeForDifferentDetectors_
When counting hits, allows hits in different detectors to have a different process type.
Definition: TrackingTruthAccumulator.h:170
edm::EventSetup
Definition: EventSetup.h:57
TrackingTruthAccumulator::selector_
TrackingParticleSelector selector_
Definition: TrackingTruthAccumulator.h:152
TrackingTruthAccumulator::OutputCollections::pTrackingParticles
std::unique_ptr< TrackingParticleCollection > pTrackingParticles
Definition: TrackingTruthAccumulator.h:176
TrackingTruthAccumulator::volumeRadius_
const double volumeRadius_
Definition: TrackingTruthAccumulator.h:115
TrackingTruthAccumulator::simTrackLabel_
const edm::InputTag simTrackLabel_
Definition: TrackingTruthAccumulator.h:144
TrackingTruthAccumulator::genParticleLabel_
edm::InputTag genParticleLabel_
Definition: TrackingTruthAccumulator.h:147
edm::ProducesCollector
Definition: ProducesCollector.h:43
TrackingParticleFwd.h
T
long double T
Definition: Basic3DVectorLD.h:48
TrackingTruthAccumulator::unmergedOutput_
OutputCollections unmergedOutput_
Definition: TrackingTruthAccumulator.h:183
TrackingTruthAccumulator::ignoreTracksOutsideVolume_
const bool ignoreTracksOutsideVolume_
Definition: TrackingTruthAccumulator.h:119
EventSetup
TrackingTruthAccumulator::volumeZ_
const double volumeZ_
Definition: TrackingTruthAccumulator.h:116
PSimHit
Definition: PSimHit.h:15
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
TrackingTruthAccumulator::createMergedCollection_
const bool createMergedCollection_
Definition: TrackingTruthAccumulator.h:134
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
TrackingTruthAccumulator::hepMCproductLabel_
edm::InputTag hepMCproductLabel_
Needed to add HepMC::GenVertex to SimVertex.
Definition: TrackingTruthAccumulator.h:149
TrackingTruthAccumulator::removeDeadModules_
const bool removeDeadModules_
As of 11/Feb/2013 this option hasn't been implemented yet.
Definition: TrackingTruthAccumulator.h:143
TrackingTruthAccumulator::addAncestors_
const bool addAncestors_
Definition: TrackingTruthAccumulator.h:140
TrackingTruthAccumulator::createInitialVertexCollection_
const bool createInitialVertexCollection_
Definition: TrackingTruthAccumulator.h:137