- Removed not implemented methods AddData(), GetGlobalTriggerPattern
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalTriggerBoard.h
CommitLineData
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
19class AliMUONTriggerLut;
20
21class 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; }
e93b11d0 44 void SetCoinc44(Int_t coinc44=0) { fCoinc44 = coinc44; }
45
be972727 46 virtual void Setbit(Int_t strip, Int_t cathode, Int_t chamber);
8af755f4 47 virtual void SetbitM(Int_t strip, Int_t cathode, Int_t chamber);
be972727 48
e44235aa 49 virtual void Pattern(Option_t *option = "X Y") const; // default option displays X then Y bp
be972727 50
51 virtual void Reset();
52
53 virtual void SetSwitch(Int_t i, Int_t value) {fSwitch[i] = value;}
54
f4678817 55 virtual UShort_t GetSwitch(Int_t i) const {return fSwitch[i];}
be972727 56
57 virtual void SetTC(Bool_t con) {fTC = con;}
58
f4678817 59 virtual Bool_t GetTC() const {return fTC;}
be972727 60
e44235aa 61 virtual void SetNumber(Int_t nb) {fNumber = nb;}
8af755f4 62
e44235aa 63 virtual Int_t GetNumber() const {return fNumber;}
8af755f4 64
be972727 65 virtual void Module(char *mod);
66
f4678817 67 virtual void GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];}
be972727 68
69 virtual void SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];}
70
f4678817 71 virtual void GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];}
be972727 72
73 virtual void SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];}
74
f4678817 75 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 76
f4678817 77 virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];}
be972727 78
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
95 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];}
96
97 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];}
98
e44235aa 99 virtual void Scan(Option_t *option = "") const;
be972727 100
e44235aa 101 virtual Int_t GetI() const;
be972727 102
103 virtual void LocalTrigger();
104
f4678817 105 virtual Int_t Triggered() const {return fOutput;}
be972727 106
f4678817 107 virtual Int_t GetStripX11() const {return fStripX11;}
be972727 108
f4678817 109 virtual Int_t GetStripY11() const {return fStripY11;}
be972727 110
f4678817 111 virtual Int_t GetDev() const {return fDev;}
be972727 112
e44235aa 113 virtual void SetCrate(TString crate) {fCrate = crate;}
f4678817 114
e44235aa 115 virtual TString GetCrate() const {return fCrate;}
8af755f4 116
be972727 117 protected:
884a73f1 118 AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right);
119 AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right);
120
e44235aa 121 static const Int_t fgkCircuitId[234]; // old numbering (to be removed)
be972727 122
e44235aa 123 virtual void Resp(Option_t *option) const; // local trigger info before ("I") and after ("F") LUT
be972727 124
e44235aa 125 virtual void BP(Option_t *option) const; // display X/Y bp
be972727 126
127 private:
128
829425a5 129 Int_t fNumber; ///< Board number
be972727 130
829425a5 131 TString fCrate; ///< Crate name
8af755f4 132
829425a5 133 UShort_t fSwitch[10]; ///< Switch
134 UShort_t fXY[2][4]; ///< Bit pattern
135 UShort_t fXYU[2][4]; ///< Bit pattern UP
136 UShort_t fXYD[2][4]; ///< Bit pattern DOWN
137 UShort_t fMask[2][4]; ///< Mask
be972727 138
829425a5 139 Bool_t fTC; ///< Transverse connector
be972727 140
829425a5 141 Int_t fStripX11; ///< MT1 X position of the valid road
be972727 142
829425a5 143 Int_t fStripY11; ///< MT1 Y position of the valid road
be972727 144
829425a5 145 Int_t fDev; ///< Deviation in [0;+30]
be972727 146
829425a5 147 Int_t fLutLpt[2]; ///< Low Pt cuts estimated from LUT
148 Int_t fLutHpt[2]; ///< High Pt cuts estimated from LUT
be972727 149
150// Outputs of the local logic
829425a5 151 Int_t fOutput; ///< Board has triggered
152 Int_t fMinDevStrip[5]; ///< X (from algo)
153 Int_t fMinDev[5]; ///< Dev (from algo)
154 Int_t fCoordY[5]; ///< Y (from algo)
e93b11d0 155
829425a5 156 AliMUONTriggerLut *fLUT; //!< Pointer to trigger LUT, that we do not own.
e93b11d0 157 Int_t fCoinc44; ///< Coinc 44 (0/1 = coinc34/coinc44)
be972727 158
159 ClassDef(AliMUONLocalTriggerBoard,1)
160};
161#endif