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