]>
Commit | Line | Data |
---|---|---|
ba030c0e | 1 | #ifndef ALI_MUON_ST1_RESPONSE_PARAMETER_H |
2 | #define ALI_MUON_ST1_RESPONSE_PARAMETER_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
30178c30 | 8 | // Revision of includes 07/05/2004 |
ba030c0e | 9 | |
10 | // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay | |
11 | // | |
12 | // Class AliMUONSt1ResponseParameter | |
13 | // --------------------------------- | |
14 | // Describes a set of filters to be applied to a digital value | |
15 | // in order to simulate electronics characteristics | |
16 | // (pedestal, noise, sticky bits, etc....) | |
17 | // Threshold levels for the MANU zero supression algorithm are included. | |
18 | ||
19 | #include <TNamed.h> | |
3c25381f | 20 | |
21 | class TString; | |
ba030c0e | 22 | |
23 | class AliMUONSt1ResponseParameter : public TNamed | |
24 | { | |
5f91c9e8 | 25 | public: |
26 | typedef enum {kNone,kValue,kGauss,kFile} TMode; | |
27 | typedef struct {Double_t mean; Double_t sigma;} TGaussParam; | |
28 | ||
ba030c0e | 29 | public: |
30 | AliMUONSt1ResponseParameter(); | |
31 | AliMUONSt1ResponseParameter(const TString& name,const TString& title); | |
32 | virtual ~AliMUONSt1ResponseParameter(); | |
33 | ||
34 | void SetState(Bool_t state) ; | |
35 | void SetPedestal(Double_t val); | |
36 | void SetPedestal(Double_t mean,Double_t sigma); | |
37 | void SetPedestal(const TString& fileName); | |
38 | void UnSetPedestal(); | |
39 | void SetNoise(Double_t val); | |
40 | void SetNoise(Double_t mean,Double_t sigma); | |
41 | void SetNoise(const TString& fileName); | |
42 | void SetNofSigma(Int_t nofSigma); | |
43 | void SetStickyBitOn (Int_t bit,Int_t val=1); | |
44 | void SetStickyBitOff(Int_t bit,Int_t val=1); | |
45 | Int_t ApplyPedestal(Int_t base,Int_t GC) const; | |
46 | Int_t ApplyStickyBits(Int_t base) const; | |
47 | Bool_t HasPedestal() const {return fPedestalMode != kNone;} | |
48 | Bool_t GetState() const {return fState;} | |
5f91c9e8 | 49 | |
ba030c0e | 50 | private: |
3c25381f | 51 | static const Int_t fgkNofChannels=64; // number of channels |
ba030c0e | 52 | typedef union { |
5f91c9e8 | 53 | //Double_t values[fgkNofChannels]; |
54 | Double_t values[64]; | |
ba030c0e | 55 | Double_t value; |
56 | TGaussParam gauss; | |
57 | } TParam; | |
58 | ||
59 | Double_t Choose(TMode mode,TParam param,Int_t GC) const; | |
60 | TMode fPedestalMode; // mode for pedestal values | |
61 | TParam fPedestalParam; // pedestal access parameters | |
62 | TMode fNoiseMode; // mode for noise values | |
63 | TParam fNoiseParam; // noise access parameters | |
64 | Int_t fNofSigma; // No of sigma for threshold (zero supression) | |
65 | Bool_t fState; // is the element on/off | |
66 | Int_t fStickyOn; // which bits are always on (mask) . | |
67 | Int_t fStickyOff; // which bits are always off (mask). | |
68 | ||
69 | ClassDef(AliMUONSt1ResponseParameter,1) // electronics parmeters for Response | |
70 | }; | |
71 | #endif //ALI_MUON_ST1_RESPONSE_PARAMETER_H |