fix reporting of writing speed when interrupted by signal.
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSRESPONSESSD_H
2#define ALIITSRESPONSESSD_H
3
4#include "AliITSresponse.h"
5
1ca7869b 6class TString;
7
b0f5e3fc 8// response for SSD
9
10//-----------------------------
6a407881 11class AliITSresponseSSD : public AliITSresponse {
12
13 public:
14 AliITSresponseSSD();
9de0700b 15 AliITSresponseSSD(const char *dataType);
6a407881 16 virtual ~AliITSresponseSSD();
17 AliITSresponseSSD(const AliITSresponseSSD &source); // copy constructor
18 AliITSresponseSSD& operator=(const AliITSresponseSSD &source); // ass. op.
19
20 virtual void SetDiffCoeff(Float_t p1=0.,Float_t dummy=0.) {
21 // Diffusion coefficient
ac74f489 22 fDiffCoeff=p1;dummy = 0.0;
6a407881 23 }
24 virtual void DiffCoeff(Float_t &diffc,Float_t &dummy) {
25 // Get diffusion coefficient
ac74f489 26 diffc= fDiffCoeff;dummy = 0.0;
6a407881 27 }
28
29 virtual void SetNoiseParam(Float_t np=420., Float_t nn=625.) {
30 // set noise par
31 fNoiseP=np; fNoiseN=nn;
32 }
33 virtual void GetNoiseParam(Float_t &np, Float_t &nn) {
34 // get noise par
35 np=fNoiseP; nn=fNoiseN;
36 }
37
38 virtual void SetParamOptions(const char *opt1="", const char *opt2="") {
39 // parameters: "SetInvalid" to simulate the invalid strips
40 fOption1=opt1; fOption2=opt2;
41 }
42 virtual void ParamOptions(char *opt1,char *opt2) {
43 // options
44 strcpy(opt1,fOption1.Data()); strcpy(opt2,fOption2.Data());
45 }
46
47 // Number of parameters to be set
48 // 4 couplings, mean number of invalid strips, RMS of invalid strips
49 virtual void SetNDetParam(Int_t npar=6) {
50 // set number of param
51 fNPar=npar;
52 }
53
54 virtual void SetDetParam(Float_t *par);
55
56 // Parameters options
bff7ba71 57 virtual Int_t NDetParam() const {
6a407881 58 // number of param
59 return fNPar;
60 }
61 virtual void GetDetParam(Float_t *dpar);
62
63 virtual void SetDataType(const char *data="simulated") {
64 // Type of data - real or simulated
65 fDataType=data;
66 }
67 virtual const char *DataType() const {
68 // Get data type
69 return fDataType.Data();
70 }
71
72 virtual void SetSigmaSpread(Float_t p1=3., Float_t p2=2.) {
73 // Set sigmas of the charge spread function: Pside-Nside
74 // square of (microns)
75 fSigmaP=p1; fSigmaN=p2;
76 }
77 virtual void SigmaSpread(Float_t &sP, Float_t &sN) {
78 // Get sigmas for the charge spread
79 sP=fSigmaP; sN=fSigmaN;
80 }
2aea926d 81 virtual void SetADCpereV(Float_t a=50./30000.0){ // Sets electron-hole
82 // pairs to ADC value conversion factor are rather arbitrary
83 // (need tuning) minimum ionizing particle--> ~30000 pairs--> ADC
84 // channel 50
6a407881 85 fADCpereV = a;
86 }
2aea926d 87 virtual Double_t DEvToADC(Double_t eV){ // Converts electron-hole pairs to
88 // ADC value conversion factor are rather arbitrary (need tuning)
6a407881 89 // minimum ionizing particle--> ~30000 pairs--> ADC channel 50
90 return eV*fADCpereV;
91 }
2aea926d 92 virtual Int_t IEvToADC(Double_t eV){ // Converts electron-hole pairs to
93 // ADC value
6a407881 94 return ((Int_t) DEvToADC(eV));
95 }
b0f5e3fc 96
6a407881 97 protected:
98 Int_t fNPar; // Number of detector param
99 Float_t *fDetPar; //[fNPar] Array of parameters
100
101 Float_t fNoiseP; // Noise on Pside
102 Float_t fNoiseN; // Noise on Nside
b0f5e3fc 103
6a407881 104 Float_t fSigmaP; // Sigma charge spread on Pside
105 Float_t fSigmaN; // Sigma charge spread on Nside
106 Float_t fDiffCoeff; // Diffusion Coefficient
b0f5e3fc 107
6a407881 108 Float_t fADCpereV; // Constant to convert eV to ADC.
b0f5e3fc 109
6a407881 110 TString fOption1; // Simulate invalid strips option
111 TString fOption2; // Not used for the moment
112 TString fDataType; // Type of data - real or simulated
b0f5e3fc 113
6a407881 114 ClassDef(AliITSresponseSSD,1) //Response class for SSD
115};
b0f5e3fc 116#endif