CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimRomanPot/SimFP420/interface/FP420DigiMain.h

Go to the documentation of this file.
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 //#include "SimG4CMS/FP420/interface/FP420G4HitCollection.h"
00011 //#include "SimG4CMS/FP420/interface/FP420G4Hit.h"
00012 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00013 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
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 //#include "SimRomanPot/SimFP420/interface/HDigiFP420.h"
00025 #include "SimG4CMS/FP420/interface/FP420NumberingScheme.h"
00026 #include <iostream>
00027 #include <vector>
00028 
00029 
00030 
00032 class FP420DigiMain { 
00033   //       interface   interface    interface:
00034 public:
00035 
00036   typedef std::map<int, float, std::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   // FP420DigiMain();
00044   ~FP420DigiMain();
00045 
00046 
00047   // Runs the algorithm
00048   //  void run(const std::vector<PSimHit*> &input, DigiCollectionFP420 &output,StripGeomDetUnit *det,GlobalVector);
00049   std::vector <HDigiFP420>  run(const std::vector<PSimHit> &input, G4ThreeVector, unsigned int);
00050   //vector <HDigiFP420>  run(const std::vector<PSimHit> &input, G4ThreeVector, unsigned int, int);
00051 
00052  private:
00053   int ndigis; 
00054   std::vector<short int> adcVec;
00055 
00056   edm::ParameterSet conf_;
00057   // Const Parameters needed by:
00058   //-- primary ionization
00059   int    NumberOfSegments, verbosity, xytype; // 
00060   // go from Geant energy GeV to number of electrons
00061 
00062   //-- drift
00063   float Sigma0; //=0.0007  // Charge diffusion in microns for 300 micron Si
00064   float Thick300;  //=0.0300cm     or = 0.300 mm  - define 300microns for normalization 
00065 
00066   //-- induce_signal
00067   float ClusterWidth;       // Gaussian charge cutoff width in sigma units
00068   // Should be rather called CutoffWidth?
00069 
00070   //-- make_digis 
00071   float theElectronPerADC;     // Gain, number of electrons per adc count.   =  3600 
00072   double thez420;
00073   double thezD2;
00074   double thezD3;
00075   float ENC;                   // Equivalent noise charge   = 50
00076   int theAdcFullScale;         // Saturation count, 255=8bit.   = 35000
00077   float theNoiseInElectrons;   // Noise (RMS) in units of electrons.  = 500
00078   float theStripThreshold;     // Strip threshold in units of noise.  = 5
00079   float theStripThresholdInE;  // Strip noise in electorns.  = 2500
00080   //  bool peakMode; //  = false;
00081   bool noNoise; //  = false; 
00082   bool addNoisyPixels;//  = true ;
00083   bool theApplyTofCut;
00084 
00085   float elossCut;            
00086   double tofCut;             
00087   float theThreshold;          // ADC threshold   = 2
00088 
00089   double pitchX;          // pitchX
00090   double pitchY;          // pitchY
00091   double pitch;          // pitch automatic
00092   double pitchXW;          // pitchX
00093   double pitchYW;          // pitchY
00094   double pitchW;          // pitch automatic
00095 
00096   double ldriftX;          // ldriftX
00097   double ldriftY;          // ldriftY
00098   double ldrift;          // ldrift automatic
00099 
00100 
00101 
00102   double depletionVoltage; //  =   25.0       !depletion voltage [V]
00103   double appliedVoltage; //  =   45.0       !bias voltage      [V]
00104   double chargeMobility; //  = 480.0  !holes    mobility [cm**2/V/sec] p-side;   = 1350.0 !electron mobility - n-side
00105   double temperature; //  =   
00106   bool noDiffusion; //  =   true
00107   double chargeDistributionRMS; //  =  5
00108   /*
00109       DH     =   12.3       !diffusion const for holes     [cm**2/sec]
00110       DE     =   34.6       !diffusion const for electrons [cm**2/sec]
00111 
00112       TGAP   = MUH*BFIELD   !tangent of Lorentz angle for holes
00113       TGAN   = MUE*BFIELD   !tangent of Lorentz angle for electrons
00114       W      =    0.0036    !average deposited energy per e-h pair [keV]
00115       CMB    =    1.6E-19   !electron charge [Coulombs]
00116       CAP    =   10.0E-15
00117       GAINP  = 3588.7
00118       GAINN  = 3594.8
00119 */
00120               ChargeDrifterFP420* theCDrifterFP420;
00121               /*
00122                         interface/
00123                 ChargeDrifterFP420.h
00124                 CDrifterFP420.h
00125                 EnergySegmentFP420.h
00126                 AmplitudeSegmentFP420.h
00127                         src/
00128                 ChargeDrifterFP420.cc
00129               */
00130               CDividerFP420* theCDividerFP420;
00131               /*
00132                         interface/
00133                         CDividerFP420.h
00134                         EnergySegmentFP420.h
00135               */
00137               /*
00138                         interface/
00139                         ChargeDividerFP420.h
00140                         LandauFP420.h
00141                         src/
00142                         ChargeDividerFP420.cc
00143                         LandauFP420.cc
00144               */
00146               /*
00147                           interface/
00148                           IChargeFP420.h            
00149                           InduceChargeFP420.h
00150                           src/
00151                           InduceChargeFP420.cc
00152               */
00153 
00154   GaussNoiseFP420* theGNoiseFP420;
00155   PileUpFP420* thePileUpFP420;
00156   HitDigitizerFP420* theHitDigitizerFP420;
00157   ZeroSuppressFP420* theZSuppressFP420;
00158   DigiConverterFP420* theDConverterFP420;
00159 
00160   int theStripsInChip;           // num of columns per APV (for strip ineff.)
00161 
00162   int numStripsX;    // number of Xstrips in the module
00163   int numStripsY;    // number of Ystrips in the module
00164   int numStrips;    // number of strips in the module
00165   int numStripsXW;    // number of Xstrips in the module
00166   int numStripsYW;    // number of Ystrips in the module
00167   int numStripsW;    // number of strips in the module
00168 
00169   //  int numStripsMax;    // max number of strips in the module
00170   float moduleThickness; // plate thickness 
00171 
00172   FP420NumberingScheme * theFP420NumberingScheme;
00173 
00174   void push_digis(const DigitalMapType&,
00175                   const HitToDigisMapType&,
00176                   const PileUpFP420::signal_map_type&
00177                   );
00178                                                                                                   
00179   //-- calibration smearing
00180   bool doMissCalibrate;         // Switch on the calibration smearing
00181   float theGainSmearing;        // The sigma of the gain fluctuation (around 1)
00182   float theOffsetSmearing;      // The sigma of the offset fluct. (around 0)
00183                                                                                                   
00184   // The PDTable
00185 //  HepPDTable *particleTable;
00186                                                                                                   
00187   //-- charge fluctuation
00188   double tMax;  // The delta production cut, should be as in OSCAR = 30keV
00189                 //                                           cmsim = 100keV
00190   // The eloss fluctuation class from G4. Is the right place?
00191   LandauFP420 fluctuate; //
00192   GaussNoiseProducerFP420* theNoiser; //
00193   std::vector<const PSimHit*> ss;  // ss - pointers to hit info of PSimHit
00194                                                                                                   
00195   void fluctuateEloss(int particleId, float momentum, float eloss,
00196                       float length, int NumberOfSegments,
00197                       float elossVector[]);
00198                                                                                                   
00199 //  std::vector<HDigiFP420> internal_coll; //empty vector of HDigiFP420 used in digitize // AZ
00200 
00201 
00202   std::vector<HDigiFP420> digis;
00203 
00204 
00205 //  std::vector<HDigiFP420> digitize(StripGeomDetUnit *det);    // AZ
00206 //  int rn0,pn0,sn0;                                                                                          
00207                                                                                                   
00208 };
00209                                                                                                   
00210 
00211 
00212 // end of interface
00214 
00215 #endif
00216