New SSD calibration objects (AliITSBadChannelsSSD, AliITSGainSSD, AliITSNoiseSSD...
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSSD.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
17 #include "AliITSCalibrationSSD.h"
18 //////////////////////////////////////////////////////
19 //  Calibration class for set:ITS                   //
20 //  Specific subdetector implementation             //
21 //  for silicon strips detectors                    //
22 //                                                  //
23 //                                                  //
24 //////////////////////////////////////////////////////
25
26 const Double_t AliITSCalibrationSSD::fgkNoiseNDefault = 625.;
27 const Double_t AliITSCalibrationSSD::fgkNoisePDefault = 420.;
28 const Int_t AliITSCalibrationSSD::fgkNParDefault = 6;
29 const Double_t AliITSCalibrationSSD::fgkSigmaPDefault = 3.;
30 const Double_t AliITSCalibrationSSD::fgkSigmaNDefault = 2.;
31
32 ClassImp(AliITSCalibrationSSD)
33
34 //______________________________________________________________________
35 AliITSCalibrationSSD::AliITSCalibrationSSD():
36 fNPar(0),
37 fDetPar(0),
38 fNoiseP(0),
39 fNoiseN(0),
40 fSigmaP(0),
41 fSigmaN(0),
42 fNoise(0),
43 fGain(0),
44 fBadChannels(0),
45 fGainP(0),
46 fGainN(0),
47 fNoisP(0),
48 fNoisN(0),
49 fNoisePThreshold(0),
50 fNoisyPChannelsList(0),
51 fNoiseNThreshold(0),
52 fNoisyNChannelsList(0),
53 fDeadNChannelsList(0),
54 fDeadPChannelsList(0){
55     // Default Constructor
56
57     SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
58 }
59 //______________________________________________________________________
60 AliITSCalibrationSSD::AliITSCalibrationSSD(const char *dataType):
61 fNPar(0),
62 fDetPar(0),
63 fNoiseP(0),
64 fNoiseN(0),
65 fSigmaP(0),
66 fSigmaN(0),
67 fNoise(0),
68 fGain(0),
69 fBadChannels(0),
70 fGainP(0),
71 fGainN(0),
72 fNoisP(0),
73 fNoisN(0),
74 fNoisePThreshold(0),
75 fNoisyPChannelsList(0),
76 fNoiseNThreshold(0),
77 fNoisyNChannelsList(0),
78 fDeadNChannelsList(0),
79 fDeadPChannelsList(0){
80     // constructor
81
82     SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
83     SetDataType(dataType);
84     SetSigmaSpread(fgkSigmaPDefault,fgkSigmaNDefault);
85     SetNDetParam(fgkNParDefault);   // Sets fNPar=6 by default.
86     fDetPar = new Double_t[fNPar];
87     if (fNPar==6) {
88         fDetPar[0]=10.;
89         fDetPar[1]=5.;
90         fDetPar[2]=0.02;
91         fDetPar[3]=0.02;
92         fDetPar[4]=0.02;
93         fDetPar[5]=0.03;
94     } // end if
95 }
96 //______________________________________________________________________
97 AliITSCalibrationSSD::~AliITSCalibrationSSD(){
98     // destructor
99
100     delete [] fDetPar;
101 }
102 //______________________________________________________________________
103 void AliITSCalibrationSSD::SetDetParam(Double_t  *par){
104     // set det param
105     Int_t i;
106
107     for (i=0; i<fNPar; i++) {
108         fDetPar[i]=par[i];
109         //printf("\n CompressPar %d %d \n",i,fCPar[i]);    
110     } // end for i
111 }
112 //______________________________________________________________________
113 void AliITSCalibrationSSD::GetDetParam(Double_t  *par) const {
114     // get det param
115     Int_t i;
116
117     for (i=0; i<fNPar; i++) {
118         par[i]=fDetPar[i];
119     } // end for i
120 }