Initialization of some variables (Bogdan)
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSPD.cxx
CommitLineData
fcf95fc7 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// Calibration class for set:ITS //
17// Specific subdetector implementation for //
18// Silicon pixels //
19// An alternative version "SPDdubna" //
20// is also available //
21//////////////////////////////////////////////////////
22
23#include "AliITSCalibrationSPD.h"
24
25const Double_t AliITSCalibrationSPD::fgkThreshDefault = 2000.;
26const Double_t AliITSCalibrationSPD::fgkSigmaDefault = 280.;
27
28ClassImp(AliITSCalibrationSPD)
29//______________________________________________________________________
30AliITSCalibrationSPD::AliITSCalibrationSPD():
31AliITSCalibration(),
32fBaseline(0.0),
33fNoise(0.0),
34fThresh(fgkThreshDefault),
35fSigma(fgkSigmaDefault),
36fDeadPixels(0.01){
37 // constructor
38
39 SetThresholds(fgkThreshDefault,fgkSigmaDefault);
40 SetNoiseParam(0.,0.);
41 SetDataType("simulated");
42 SetFractionDead();
43}
44//_________________________________________________________________________
45Bool_t AliITSCalibrationSPD::IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const {
46 // Returns kTRUE if pixel is dead
47 // Inputs:
48 // Int_t mod module number
49 // Int_t ix x pixel number
50 // Int_t iz z pixel number
51 // Outputs:
52 // none.
53 // Return:
54 // kFALSE if pixel is alive, or kTRUE if pixel is dead.
55 Bool_t dead = kFALSE;
56 Int_t seed;
57 static TRandom ran; // don't use gRandom. This must not be a true randome
58 // sequence. These sequence must be random one and then fully repetable.
59
60 seed = mod*256*256+iz*256+ix;
61 ran.SetSeed(seed);
62 if(ran.Rndm(0)<fDeadPixels) dead = kTRUE;
63 return dead;
64}