test
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  unsigned int tofBin,
72  const StripGeomDetUnit *stripdet,
73  const GlobalVector& bfield,
74  const TrackerTopology *tTopo,
75  CLHEP::HepRandomEngine*);
76 
77  void digitize(
78  edm::DetSet<SiStripDigi>& outDigis,
79  edm::DetSet<SiStripRawDigi>& outRawDigis,
81  const StripGeomDetUnit* stripdet,
86  CLHEP::HepRandomEngine*);
87 
88  // ParticleDataTable
90  theSiHitDigitizer->setParticleDataTable(pardt);
91  pdt= pardt;
92  }
93 
94  private:
96  const double theThreshold;
97  const double cmnRMStib;
98  const double cmnRMStob;
99  const double cmnRMStid;
100  const double cmnRMStec;
101  const double APVSaturationProb;
102  const bool makeDigiSimLinks_; //< Whether or not to create the association to sim truth collection. Set in configuration.
103  const bool peakMode;
104  const bool noise;
105  const bool RealPedestals;
106  const bool SingleStripNoise;
107  const bool CommonModeNoise;
108  const bool BaselineShift;
110 
111  const int theFedAlgo;
112  const bool zeroSuppression;
113  const double theElectronPerADC;
114  const double theTOFCutForPeak;
116  const double tofCut;
117  const double cosmicShift;
118  const double inefficiency;
119  const double pedOffset;
120  const bool PreMixing_;
121 
124 
125  const std::unique_ptr<SiHitDigitizer> theSiHitDigitizer;
126  const std::unique_ptr<SiPileUpSignals> theSiPileUpSignals;
127  const std::unique_ptr<const SiGaussianTailNoiseAdder> theSiNoiseAdder;
128  const std::unique_ptr<SiTrivialDigitalConverter> theSiDigitalConverter;
129  const std::unique_ptr<SiStripFedZeroSuppression> theSiZeroSuppress;
130 
131  // bad channels for each detector ID
132  std::map<unsigned int, std::vector<bool> > allBadChannels;
133  // first and last channel wit signal for each detector ID
134  std::map<unsigned int, size_t> firstChannelsWithSignal;
135  std::map<unsigned int, size_t> lastChannelsWithSignal;
136 
137  // ESHandles
139 
143  {
144  unsigned int trackID;
148  unsigned int tofBin; // Needed along with subDet to determine which PSimHit collection simHitGlobalIndex indexes
149  };
150 
151  typedef std::map<int, std::vector<AssociationInfo> > AssociationInfoForChannel;
152  typedef std::map<uint32_t, AssociationInfoForChannel> AssociationInfoForDetId;
155 
156 };
157 
158 #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
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
void setParticleDataTable(const ParticleDataTable *pardt)
std::map< int, std::vector< AssociationInfo > > AssociationInfoForChannel
SiStripDigitizerAlgorithm(const edm::ParameterSet &conf)
std::map< unsigned int, size_t > lastChannelsWithSignal
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, size_t inputBeginGlobalIndex, unsigned int tofBin, const StripGeomDetUnit *stripdet, const GlobalVector &bfield, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
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.