]>
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 | ||
f4678817 | 8 | /// \ingroup sim |
9 | /// \class AliMUONLocalTriggerBoard | |
10 | /// \brief Implementation of local trigger board objects | |
11 | /// | |
12 | /// A local trigger board has as input a bit pattern and returns | |
13 | /// the local trigger response after comparison w/ a LUT | |
14 | /// | |
15 | /// \author Rachid Guernane (LPCCFd) | |
be972727 | 16 | |
17 | #include "AliMUONTriggerBoard.h" | |
18 | ||
19 | class AliMUONTriggerLut; | |
20 | ||
21 | class AliMUONLocalTriggerBoard : public AliMUONTriggerBoard | |
22 | { | |
23 | public: | |
e44235aa | 24 | |
25 | enum ESwitch { | |
26 | kX2d = 0, | |
27 | kX2m, | |
28 | kX2u, | |
29 | kOR0, | |
30 | kOR1, | |
31 | kENY, | |
32 | kZeroAllYLSB, | |
33 | kZeroDown, | |
34 | kZeroMiddle, | |
35 | kZeroUp }; | |
36 | ||
be972727 | 37 | AliMUONLocalTriggerBoard(); |
41922e78 | 38 | AliMUONLocalTriggerBoard(const char *name, Int_t a, AliMUONTriggerLut* lut); |
be972727 | 39 | virtual ~AliMUONLocalTriggerBoard() {;} |
e44235aa | 40 | |
41 | Bool_t HasLUT() const { return (fLUT != 0); } | |
42 | ||
43 | void SetLUT(AliMUONTriggerLut* lut) { fLUT = lut; } | |
be972727 | 44 | |
45 | virtual void Setbit(Int_t strip, Int_t cathode, Int_t chamber); | |
8af755f4 | 46 | virtual void SetbitM(Int_t strip, Int_t cathode, Int_t chamber); |
be972727 | 47 | |
e44235aa | 48 | virtual void Pattern(Option_t *option = "X Y") const; // default option displays X then Y bp |
be972727 | 49 | |
50 | virtual void Reset(); | |
51 | ||
52 | virtual void SetSwitch(Int_t i, Int_t value) {fSwitch[i] = value;} | |
53 | ||
f4678817 | 54 | virtual UShort_t GetSwitch(Int_t i) const {return fSwitch[i];} |
be972727 | 55 | |
56 | virtual void SetTC(Bool_t con) {fTC = con;} | |
57 | ||
f4678817 | 58 | virtual Bool_t GetTC() const {return fTC;} |
be972727 | 59 | |
e44235aa | 60 | virtual void SetNumber(Int_t nb) {fNumber = nb;} |
8af755f4 | 61 | |
e44235aa | 62 | virtual Int_t GetNumber() const {return fNumber;} |
8af755f4 | 63 | |
be972727 | 64 | virtual void Module(char *mod); |
65 | ||
f4678817 | 66 | virtual void GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];} |
be972727 | 67 | |
68 | virtual void SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];} | |
69 | ||
f4678817 | 70 | virtual void GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];} |
be972727 | 71 | |
72 | virtual void SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];} | |
73 | ||
f4678817 | 74 | 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 | 75 | |
f4678817 | 76 | virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];} |
be972727 | 77 | |
78 | 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];} | |
79 | ||
e44235aa | 80 | virtual void Conf() const; |
be972727 | 81 | |
82 | virtual void Response(); | |
83 | ||
41922e78 | 84 | virtual void Mask(Int_t index, UShort_t value); |
be972727 | 85 | |
86 | virtual void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32], | |
87 | Int_t coinc44); | |
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], | |
93 | Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16], | |
94 | Int_t coinc44); | |
95 | ||
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 | ||
98 | 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];} | |
99 | ||
e44235aa | 100 | virtual void Scan(Option_t *option = "") const; |
be972727 | 101 | |
e44235aa | 102 | virtual Int_t GetI() const; |
be972727 | 103 | |
104 | virtual void LocalTrigger(); | |
105 | ||
f4678817 | 106 | virtual Int_t Triggered() const {return fOutput;} |
be972727 | 107 | |
f4678817 | 108 | virtual Int_t GetStripX11() const {return fStripX11;} |
be972727 | 109 | |
f4678817 | 110 | virtual Int_t GetStripY11() const {return fStripY11;} |
be972727 | 111 | |
f4678817 | 112 | virtual Int_t GetDev() const {return fDev;} |
be972727 | 113 | |
e44235aa | 114 | virtual void SetCrate(TString crate) {fCrate = crate;} |
f4678817 | 115 | |
e44235aa | 116 | virtual TString GetCrate() const {return fCrate;} |
8af755f4 | 117 | |
be972727 | 118 | protected: |
884a73f1 | 119 | AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right); |
120 | AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right); | |
121 | ||
e44235aa | 122 | static const Int_t fgkCircuitId[234]; // old numbering (to be removed) |
be972727 | 123 | |
e44235aa | 124 | virtual void Resp(Option_t *option) const; // local trigger info before ("I") and after ("F") LUT |
be972727 | 125 | |
e44235aa | 126 | virtual void BP(Option_t *option) const; // display X/Y bp |
be972727 | 127 | |
128 | private: | |
129 | ||
829425a5 | 130 | Int_t fNumber; ///< Board number |
be972727 | 131 | |
829425a5 | 132 | TString fCrate; ///< Crate name |
8af755f4 | 133 | |
829425a5 | 134 | UShort_t fSwitch[10]; ///< Switch |
135 | UShort_t fXY[2][4]; ///< Bit pattern | |
136 | UShort_t fXYU[2][4]; ///< Bit pattern UP | |
137 | UShort_t fXYD[2][4]; ///< Bit pattern DOWN | |
138 | UShort_t fMask[2][4]; ///< Mask | |
be972727 | 139 | |
829425a5 | 140 | Bool_t fTC; ///< Transverse connector |
be972727 | 141 | |
829425a5 | 142 | Int_t fStripX11; ///< MT1 X position of the valid road |
be972727 | 143 | |
829425a5 | 144 | Int_t fStripY11; ///< MT1 Y position of the valid road |
be972727 | 145 | |
829425a5 | 146 | Int_t fDev; ///< Deviation in [0;+30] |
be972727 | 147 | |
829425a5 | 148 | Int_t fLutLpt[2]; ///< Low Pt cuts estimated from LUT |
149 | Int_t fLutHpt[2]; ///< High Pt cuts estimated from LUT | |
150 | Int_t fLutApt[2]; ///< All Pt cuts estimated from LUT | |
be972727 | 151 | |
152 | // Outputs of the local logic | |
829425a5 | 153 | Int_t fOutput; ///< Board has triggered |
154 | Int_t fMinDevStrip[5]; ///< X (from algo) | |
155 | Int_t fMinDev[5]; ///< Dev (from algo) | |
156 | Int_t fCoordY[5]; ///< Y (from algo) | |
be972727 | 157 | |
829425a5 | 158 | AliMUONTriggerLut *fLUT; //!< Pointer to trigger LUT, that we do not own. |
be972727 | 159 | |
160 | ClassDef(AliMUONLocalTriggerBoard,1) | |
161 | }; | |
162 | #endif |