CMS 3D CMS Logo

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