minor changes (action in case of some module is not calibrated)
[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
26const Double_t AliITSCalibrationSSD::fgkNoiseNDefault = 625.;
27const Double_t AliITSCalibrationSSD::fgkNoisePDefault = 420.;
28const Int_t AliITSCalibrationSSD::fgkNParDefault = 6;
29const Double_t AliITSCalibrationSSD::fgkSigmaPDefault = 3.;
30const Double_t AliITSCalibrationSSD::fgkSigmaNDefault = 2.;
31
32ClassImp(AliITSCalibrationSSD)
33
34//______________________________________________________________________
e56160b8 35AliITSCalibrationSSD::AliITSCalibrationSSD():
36fNPar(0),
37fDetPar(0),
38fNoiseP(0),
39fNoiseN(0),
40fSigmaP(0),
41fSigmaN(0),
fb4dfab9 42fNoise(0),
43fGain(0),
44fBadChannels(0),
e56160b8 45fGainP(0),
46fGainN(0),
47fNoisP(0),
48fNoisN(0),
49fNoisePThreshold(0),
50fNoisyPChannelsList(0),
51fNoiseNThreshold(0),
52fNoisyNChannelsList(0),
53fDeadNChannelsList(0),
54fDeadPChannelsList(0){
fcf95fc7 55 // Default Constructor
56
fcf95fc7 57 SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
58}
59//______________________________________________________________________
e56160b8 60AliITSCalibrationSSD::AliITSCalibrationSSD(const char *dataType):
61fNPar(0),
62fDetPar(0),
63fNoiseP(0),
64fNoiseN(0),
65fSigmaP(0),
66fSigmaN(0),
fb4dfab9 67fNoise(0),
b42cfa25 68fPedestal(0),
fb4dfab9 69fGain(0),
70fBadChannels(0),
e56160b8 71fGainP(0),
72fGainN(0),
73fNoisP(0),
74fNoisN(0),
b42cfa25 75fPedP(0),
76fPedN(0),
e56160b8 77fNoisePThreshold(0),
78fNoisyPChannelsList(0),
79fNoiseNThreshold(0),
80fNoisyNChannelsList(0),
81fDeadNChannelsList(0),
82fDeadPChannelsList(0){
fcf95fc7 83 // constructor
84
85 SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
86 SetDataType(dataType);
87 SetSigmaSpread(fgkSigmaPDefault,fgkSigmaNDefault);
88 SetNDetParam(fgkNParDefault); // Sets fNPar=6 by default.
89 fDetPar = new Double_t[fNPar];
90 if (fNPar==6) {
91 fDetPar[0]=10.;
92 fDetPar[1]=5.;
93 fDetPar[2]=0.02;
94 fDetPar[3]=0.02;
95 fDetPar[4]=0.02;
96 fDetPar[5]=0.03;
97 } // end if
98}
99//______________________________________________________________________
100AliITSCalibrationSSD::~AliITSCalibrationSSD(){
101 // destructor
102
103 delete [] fDetPar;
104}
105//______________________________________________________________________
fcf95fc7 106void AliITSCalibrationSSD::SetDetParam(Double_t *par){
107 // set det param
108 Int_t i;
109
110 for (i=0; i<fNPar; i++) {
111 fDetPar[i]=par[i];
112 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
113 } // end for i
114}
115//______________________________________________________________________
116void AliITSCalibrationSSD::GetDetParam(Double_t *par) const {
117 // get det param
118 Int_t i;
119
120 for (i=0; i<fNPar; i++) {
121 par[i]=fDetPar[i];
122 } // end for i
123}