]>
Commit | Line | Data |
---|---|---|
451f5018 | 1 | #ifndef ALIITSUSIMULATIONPIX_H |
2 | #define ALIITSUSIMULATIONPIX_H | |
3 | ||
4 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //////////////////////////////////////////////////////////// | |
8 | // Simulation class for upgrade pixels // | |
9 | //////////////////////////////////////////////////////////// | |
10 | ||
4fa9d550 | 11 | #include <TObjArray.h> |
451f5018 | 12 | #include "AliITSUSimulation.h" |
13 | #include "AliITSUSegmentationPix.h" | |
14 | ||
15 | class TH1F; | |
16 | class AliITSUModule; | |
17 | class AliITSUSimuParam; | |
29ad4146 | 18 | class AliITSUParamList; |
19 | class TH2; | |
451f5018 | 20 | |
21 | //------------------------------------------------------------------- | |
22 | ||
23 | class AliITSUSimulationPix : public AliITSUSimulation { | |
24 | public: | |
c92b1537 | 25 | enum {kCellX1,kCellX2,kCellZ1,kCellZ2,kCellYDepth,kNDtSpread}; // data used for ch. spread integral calc. |
26 | // | |
27 | // charge spread functions defined | |
b2679935 | 28 | enum {kSpreadFunGauss2D // single gaussian in 2D, SpreadFunGauss2D |
29 | ,kSpreadFunDoubleGauss2D // double gaussian in 2D, SpreadFunDoubleGauss2D | |
30 | ,kSpreadFunHisto // use 2D histo from the object stored in fResponseParam | |
31 | ,kNSpreadFuns | |
c92b1537 | 32 | }; |
29ad4146 | 33 | // These are enums for interpretation of the entries in the AliITSUParamList*fResponseParam : |
34 | // object to holding the sensor-specific response data | |
35 | // fist kParamStart entries of spread fun params are reserved for common parameters | |
b2679935 | 36 | enum {kChargeSpreadType // charge spread function type, one of kNSpreadFuns types |
37 | ,kSpreadFunParamNXoffs // number of pixels to consider +- from injection point (in X) | |
38 | ,kSpreadFunParamNZoffs // number of pixels to consider +- from injection point (in Z) | |
39 | ,kSpreadFunMinSteps // the single hit charge is divided into kSpreadFunMinSteps (minimum is 3) | |
40 | ,kReadOutSchemeType // readout type strobe, rolling shutter etc | |
41 | ,kReadOutCycleLength // full readout cycle window | |
42 | ,kSpreadFunGlobalQScale // Global charge scaling factor to match tes beam results to simu (Geant3) | |
43 | ,kPixSNDisrcCut // S/N cut applied at discrimination level | |
44 | ,kPixMinElToAdd // Min number of electrons to add to sdig | |
45 | ,kPixNoiseIsOn // Turn Pixel Noise on | |
46 | ,kPixNoiseInAllMod // To apply pixel noise in all modules, if not only on ones where there is a hit | |
47 | ,kPixNoiseMPV // Pixel noise MPV | |
48 | ,kPixNoiseSigma // Pixel noise sigma | |
49 | ,kPixFakeRate // Pixel fake rate | |
29ad4146 | 50 | // |
b2679935 | 51 | ,kNReservedParams=20 // some reserved slots |
52 | ,kParamStart = kNReservedParams // user parameters must start from this slot | |
c92b1537 | 53 | }; |
0ebc85cf | 54 | // |
55 | // defined readout types: | |
b2679935 | 56 | enum {kReadOutStrobe // hits in static time window fReadOutCycleLength wrt offset fReadOOutCycleOffset (global for sensor) are seen |
57 | ,kReadOutRollingShutter // hits in rolling (row-wise) window are seen (see GetReadOutCycleRollingShutter) | |
58 | ,kNReadOutTypes | |
59 | }; | |
69e0f089 | 60 | // elements of the SpreadFunGauss2D parameterization (offsetted by kParamStart) |
61 | enum {kG1MeanX=kParamStart,kG1SigX,kG1MeanZ,kG1SigZ,kNG1Par}; | |
62 | // elements of the SpreadFunDoubleGauss2D parameterization (offsetted by kParamStart) | |
63 | enum {kG2MeanX0=kParamStart,kG2SigX0,kG2MeanZ0,kG2SigZ0,kG2MeanX1,kG2SigX1,kG2MeanZ1,kG2SigZ1,kG2ScaleG2,kNG2Par}; | |
c92b1537 | 64 | // |
451f5018 | 65 | AliITSUSimulationPix(); |
66 | AliITSUSimulationPix(AliITSUSimuParam* sim,AliITSUSensMap* map); | |
67 | virtual ~AliITSUSimulationPix(); | |
68 | AliITSUSimulationPix(const AliITSUSimulationPix &source); | |
69 | AliITSUSimulationPix& operator=(const AliITSUSimulationPix &s); | |
70 | void Init(); | |
71 | // | |
72 | void FinishSDigitiseModule(); | |
c92b1537 | 73 | void DigitiseModule(); |
451f5018 | 74 | // |
c92b1537 | 75 | void SDigitiseModule(); |
451f5018 | 76 | void WriteSDigits(); |
c92b1537 | 77 | void Hits2SDigits(); |
78 | void Hits2SDigitsFast(); | |
451f5018 | 79 | void AddNoisyPixels(); |
80 | void RemoveDeadPixels(); | |
81 | void FrompListToDigits(); | |
344d4ff3 | 82 | // |
1cdd0456 | 83 | Int_t AddRandomNoisePixels(Double_t tof=0); |
451f5018 | 84 | Bool_t SetTanLorAngle(Double_t WeightHole=1.0); |
85 | Double_t GetTanLorAngle() const {return fTanLorAng;}; | |
86 | // | |
87 | // For backwards compatibility | |
88 | void SDigitsToDigits(){ FinishSDigitiseModule();} | |
344d4ff3 | 89 | // |
c92b1537 | 90 | Double_t SpreadFunDoubleGauss2D(const Double_t *dtIn); |
91 | Double_t SpreadFunGauss2D(const Double_t *dtIn); | |
29ad4146 | 92 | Double_t SpreadFrom2DHisto(const Double_t *dtIn); |
c92b1537 | 93 | // |
29ad4146 | 94 | virtual void SetResponseParam(AliITSUParamList* resp); |
451f5018 | 95 | // |
b2679935 | 96 | Int_t GetReadOutCycle(Int_t row, Int_t col, Double_t hitTime); |
97 | Int_t GetReadOutCycleRollingShutter(Int_t row, Int_t col, Double_t hitTime); | |
29ad4146 | 98 | // |
ee58ce21 | 99 | void CalcDiodeShiftInPixel(Int_t xrow, Int_t zcol, Float_t &x, Float_t &z); |
0ebc85cf | 100 | // |
451f5018 | 101 | private: |
c92b1537 | 102 | void SpreadCharge2D(Double_t x0,Double_t z0, Double_t dy, Int_t ix0,Int_t iz0, |
1843e6f3 | 103 | Double_t el, Double_t tof, Int_t tID, Int_t hID); |
451f5018 | 104 | // |
120e5202 | 105 | void SetCoupling(AliITSUSDigit* old); // "New" coupling routine Tiziano Virgili |
106 | void SetCouplingOld(AliITSUSDigit* old); // "Old" coupling routine Rocco Caliandro | |
451f5018 | 107 | // |
108 | protected: | |
0ebc85cf | 109 | Double_t fTanLorAng; //! Tangent of the Lorentz Angle (weighted average for hole and electrons) |
29ad4146 | 110 | Double_t fGlobalChargeScale; // Charge scaling to match Geant and Test beam |
c92b1537 | 111 | // |
29ad4146 | 112 | TH2* fSpread2DHisto; //! optional 2D histo for charge spread parameterization |
c92b1537 | 113 | Double_t (AliITSUSimulationPix::*fSpreadFun)(const Double_t *dtIn); //! pointer on current spread function |
b2679935 | 114 | Int_t (AliITSUSimulationPix::*fROTimeFun)(Int_t row,Int_t col, Double_t hitTime); //! pointer on current R/O time check function |
c92b1537 | 115 | |
451f5018 | 116 | ClassDef(AliITSUSimulationPix,1) // Simulation of pixel clusters |
117 | }; | |
118 | #endif |