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>
12 
13 class TrackerTopology;
14 
15 namespace CLHEP {
16  class HepRandomEngine;
17 }
18 
19 namespace edm {
20  class ConsumesCollector;
21  class ProducerBase;
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 
79  const vstring trackerContainers;
85  const bool useConfFromDB;
86  const bool zeroSuppression;
87  const bool makeDigiSimLinks_;
88 
90 
98  std::map<std::string, size_t> crossingSimHitIndexOffset_;
99 
100  std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
101  std::map<uint32_t, std::vector<int>> theDetIdList;
104  std::map<unsigned int, StripGeomDetUnit const*> detectorUnits;
105  CLHEP::HepRandomEngine* randomEngine_ = nullptr;
106  std::vector<std::pair<int, std::bitset<6>>> theAffectedAPVvector;
107 
108  std::unique_ptr<PileupMixingContent> PileupInfo_;
109 };
110 
111 #endif
void StorePileupInformation(std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventInfoList, int bunchSpacing) override
const vstring trackerContainers
const std::string ZSDigi
edm::ESHandle< TrackerGeometry > pDD
const bool zeroSuppression
const std::string hitsProducer
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
const bool useConfFromDB
std::map< uint32_t, std::vector< int > > theDetIdList
std::map< unsigned int, std::vector< std::pair< const PSimHit *, int > >, std::less< unsigned int > > simhit_map
simhit_map::iterator simhit_map_iterator
Accumulator to perform digitisation on the strip tracker sim hits.
std::unique_ptr< SiStripDigitizerAlgorithm > theDigiAlgo
edm::ESHandle< MagneticField > pSetup
const std::string VRDigi
const std::string PRDigi
const std::string geometryType
std::vector< std::pair< int, std::bitset< 6 > > > theAffectedAPVvector
std::vector< std::string > vstring
HLT enums.
std::map< std::string, size_t > crossingSimHitIndexOffset_
Offset to add to the index of each sim hit to account for which crossing it&#39;s in. ...
const bool makeDigiSimLinks_
Whether or not to create the association to sim truth collection. Set in configuration.
const std::string gainLabel
PileupMixingContent * getEventPileupInfo() override
std::unique_ptr< PileupMixingContent > PileupInfo_
const std::string SCDigi