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>
13 
14 class TrackerTopology;
15 
16 namespace CLHEP {
17  class HepRandomEngine;
18 }
19 
20 namespace edm {
21  class ConsumesCollector;
22  class Event;
23  class EventSetup;
24  class ParameterSet;
25  template <typename T>
26  class Handle;
27  class StreamID;
28 } // namespace edm
29 
30 class MagneticField;
32 class PSimHit;
34 class StripGeomDetUnit;
35 class TrackerGeometry;
36 
46 public:
48 
49  ~SiStripDigitizer() override;
50 
51  void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
52  void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
53  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
54  void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
55 
56  void StorePileupInformation(std::vector<int>& numInteractionList,
57  std::vector<int>& bunchCrossingList,
58  std::vector<float>& TrueInteractionList,
59  std::vector<edm::EventID>& eventInfoList,
60  int bunchSpacing) override {
61  PileupInfo_ = std::make_unique<PileupMixingContent>(
62  numInteractionList, bunchCrossingList, TrueInteractionList, eventInfoList, bunchSpacing);
63  }
64 
65  PileupMixingContent* getEventPileupInfo() override { return PileupInfo_.get(); }
66 
67 private:
68  void accumulateStripHits(edm::Handle<std::vector<PSimHit>>,
69  const TrackerTopology* tTopo,
70  size_t globalSimHitIndex,
71  const unsigned int tofBin);
72 
73  typedef std::vector<std::string> vstring;
74  typedef std::map<unsigned int, std::vector<std::pair<const PSimHit*, int>>, std::less<unsigned int>> simhit_map;
75  typedef simhit_map::iterator simhit_map_iterator;
76 
85  const bool useConfFromDB;
86  const bool zeroSuppression;
87  const bool makeDigiSimLinks_;
89  const double fracOfEventsToSimAPV_;
90 
92 
100  std::map<std::string, size_t> crossingSimHitIndexOffset_;
101 
102  std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
103  std::map<uint32_t, std::vector<int>> theDetIdList;
106  std::map<unsigned int, StripGeomDetUnit const*> detectorUnits;
107  CLHEP::HepRandomEngine* randomEngine_ = nullptr;
108  std::vector<std::pair<int, std::bitset<6>>> theAffectedAPVvector;
109 
110  std::unique_ptr<PileupMixingContent> PileupInfo_;
111 };
112 
113 #endif
edm::StreamID
Definition: StreamID.h:30
SiStripDigitizer::vstring
std::vector< std::string > vstring
Definition: SiStripDigitizer.h:73
SiStripDigitizer::PRDigi
const std::string PRDigi
Definition: SiStripDigitizer.h:83
SiStripDigitizer::geometryType
const std::string geometryType
Definition: SiStripDigitizer.h:84
ESHandle.h
Handle
SiStripDigitizer::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: SiStripDigitizer.h:87
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
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:100
SiStripDigitizer::getEventPileupInfo
PileupMixingContent * getEventPileupInfo() override
Definition: SiStripDigitizer.h:65
SiStripDigitizer::simhit_map_iterator
simhit_map::iterator simhit_map_iterator
Definition: SiStripDigitizer.h:75
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
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:56
edm::Handle
Definition: AssociativeIterator.h:50
SiStripDigitizer::SiStripDigitizer
SiStripDigitizer(const edm::ParameterSet &conf, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: SiStripDigitizer.cc:59
ProducesCollector.h
SiStripDigitizer::gainLabel
const std::string gainLabel
Definition: SiStripDigitizer.h:77
SiStripDigitizer::pSetup
edm::ESHandle< MagneticField > pSetup
Definition: SiStripDigitizer.h:105
SiStripDigitizer::pDD
edm::ESHandle< TrackerGeometry > pDD
Definition: SiStripDigitizer.h:104
SiStripDigitizer::ZSDigi
const std::string ZSDigi
Definition: SiStripDigitizer.h:80
SiStripDigitizer::theAffectedAPVvector
std::vector< std::pair< int, std::bitset< 6 > > > theAffectedAPVvector
Definition: SiStripDigitizer.h:108
HLTEgPhaseIITestSequence_cff.bunchSpacing
bunchSpacing
Definition: HLTEgPhaseIITestSequence_cff.py:1574
SiStripDigitizer::~SiStripDigitizer
~SiStripDigitizer() override
Definition: SiStripDigitizer.cc:106
DigiAccumulatorMixMod.h
edm::ESHandle< TrackerGeometry >
SiStripDigitizer::theDigiAlgo
std::unique_ptr< SiStripDigitizerAlgorithm > theDigiAlgo
Definition: SiStripDigitizer.h:102
SiStripDigitizer::VRDigi
const std::string VRDigi
Definition: SiStripDigitizer.h:82
Event
SiStripDigitizer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: SiStripDigitizer.cc:193
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
SiStripDigitizer::hitsProducer
const std::string hitsProducer
Definition: SiStripDigitizer.h:78
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripDigitizer::fracOfEventsToSimAPV_
const double fracOfEventsToSimAPV_
Whether or not to create the association to sim truth collection. Set in configuration.
Definition: SiStripDigitizer.h:89
SiStripDigitizer
Accumulator to perform digitisation on the strip tracker sim hits.
Definition: SiStripDigitizer.h:45
ParameterSet
Definition: Functions.h:16
SiStripDigitizer::simhit_map
std::map< unsigned int, std::vector< std::pair< const PSimHit *, int > >, std::less< unsigned int > > simhit_map
Definition: SiStripDigitizer.h:74
PileupMixingContent
Definition: PileupMixingContent.h:24
genPUProtons_cfi.bunchCrossingList
bunchCrossingList
Definition: genPUProtons_cfi.py:5
SiStripDigitizer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: SiStripDigitizer.h:107
SiStripDigitizer::useConfFromDB
const bool useConfFromDB
Definition: SiStripDigitizer.h:85
edm::EventSetup
Definition: EventSetup.h:57
SiStripDigitizer::trackerContainers
const vstring trackerContainers
Definition: SiStripDigitizer.h:79
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
SiStripDigitizer::PileupInfo_
std::unique_ptr< PileupMixingContent > PileupInfo_
Definition: SiStripDigitizer.h:110
SiStripDigitizer::SCDigi
const std::string SCDigi
Definition: SiStripDigitizer.h:81
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:108
SiStripDigitizer::includeAPVSimulation_
const bool includeAPVSimulation_
Definition: SiStripDigitizer.h:88
PileupMixingContent.h
SiStripDigitizer::zeroSuppression
const bool zeroSuppression
Definition: SiStripDigitizer.h:86
EventSetup
PSimHit
Definition: PSimHit.h:15
SiStripDigitizer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: SiStripDigitizer.cc:139
SiStripDigitizer::detectorUnits
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
Definition: SiStripDigitizer.h:106
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
SiStripDigitizerAlgorithm
Definition: SiStripDigitizerAlgorithm.h:57
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
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:103
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerGeometry
Definition: TrackerGeometry.h:14