00001 #ifndef FP420DigiMain_h
00002 #define FP420DigiMain_h
00003
00004 #include <string>
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006
00007 #include "DataFormats/FP420Digi/interface/DigiCollectionFP420.h"
00008 #include "DataFormats/FP420Digi/interface/HDigiFP420.h"
00009
00010
00011
00012 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00013
00014
00015 #include "SimRomanPot/SimFP420/interface/ChargeDrifterFP420.h"
00016 #include "SimRomanPot/SimFP420/interface/CDividerFP420.h"
00017 #include "SimRomanPot/SimFP420/interface/ChargeDividerFP420.h"
00018
00019 #include "SimRomanPot/SimFP420/interface/GaussNoiseProducerFP420.h"
00020 #include "SimRomanPot/SimFP420/interface/GaussNoiseFP420.h"
00021
00022 #include "SimRomanPot/SimFP420/interface/ZeroSuppressFP420.h"
00023 #include "SimRomanPot/SimFP420/interface/DigiConverterFP420.h"
00024
00025 #include "SimG4CMS/FP420/interface/FP420NumberingScheme.h"
00026 #include <iostream>
00027 #include <vector>
00028
00029 using namespace std;
00030
00032 class FP420DigiMain {
00033
00034 public:
00035
00036 typedef map< int, float, less<int> > hit_map_type;
00037 typedef float Amplitude;
00038
00039 typedef DConverterFP420::DigitalMapType DigitalMapType;
00040 typedef PileUpFP420::HitToDigisMapType HitToDigisMapType;
00041
00042 FP420DigiMain(const edm::ParameterSet& conf);
00043
00044 ~FP420DigiMain();
00045
00046
00047
00048
00049 vector <HDigiFP420> run(const std::vector<PSimHit> &input, G4ThreeVector, unsigned int);
00050
00051
00052 private:
00053 int ndigis;
00054 vector<short int> adcVec;
00055
00056 edm::ParameterSet conf_;
00057
00058
00059 int NumberOfSegments, verbosity, xytype;
00060
00061
00062
00063 float Sigma0;
00064 float Thick300;
00065
00066
00067 float ClusterWidth;
00068
00069
00070
00071 float theElectronPerADC;
00072 double thez420;
00073 double thezD2;
00074 double thezD3;
00075 float ENC;
00076 int theAdcFullScale;
00077 float theNoiseInElectrons;
00078 float theStripThreshold;
00079 float theStripThresholdInE;
00080
00081 bool noNoise;
00082 bool addNoisyPixels;
00083 bool theApplyTofCut;
00084
00085 float elossCut;
00086 double tofCut;
00087 float theThreshold;
00088
00089 double pitchX;
00090 double pitchY;
00091 double pitch;
00092 double pitchXW;
00093 double pitchYW;
00094 double pitchW;
00095
00096 double ldriftX;
00097 double ldriftY;
00098 double ldrift;
00099
00100
00101
00102 double depletionVoltage;
00103 double appliedVoltage;
00104 double chargeMobility;
00105 double temperature;
00106 bool noDiffusion;
00107 double chargeDistributionRMS;
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 ChargeDrifterFP420* theCDrifterFP420;
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 CDividerFP420* theCDividerFP420;
00131
00132
00133
00134
00135
00137
00138
00139
00140
00141
00142
00143
00144
00146
00147
00148
00149
00150
00151
00152
00153
00154 GaussNoiseFP420* theGNoiseFP420;
00155 PileUpFP420* thePileUpFP420;
00156 HitDigitizerFP420* theHitDigitizerFP420;
00157 ZeroSuppressFP420* theZSuppressFP420;
00158 DigiConverterFP420* theDConverterFP420;
00159
00160 int theStripsInChip;
00161
00162 int numStripsX;
00163 int numStripsY;
00164 int numStrips;
00165 int numStripsXW;
00166 int numStripsYW;
00167 int numStripsW;
00168
00169
00170 float moduleThickness;
00171
00172 FP420NumberingScheme * theFP420NumberingScheme;
00173
00174 void push_digis(const DigitalMapType&,
00175 const HitToDigisMapType&,
00176 const PileUpFP420::signal_map_type&
00177 );
00178
00179
00180 bool doMissCalibrate;
00181 float theGainSmearing;
00182 float theOffsetSmearing;
00183
00184
00185
00186
00187
00188 double tMax;
00189
00190
00191 LandauFP420 fluctuate;
00192 GaussNoiseProducerFP420* theNoiser;
00193 std::vector<const PSimHit*> ss;
00194
00195 void fluctuateEloss(int particleId, float momentum, float eloss,
00196 float length, int NumberOfSegments,
00197 float elossVector[]);
00198
00199
00200
00201
00202 std::vector<HDigiFP420> digis;
00203
00204
00205
00206
00207
00208 };
00209
00210
00211
00212
00214
00215 #endif
00216