1 #ifndef ALI_MUON_ST1_RESPONSE_PARAMETER_H
2 #define ALI_MUON_ST1_RESPONSE_PARAMETER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
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.
21 class AliMUONSt1ResponseParameter : public TNamed
24 AliMUONSt1ResponseParameter();
25 AliMUONSt1ResponseParameter(const TString& name,const TString& title);
26 virtual ~AliMUONSt1ResponseParameter();
28 void SetState(Bool_t state) ;
29 void SetPedestal(Double_t val);
30 void SetPedestal(Double_t mean,Double_t sigma);
31 void SetPedestal(const TString& fileName);
33 void SetNoise(Double_t val);
34 void SetNoise(Double_t mean,Double_t sigma);
35 void SetNoise(const TString& fileName);
36 void SetNofSigma(Int_t nofSigma);
37 void SetStickyBitOn (Int_t bit,Int_t val=1);
38 void SetStickyBitOff(Int_t bit,Int_t val=1);
39 Int_t ApplyPedestal(Int_t base,Int_t GC) const;
40 Int_t ApplyStickyBits(Int_t base) const;
41 Bool_t HasPedestal() const {return fPedestalMode != kNone;}
42 Bool_t GetState() const {return fState;}
44 static const Int_t fgkNofChannels=64;
45 typedef enum {kNone,kValue,kGauss,kFile} TMode;
46 typedef struct {Double_t mean; Double_t sigma;} TGaussParam;
48 Double_t values[fgkNofChannels];
53 Double_t Choose(TMode mode,TParam param,Int_t GC) const;
54 TMode fPedestalMode; // mode for pedestal values
55 TParam fPedestalParam; // pedestal access parameters
56 TMode fNoiseMode; // mode for noise values
57 TParam fNoiseParam; // noise access parameters
58 Int_t fNofSigma; // No of sigma for threshold (zero supression)
59 Bool_t fState; // is the element on/off
60 Int_t fStickyOn; // which bits are always on (mask) .
61 Int_t fStickyOff; // which bits are always off (mask).
63 ClassDef(AliMUONSt1ResponseParameter,1) // electronics parmeters for Response
65 #endif //ALI_MUON_ST1_RESPONSE_PARAMETER_H