1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 #include "AliITSCalibrationSSD.h"
18 //////////////////////////////////////////////////////
19 // Calibration class for set:ITS //
20 // Specific subdetector implementation //
21 // for silicon strips detectors //
24 //////////////////////////////////////////////////////
26 const Int_t AliITSCalibrationSSD::fgkNParDefault = 6;
28 ClassImp(AliITSCalibrationSSD)
30 //______________________________________________________________________
31 AliITSCalibrationSSD::AliITSCalibrationSSD():
43 // Default Constructor
45 for(Int_t i=0;i<fgkChipsPerModule;i++){
51 //______________________________________________________________________
52 AliITSCalibrationSSD::AliITSCalibrationSSD(const char *dataType):
65 SetDataType(dataType);
66 SetNDetParam(fgkNParDefault); // Sets fNPar=6 by default.
67 fDetPar = new Double_t[fNPar];
76 for(Int_t i=0;i<fgkChipsPerModule;i++){
82 //______________________________________________________________________
83 AliITSCalibrationSSD::~AliITSCalibrationSSD(){
87 if(fNoise)delete fNoise;
88 if(fPedestal)delete fPedestal;
89 if(fGain)delete fGain;
90 if(fBadChannels)delete fBadChannels;
92 //______________________________________________________________________
93 void AliITSCalibrationSSD::SetDetParam(Double_t *par){
97 for (i=0; i<fNPar; i++) {
99 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
102 //______________________________________________________________________
103 void AliITSCalibrationSSD::GetDetParam(Double_t *par) const {
107 for (i=0; i<fNPar; i++) {
112 //______________________________________________________________________
113 void AliITSCalibrationSSD::FillBadChipMap() {
117 for(Int_t i=0;i<fgkChipsPerModule;i++){
118 fIsChipBad[i]=kFALSE;
123 Int_t cc[fgkChipsPerModule];
126 for(Int_t i=0; i<fgkChipsPerModule/2; i++){
128 for(Int_t j=0; j<ChannelsPerChip(); j++) {
129 if(IsPChannelBad(i*ChannelsPerChip()+j)) cc[i]++;
131 if(cc[i]==ChannelsPerChip()) { SetChipBad(i); mc++; }
135 for(Int_t i=fgkChipsPerModule/2; i<fgkChipsPerModule; i++){
137 for(Int_t j=0; j<ChannelsPerChip(); j++) {
138 if(IsNChannelBad(1535-i*ChannelsPerChip()-j)) cc[i]++;
140 if(cc[i]==ChannelsPerChip()) { SetChipBad(i); mc++; }
143 if(mc==fgkChipsPerModule) fIsBad=kTRUE;