1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
16 #include "AliITSCalibrationSPD.h"
17 ///////////////////////////////////////////////////////////////////////////
18 // Calibration class for set:ITS
19 // Specific subdetector implementation for
22 // Modified by D. Elia, G.E. Bruno, H. Tydesjo
24 // Last mod: H. Tydesjo January 2007
26 ///////////////////////////////////////////////////////////////////////////
27 const Double_t AliITSCalibrationSPD::fgkThreshDefault = 3000.;
28 const Double_t AliITSCalibrationSPD::fgkSigmaDefault = 250.;
29 const Double_t AliITSCalibrationSPD::fgkCouplColDefault = 0.;
30 const Double_t AliITSCalibrationSPD::fgkCouplRowDefault = 0.047;
31 const Double_t AliITSCalibrationSPD::fgkBiasVoltageDefault = 18.182;
33 ClassImp(AliITSCalibrationSPD)
35 //______________________________________________________________________
36 AliITSCalibrationSPD::AliITSCalibrationSPD():
40 fThresh(fgkThreshDefault),
41 fSigma(fgkSigmaDefault),
42 fCouplCol(fgkCouplColDefault),
43 fCouplRow(fgkCouplRowDefault),
44 fBiasVoltage(fgkBiasVoltageDefault),
51 SetThresholds(fgkThreshDefault,fgkSigmaDefault);
52 SetCouplingParam(fgkCouplColDefault,fgkCouplRowDefault);
53 SetBiasVoltage(fgkBiasVoltageDefault);
55 SetDataType("simulated");
57 //_________________________________________________________________________
59 void AliITSCalibrationSPD::AddDead(UInt_t col, UInt_t row) {
61 // Add a dead channel to fDeadChannel array
63 fDeadChannels.Set(fNrDead*2+2);
64 fDeadChannels.AddAt(col,fNrDead*2);
65 fDeadChannels.AddAt(row,fNrDead*2+1);
68 //_________________________________________________________________________
69 Int_t AliITSCalibrationSPD::GetDeadColAt(UInt_t index) {
71 // Returns column of index-th dead channel
74 return fDeadChannels.At(index*2);
78 //_________________________________________________________________________
79 Int_t AliITSCalibrationSPD::GetDeadRowAt(UInt_t index) {
81 // Returns row of index-th dead channel
84 return fDeadChannels.At(index*2+1);
88 //_________________________________________________________________________
89 Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t col, Int_t row) const {
91 // Check if pixel (col,row) is dead
93 for (UInt_t i=0; i<fNrDead; i++) {
94 if (fDeadChannels.At(i*2)==col && fDeadChannels.At(i*2+1)==row) {
100 //____________________________________________________________________________
101 void AliITSCalibrationSPD::AddNoisy(UInt_t col, UInt_t row) {
105 fDeadChannels.Set(fNrNoisy*2+2);
106 fNoisyChannels.AddAt(col,fNrNoisy*2);
107 fNoisyChannels.AddAt(row,fNrNoisy*2+1);
110 //____________________________________________________________________________
111 Int_t AliITSCalibrationSPD::GetNoisyColAt(UInt_t index) {
113 // Get column of index-th noisy pixel
115 if (index<fNrNoisy) {
116 return fNoisyChannels.At(index*2);
120 //____________________________________________________________________________
121 Int_t AliITSCalibrationSPD::GetNoisyRowAt(UInt_t index) {
123 // Get row of index-th noisy pixel
125 if (index<fNrNoisy) {
126 return fNoisyChannels.At(index*2+1);
130 //____________________________________________________________________________
131 Bool_t AliITSCalibrationSPD::IsPixelNoisy(Int_t col, Int_t row) const {
133 // Check if pixel (col,row) is noisy
135 for (UInt_t i=0; i<fNrNoisy; i++) {
136 if (fNoisyChannels.At(i*2)==col && fNoisyChannels.At(i*2+1)==row) {