Some clean-up in AliITSresponse classes + coding conventions
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSRESPONSESSD_H
2#define ALIITSRESPONSESSD_H
3
4#include "AliITSresponse.h"
5
1ca7869b 6
b0f5e3fc 7// response for SSD
8
9//-----------------------------
6a407881 10class AliITSresponseSSD : public AliITSresponse {
11
12 public:
13 AliITSresponseSSD();
9de0700b 14 AliITSresponseSSD(const char *dataType);
6a407881 15 virtual ~AliITSresponseSSD();
6a407881 16
703a4e51 17// Implementation of virtual member functions declared in AliITSresponse
18 virtual void SetDiffCoeff(Float_t p1,Float_t /* dummy */) {
6a407881 19 // Diffusion coefficient
703a4e51 20 fDiffCoeff=p1; }
21 virtual void DiffCoeff(Float_t &diffc,Float_t & /* dummy */) const {
6a407881 22 // Get diffusion coefficient
703a4e51 23 diffc= fDiffCoeff;
6a407881 24 }
25
703a4e51 26 virtual void SetNoiseParam(Float_t np, Float_t nn) {
6a407881 27 // set noise par
28 fNoiseP=np; fNoiseN=nn;
29 }
703a4e51 30 virtual void GetNoiseParam(Float_t &np, Float_t &nn) const {
6a407881 31 // get noise par
32 np=fNoiseP; nn=fNoiseN;
33 }
34
703a4e51 35 virtual void SetParamOptions(const char *opt1, const char *opt2) {
6a407881 36 // parameters: "SetInvalid" to simulate the invalid strips
37 fOption1=opt1; fOption2=opt2;
38 }
703a4e51 39 virtual void ParamOptions(char *opt1,char *opt2) const {
6a407881 40 // options
41 strcpy(opt1,fOption1.Data()); strcpy(opt2,fOption2.Data());
42 }
43
44 // Number of parameters to be set
45 // 4 couplings, mean number of invalid strips, RMS of invalid strips
703a4e51 46 virtual void SetNDetParam(Int_t npar) {
6a407881 47 // set number of param
48 fNPar=npar;
49 }
50
51 virtual void SetDetParam(Float_t *par);
52
53 // Parameters options
bff7ba71 54 virtual Int_t NDetParam() const {
6a407881 55 // number of param
56 return fNPar;
57 }
703a4e51 58 virtual void GetDetParam(Float_t *dpar) const;
6a407881 59
703a4e51 60 virtual void SetSigmaSpread(Float_t p1, Float_t p2) {
6a407881 61 // Set sigmas of the charge spread function: Pside-Nside
62 // square of (microns)
63 fSigmaP=p1; fSigmaN=p2;
64 }
703a4e51 65 virtual void SigmaSpread(Float_t &sP, Float_t &sN) const {
6a407881 66 // Get sigmas for the charge spread
67 sP=fSigmaP; sN=fSigmaN;
68 }
703a4e51 69
70//Declaration of member functions peculiar to this class
71
72// Sets electron-hole pairs to ADC value conversion factor
73// are rather arbitrary (need tuning)
74// minimum ionizing particle--> ~30000 pairs--> ADC channel 50
75 void SetADCpereV(Float_t a=50./30000.0){fADCpereV = a;}
76// Converts electron-hole pairs to
77// ADC value conversion factor are rather arbitrary (need tuning)
78// minimum ionizing particle--> ~30000 pairs--> ADC channel 50
79 Double_t DEvToADC(Double_t eV){return eV*fADCpereV;}
80 Int_t IEvToADC(Double_t eV){ // Converts electron-hole pairs to
2aea926d 81 // ADC value
703a4e51 82 return ((Int_t) DEvToADC(eV)); }
83
84 //abstract methods in AliITSresponse not implemented in this class
85 virtual void SetDriftSpeed(Float_t /* p1 */)
86 {NotImplemented("SetDriftSpeed");}
87 virtual Float_t DriftSpeed() const
88 {NotImplemented("DrifSpeed"); return 0.;}
89 virtual void SetElectronics(Int_t /* i */)
90 {NotImplemented("SetElectronics");}
91 virtual Int_t Electronics() const {NotImplemented("Electronics"); return 0;}
92 virtual void GiveCompressParam(Int_t *) const
93 {NotImplemented("GiveCompressParam");}
94 virtual void SetMaxAdc(Float_t /* adc */) {NotImplemented("SetMaxAdc");}
95 virtual Float_t MaxAdc() const {NotImplemented("MaxAdc"); return 0.;}
96 virtual void SetDynamicRange(Float_t /*dr */)
97 {NotImplemented("SetDynamicRange");}
98 virtual Float_t DynamicRange() const
99 {NotImplemented("DynamicRange"); return 0.;}
100 virtual void SetChargeLoss(Float_t /* cl */)
101 {NotImplemented("SetChargeLoss"); }
102 virtual Float_t ChargeLoss() const
103 {NotImplemented("ChargeLoss"); return 0.;}
104 virtual void SetThresholds(Float_t /* a */, Float_t /* b */)
105 {NotImplemented("SetThresholds");}
106 virtual void Thresholds(Float_t & /* a */, Float_t & /* b */) const
107 {NotImplemented("Thresholds");}
108 virtual void SetZeroSupp(const char*)
109 {NotImplemented("SetZeroSupp");}
110 virtual const char *ZeroSuppOption() const
111 {NotImplemented("ZeroSuppression"); return "";}
112 virtual void SetNSigmaIntegration(Float_t)
113 {NotImplemented("SetNSigmaIntegration");}
114 virtual Float_t NSigmaIntegration() const
115 {NotImplemented("NSigmaIntegration"); return 0.;}
116 virtual void SetNLookUp(Int_t)
117 {NotImplemented("SetNLookUp");}
b0f5e3fc 118
6a407881 119 protected:
703a4e51 120 static const Float_t fgkDiffCoeffDefault; //default for fDiffCoeff
121 static const TString fgkOption1Default; // default for fOption1
122 static const TString fgkOption2Default; // default for fOption2
123 static const Float_t fgkNoiseNDefault; // default for fNoiseN
124 static const Float_t fgkNoisePDefault; // default for fNoiseP
125 static const Int_t fgkNParDefault; // default for fNPar
126 static const Float_t fgkSigmaPDefault; //default for fSigmaP
127 static const Float_t fgkSigmaNDefault; //default for fSigmaP
6a407881 128 Int_t fNPar; // Number of detector param
129 Float_t *fDetPar; //[fNPar] Array of parameters
130
131 Float_t fNoiseP; // Noise on Pside
132 Float_t fNoiseN; // Noise on Nside
b0f5e3fc 133
6a407881 134 Float_t fSigmaP; // Sigma charge spread on Pside
135 Float_t fSigmaN; // Sigma charge spread on Nside
136 Float_t fDiffCoeff; // Diffusion Coefficient
b0f5e3fc 137
6a407881 138 Float_t fADCpereV; // Constant to convert eV to ADC.
b0f5e3fc 139
6a407881 140 TString fOption1; // Simulate invalid strips option
141 TString fOption2; // Not used for the moment
703a4e51 142
143 private:
144 AliITSresponseSSD(const AliITSresponseSSD &source); // copy constructor
145 AliITSresponseSSD& operator=(const AliITSresponseSSD &source); // ass. op.
b0f5e3fc 146
6a407881 147 ClassDef(AliITSresponseSSD,1) //Response class for SSD
148};
b0f5e3fc 149#endif