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