]>
Commit | Line | Data |
---|---|---|
451f5018 | 1 | #ifndef ALIITSUSIMUPARAM_H |
2 | #define ALIITSUSIMUPARAM_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // Class to store the parameters used in the simulation ITS // | |
10 | // // | |
11 | /////////////////////////////////////////////////////////////////// | |
12 | #include <TRandom.h> | |
13 | #include <TObject.h> | |
c92b1537 | 14 | #include <TObjArray.h> |
451f5018 | 15 | #include <TMath.h> |
29ad4146 | 16 | #include <TF1.h> |
02d6eccc | 17 | #include "AliMathBase.h" |
29ad4146 | 18 | class AliITSUParamList; |
451f5018 | 19 | |
20 | class AliITSUSimuParam : public TObject { | |
21 | ||
22 | public: | |
120e5202 | 23 | enum {kNoCouplingPix,kOldCouplingPix,kNewCouplingPix,kMaxCouplingOptPix}; |
451f5018 | 24 | // |
25 | AliITSUSimuParam(); | |
4fa9d550 | 26 | AliITSUSimuParam(UInt_t nPix); |
451f5018 | 27 | AliITSUSimuParam(const AliITSUSimuParam& simpar); |
28 | // assignment operator | |
29 | AliITSUSimuParam& operator=(const AliITSUSimuParam& source); | |
30 | ~AliITSUSimuParam(); | |
31 | ||
4fa9d550 | 32 | Double_t ApplyPixBaselineAndNoise(UInt_t mod) const; |
451f5018 | 33 | Double_t CalcProbNoiseOverThreshold(UInt_t mod) const; |
34 | // | |
4fa9d550 | 35 | void SetPixThreshold(Double_t thresh, Double_t sigma, int mod=-1); |
36 | void SetPixMinElToAdd(Double_t nel) {fPixMinElToAddDef = nel;} | |
37 | void GetPixThreshold(UInt_t mod, Double_t& thresh, Double_t& sigma) const; | |
38 | Double_t GetPixThreshold(UInt_t mod) const; | |
39 | Double_t GetPixMinElToAdd() const {return fPixMinElToAddDef;} | |
451f5018 | 40 | // |
29ad4146 | 41 | void SetPixFakeRate(Double_t frate) { fPixFakeRateDef = frate;} |
42 | Double_t GetPixFakeRate() const {return fPixFakeRateDef;} | |
43 | // | |
44 | void SetPixNoiseInAllMod(Bool_t ison) {fPixNoiseInAllMod = ison;} | |
45 | Bool_t GetPixNoiseInAllMod() const {return fPixNoiseInAllMod;} | |
46 | // | |
4fa9d550 | 47 | void SetPixNoise(Double_t noise, Double_t baseline, Int_t mod=-1); |
48 | void GetPixNoise(UInt_t mod,Double_t &noise, Double_t &baseline) const; | |
451f5018 | 49 | // |
4fa9d550 | 50 | void SetPixBiasVoltage(Double_t bias=18.182,Int_t mod=-1); |
51 | Double_t GetPixBiasVoltage(UInt_t mod) const; | |
451f5018 | 52 | |
53 | ||
54 | void SetGeVToCharge(Double_t gc=fgkNcompsDefault) {fGeVcharge = gc;} | |
29ad4146 | 55 | Double_t GetGeVToCharge() const {return fGeVcharge;} |
56 | Double_t GeVToCharge(Double_t gev) const {return gev/fGeVcharge;} | |
451f5018 | 57 | // |
4fa9d550 | 58 | void SetPixCouplingOption(UInt_t opt); |
59 | UInt_t GetPixCouplingOption() const {return fPixCouplOpt;} | |
451f5018 | 60 | |
4fa9d550 | 61 | void SetPixCouplingParam(Double_t col, Double_t row) {fPixCouplCol = col; fPixCouplRow = row;} |
62 | void GetPixCouplingParam(Double_t &col, Double_t &row) const {col = fPixCouplCol; row = fPixCouplRow;} | |
451f5018 | 63 | |
4fa9d550 | 64 | void SetPixLorentzDrift(Bool_t ison) {fPixLorentzDrift=ison;} |
65 | Bool_t GetPixLorentzDrift() const {return fPixLorentzDrift;} | |
66 | void SetPixLorentzHoleWeight(Double_t weight) {fPixLorentzHoleWeight=weight;} | |
67 | Double_t GetPixLorentzHoleWeight() const {return fPixLorentzHoleWeight;} | |
451f5018 | 68 | |
4fa9d550 | 69 | void SetPixAddNoisyFlag(Bool_t value) {fPixAddNoisyFlag = value;} |
70 | Bool_t GetPixAddNoisyFlag() const {return fPixAddNoisyFlag;} | |
71 | void SetPixRemoveDeadFlag(Bool_t value) {fPixRemoveDeadFlag = value;} | |
72 | Bool_t GetPixRemoveDeadFlag() const {return fPixRemoveDeadFlag;} | |
451f5018 | 73 | // |
29ad4146 | 74 | Double_t LorentzAngleElectron(Double_t bz) const; |
75 | Double_t LorentzAngleHole(Double_t bz) const; | |
451f5018 | 76 | // |
29ad4146 | 77 | Int_t GetNRespFunParams() const {return fRespFunParam.GetEntriesFast();} |
78 | const AliITSUParamList* GetRespFunParams(Int_t i) const {return (const AliITSUParamList*)fRespFunParam[i];} | |
79 | const AliITSUParamList* FindRespFunParams(Int_t detId) const; | |
80 | void AddRespFunParam(AliITSUParamList* pr); | |
c92b1537 | 81 | // |
29ad4146 | 82 | virtual void Print(Option_t *opt = "") const; |
451f5018 | 83 | // |
84 | static Double_t CalcProbNoiseOverThreshold(double base, double noise, double thresh); | |
85 | static Double_t GenerateNoiseQFunction(double prob, double mean, double sigma); | |
86 | // | |
87 | protected: | |
88 | ||
4fa9d550 | 89 | static const Double_t fgkPixBiasVoltageDefault;//default for fPixBiasVoltage |
90 | static const Double_t fgkPixThreshDefault; //default for fThresh | |
91 | static const Double_t fgkPixMinElToAddDefault; // default min number of electrons to add to sdigit | |
92 | static const Double_t fgkPixThrSigmaDefault; //default for fSigma | |
93 | static const Double_t fgkPixCouplColDefault; //default for fPixCouplCol | |
94 | static const Double_t fgkPixCouplRowDefault; //default for fPixCouplRow | |
95 | static const Double_t fgkPixEccDiffDefault;//default for fPixEccDiff | |
96 | static const Double_t fgkPixLorentzHoleWeightDefault;//default for fPixLorentzHoleWeight | |
97 | static const UInt_t fgkPixCouplingOptDefault; // type of pixel Coupling (old or new) | |
451f5018 | 98 | static const Double_t fgkDOverVDefault; // default distance over voltage |
99 | static const Double_t fgkGeVtoChargeDefault; // default energy to ionize (free an electron) in GeV | |
100 | static const Double_t fgkTDefault; // default temperature | |
29ad4146 | 101 | static const Double_t fgkPixFakeRateDefault; // default monopix fake rate |
102 | static const Bool_t fgkPixNoiseInAllMod; // default switch to add digital noise to every module | |
103 | ||
451f5018 | 104 | static const Double_t fgkNsigmasDefault; //default for fNsigmas |
105 | static const Int_t fgkNcompsDefault; //default for fNcomps | |
106 | ||
107 | private: | |
108 | // | |
109 | Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV | |
110 | Double_t fDOverV; // The parameter d/v where d is the disance over which the the potential v is applied d/v [cm/volts] | |
111 | Double_t fT; // The temperature of the Si in Degree K. | |
112 | // | |
4fa9d550 | 113 | UInt_t fNPix; // number of Pix type detectors |
114 | UInt_t fPixCouplOpt; // Pix Coupling Option | |
115 | Double_t fPixCouplCol; // Pix Coupling parameter along the cols | |
116 | Double_t fPixCouplRow; // Pix Coupling parameter along the rows | |
4fa9d550 | 117 | Bool_t fPixLorentzDrift; // Flag to decide whether to simulate the Lorentz Drift or not in Pix |
118 | Double_t fPixLorentzHoleWeight;// Lorentz Angle is computed for Pix as average of Hole and Electron | |
451f5018 | 119 | // this parameter gives the relative weights between the two |
4fa9d550 | 120 | Bool_t fPixAddNoisyFlag; // Flag saying whether noisy pixels should be added to digits |
121 | Bool_t fPixRemoveDeadFlag; // Flag saying whether dead pixels should be removed from digits | |
451f5018 | 122 | // |
29ad4146 | 123 | Double_t fPixThreshDef; // Pix Threshold value |
124 | Double_t fPixThrSigmaDef; // Pix Threshold fluctuation | |
125 | Double_t fPixBiasVoltageDef; // Bias Voltage for the Pix | |
126 | Double_t fPixNoiseDef; // Pix electronic noise: sigma | |
127 | Double_t fPixBaselineDef; // Pix electronic noise: baseline | |
128 | Double_t fPixMinElToAddDef; // min number of electrons to add | |
129 | Double_t fPixFakeRateDef; // Fake rate for the monopix | |
130 | Bool_t fPixNoiseInAllMod; // Add digital noise to every module | |
451f5018 | 131 | // |
4fa9d550 | 132 | Double_t* fPixThresh; //[fNPix] Pix Threshold value |
133 | Double_t* fPixThrSigma; //[fNPix] Pix Threshold fluctuation | |
134 | Double_t* fPixBiasVoltage; //[fNPix] Bias Voltage for the Pix | |
135 | Double_t* fPixSigma; //[fNPix] Pix threshold fluctuations spread | |
136 | Double_t* fPixNoise; //[fNPix] Pix electronic noise: sigma | |
137 | Double_t* fPixBaseline; //[fNPix] Pix electronic noise: baseline | |
451f5018 | 138 | // |
29ad4146 | 139 | TObjArray fRespFunParam; // set of parameterizations for response function (AliITSUParamList) |
451f5018 | 140 | |
02d6eccc | 141 | ClassDef(AliITSUSimuParam,1); // ITSU simulataion params |
451f5018 | 142 | }; |
143 | ||
451f5018 | 144 | |
145 | #endif |