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
58  SiStripDigitizerAlgorithm(const edm::ParameterSet& conf, CLHEP::HepRandomEngine&);
59 
60  // Destructor
62 
63  void initializeDetUnit(StripGeomDetUnit* 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 
75  void digitize(
76  edm::DetSet<SiStripDigi>& outDigis,
77  edm::DetSet<SiStripRawDigi>& outRawDigis,
79  const StripGeomDetUnit* stripdet,
84 
85  // ParticleDataTable
87  theSiHitDigitizer->setParticleDataTable(pardt);
88  pdt= pardt;
89  }
90 
91  private:
93  const double theThreshold;
94  const double cmnRMStib;
95  const double cmnRMStob;
96  const double cmnRMStid;
97  const double cmnRMStec;
98  const double APVSaturationProb;
99  const bool makeDigiSimLinks_; //< Whether or not to create the association to sim truth collection. Set in configuration.
100  const bool peakMode;
101  const bool noise;
102  const bool RealPedestals;
103  const bool SingleStripNoise;
104  const bool CommonModeNoise;
105  const bool BaselineShift;
107 
108  const int theFedAlgo;
109  const bool zeroSuppression;
110  const double theElectronPerADC;
111  const double theTOFCutForPeak;
113  const double tofCut;
114  const double cosmicShift;
115  const double inefficiency;
116  const double pedOffset;
117 
120 
121  const std::unique_ptr<SiHitDigitizer> theSiHitDigitizer;
122  const std::unique_ptr<SiPileUpSignals> theSiPileUpSignals;
123  const std::unique_ptr<const SiGaussianTailNoiseAdder> theSiNoiseAdder;
124  const std::unique_ptr<SiTrivialDigitalConverter> theSiDigitalConverter;
125  const std::unique_ptr<SiStripFedZeroSuppression> theSiZeroSuppress;
126 
127  const std::unique_ptr<CLHEP::RandFlat> theFlatDistribution;
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< CLHEP::RandFlat > theFlatDistribution
const std::unique_ptr< SiPileUpSignals > theSiPileUpSignals
std::vector< SiStripDigi > DigitalVecType
edm::ESHandle< SiStripLorentzAngle > lorentzAngleHandle
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 > &)
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)
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)
const std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
SiPileUpSignals::SignalMapType SignalMapType
SiStripDigitizerAlgorithm(const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
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
std::map< unsigned int, size_t > lastChannelsWithSignal
std::map< uint32_t, AssociationInfoForChannel > AssociationInfoForDetId
void initializeDetUnit(StripGeomDetUnit *det, const edm::EventSetup &iSetup)
const ParticleDataTable * pdt
size_t simHitGlobalIndex
The array index of the sim hit, but in the array for all crossings.