]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSPD.cxx
Update class version number
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSPD.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 //  Response 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 "AliITSresponseSPD.h"
24
25 const Double_t AliITSresponseSPD::fgkDiffCoeffDefault = 0.;
26 const Double_t AliITSresponseSPD::fgkThreshDefault = 2000.;
27 const Double_t AliITSresponseSPD::fgkSigmaDefault = 280.;
28
29 ClassImp(AliITSresponseSPD)     
30 //______________________________________________________________________
31 AliITSresponseSPD::AliITSresponseSPD():
32 AliITSresponse(),
33 fBaseline(0.0),
34 fNoise(0.0),
35 fThresh(fgkThreshDefault),
36 fSigma(fgkSigmaDefault),
37 fCouplCol(0.0),
38 fCouplRow(0.0),
39 fDeadPixels(0.01){
40   // constructor
41
42    SetThresholds(fgkThreshDefault,fgkSigmaDefault);
43    //SetDiffCoeff(fgkDiffCoeffDefault,0.);
44    SetNoiseParam(0.,0.);
45    SetDataType("simulated");
46    SetFractionDead();
47 }
48 //_________________________________________________________________________
49 Bool_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.
63
64   seed = mod*256*256+iz*256+ix;
65   ran.SetSeed(seed);
66   if(ran.Rndm(0)<fDeadPixels) dead = kTRUE;
67   return dead;
68 }