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 ///////////////////////////////////////////////////////////////////////////
17 // Calibration class for set:ITS
18 // Specific subdetector implementation for
21 // Modified by D. Elia, G.E. Bruno, H. Tydesjo
24 ///////////////////////////////////////////////////////////////////////////
26 #include "AliITSCalibrationSPD.h"
28 const Double_t AliITSCalibrationSPD::fgkThreshDefault = 3000.;
29 const Double_t AliITSCalibrationSPD::fgkSigmaDefault = 250.;
30 const Double_t AliITSCalibrationSPD::fgkCouplColDefault = 0.;
31 const Double_t AliITSCalibrationSPD::fgkCouplRowDefault = 0.047;
32 const Double_t AliITSCalibrationSPD::fgkBiasVoltageDefault = 18.182;
34 ClassImp(AliITSCalibrationSPD)
35 //______________________________________________________________________
36 AliITSCalibrationSPD::AliITSCalibrationSPD():
40 fThresh(fgkThreshDefault),
41 fSigma(fgkSigmaDefault),
42 fCouplCol(fgkCouplColDefault),
43 fCouplRow(fgkCouplRowDefault),
44 fBiasVoltage(fgkBiasVoltageDefault),
49 SetThresholds(fgkThreshDefault,fgkSigmaDefault);
50 SetCouplingParam(fgkCouplColDefault,fgkCouplRowDefault);
51 SetBiasVoltage(fgkBiasVoltageDefault);
53 SetDataType("simulated");
55 //_________________________________________________________________________
58 void AliITSCalibrationSPD::AddDead(UInt_t col, UInt_t row) {
59 fDeadChannels.Set(nrDead*2+2);
60 fDeadChannels.AddAt(col,nrDead*2);
61 fDeadChannels.AddAt(row,nrDead*2+1);
64 Int_t AliITSCalibrationSPD::GetDeadColAt(UInt_t index) {
66 return fDeadChannels.At(index*2);
70 Int_t AliITSCalibrationSPD::GetDeadRowAt(UInt_t index) {
72 return fDeadChannels.At(index*2+1);
76 Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t col, Int_t row) const {
77 for (UInt_t i=0; i<nrDead; i++) {
78 if (fDeadChannels.At(i*2)==col && fDeadChannels.At(i*2+1)==row) {
85 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
86 //___________________________________________________________________________
87 // THIS METHOD SHOULD BE DELETED AS SOON AS POSSIBLE!!!!!!!!!!!!!!!!!!!!!!!!!
88 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
89 Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const {
90 // Returns kTRUE if pixel is dead
92 // Int_t mod module number
93 // Int_t ix x pixel number
94 // Int_t iz z pixel number
98 // kFALSE if pixel is alive, or kTRUE if pixel is dead.
100 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
101 Double_t fDeadPixels = 0.01; // fix to keep AliITSsimulationSPDdubna alive!!!
102 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
104 Bool_t dead = kFALSE;
106 static TRandom ran; // don't use gRandom. This must not be a true randome
107 // sequence. These sequence must be random one and then fully repetable.
109 seed = mod*256*256+iz*256+ix;
111 if(ran.Rndm(0)<fDeadPixels) dead = kTRUE;
114 //____________________________________________________________________________
116 void AliITSCalibrationSPD::AddNoisy(UInt_t col, UInt_t row) {
117 fDeadChannels.Set(nrNoisy*2+2);
118 fNoisyChannels.AddAt(col,nrNoisy*2);
119 fNoisyChannels.AddAt(row,nrNoisy*2+1);
122 Int_t AliITSCalibrationSPD::GetNoisyColAt(UInt_t index) {
124 return fNoisyChannels.At(index*2);
128 Int_t AliITSCalibrationSPD::GetNoisyRowAt(UInt_t index) {
130 return fNoisyChannels.At(index*2+1);
134 Bool_t AliITSCalibrationSPD::IsPixelNoisy(Int_t col, Int_t row) const {
135 for (UInt_t i=0; i<nrNoisy; i++) {
136 if (fNoisyChannels.At(i*2)==col && fNoisyChannels.At(i*2+1)==row) {