Added two missing includes to allow macro compilation (thanks to Laurent for remarkin...
[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 }
56
57 virtual void SetTimeOffset(Float_t to){fTimeOffset = to;}
58 virtual Float_t GetTimeOffset()const {return fTimeOffset;}
59 virtual Float_t GetTimeZero(Int_t modIndex){
60 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods){
61 AliError(Form("SDD module number %d out of range",modIndex));
62 return 0.;
3176641e 63 }
69b82143 64 return fTimeZero[modIndex-kNSPDmods];
65 }
66 virtual Float_t GetDeltaVDrift(Int_t modIndex){
67 if(modIndex<kNSPDmods || modIndex>kNSPDmods+kNSDDmods){
68 AliError(Form("SDD module number %d out of range",modIndex));
69 return 0.;
3176641e 70 }
69b82143 71 return fDeltaVDrift[modIndex-kNSPDmods];
72 }
73 static Float_t DefaultTimeOffset() {return fgkTimeOffsetDefault;}
a66a0eb6 74
69b82143 75 virtual void SetADC2keV(Float_t conv){fADC2keV=conv;}
d644eb2d 76 virtual void SetChargevsTime(Float_t slope){fChargevsTime=slope;}
69b82143 77 virtual Float_t GetADC2keV()const {return fADC2keV;}
d644eb2d 78 virtual Float_t GetChargevsTime()const {return fChargevsTime;}
79
80 static Float_t DefaultADC2keV() {return fgkADC2keVDefault;}
81 static Float_t DefaultChargevsTime() {return fgkChargevsTimeDefault;}
a66a0eb6 82
69b82143 83 static Float_t GetCarlosRXClockPeriod() {return fgkCarlosRXClockPeriod;}
8ba39da9 84
8ba39da9 85
48058160 86 protected:
fcf95fc7 87
69b82143 88 enum {kNSPDmods = 240};
89 enum {kNSDDmods = 260};
90 enum {kNLaddersLay3 = 14};
91 enum {kNLaddersLay4 = 22};
3176641e 92
93
69b82143 94 static const Float_t fgkTimeOffsetDefault; // default for fTimeOffset
95 static const Float_t fgkADC2keVDefault; // default for fADC2keV
d644eb2d 96 static const Float_t fgkChargevsTimeDefault; // default for fChargevsTime
69b82143 97 static const Float_t fgkCarlosRXClockPeriod; // clock period for CarlosRX
703a4e51 98
69b82143 99 Float_t fTimeOffset; // Time offset due to electronic delays
100 // --> obsolete, kept for backw. comp.
101 Float_t fTimeZero[kNSDDmods]; // Time Zero for each module
102 Float_t fDeltaVDrift[kNSDDmods]; // Vdrift correction (um/ns) for each module
103 Float_t fADC2keV; // Conversion factor from ADC to keV
d644eb2d 104 Float_t fChargevsTime; // Correction for zero suppression effect
105
703a4e51 106 private:
703a4e51 107
69b82143 108 AliITSresponseSDD(const AliITSresponseSDD &ob); // copy constructor
109 AliITSresponseSDD& operator=(const AliITSresponseSDD & /* source */); // ass. op.
fa1750f9 110
d644eb2d 111 ClassDef(AliITSresponseSDD,18)
69b82143 112
50d05d7b 113 };
b0f5e3fc 114#endif