]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSDD.cxx
Use for PID in ITS the Bethe Bloch from AliExternalTrackParam
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
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  **************************************************************************/
15
16 /* $Id$ */
17
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                                     //
23 //                                                  //
24 //                                                  //
25 //////////////////////////////////////////////////////
26
27 #include <TMath.h>
28
29 #include "AliITSresponseSDD.h"
30 #include <AliITSgeomTGeo.h>
31
32 const Float_t AliITSresponseSDD::fgkTimeOffsetDefault = 54.30;
33 const Float_t AliITSresponseSDD::fgkADC2keVDefault = 3.25;
34 const Float_t AliITSresponseSDD::fgkCarlosRXClockPeriod = 25.;
35 ClassImp(AliITSresponseSDD)
36
37 //_________________________________________________________________________
38 AliITSresponseSDD::AliITSresponseSDD():
39 TObject(),
40 fTimeOffset(fgkTimeOffsetDefault),
41 fADC2keV(fgkADC2keVDefault){
42   // default constructor
43   for(Int_t i=0; i<kNSDDmods;i++){
44     fTimeZero[i]=fgkTimeOffsetDefault;
45     fDeltaVDrift[i]=0.;
46   }  
47 }
48 //_________________________________________________________________________
49 void AliITSresponseSDD::SetHalfLadderATimeZero(Int_t lay, Int_t lad, Float_t tzero){
50   // Sets time Zero for all modules of a ladder on side A (Z>0)
51   Int_t minMod,maxMod;
52   if(lay==3){
53     minMod=1; 
54     maxMod=3;
55     if(lad>kNLaddersLay3){
56       AliError(Form("Ladder number %d out of range",lad));
57       return;
58     }
59   }else if(lay==4){
60     minMod=1; 
61     maxMod=4;
62     if(lad>kNLaddersLay4){
63       AliError(Form("Ladder number %d out of range",lad));
64       return;
65     }
66   }else{
67     AliError(Form("Layer number %d out of range",lay));
68     return;
69   }
70   for(Int_t iMod=minMod; iMod<=maxMod; iMod++){
71     Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod);
72     SetModuleTimeZero(modIndex,tzero);
73   }
74 }
75 //_________________________________________________________________________
76 void AliITSresponseSDD::SetHalfLadderCTimeZero(Int_t lay, Int_t lad, Float_t tzero){
77   // Sets time Zero for all modules of a ladder on side C (Z<0)
78   Int_t minMod,maxMod;
79   if(lay==3){
80     minMod=4; 
81     maxMod=6;
82     if(lad>kNLaddersLay3){
83       AliError(Form("Ladder number %d out of range",lad));
84       return;
85     }
86   }else if(lay==4){
87     minMod=5; 
88     maxMod=8;
89     if(lad>kNLaddersLay4){
90       AliError(Form("Ladder number %d out of range",lad));
91       return;
92     }
93   }else{
94     AliError(Form("Layer number %d out of range",lay));
95     return;
96   }
97   for(Int_t iMod=minMod; iMod<=maxMod; iMod++){
98     Int_t modIndex=AliITSgeomTGeo::GetModuleIndex(lay,lad,iMod);
99     SetModuleTimeZero(modIndex,tzero);
100   }
101 }