CMS 3D CMS Logo

SiStripDigitizer.h
Go to the documentation of this file.
1 #ifndef SiStripDigitizer_h
2 #define SiStripDigitizer_h
3 
4 #include <map>
5 #include <memory>
6 #include <string>
7 #include <vector>
8 #include <bitset>
24 
25 class TrackerTopology;
26 
27 namespace CLHEP {
28  class HepRandomEngine;
29 }
30 
31 namespace edm {
32  class ConsumesCollector;
33  class Event;
34  class EventSetup;
35  class ParameterSet;
36  template <typename T>
37  class Handle;
38  class StreamID;
39 } // namespace edm
40 
41 class MagneticField;
43 class PSimHit;
45 class StripGeomDetUnit;
46 class TrackerGeometry;
47 
57 public:
59 
60  ~SiStripDigitizer() override;
61 
62  void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
63  void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
64  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
65  void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
66 
67  void StorePileupInformation(std::vector<int>& numInteractionList,
68  std::vector<int>& bunchCrossingList,
69  std::vector<float>& TrueInteractionList,
70  std::vector<edm::EventID>& eventInfoList,
71  int bunchSpacing) override {
72  PileupInfo_ = std::make_unique<PileupMixingContent>(
73  numInteractionList, bunchCrossingList, TrueInteractionList, eventInfoList, bunchSpacing);
74  }
75 
76  PileupMixingContent* getEventPileupInfo() override { return PileupInfo_.get(); }
77 
78 private:
79  void accumulateStripHits(edm::Handle<std::vector<PSimHit>>,
80  const TrackerTopology* tTopo,
81  size_t globalSimHitIndex,
82  const unsigned int tofBin);
83 
84  typedef std::vector<std::string> vstring;
85  typedef std::map<unsigned int, std::vector<std::pair<const PSimHit*, int>>, std::less<unsigned int>> simhit_map;
86  typedef simhit_map::iterator simhit_map_iterator;
87 
94  const bool useConfFromDB;
95  const bool zeroSuppression;
96  const bool makeDigiSimLinks_;
98  const double fracOfEventsToSimAPV_;
108 
110 
118  std::map<std::string, size_t> crossingSimHitIndexOffset_;
119 
120  std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
121  std::map<uint32_t, std::vector<int>> theDetIdList;
122  const TrackerGeometry* pDD = nullptr;
123  const MagneticField* pSetup = nullptr;
124  std::map<unsigned int, StripGeomDetUnit const*> detectorUnits;
125  CLHEP::HepRandomEngine* randomEngine_ = nullptr;
126  std::vector<std::pair<int, std::bitset<6>>> theAffectedAPVvector;
127 
128  std::unique_ptr<PileupMixingContent> PileupInfo_;
129 };
130 
131 #endif
edm::StreamID
Definition: StreamID.h:30
SiStripDependentRecords.h
SiStripDigitizer::apvSimulationParametersToken_
edm::ESGetToken< SiStripApvSimulationParameters, SiStripApvSimulationParametersRcd > apvSimulationParametersToken_
Whether or not to create the association to sim truth collection. Set in configuration.
Definition: SiStripDigitizer.h:107
SiStripDigitizer::vstring
std::vector< std::string > vstring
Definition: SiStripDigitizer.h:84
SiStripDigitizer::PRDigi
const std::string PRDigi
Definition: SiStripDigitizer.h:93
SiStripGain.h
Handle
SiStripDigitizer::pDD
const TrackerGeometry * pDD
Definition: SiStripDigitizer.h:122
SiStripDigitizer::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: SiStripDigitizer.h:96
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
SiStripDigitizer::pDDToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
Definition: SiStripDigitizer.h:100
SiStripDigitizer::noiseToken_
const edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_
Definition: SiStripDigitizer.h:103
SiStripDigitizer::crossingSimHitIndexOffset_
std::map< std::string, size_t > crossingSimHitIndexOffset_
Offset to add to the index of each sim hit to account for which crossing it's in.
Definition: SiStripDigitizer.h:118
SiStripDigitizer::gainToken_
const edm::ESGetToken< SiStripGain, SiStripGainSimRcd > gainToken_
Definition: SiStripDigitizer.h:102
SiStripDigitizer::getEventPileupInfo
PileupMixingContent * getEventPileupInfo() override
Definition: SiStripDigitizer.h:76
SiStripDigitizer::simhit_map_iterator
simhit_map::iterator simhit_map_iterator
Definition: SiStripDigitizer.h:86
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
SiStripNoises.h
SiStripDigitizer::pedestalToken_
const edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalToken_
Definition: SiStripDigitizer.h:105
SiStripDigitizer::StorePileupInformation
void StorePileupInformation(std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventInfoList, int bunchSpacing) override
Definition: SiStripDigitizer.h:67
edm::Handle
Definition: AssociativeIterator.h:50
SiStripDigitizer::SiStripDigitizer
SiStripDigitizer(const edm::ParameterSet &conf, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: SiStripDigitizer.cc:53
ESGetToken.h
ProducesCollector.h
SiStripDetCabling.h
TrackerTopologyRcd.h
SiStripDigitizer::ZSDigi
const std::string ZSDigi
Definition: SiStripDigitizer.h:90
SiStripDigitizer::theAffectedAPVvector
std::vector< std::pair< int, std::bitset< 6 > > > theAffectedAPVvector
Definition: SiStripDigitizer.h:126
HLTEgPhaseIITestSequence_cff.bunchSpacing
bunchSpacing
Definition: HLTEgPhaseIITestSequence_cff.py:1574
SiStripDigitizer::~SiStripDigitizer
~SiStripDigitizer() override
Definition: SiStripDigitizer.cc:112
DigiAccumulatorMixMod.h
IdealMagneticFieldRecord.h
SiStripDigitizer::theDigiAlgo
std::unique_ptr< SiStripDigitizerAlgorithm > theDigiAlgo
Definition: SiStripDigitizer.h:120
SiStripDigitizer::VRDigi
const std::string VRDigi
Definition: SiStripDigitizer.h:92
SiStripDigitizer::tTopoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripDigitizer.h:99
Event
SiStripDigitizer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: SiStripDigitizer.cc:195
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
SiStripDigitizer::hitsProducer
const std::string hitsProducer
Definition: SiStripDigitizer.h:88
SiStripThreshold.h
SiStripDigitizer::thresholdToken_
const edm::ESGetToken< SiStripThreshold, SiStripThresholdRcd > thresholdToken_
Definition: SiStripDigitizer.h:104
CLHEP
Definition: CocoaGlobals.h:27
TrackerDigiGeometryRecord.h
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripDigitizer::fracOfEventsToSimAPV_
const double fracOfEventsToSimAPV_
Definition: SiStripDigitizer.h:98
SiStripDigitizer
Accumulator to perform digitisation on the strip tracker sim hits.
Definition: SiStripDigitizer.h:56
SiStripCondDataRecords.h
ParameterSet
Definition: Functions.h:16
SiStripDigitizer::pSetupToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > pSetupToken_
Definition: SiStripDigitizer.h:101
SiStripDigitizer::simhit_map
std::map< unsigned int, std::vector< std::pair< const PSimHit *, int > >, std::less< unsigned int > > simhit_map
Definition: SiStripDigitizer.h:85
PileupMixingContent
Definition: PileupMixingContent.h:24
genPUProtons_cfi.bunchCrossingList
bunchCrossingList
Definition: genPUProtons_cfi.py:5
SiStripDigitizer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: SiStripDigitizer.h:125
SiStripDigitizer::useConfFromDB
const bool useConfFromDB
Definition: SiStripDigitizer.h:94
edm::EventSetup
Definition: EventSetup.h:58
SiStripDigitizer::trackerContainers
const vstring trackerContainers
Definition: SiStripDigitizer.h:89
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripDigitizer::PileupInfo_
std::unique_ptr< PileupMixingContent > PileupInfo_
Definition: SiStripDigitizer.h:128
SiStripDigitizer::SCDigi
const std::string SCDigi
Definition: SiStripDigitizer.h:91
edm::ProducesCollector
Definition: ProducesCollector.h:43
SiStripDigitizer::accumulateStripHits
void accumulateStripHits(edm::Handle< std::vector< PSimHit >>, const TrackerTopology *tTopo, size_t globalSimHitIndex, const unsigned int tofBin)
Definition: SiStripDigitizer.cc:114
SiStripPedestals.h
SiStripApvSimulationParameters.h
SiStripDigitizer::includeAPVSimulation_
const bool includeAPVSimulation_
Definition: SiStripDigitizer.h:97
PileupMixingContent.h
SiStripDigitizer::zeroSuppression
const bool zeroSuppression
Definition: SiStripDigitizer.h:95
EventSetup
PSimHit
Definition: PSimHit.h:15
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
SiStripDigitizer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: SiStripDigitizer.cc:145
SiStripDigitizer::detectorUnits
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
Definition: SiStripDigitizer.h:124
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
SiStripDigitizer::detCablingToken_
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
Definition: SiStripDigitizer.h:106
SiStripDigitizerAlgorithm
Definition: SiStripDigitizerAlgorithm.h:56
SiStripDigitizer::pSetup
const MagneticField * pSetup
Definition: SiStripDigitizer.h:123
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
SiStripDigitizer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
Definition: SiStripDigitizer.cc:235
SiStripDigitizer::theDetIdList
std::map< uint32_t, std::vector< int > > theDetIdList
Definition: SiStripDigitizer.h:121
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerGeometry
Definition: TrackerGeometry.h:14