]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1ResponseParameter.h
Merge MC labels for 4 neighbour bins in the Hough space in order to reduce the size...
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1ResponseParameter.h
CommitLineData
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>
3c25381f 19
20class TString;
ba030c0e 21
22class AliMUONSt1ResponseParameter : public TNamed
23{
5f91c9e8 24 public:
25 typedef enum {kNone,kValue,kGauss,kFile} TMode;
26 typedef struct {Double_t mean; Double_t sigma;} TGaussParam;
27
ba030c0e 28 public:
29 AliMUONSt1ResponseParameter();
30 AliMUONSt1ResponseParameter(const TString& name,const TString& title);
31 virtual ~AliMUONSt1ResponseParameter();
32
33 void SetState(Bool_t state) ;
34 void SetPedestal(Double_t val);
35 void SetPedestal(Double_t mean,Double_t sigma);
36 void SetPedestal(const TString& fileName);
37 void UnSetPedestal();
38 void SetNoise(Double_t val);
39 void SetNoise(Double_t mean,Double_t sigma);
40 void SetNoise(const TString& fileName);
41 void SetNofSigma(Int_t nofSigma);
42 void SetStickyBitOn (Int_t bit,Int_t val=1);
43 void SetStickyBitOff(Int_t bit,Int_t val=1);
44 Int_t ApplyPedestal(Int_t base,Int_t GC) const;
45 Int_t ApplyStickyBits(Int_t base) const;
46 Bool_t HasPedestal() const {return fPedestalMode != kNone;}
47 Bool_t GetState() const {return fState;}
5f91c9e8 48
ba030c0e 49 private:
3c25381f 50 static const Int_t fgkNofChannels=64; // number of channels
ba030c0e 51 typedef union {
5f91c9e8 52 //Double_t values[fgkNofChannels];
53 Double_t values[64];
ba030c0e 54 Double_t value;
55 TGaussParam gauss;
56 } TParam;
57
58 Double_t Choose(TMode mode,TParam param,Int_t GC) const;
59 TMode fPedestalMode; // mode for pedestal values
60 TParam fPedestalParam; // pedestal access parameters
61 TMode fNoiseMode; // mode for noise values
62 TParam fNoiseParam; // noise access parameters
63 Int_t fNofSigma; // No of sigma for threshold (zero supression)
64 Bool_t fState; // is the element on/off
65 Int_t fStickyOn; // which bits are always on (mask) .
66 Int_t fStickyOff; // which bits are always off (mask).
67
68 ClassDef(AliMUONSt1ResponseParameter,1) // electronics parmeters for Response
69};
70#endif //ALI_MUON_ST1_RESPONSE_PARAMETER_H