]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCalibrationSSD.cxx
added check for AliMUONDigitMaker::GetRawStreamTracker method to allow conditional...
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSSD.cxx
CommitLineData
fcf95fc7 1/**************************************************************************
b42cfa25 2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
fcf95fc7 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 **************************************************************************/
b42cfa25 15/* $Id$ */
fcf95fc7 16
17#include "AliITSCalibrationSSD.h"
18//////////////////////////////////////////////////////
19// Calibration class for set:ITS //
20// Specific subdetector implementation //
21// for silicon strips detectors //
22// //
23// //
24//////////////////////////////////////////////////////
25
fcf95fc7 26const Int_t AliITSCalibrationSSD::fgkNParDefault = 6;
fcf95fc7 27
28ClassImp(AliITSCalibrationSSD)
29
30//______________________________________________________________________
e56160b8 31AliITSCalibrationSSD::AliITSCalibrationSSD():
ced4d9bc 32 fModule(0),
e56160b8 33fNPar(0),
34fDetPar(0),
fb4dfab9 35fNoise(0),
5a88c45b 36fPedestal(),
fb4dfab9 37fGain(0),
38fBadChannels(0),
ced4d9bc 39fIsBad(kFALSE){
fcf95fc7 40 // Default Constructor
41
df1d5598 42 for(Int_t i=0;i<fgkChipsPerModule;i++){
43 fIsChipBad[i]=kFALSE;
44 }
fcf95fc7 45}
46//______________________________________________________________________
e56160b8 47AliITSCalibrationSSD::AliITSCalibrationSSD(const char *dataType):
ced4d9bc 48 fModule(0),
e56160b8 49fNPar(0),
50fDetPar(0),
fb4dfab9 51fNoise(0),
b42cfa25 52fPedestal(0),
fb4dfab9 53fGain(0),
54fBadChannels(0),
ced4d9bc 55fIsBad(kFALSE){
fcf95fc7 56 // constructor
57
fcf95fc7 58 SetDataType(dataType);
fcf95fc7 59 SetNDetParam(fgkNParDefault); // Sets fNPar=6 by default.
60 fDetPar = new Double_t[fNPar];
61 if (fNPar==6) {
62 fDetPar[0]=10.;
63 fDetPar[1]=5.;
64 fDetPar[2]=0.02;
65 fDetPar[3]=0.02;
66 fDetPar[4]=0.02;
67 fDetPar[5]=0.03;
68 } // end if
df1d5598 69 for(Int_t i=0;i<fgkChipsPerModule;i++){
70 fIsChipBad[i]=kFALSE;
71 }
fcf95fc7 72}
73//______________________________________________________________________
74AliITSCalibrationSSD::~AliITSCalibrationSSD(){
75 // destructor
23197852 76
fcf95fc7 77 delete [] fDetPar;
78}
79//______________________________________________________________________
fcf95fc7 80void AliITSCalibrationSSD::SetDetParam(Double_t *par){
81 // set det param
82 Int_t i;
83
84 for (i=0; i<fNPar; i++) {
85 fDetPar[i]=par[i];
86 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
87 } // end for i
88}
89//______________________________________________________________________
90void AliITSCalibrationSSD::GetDetParam(Double_t *par) const {
91 // get det param
92 Int_t i;
93
94 for (i=0; i<fNPar; i++) {
95 par[i]=fDetPar[i];
96 } // end for i
97}
23197852 98
99//______________________________________________________________________
100void AliITSCalibrationSSD::FillBadChipMap() {
101
102 Int_t mc=0;
103 Int_t cc[12];
104
105 // P-side
106 for(Int_t i=0; i<6; i++){
107 cc[i]=0;
108 for(Int_t j=0; j<ChannelsPerChip(); j++) {
109 if(IsPChannelBad(i*ChannelsPerChip()+j)) cc[i]++;
110 }
111 if(cc[i]==ChannelsPerChip()) { SetChipBad(i); mc++; }
112 }
113
114 // N-side
115 for(Int_t i=6; i<11; i++){
116 cc[i]=0;
117 for(Int_t j=0; j<ChannelsPerChip(); j++) {
118 if(IsNChannelBad(1535-i*ChannelsPerChip()-j)) cc[i]++;
119 }
120 if(cc[i]==ChannelsPerChip()) { SetChipBad(i); mc++; }
121 }
122
123 if(mc==ChannelsPerChip()) fIsBad=kTRUE;
124}