fix finding of pad neighbours; remove methods to write them in OCDB
[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
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
17class AliMUONTriggerLut;
18
19class 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; }
12549f10 35
8af755f4 36 virtual void SetbitM(Int_t strip, Int_t cathode, Int_t chamber);
be972727 37
57e2ad1a 38 virtual void Pattern(const Option_t *option = "X Y") const; // default option displays X then Y bp
be972727 39
40 virtual void Reset();
00d46f24 41 virtual void ResetResponse();
be972727 42
be972727 43
71a2d3aa 44 /// Return i-th Switch value
ac809573 45 virtual UShort_t GetSwitch(Int_t i) const {return (UShort_t)fMpLocalBoard->GetSwitch(i);}
be972727 46
71a2d3aa 47 /// Return Transverse connector
ac809573 48 virtual Bool_t GetTC() const {return fMpLocalBoard->GetTC();}
8af755f4 49
71a2d3aa 50 /// Return Board number
12549f10
VB
51 virtual Int_t GetNumber() const { return fMpLocalBoard->GetId(); }
52
53 /// Is notified (copy boards are not)
54 virtual Bool_t IsNotified() const { return fMpLocalBoard->IsNotified(); }
ac809573 55
56 /// Return Crate name
57 virtual TString GetCrate() const {return fMpLocalBoard->GetCrate();}
58
71a2d3aa 59 /// Return XY
f4678817 60 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 61
71a2d3aa 62 /// Return XY
f4678817 63 virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];}
be972727 64
71a2d3aa 65 /// Set XY
be972727 66 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];}
67
e44235aa 68 virtual void Conf() const;
be972727 69
70 virtual void Response();
71
41922e78 72 virtual void Mask(Int_t index, UShort_t value);
be972727 73
e93b11d0 74 virtual void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32]);
be972727 75
76 virtual void Sort2x5(Int_t dev1[6], Int_t dev2[6],
77 Int_t minDev[6], Int_t &dev1GTdev2);
78
79 virtual void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16],
e93b11d0 80 Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16]);
be972727 81
71a2d3aa 82 /// Set XYU
be972727 83 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];}
84
00d46f24 85 /// Return XYU
86 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];}
87
71a2d3aa 88 /// Set XYD
be972727 89 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];}
90
00d46f24 91 /// Return XYD
92 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];}
93
e44235aa 94 virtual void Scan(Option_t *option = "") const;
be972727 95
e44235aa 96 virtual Int_t GetI() const;
be972727 97
98 virtual void LocalTrigger();
99
71a2d3aa 100 /// Return info if Board has triggered
f4678817 101 virtual Int_t Triggered() const {return fOutput;}
be972727 102
71a2d3aa 103 /// Return MT1 X position of the valid road
f4678817 104 virtual Int_t GetStripX11() const {return fStripX11;}
be972727 105
71a2d3aa 106 /// Return MT1 Y position of the valid road
f4678817 107 virtual Int_t GetStripY11() const {return fStripY11;}
be972727 108
8aac6cce 109 /// Return Deviation
f4678817 110 virtual Int_t GetDev() const {return fDev;}
8aac6cce 111
112 /// Return Sign of Deviation
113 virtual Int_t GetSdev() const {return fMinDev[4];}
114
5a8d50e9 115 /// Return Trigger in Y
8aac6cce 116 virtual Int_t GetTrigY() const {return fTrigY;}
5a8d50e9 117
118 virtual Bool_t IsTrigY() const;
119
120 virtual Bool_t IsTrigX() const;
00d46f24 121
122 AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right);
123 AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right);
124
125 virtual Bool_t IsNull() const;
be972727 126
be972727 127 protected:
128
71a2d3aa 129 static const Int_t fgkCircuitId[234]; ///< old numbering (to be removed)
130
131 virtual void Resp(Option_t *option) const; ///< local trigger info before ("I") and after ("F") LUT
be972727 132
57e2ad1a 133 virtual void BP(const Option_t *option) const; ///< display X/Y bp
be972727 134
135 private:
ac809573 136 AliMpLocalBoard* fMpLocalBoard; ///< pointer to the local board mapping
8af755f4 137
829425a5 138 UShort_t fXY[2][4]; ///< Bit pattern
139 UShort_t fXYU[2][4]; ///< Bit pattern UP
140 UShort_t fXYD[2][4]; ///< Bit pattern DOWN
141 UShort_t fMask[2][4]; ///< Mask
be972727 142
829425a5 143 Int_t fStripX11; ///< MT1 X position of the valid road
be972727 144
829425a5 145 Int_t fStripY11; ///< MT1 Y position of the valid road
be972727 146
8aac6cce 147 Int_t fDev; ///< X deviation as in table 3-1 of Local Trigger Board PRR
148 Int_t fTrigY; ///< Trigger in Y
149
829425a5 150 Int_t fLutLpt[2]; ///< Low Pt cuts estimated from LUT
151 Int_t fLutHpt[2]; ///< High Pt cuts estimated from LUT
be972727 152
153// Outputs of the local logic
829425a5 154 Int_t fOutput; ///< Board has triggered
155 Int_t fMinDevStrip[5]; ///< X (from algo)
156 Int_t fMinDev[5]; ///< Dev (from algo)
157 Int_t fCoordY[5]; ///< Y (from algo)
e93b11d0 158
829425a5 159 AliMUONTriggerLut *fLUT; //!< Pointer to trigger LUT, that we do not own.
e93b11d0 160 Int_t fCoinc44; ///< Coinc 44 (0/1 = coinc34/coinc44)
be972727 161
d0d71b34 162 ClassDef(AliMUONLocalTriggerBoard,2) //Implementation of local trigger board objects
be972727 163};
164#endif