Modifed MC analysis (A. Grelli)
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSRESPONSESDD_H
2#define ALIITSRESPONSESDD_H
48058160 3
c2bd28b6 4/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
48058160 5 * See cxx source for full Copyright notice */
6
88cb7938 7
253e68a0 8#include <TObject.h>
3176641e 9#include <AliLog.h>
b0f5e3fc 10
c2bd28b6 11/* $Id$ */
12
fcf95fc7 13/////////////////////////////////////////////////////////////
14// Base settings for the ITS response classes. //
15// The data member of this class are static and set once //
16// for all the modules. //
17/////////////////////////////////////////////////////////////
b0f5e3fc 18
253e68a0 19class AliITSresponseSDD : public TObject {
69b82143 20 public:
21
22 AliITSresponseSDD();
23 virtual ~AliITSresponseSDD(){};
24
25 virtual void SetSideATimeZero(Float_t tzero){
26 SetLayer3ATimeZero(tzero);
27 SetLayer4ATimeZero(tzero);
28 }
29 virtual void SetSideCTimeZero(Float_t tzero){
30 SetLayer3CTimeZero(tzero);
31 SetLayer4CTimeZero(tzero);
32 }
33 virtual void SetLayer3ATimeZero(Float_t tzero){
34 for(Int_t iLad=1; iLad<=kNLaddersLay3; iLad++) SetHalfLadderATimeZero(3,iLad,tzero);
35 }
36 virtual void SetLayer3CTimeZero(Float_t tzero){
37 for(Int_t iLad=1; iLad<=kNLaddersLay3; iLad++) SetHalfLadderCTimeZero(3,iLad,tzero);
38 }
39 virtual void SetLayer4ATimeZero(Float_t tzero){
40 for(Int_t iLad=1; iLad<=kNLaddersLay4; iLad++) SetHalfLadderATimeZero(4,iLad,tzero);
41 }
42 virtual void SetLayer4CTimeZero(Float_t tzero){
43 for(Int_t iLad=1; iLad<=kNLaddersLay4; iLad++) SetHalfLadderCTimeZero(4,iLad,tzero);
44 }
45 virtual void SetHalfLadderATimeZero(Int_t lay, Int_t lad, Float_t tzero);
46 virtual void SetHalfLadderCTimeZero(Int_t lay, Int_t lad, Float_t tzero);
47 virtual void SetModuleTimeZero(Int_t modIndex, Float_t tzero){
48 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods) AliError(Form("SDD module number %d out of range",modIndex));
49 fTimeZero[modIndex-kNSPDmods]=tzero;
50 }
51
52 virtual void SetDeltaVDrift(Int_t modIndex, Float_t dv){
53 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods) AliError(Form("SDD module number %d out of range",modIndex));
54 fDeltaVDrift[modIndex-kNSPDmods]=dv;
55 }
57019696 56 virtual Float_t GetDeltaVDrift(Int_t modIndex) const {
57 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods){
58 AliError(Form("SDD module number %d out of range",modIndex));
59 return 0.;
60 }
61 return fDeltaVDrift[modIndex-kNSPDmods];
62 }
69b82143 63
57019696 64 static Float_t DefaultTimeOffset() {return fgkTimeOffsetDefault;}
69b82143 65 virtual void SetTimeOffset(Float_t to){fTimeOffset = to;}
66 virtual Float_t GetTimeOffset()const {return fTimeOffset;}
57019696 67 virtual Float_t GetTimeZero(Int_t modIndex) const {
69b82143 68 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods){
69 AliError(Form("SDD module number %d out of range",modIndex));
70 return 0.;
3176641e 71 }
69b82143 72 return fTimeZero[modIndex-kNSPDmods];
73 }
57019696 74
75 virtual void SetADC2keV(Float_t conv){fADC2keV=conv;}
76 virtual Float_t GetADC2keV()const {return fADC2keV;}
77 virtual void SetADCtokeV(Int_t modIndex, Float_t conv){
78 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods) AliError(Form("SDD module number %d out of range",modIndex));
79 fADCtokeV[modIndex-kNSPDmods]=conv;
80 }
81 virtual Float_t GetADCtokeV(Int_t modIndex) const {
69b82143 82 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods){
83 AliError(Form("SDD module number %d out of range",modIndex));
84 return 0.;
3176641e 85 }
57019696 86 return fADCtokeV[modIndex-kNSPDmods];
69b82143 87 }
a66a0eb6 88
d644eb2d 89 virtual void SetChargevsTime(Float_t slope){fChargevsTime=slope;}
d644eb2d 90 virtual Float_t GetChargevsTime()const {return fChargevsTime;}
91
92 static Float_t DefaultADC2keV() {return fgkADC2keVDefault;}
93 static Float_t DefaultChargevsTime() {return fgkChargevsTimeDefault;}
a66a0eb6 94
69b82143 95 static Float_t GetCarlosRXClockPeriod() {return fgkCarlosRXClockPeriod;}
8ba39da9 96
8ba39da9 97
48058160 98 protected:
fcf95fc7 99
69b82143 100 enum {kNSPDmods = 240};
101 enum {kNSDDmods = 260};
102 enum {kNLaddersLay3 = 14};
103 enum {kNLaddersLay4 = 22};
3176641e 104
105
69b82143 106 static const Float_t fgkTimeOffsetDefault; // default for fTimeOffset
107 static const Float_t fgkADC2keVDefault; // default for fADC2keV
d644eb2d 108 static const Float_t fgkChargevsTimeDefault; // default for fChargevsTime
69b82143 109 static const Float_t fgkCarlosRXClockPeriod; // clock period for CarlosRX
703a4e51 110
69b82143 111 Float_t fTimeOffset; // Time offset due to electronic delays
112 // --> obsolete, kept for backw. comp.
113 Float_t fTimeZero[kNSDDmods]; // Time Zero for each module
114 Float_t fDeltaVDrift[kNSDDmods]; // Vdrift correction (um/ns) for each module
115 Float_t fADC2keV; // Conversion factor from ADC to keV
57019696 116 // --> obsolete, kept for backw. comp.
d644eb2d 117 Float_t fChargevsTime; // Correction for zero suppression effect
57019696 118 Float_t fADCtokeV[kNSDDmods]; // ADC to keV conversion for each module
119
703a4e51 120 private:
703a4e51 121
69b82143 122 AliITSresponseSDD(const AliITSresponseSDD &ob); // copy constructor
123 AliITSresponseSDD& operator=(const AliITSresponseSDD & /* source */); // ass. op.
fa1750f9 124
57019696 125 ClassDef(AliITSresponseSDD,19)
69b82143 126
50d05d7b 127 };
b0f5e3fc 128#endif