]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSPDdubna.h
new data member: fDebug=kFALSE by default. Setter and Getter defined in the base...
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSPDdubna.h
1 #ifndef ALIITSRESPONSESPDDUBNA_H
2 #define ALIITSRESPONSESPDDUBNA_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 #include <TString.h>
9 #include <TRandom.h>
10
11 #include "AliITSresponse.h"
12
13 //----------------------------------------------
14 // ITS response class for SPD
15 class AliITSresponseSPDdubna : public AliITSresponse {
16  public:
17   AliITSresponseSPDdubna();
18   virtual ~AliITSresponseSPDdubna(){}// destructror
19   //
20   // set noise and baseline
21   virtual void SetNoiseParam(Float_t n=200., Float_t b=0.) {
22     fNoise=n; fBaseline=b;}
23   // Returns just noise value
24   virtual Float_t GetNoise() const {return fNoise;} 
25   //Returns just baseline value
26   virtual Float_t GetBaseline() const {return fBaseline;}
27   virtual void GetNoiseParam(Float_t &n, Float_t &b) {
28     n=fNoise; b=fBaseline;} // get noise and baseline
29   // Applies a randome noise and addes the baseline
30   virtual Float_t ApplyBaselineAndNoise() const {return fBaseline+
31                                                  fNoise*gRandom->Gaus();}
32   // Zero-suppression option threshold
33   virtual void SetThreshold(Int_t th=2000) {fThreshold=th;}
34   // Get zero-suppression threshold
35   virtual Float_t GetThreshold() const {return fThreshold;}
36   // Sets the coupling probabilities for columns and rows
37   virtual void SetCouplings(Float_t ccol=0.,Float_t crow=0.){fCouplCol=ccol;
38                                                        fCouplRow=crow;}
39   // Gets the coupling probabilities for columns and rows
40   virtual void GetCouplings(Float_t &ccol,Float_t &crow){ccol=fCouplCol;
41                                                          crow=fCouplRow;}
42   // Retruns the fraction of dead pixels
43   virtual Float_t GetFractionDeadPixels() const {return fDeadPixels;}
44   // Sets the fraction of dead pixels
45   virtual void SetFractionDeadPixels(Float_t f=0.01){fDeadPixels = f;}
46   // Returns a logical if a pixels is dead or not
47   virtual Bool_t IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const ;
48   // Sets the Type of data -real or simulated
49   virtual void SetDataType(const char *data="simulated") {fDataType=data;}
50   // Get data type, real or simulated.
51   virtual const char* DataType() const {return fDataType.Data();}
52   // Prints out the content of this class in ASCII format.
53   virtual void Print(ostream *os);
54   // Reads in the content of this class in the format of Print
55   virtual void Read(istream *is);
56
57   ClassDef(AliITSresponseSPDdubna,2) // SPD response
58     ;
59  protected:
60   Float_t fNoise;           // Noise value
61   Float_t fBaseline;        // Baseline value
62   Float_t fCouplCol;        // Coupling Probability along columns
63   Float_t fCouplRow;        // Coupling Probability along rows
64   Float_t fThreshold;       // Zero-Suppression threshold
65   Float_t fDeadPixels;      // Fraction of dead pixels.
66   TString fDataType;        // Type of data - real or simulated
67 };
68 // Input and output function for standard C++ input/output.
69 ostream& operator<<(ostream &os,AliITSresponseSPDdubna &source);
70 istream& operator>>(istream &os,AliITSresponseSPDdubna &source);
71
72 #endif