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> class Handle;
26  class StreamID;
27 }
28 
29 class MagneticField;
31 class PSimHit;
33 class StripGeomDetUnit;
34 class TrackerGeometry;
35 
45 public:
47 
48  ~SiStripDigitizer() override;
49 
50  void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
51  void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
52  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
53  void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
54 
55  void StorePileupInformation( std::vector<int> &numInteractionList,
56  std::vector<int> &bunchCrossingList,
57  std::vector<float> &TrueInteractionList,
58  std::vector<edm::EventID> &eventInfoList, int bunchSpacing) override{
59  PileupInfo_ = new PileupMixingContent(numInteractionList, bunchCrossingList, TrueInteractionList, eventInfoList, bunchSpacing);
60  }
61 
62  PileupMixingContent* getEventPileupInfo() override { return PileupInfo_; }
63 
64 
65 private:
66  void accumulateStripHits(edm::Handle<std::vector<PSimHit> >, const TrackerTopology *tTopo, size_t globalSimHitIndex, const unsigned int tofBin, CLHEP::HepRandomEngine*);
67  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
68 
69  typedef std::vector<std::string> vstring;
70  typedef std::map<unsigned int, std::vector<std::pair<const PSimHit*, int> >,std::less<unsigned int> > simhit_map;
71  typedef simhit_map::iterator simhit_map_iterator;
72 
75  const vstring trackerContainers;
81  const bool useConfFromDB;
82  const bool zeroSuppression;
83  const bool makeDigiSimLinks_;
84 
86 
94  std::map<std::string,size_t> crossingSimHitIndexOffset_;
95 
96  std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
97  std::map<uint32_t, std::vector<int> > theDetIdList;
100  std::map<unsigned int, StripGeomDetUnit const *> detectorUnits;
101  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
102  std::vector<std::pair<int,std::bitset<6>>> theAffectedAPVvector;
103 
105 
106 };
107 
108 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
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
std::vector< std::pair< int, std::bitset< 6 > > > theAffectedAPVvector
const std::string hitsProducer
const bool useConfFromDB
std::map< uint32_t, std::vector< int > > theDetIdList
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. ...
simhit_map::iterator simhit_map_iterator
Accumulator to perform digitisation on the strip tracker sim hits.
PileupMixingContent * PileupInfo_
std::unique_ptr< SiStripDigitizerAlgorithm > theDigiAlgo
edm::ESHandle< MagneticField > pSetup
const std::string VRDigi
const std::string PRDigi
const std::string geometryType
std::vector< std::string > vstring
HLT enums.
const bool makeDigiSimLinks_
Whether or not to create the association to sim truth collection. Set in configuration.
std::map< unsigned int, std::vector< std::pair< const PSimHit *, int > >, std::less< unsigned int > > simhit_map
const std::string gainLabel
PileupMixingContent * getEventPileupInfo() override
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
const std::string SCDigi
std::vector< CLHEP::HepRandomEngine * > randomEngines_