CMS 3D CMS Logo

FP420DigiMain.h
Go to the documentation of this file.
1 #ifndef FP420DigiMain_h
2 #define FP420DigiMain_h
3 
5 #include <string>
6 
9 
10 //#include "SimG4CMS/FP420/interface/FP420G4HitCollection.h"
11 //#include "SimG4CMS/FP420/interface/FP420G4Hit.h"
13 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
14 
18 
21 
24 //#include "SimRomanPot/SimFP420/interface/HDigiFP420.h"
26 #include <iostream>
27 #include <vector>
28 
31  // interface interface interface:
32 public:
33  typedef std::map<int, float, std::less<int>> hit_map_type;
34  typedef float Amplitude;
35 
38 
39  FP420DigiMain(const edm::ParameterSet &conf);
40  // FP420DigiMain();
42 
43  // Runs the algorithm
44  // void run(const std::vector<PSimHit*> &input, DigiCollectionFP420
45  // &output,StripGeomDetUnit *det,GlobalVector);
46  std::vector<HDigiFP420> run(const std::vector<PSimHit> &input, const G4ThreeVector &, unsigned int);
47  // vector <HDigiFP420> run(const std::vector<PSimHit> &input, G4ThreeVector,
48  // unsigned int, int);
49 
50 private:
51  int ndigis;
52  std::vector<short int> adcVec;
53 
55  // Const Parameters needed by:
56  //-- primary ionization
58  // go from Geant energy GeV to number of electrons
59 
60  //-- drift
61  float Sigma0; //=0.0007 // Charge diffusion in microns for 300 micron Si
62  float Thick300; //=0.0300cm or = 0.300 mm - define 300microns for
63  // normalization
64 
65  //-- induce_signal
66  float ClusterWidth; // Gaussian charge cutoff width in sigma units
67  // Should be rather called CutoffWidth?
68 
69  //-- make_digis
70  float theElectronPerADC; // Gain, number of electrons per adc count. = 3600
71  double thez420;
72  double thezD2;
73  double thezD3;
74  float ENC; // Equivalent noise charge = 50
75  int theAdcFullScale; // Saturation count, 255=8bit. = 35000
76  float theNoiseInElectrons; // Noise (RMS) in units of electrons. = 500
77  float theStripThreshold; // Strip threshold in units of noise. = 5
78  float theStripThresholdInE; // Strip noise in electorns. = 2500
79  // bool peakMode; // = false;
80  bool noNoise; // = false;
81  bool addNoisyPixels; // = true ;
83 
84  float elossCut;
85  double tofCut;
86  float theThreshold; // ADC threshold = 2
87 
88  double pitchX; // pitchX
89  double pitchY; // pitchY
90  double pitch; // pitch automatic
91  double pitchXW; // pitchX
92  double pitchYW; // pitchY
93  double pitchW; // pitch automatic
94 
95  double ldriftX; // ldriftX
96  double ldriftY; // ldriftY
97  double ldrift; // ldrift automatic
98 
99  double depletionVoltage; // = 25.0 !depletion voltage [V]
100  double appliedVoltage; // = 45.0 !bias voltage [V]
101  double chargeMobility; // = 480.0 !holes mobility [cm**2/V/sec] p-side;
102  // = 1350.0 !electron mobility - n-side
103  double temperature; // =
104  bool noDiffusion; // = true
105  double chargeDistributionRMS; // = 5
106  /*
107  DH = 12.3 !diffusion const for holes [cm**2/sec]
108  DE = 34.6 !diffusion const for electrons [cm**2/sec]
109 
110  TGAP = MUH*BFIELD !tangent of Lorentz angle for holes
111  TGAN = MUE*BFIELD !tangent of Lorentz angle for electrons
112  W = 0.0036 !average deposited energy per e-h pair [keV]
113  CMB = 1.6E-19 !electron charge [Coulombs]
114  CAP = 10.0E-15
115  GAINP = 3588.7
116  GAINN = 3594.8
117  */
119  /*
120  interface/
121  ChargeDrifterFP420.h
122  CDrifterFP420.h
123  EnergySegmentFP420.h
124  AmplitudeSegmentFP420.h
125  src/
126  ChargeDrifterFP420.cc
127  */
129  /*
130  interface/
131  CDividerFP420.h
132  EnergySegmentFP420.h
133  */
135  /*
136  interface/
137  ChargeDividerFP420.h
138  LandauFP420.h
139  src/
140  ChargeDividerFP420.cc
141  LandauFP420.cc
142  */
144  /*
145  interface/
146  IChargeFP420.h
147  InduceChargeFP420.h
148  src/
149  InduceChargeFP420.cc
150  */
151 
157 
158  int theStripsInChip; // num of columns per APV (for strip ineff.)
159 
160  int numStripsX; // number of Xstrips in the module
161  int numStripsY; // number of Ystrips in the module
162  int numStrips; // number of strips in the module
163  int numStripsXW; // number of Xstrips in the module
164  int numStripsYW; // number of Ystrips in the module
165  int numStripsW; // number of strips in the module
166 
167  // int numStripsMax; // max number of strips in the module
168  float moduleThickness; // plate thickness
169 
170  void push_digis(const DigitalMapType &, const HitToDigisMapType &, const PileUpFP420::signal_map_type &);
171 
172  //-- calibration smearing
173  bool doMissCalibrate; // Switch on the calibration smearing
174  float theGainSmearing; // The sigma of the gain fluctuation (around 1)
175  float theOffsetSmearing; // The sigma of the offset fluct. (around 0)
176 
177  // The PDTable
178  // HepPDTable *particleTable;
179 
180  //-- charge fluctuation
181  double tMax; // The delta production cut, should be as in OSCAR = 30keV
182  // cmsim = 100keV
183  // The eloss fluctuation class from G4. Is the right place?
186  std::vector<const PSimHit *> ss; // ss - pointers to hit info of PSimHit
187 
188  void fluctuateEloss(
189  int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[]);
190 
191  // std::vector<HDigiFP420> internal_coll; //empty vector of HDigiFP420 used
192  // in digitize // AZ
193 
194  std::vector<HDigiFP420> digis;
195 
196  // std::vector<HDigiFP420> digitize(StripGeomDetUnit *det); // AZ
197  // int rn0,pn0,sn0;
198 };
199 
200 // end of interface
202 
203 #endif
double temperature
DConverterFP420::DigitalMapType DigitalMapType
Definition: FP420DigiMain.h:36
GaussNoiseFP420 * theGNoiseFP420
edm::ParameterSet conf_
Definition: FP420DigiMain.h:54
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[])
std::map< int, int, std::less< int > > DigitalMapType
double depletionVoltage
Definition: FP420DigiMain.h:99
std::vector< const PSimHit * > ss
double appliedVoltage
std::vector< HDigiFP420 > digis
float theThreshold
Definition: FP420DigiMain.h:86
PileUpFP420::HitToDigisMapType HitToDigisMapType
Definition: FP420DigiMain.h:37
float theOffsetSmearing
GaussNoiseProducerFP420 * theNoiser
static std::string const input
Definition: EdmProvDump.cc:48
std::map< int, float, std::less< int > > hit_map_type
Definition: FP420DigiMain.h:33
float theNoiseInElectrons
Definition: FP420DigiMain.h:76
std::vector< HDigiFP420 > run(const std::vector< PSimHit > &input, const G4ThreeVector &, unsigned int)
float theGainSmearing
DigiConverterFP420 * theDConverterFP420
double chargeMobility
ChargeDrifterFP420 * theCDrifterFP420
std::vector< short int > adcVec
Definition: FP420DigiMain.h:52
float theElectronPerADC
Definition: FP420DigiMain.h:70
FP420DigiMain(const edm::ParameterSet &conf)
float theStripThresholdInE
Definition: FP420DigiMain.h:78
CDividerFP420 * theCDividerFP420
std::map< int, Amplitude, std::less< int > > signal_map_type
Definition: PileUpFP420.h:13
float theStripThreshold
Definition: FP420DigiMain.h:77
double chargeDistributionRMS
ZeroSuppressFP420 * theZSuppressFP420
std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
Definition: PileUpFP420.h:14
LandauFP420 fluctuate
void push_digis(const DigitalMapType &, const HitToDigisMapType &, const PileUpFP420::signal_map_type &)
PileUpFP420 * thePileUpFP420
float ClusterWidth
Definition: FP420DigiMain.h:66
HitDigitizerFP420 * theHitDigitizerFP420
float moduleThickness