]>
Commit | Line | Data |
---|---|---|
998c0c43 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | // Revision of includes 07/05/2004 | |
6 | ||
8778870d | 7 | #ifndef AliMUONTriggerDecisionV1_H |
8 | #define AliMUONTriggerDecisionV1_H | |
998c0c43 | 9 | |
10 | /// \ingroup sim | |
11 | /// \class AliMUONTriggerDecisionV1 | |
12 | /// \brief MUON trigger decision class | |
13 | /// | |
14 | /// interim solution (but needed so far) | |
15 | ||
16 | #ifndef ROOT_TTask | |
17 | #include "TTask.h" | |
18 | #endif | |
19 | ||
20 | #ifndef ROOT_TArrayI | |
21 | #include "TArrayI.h" | |
22 | #endif | |
23 | ||
24 | class AliMUONData; | |
25 | class AliMUON; | |
26 | class TObjArray; | |
27 | ||
28 | class AliMUONTriggerDecisionV1 : public TTask | |
29 | { | |
30 | public: | |
31 | AliMUONTriggerDecisionV1(AliMUONData* data); // constructor | |
32 | AliMUONTriggerDecisionV1(); // constructor | |
33 | virtual ~AliMUONTriggerDecisionV1(); // destructor | |
34 | ||
35 | void Trigger(); | |
36 | void ResetBit(); | |
37 | void SetBit(); | |
0a04ebd2 | 38 | void SetBitUpDownX(); |
998c0c43 | 39 | void SetBitUpDownY(); |
40 | ||
41 | void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32], | |
42 | Int_t coinc44, Int_t minDevStrip[5], Int_t minDev[5]); | |
43 | void Sort2x5(Int_t dev1[6], Int_t dev2[6], | |
44 | Int_t minDev[6], Int_t &dev1GTdev2); | |
45 | void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16], | |
46 | Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16], | |
47 | Int_t x2m, Int_t x2ud, Int_t orMud[2], Int_t resetMid, | |
48 | Int_t coinc44, Int_t coordY[5]); | |
49 | void LocalTrigger(Int_t icirc, Int_t minDevStrip[5], | |
50 | Int_t minDev[5], Int_t coordY[5], | |
51 | Int_t &iTrigger); | |
52 | void GlobalTrigger(); | |
53 | ||
54 | void Exec(Option_t* opt=""); | |
55 | ||
56 | // print-debug | |
57 | void PrintBitPatXInput(Int_t icirc); | |
58 | void PrintBitPatYInput(Int_t icirc); | |
59 | void PrintLocalOutput(Int_t minDevStrip[5], Int_t minDev[5], | |
60 | Int_t coordY[5]); | |
61 | ||
62 | // return member data information | |
63 | Int_t GetITrigger(Int_t icirc) const; | |
64 | Int_t GetStripX11(Int_t icirc) const; | |
65 | Int_t GetDev(Int_t icirc) const; | |
66 | Int_t GetStripY11(Int_t icirc) const; | |
67 | void GetLutOutput(Int_t icirc, Int_t lpt[2], Int_t hpt[2], Int_t apt[2]) const; | |
68 | void GetGlobalTrigger(Int_t singlePlus[3], Int_t singleMinus[3], | |
69 | Int_t singleUndef[3], Int_t pairUnlike[3], | |
70 | Int_t pairLike[3]) const; | |
71 | ||
0a04ebd2 | 72 | Int_t Board2Circuit(Int_t iboard) const; |
73 | Int_t CircuitNumber(Int_t idCircuit) const; | |
74 | Int_t ModuleNumber(Int_t idModule) const; | |
84aac932 | 75 | static const Int_t fgkCircuitSortedAsBoard[234]; // circuit Id. number |
998c0c43 | 76 | |
0a04ebd2 | 77 | |
998c0c43 | 78 | ClassDef(AliMUONTriggerDecisionV1,1) // Trigger Decision class |
79 | ||
80 | ||
81 | protected: | |
82 | ||
83 | AliMUONTriggerDecisionV1(const AliMUONTriggerDecisionV1& rhs); | |
84 | AliMUONTriggerDecisionV1& operator=(const AliMUONTriggerDecisionV1& rhs); | |
85 | ||
86 | void ClearDigitNumbers(); | |
87 | ||
88 | void DigitFiredCircuit( | |
89 | Int_t circuit, Int_t cathode, | |
90 | Int_t chamber, Int_t digit | |
91 | ); | |
92 | ||
93 | // Global Trigger information [0] : Low pt, [1] : High pt, [2] : All pt | |
94 | Int_t fGlobalSinglePlus[3]; // tot num of single plus | |
95 | Int_t fGlobalSingleMinus[3]; // tot num of single minus | |
96 | Int_t fGlobalSingleUndef[3]; // tot num of single undefined | |
97 | Int_t fGlobalPairUnlike[3]; // tot num of unlike-sign pairs | |
98 | Int_t fGlobalPairLike[3]; // tot num of like-sign pairs | |
99 | ||
100 | // Local Trigger information | |
101 | Int_t fTrigger[234]; // fTrigger = 0 : no trigger, 1 : trigger | |
102 | Int_t fStripX11[234]; // X strip in MC11 which triggers | |
103 | Int_t fDev[234]; // deviation which triggers | |
104 | Int_t fStripY11[234]; // Y strip in MC11 which triggers | |
105 | Int_t fLutLpt[234][2]; // Local Trigger info Low pt | |
106 | Int_t fLutHpt[234][2]; // Local Trigger info High pt | |
107 | Int_t fLutApt[234][2]; // Local Trigger info All pt | |
108 | ||
109 | // bit pattern | |
110 | Int_t fXbit11[234][16]; // bit pattern XM11 | |
111 | Int_t fXbit12[234][16]; // bit pattern XM12 | |
112 | Int_t fXbit21[234][32]; // bit pattern XM21 | |
113 | Int_t fXbit22[234][32]; // bit pattern XM22 | |
114 | Int_t fYbit11[234][16]; // bit pattern YM11 | |
115 | Int_t fYbit12[234][16]; // bit pattern YM12 | |
116 | Int_t fYbit21[234][16]; // bit pattern YM21 | |
117 | Int_t fYbit22[234][16]; // bit pattern YM22 | |
118 | ||
119 | Int_t fYbit21U[234][16]; // bit pattern YM21 Up | |
120 | Int_t fYbit22U[234][16]; // bit pattern YM22 Up | |
121 | Int_t fYbit21D[234][16]; // bit pattern YM21 Down | |
122 | Int_t fYbit22D[234][16]; // bit pattern YM22 Down | |
123 | ||
124 | TArrayI fDigitNumbers[234]; //! The digit number that fired a circuit. | |
125 | ||
126 | TObjArray* fTriggerCircuit; //! List of Trigger Circuit | |
127 | AliMUONData* fMUONData; //! Data container for MUON subsystem | |
128 | AliMUON* fMUON; //! pointer to MUON | |
129 | }; | |
130 | #endif | |
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 |