]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponseSDD.cxx
Module by module ADC->keV conversion factor in SDD calibration -- updated code (F...
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.cxx
CommitLineData
b0f5e3fc 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2aea926d 3 * *
b0f5e3fc 4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
b9d0a01d 15
090026bf 16/* $Id$ */
17
fcf95fc7 18//////////////////////////////////////////////////////
19// Base response class forITS //
20// It is used to set static data members //
21// connected to parameters equal for all //
22// the modules //
703a4e51 23// //
24// //
25//////////////////////////////////////////////////////
50d05d7b 26
090026bf 27#include <TMath.h>
28
29#include "AliITSresponseSDD.h"
3176641e 30#include <AliITSgeomTGeo.h>
fcf95fc7 31
10add0d4 32const Float_t AliITSresponseSDD::fgkTimeOffsetDefault = 54.30;
d644eb2d 33const Float_t AliITSresponseSDD::fgkADC2keVDefault = 3.34;
34const Float_t AliITSresponseSDD::fgkChargevsTimeDefault = 0.00355;
de075dae 35const Float_t AliITSresponseSDD::fgkCarlosRXClockPeriod = 25.;
48058160 36ClassImp(AliITSresponseSDD)
50d05d7b 37
fcf95fc7 38//_________________________________________________________________________
4bfbde86 39AliITSresponseSDD::AliITSresponseSDD():
253e68a0 40TObject(),
a66a0eb6 41fTimeOffset(fgkTimeOffsetDefault),
d644eb2d 42fADC2keV(fgkADC2keVDefault),
43fChargevsTime(fgkChargevsTimeDefault){
50d05d7b 44 // default constructor
3176641e 45 for(Int_t i=0; i<kNSDDmods;i++){
46 fTimeZero[i]=fgkTimeOffsetDefault;
69b82143 47 fDeltaVDrift[i]=0.;
57019696 48 fADCtokeV[i]=fgkADC2keVDefault;
3176641e 49 }
50}
51//_________________________________________________________________________
52void AliITSresponseSDD::SetHalfLadderATimeZero(Int_t lay, Int_t lad, Float_t tzero){
53 // Sets time Zero for all modules of a ladder on side A (Z>0)
54 Int_t minMod,maxMod;
55 if(lay==3){
56 minMod=1;
57 maxMod=3;
58 if(lad>kNLaddersLay3){
59 AliError(Form("Ladder number %d out of range",lad));
60 return;
61 }
62 }else if(lay==4){
63 minMod=1;
64 maxMod=4;
65 if(lad>kNLaddersLay4){
66 AliError(Form("Ladder number %d out of range",lad));
67 return;
68 }
69 }else{
70 AliError(Form("Layer number %d out of range",lay));
71 return;
72 }
73 for(Int_t iMod=minMod; iMod<=maxMod; iMod++){
74 Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod);
75 SetModuleTimeZero(modIndex,tzero);
76 }
77}
78//_________________________________________________________________________
79void AliITSresponseSDD::SetHalfLadderCTimeZero(Int_t lay, Int_t lad, Float_t tzero){
80 // Sets time Zero for all modules of a ladder on side C (Z<0)
81 Int_t minMod,maxMod;
82 if(lay==3){
83 minMod=4;
84 maxMod=6;
85 if(lad>kNLaddersLay3){
86 AliError(Form("Ladder number %d out of range",lad));
87 return;
88 }
89 }else if(lay==4){
90 minMod=5;
91 maxMod=8;
92 if(lad>kNLaddersLay4){
93 AliError(Form("Ladder number %d out of range",lad));
94 return;
95 }
96 }else{
97 AliError(Form("Layer number %d out of range",lay));
98 return;
99 }
100 for(Int_t iMod=minMod; iMod<=maxMod; iMod++){
101 Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod);
102 SetModuleTimeZero(modIndex,tzero);
103 }
9de0700b 104}