Line data Source code
1 : #ifndef ALIPHOSTRIGGERPARAMETERS_H
2 : #define ALIPHOSTRIGGERPARAMETERS_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : // Author: Henrik Qvigstad <henrik.qvigstad@cern.ch> 17/10-2011
8 : /* $Id$ */
9 :
10 : ///////////////////////////////////////////////////////////////////////////////
11 : // //
12 : // class for PHOS Trigger Parameters //
13 : // //
14 : ///////////////////////////////////////////////////////////////////////////////
15 :
16 :
17 : #include "TNamed.h"
18 :
19 : /* class for TRU Calib Data: Pedestals, etc...
20 : */
21 : class AliPHOSTriggerParameters : public TNamed
22 : {
23 :
24 : public:
25 : AliPHOSTriggerParameters();
26 : AliPHOSTriggerParameters(const char* name);
27 : AliPHOSTriggerParameters(const AliPHOSTriggerParameters& );
28 : AliPHOSTriggerParameters& operator= (const AliPHOSTriggerParameters& );
29 : virtual ~AliPHOSTriggerParameters();
30 :
31 : // Getters
32 : UShort_t GetTRUPedestal(Int_t mod, Int_t TRURow, Int_t branch, Int_t xIdx, Int_t zIdx) const;
33 : Bool_t GetTRUReadoutOn(Int_t mod, Int_t TRURow, Int_t branch) const;
34 : Bool_t GetTRUSignalReadoutOn(Int_t mod, Int_t TRURow, Int_t branch) const;
35 : UShort_t GetTRUSignalTimeBinFrom(Int_t mod, Int_t TRURow, Int_t branch) const;
36 : UShort_t GetTRUSignalTimeBinTo(Int_t mod, Int_t TRURow, Int_t branch) const;
37 : UShort_t GetTRUThreshold(Int_t mod, Int_t TRURow, Int_t branch) const;
38 : UShort_t GetTRUMaskChannel(Int_t mod, Int_t TRURow, Int_t branch) const;
39 : const UShort_t* GetTORMaskArray(Int_t mod, Int_t tor) const;
40 : const UShort_t* GetTORReadoutMask(Int_t mod, Int_t tor) const;
41 :
42 :
43 : // Setters
44 : void SetTRUPedestal(UShort_t pedestal, Int_t mod, Int_t TRURow, Int_t branch, Int_t xIdx, Int_t zIdx);
45 : void SetTRUReadoutOn(Bool_t isOn, Int_t mod, Int_t TRURow, Int_t branch);
46 : void SetTRUSignalReadoutOn(Bool_t isOn, Int_t mod, Int_t TRURow, Int_t branch);
47 : void SetTRUSignalTimeBinFrom(UShort_t fromBin, Int_t mod, Int_t TRURow, Int_t branch);
48 : void SetTRUSignalTimeBinTo(UShort_t toBin, Int_t mod, Int_t TRURow, Int_t branch);
49 : void SetTRUThreshold(UShort_t threshold, Int_t mod, Int_t TRURow, Int_t branch);
50 : void SetTRUMaskChannel(UShort_t mask, Int_t mod, Int_t TRURow, Int_t branch);
51 : void SetTORMaskArray(const UShort_t ma[3], Int_t mod, Int_t tor);
52 : void SetTORReadoutMask(const UShort_t rm[2], Int_t mod, Int_t tor);
53 :
54 : // Misc
55 : virtual void Print(Option_t *option = "") const;
56 : void Reset();
57 :
58 : // Constants
59 : static const Int_t kNMods = 5; // Number of PHOS Modules
60 : static const Int_t kNTORs = 2; // Number of TORs per Module
61 : static const Int_t kNTRURows = 4; // Number of TRU rows
62 : static const Int_t kNBranches = 2; // Number of Branches
63 : static const Int_t kNTRUX = 8; // Number of 2x2 per TRU in x
64 : static const Int_t kNTRUZ = 14; // Number of 2x2 per TRU in z
65 : static const UShort_t kIdealTRUPedestal = 512; // Ideal TRU Pedestal
66 : static const Int_t kDefaultNTRUTimeBins = 128; // Number of timebins
67 :
68 : protected:
69 : // TRU Parameters:
70 : UShort_t fTRUPedestals [kNMods][kNTRURows][kNBranches][kNTRUX][kNTRUZ]; // TRU Pedestals
71 : Bool_t fTRUTriggerBitReadoutOn[kNMods][kNTRURows][kNBranches]; // TRU TriggerBit Readout is on
72 : Bool_t fTRUSignalReadoutOn [kNMods][kNTRURows][kNBranches]; // TRU Signal Readout is on
73 : UChar_t fTRUSignalTimeBinFrom [kNMods][kNTRURows][kNBranches]; // TRU from (including) timebin
74 : UChar_t fTRUSignalTimeBinTo [kNMods][kNTRURows][kNBranches]; // TRU to (including) timebin
75 : UShort_t fTRUThreshold [kNMods][kNTRURows][kNBranches]; // TRU Threshold
76 : UShort_t fTRUMaskChannel [kNMods][kNTRURows][kNBranches]; // TRU Mask Channel
77 :
78 : // TOR Parameters:
79 : UShort_t fTORMaskArray[kNMods][kNTORs][3]; // TOR Mask Array
80 : UShort_t fTORReadoutMask[kNMods][kNTORs][2]; // TOR Readout Mask
81 :
82 38 : ClassDef(AliPHOSTriggerParameters, 1) // PHOS Trigger Parameters
83 : };
84 :
85 : #endif
|