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 **************************************************************************/
17 #include "AliITSresponseSPDdubna.h"
18 //////////////////////////////////////////////////////
19 // Response class for set:ITS //
20 // Specific subdetector implementation for //
22 // This is and alternative version //
23 // to the default version //
24 //////////////////////////////////////////////////////
25 const Float_t AliITSresponseSPDdubna::fgkNoiseDefault = 200.;
26 const Float_t AliITSresponseSPDdubna::fgkThresholdDefault = 2000.;
28 //___________________________________________
29 ClassImp(AliITSresponseSPDdubna)
31 AliITSresponseSPDdubna::AliITSresponseSPDdubna() : AliITSresponse(){
32 // Default constructor
38 // A default constructed AliITSresponseSPD class
40 SetNoiseParam(fgkNoiseDefault,0.); // fNoise, fBaseline
41 SetThresholds(fgkThresholdDefault,0.); // fThreshold
42 SetCouplings(); // fCouplCol, fCouplRow
43 SetFractionDeadPixels(); // fDeadPixels
44 SetDataType(); // fDataType
46 //_________________________________________________________________________
47 Bool_t AliITSresponseSPDdubna::IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const {
48 // Returns kTRUE if pixel is dead
50 // Int_t mod module number
51 // Int_t ix x pixel number
52 // Int_t iz z pixel number
56 // kFALSE if pixel is alive, or kTRUE if pixel is dead.
59 static TRandom ran; // don't use gRandom. This must not be a true randome
60 // sequence. These sequence must be random one and then fully repetable.
62 seed = mod*256*256+iz*256+ix;
64 if(ran.Rndm(0)<fDeadPixels) dead = kTRUE;
68 //----------------------------------------------------------------------
69 void AliITSresponseSPDdubna::Print(ostream *os) const{
70 // Standard output format for this class.
72 // ostream *os Pointer to the output stream
78 AliITSresponse::Print(os);
79 *os << fNoise << " " << fBaseline << " " << fCouplCol << " ";
80 *os << fCouplRow << " "<< fThreshold << " " << fDeadPixels << " ";
82 // *os << " " << endl;
86 //----------------------------------------------------------------------
87 void AliITSresponseSPDdubna::Read(istream *is) {
88 // Standard input format for this class.
90 // ostream *os Pointer to the output stream
96 AliITSresponse::Read(is);
97 *is >> fNoise >> fBaseline >> fCouplCol >> fCouplRow;
98 *is >> fThreshold >> fDeadPixels >> fDataType;
101 //----------------------------------------------------------------------
103 ostream &operator<<(ostream &os,AliITSresponseSPDdubna &p){
104 // Standard output streaming function.
106 // ostream *os Pointer to the output stream
116 //----------------------------------------------------------------------
117 istream &operator>>(istream &is,AliITSresponseSPDdubna &r){
118 // Standard input streaming function.
120 // ostream *os Pointer to the output stream
129 //----------------------------------------------------------------------