CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripDigitizerAlgorithm.h
Go to the documentation of this file.
1 #ifndef SiStripDigitizerAlgorithm_h
2 #define SiStripDigitizerAlgorithm_h
3 
10 #include <memory>
11 #include <string>
12 
14 
27 #include "SiHitDigitizer.h"
35 
36 class TrackerTopology;
37 
38 namespace edm {
39  class EventSetup;
40 }
41 
43 class StripDigiSimLink;
44 
45 namespace CLHEP {
46  class HepRandomEngine;
47 }
48 
50  public:
54  typedef std::map< int, float, std::less<int> > hit_map_type;
55  typedef float Amplitude;
56 
57  // Constructor
59 
60  // Destructor
62 
63  void initializeDetUnit(StripGeomDetUnit const * det, const edm::EventSetup& iSetup);
64 
65  void initializeEvent(const edm::EventSetup& iSetup);
66 
67  //run the algorithm to digitize a single det
68  void accumulateSimHits(const std::vector<PSimHit>::const_iterator inputBegin,
69  const std::vector<PSimHit>::const_iterator inputEnd,
70  size_t inputBeginGlobalIndex,
71  const StripGeomDetUnit *stripdet,
72  const GlobalVector& bfield,
73  const TrackerTopology *tTopo,
74  CLHEP::HepRandomEngine*);
75 
76  void digitize(
77  edm::DetSet<SiStripDigi>& outDigis,
78  edm::DetSet<SiStripRawDigi>& outRawDigis,
80  const StripGeomDetUnit* stripdet,
85  CLHEP::HepRandomEngine*);
86 
87  // ParticleDataTable
89  theSiHitDigitizer->setParticleDataTable(pardt);
90  pdt= pardt;
91  }
92 
93  private:
95  const double theThreshold;
96  const double cmnRMStib;
97  const double cmnRMStob;
98  const double cmnRMStid;
99  const double cmnRMStec;
100  const double APVSaturationProb;
101  const bool makeDigiSimLinks_; //< Whether or not to create the association to sim truth collection. Set in configuration.
102  const bool peakMode;
103  const bool noise;
104  const bool RealPedestals;
105  const bool SingleStripNoise;
106  const bool CommonModeNoise;
107  const bool BaselineShift;
109 
110  const int theFedAlgo;
111  const bool zeroSuppression;
112  const double theElectronPerADC;
113  const double theTOFCutForPeak;
115  const double tofCut;
116  const double cosmicShift;
117  const double inefficiency;
118  const double pedOffset;
119 
122 
123  const std::unique_ptr<SiHitDigitizer> theSiHitDigitizer;
124  const std::unique_ptr<SiPileUpSignals> theSiPileUpSignals;
125  const std::unique_ptr<const SiGaussianTailNoiseAdder> theSiNoiseAdder;
126  const std::unique_ptr<SiTrivialDigitalConverter> theSiDigitalConverter;
127  const std::unique_ptr<SiStripFedZeroSuppression> theSiZeroSuppress;
128 
129  // bad channels for each detector ID
130  std::map<unsigned int, std::vector<bool> > allBadChannels;
131  // first and last channel wit signal for each detector ID
132  std::map<unsigned int, size_t> firstChannelsWithSignal;
133  std::map<unsigned int, size_t> lastChannelsWithSignal;
134 
135  // ESHandles
137 
141  {
142  unsigned int trackID;
146  };
147 
148  typedef std::map<int, std::vector<AssociationInfo> > AssociationInfoForChannel;
149  typedef std::map<uint32_t, AssociationInfoForChannel> AssociationInfoForDetId;
152 
153 };
154 
155 #endif
const std::unique_ptr< SiPileUpSignals > theSiPileUpSignals
std::vector< SiStripDigi > DigitalVecType
edm::ESHandle< SiStripLorentzAngle > lorentzAngleHandle
HepPDT::ParticleDataTable ParticleDataTable
AssociationInfoForDetId associationInfoForDetId_
Structure that holds the information on the SimTrack contributions. Only filled if makeDigiSimLinks_ ...
SiDigitalConverter::DigitalRawVecType DigitalRawVecType
SiDigitalConverter::DigitalVecType DigitalVecType
void initializeEvent(const edm::EventSetup &iSetup)
void initializeDetUnit(StripGeomDetUnit const *det, const edm::EventSetup &iSetup)
void digitize(edm::DetSet< SiStripDigi > &outDigis, edm::DetSet< SiStripRawDigi > &outRawDigis, edm::DetSet< StripDigiSimLink > &outLink, const StripGeomDetUnit *stripdet, edm::ESHandle< SiStripGain > &, edm::ESHandle< SiStripThreshold > &, edm::ESHandle< SiStripNoises > &, edm::ESHandle< SiStripPedestals > &, CLHEP::HepRandomEngine *)
std::map< int, float, std::less< int > > hit_map_type
const std::unique_ptr< const SiGaussianTailNoiseAdder > theSiNoiseAdder
const std::unique_ptr< SiHitDigitizer > theSiHitDigitizer
std::map< unsigned int, size_t > firstChannelsWithSignal
std::map< int, Amplitude > SignalMapType
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, size_t inputBeginGlobalIndex, const StripGeomDetUnit *stripdet, const GlobalVector &bfield, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
const std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
SiPileUpSignals::SignalMapType SignalMapType
const std::unique_ptr< SiStripFedZeroSuppression > theSiZeroSuppress
std::vector< SiStripRawDigi > DigitalRawVecType
std::map< unsigned int, std::vector< bool > > allBadChannels
HepPDT::ParticleData ParticleData
tuple conf
Definition: dbtoconf.py:185
void setParticleDataTable(const ParticleDataTable *pardt)
std::map< int, std::vector< AssociationInfo > > AssociationInfoForChannel
SiStripDigitizerAlgorithm(const edm::ParameterSet &conf)
std::map< unsigned int, size_t > lastChannelsWithSignal
std::map< uint32_t, AssociationInfoForChannel > AssociationInfoForDetId
const ParticleDataTable * pdt
size_t simHitGlobalIndex
The array index of the sim hit, but in the array for all crossings.