]>
Commit | Line | Data |
---|---|---|
be972727 | 1 | #ifndef ALIMUONLOCALTRIGGERBOARD_H |
2 | #define ALIMUONLOCALTRIGGERBOARD_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
c1975ba7 | 8 | /// \ingroup trigger |
f4678817 | 9 | /// \class AliMUONLocalTriggerBoard |
10 | /// \brief Implementation of local trigger board objects | |
11 | /// | |
71a2d3aa | 12 | // Author Rachid Guernane (LPCCFd) |
be972727 | 13 | |
14 | #include "AliMUONTriggerBoard.h" | |
ac809573 | 15 | #include "AliMpLocalBoard.h" |
be972727 | 16 | |
17 | class AliMUONTriggerLut; | |
18 | ||
19 | class AliMUONLocalTriggerBoard : public AliMUONTriggerBoard | |
20 | { | |
21 | public: | |
e44235aa | 22 | |
be972727 | 23 | AliMUONLocalTriggerBoard(); |
ac809573 | 24 | AliMUONLocalTriggerBoard(AliMpLocalBoard* mpLocalBoard); |
25 | ||
71a2d3aa | 26 | virtual ~AliMUONLocalTriggerBoard(); |
e44235aa | 27 | |
71a2d3aa | 28 | /// Return true if LUT is set |
29 | Bool_t HasLUT() const { return (fLUT != 0); } | |
30 | ||
31 | /// Set LUT | |
32 | void SetLUT(AliMUONTriggerLut* lut) { fLUT = lut; } | |
33 | /// Set Coinc 44 (0/1 = coinc34/coinc44) | |
34 | void SetCoinc44(Int_t coinc44=0) { fCoinc44 = coinc44; } | |
e93b11d0 | 35 | |
be972727 | 36 | virtual void Setbit(Int_t strip, Int_t cathode, Int_t chamber); |
8af755f4 | 37 | virtual void SetbitM(Int_t strip, Int_t cathode, Int_t chamber); |
be972727 | 38 | |
e44235aa | 39 | virtual void Pattern(Option_t *option = "X Y") const; // default option displays X then Y bp |
be972727 | 40 | |
41 | virtual void Reset(); | |
00d46f24 | 42 | virtual void ResetResponse(); |
be972727 | 43 | |
be972727 | 44 | |
71a2d3aa | 45 | /// Return i-th Switch value |
ac809573 | 46 | virtual UShort_t GetSwitch(Int_t i) const {return (UShort_t)fMpLocalBoard->GetSwitch(i);} |
be972727 | 47 | |
71a2d3aa | 48 | /// Return Transverse connector |
ac809573 | 49 | virtual Bool_t GetTC() const {return fMpLocalBoard->GetTC();} |
8af755f4 | 50 | |
71a2d3aa | 51 | /// Return Board number |
ac809573 | 52 | virtual Int_t GetNumber() const; |
53 | ||
54 | /// Return Crate name | |
55 | virtual TString GetCrate() const {return fMpLocalBoard->GetCrate();} | |
56 | ||
8af755f4 | 57 | |
be972727 | 58 | virtual void Module(char *mod); |
59 | ||
71a2d3aa | 60 | /// Return X34 |
f4678817 | 61 | virtual void GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];} |
be972727 | 62 | |
71a2d3aa | 63 | /// Set X34 |
be972727 | 64 | virtual void SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];} |
65 | ||
71a2d3aa | 66 | /// Return Y |
f4678817 | 67 | virtual void GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];} |
be972727 | 68 | |
71a2d3aa | 69 | /// Set Y |
be972727 | 70 | virtual void SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];} |
71 | ||
71a2d3aa | 72 | /// Return XY |
f4678817 | 73 | virtual void GetXY(UShort_t XY[2][4]) const {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) XY[i][j] = fXY[i][j];} |
be972727 | 74 | |
71a2d3aa | 75 | /// Return XY |
f4678817 | 76 | virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];} |
be972727 | 77 | |
71a2d3aa | 78 | /// Set XY |
be972727 | 79 | virtual void SetXY(UShort_t XY[2][4]) {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) fXY[i][j] = XY[i][j];} |
80 | ||
e44235aa | 81 | virtual void Conf() const; |
be972727 | 82 | |
83 | virtual void Response(); | |
84 | ||
41922e78 | 85 | virtual void Mask(Int_t index, UShort_t value); |
be972727 | 86 | |
e93b11d0 | 87 | virtual void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32]); |
be972727 | 88 | |
89 | virtual void Sort2x5(Int_t dev1[6], Int_t dev2[6], | |
90 | Int_t minDev[6], Int_t &dev1GTdev2); | |
91 | ||
92 | virtual void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16], | |
e93b11d0 | 93 | Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16]); |
be972727 | 94 | |
71a2d3aa | 95 | /// Set XYU |
be972727 | 96 | virtual void SetXYU(UShort_t V[2][4]) {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) fXYU[i][j] = V[i][j];} |
97 | ||
00d46f24 | 98 | /// Return XYU |
99 | virtual void GetXYU(UShort_t V[2][4]) const {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) V[i][j] = fXYU[i][j];} | |
100 | ||
71a2d3aa | 101 | /// Set XYD |
be972727 | 102 | virtual void SetXYD(UShort_t V[2][4]) {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) fXYD[i][j] = V[i][j];} |
103 | ||
00d46f24 | 104 | /// Return XYD |
105 | virtual void GetXYD(UShort_t V[2][4]) const {for (Int_t i=0;i<2;i++) for (Int_t j=0;j<4;j++) V[i][j] = fXYD[i][j];} | |
106 | ||
e44235aa | 107 | virtual void Scan(Option_t *option = "") const; |
be972727 | 108 | |
e44235aa | 109 | virtual Int_t GetI() const; |
be972727 | 110 | |
111 | virtual void LocalTrigger(); | |
112 | ||
71a2d3aa | 113 | /// Return info if Board has triggered |
f4678817 | 114 | virtual Int_t Triggered() const {return fOutput;} |
be972727 | 115 | |
71a2d3aa | 116 | /// Return MT1 X position of the valid road |
f4678817 | 117 | virtual Int_t GetStripX11() const {return fStripX11;} |
be972727 | 118 | |
71a2d3aa | 119 | /// Return MT1 Y position of the valid road |
f4678817 | 120 | virtual Int_t GetStripY11() const {return fStripY11;} |
be972727 | 121 | |
8aac6cce | 122 | /// Return Deviation |
f4678817 | 123 | virtual Int_t GetDev() const {return fDev;} |
8aac6cce | 124 | |
125 | /// Return Sign of Deviation | |
126 | virtual Int_t GetSdev() const {return fMinDev[4];} | |
127 | ||
5a8d50e9 | 128 | /// Return Trigger in Y |
8aac6cce | 129 | virtual Int_t GetTrigY() const {return fTrigY;} |
5a8d50e9 | 130 | |
131 | virtual Bool_t IsTrigY() const; | |
132 | ||
133 | virtual Bool_t IsTrigX() const; | |
00d46f24 | 134 | |
135 | AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right); | |
136 | AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right); | |
137 | ||
138 | virtual Bool_t IsNull() const; | |
be972727 | 139 | |
be972727 | 140 | protected: |
141 | ||
71a2d3aa | 142 | static const Int_t fgkCircuitId[234]; ///< old numbering (to be removed) |
143 | ||
144 | virtual void Resp(Option_t *option) const; ///< local trigger info before ("I") and after ("F") LUT | |
be972727 | 145 | |
71a2d3aa | 146 | virtual void BP(Option_t *option) const; ///< display X/Y bp |
be972727 | 147 | |
148 | private: | |
ac809573 | 149 | AliMpLocalBoard* fMpLocalBoard; ///< pointer to the local board mapping |
8af755f4 | 150 | |
829425a5 | 151 | UShort_t fXY[2][4]; ///< Bit pattern |
152 | UShort_t fXYU[2][4]; ///< Bit pattern UP | |
153 | UShort_t fXYD[2][4]; ///< Bit pattern DOWN | |
154 | UShort_t fMask[2][4]; ///< Mask | |
be972727 | 155 | |
829425a5 | 156 | Int_t fStripX11; ///< MT1 X position of the valid road |
be972727 | 157 | |
829425a5 | 158 | Int_t fStripY11; ///< MT1 Y position of the valid road |
be972727 | 159 | |
8aac6cce | 160 | Int_t fDev; ///< X deviation as in table 3-1 of Local Trigger Board PRR |
161 | Int_t fTrigY; ///< Trigger in Y | |
162 | ||
829425a5 | 163 | Int_t fLutLpt[2]; ///< Low Pt cuts estimated from LUT |
164 | Int_t fLutHpt[2]; ///< High Pt cuts estimated from LUT | |
be972727 | 165 | |
166 | // Outputs of the local logic | |
829425a5 | 167 | Int_t fOutput; ///< Board has triggered |
168 | Int_t fMinDevStrip[5]; ///< X (from algo) | |
169 | Int_t fMinDev[5]; ///< Dev (from algo) | |
170 | Int_t fCoordY[5]; ///< Y (from algo) | |
e93b11d0 | 171 | |
829425a5 | 172 | AliMUONTriggerLut *fLUT; //!< Pointer to trigger LUT, that we do not own. |
e93b11d0 | 173 | Int_t fCoinc44; ///< Coinc 44 (0/1 = coinc34/coinc44) |
be972727 | 174 | |
d0d71b34 | 175 | ClassDef(AliMUONLocalTriggerBoard,2) //Implementation of local trigger board objects |
be972727 | 176 | }; |
177 | #endif |