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  namespace stream {
22  class EDProducerBase;
23  }
24  class Event;
25  class EventSetup;
26  class ParameterSet;
27  template<typename T> class Handle;
28  class StreamID;
29 }
30 
31 class MagneticField;
33 class PSimHit;
35 class StripGeomDetUnit;
36 class TrackerGeometry;
37 
47 public:
49 
50  virtual ~SiStripDigitizer();
51 
52  virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
53  virtual void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
54  virtual void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
55  virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
56 
57  virtual void StorePileupInformation( std::vector<int> &numInteractionList,
58  std::vector<int> &bunchCrossingList,
59  std::vector<float> &TrueInteractionList,
60  std::vector<edm::EventID> &eventInfoList, int bunchSpacing) override{
61  PileupInfo_ = new PileupMixingContent(numInteractionList, bunchCrossingList, TrueInteractionList, eventInfoList, bunchSpacing);
62  }
63 
64  virtual PileupMixingContent* getEventPileupInfo() override { return PileupInfo_; }
65 
66 
67 private:
68  void accumulateStripHits(edm::Handle<std::vector<PSimHit> >, const TrackerTopology *tTopo, size_t globalSimHitIndex, const unsigned int tofBin, CLHEP::HepRandomEngine*);
69  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
70 
71  typedef std::vector<std::string> vstring;
72  typedef std::map<unsigned int, std::vector<std::pair<const PSimHit*, int> >,std::less<unsigned int> > simhit_map;
73  typedef simhit_map::iterator simhit_map_iterator;
74 
77  const vstring trackerContainers;
83  const bool useConfFromDB;
84  const bool zeroSuppression;
85  const bool makeDigiSimLinks_;
86 
88 
96  std::map<std::string,size_t> crossingSimHitIndexOffset_;
97 
98  std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
99  std::map<uint32_t, std::vector<int> > theDetIdList;
102  std::map<unsigned int, StripGeomDetUnit const *> detectorUnits;
103  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
104  std::vector<std::pair<int,std::bitset<6>>> theAffectedAPVvector;
105 
107 
108 };
109 
110 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
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
virtual void StorePileupInformation(std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventInfoList, int bunchSpacing) override
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
virtual PileupMixingContent * getEventPileupInfo() override
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
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
const std::string SCDigi
std::vector< CLHEP::HepRandomEngine * > randomEngines_