]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONLocalTriggerBoard.h
Initial version (Laurent)
[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; }
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();
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
ac809573 51 virtual Int_t GetNumber() const;
52
53 /// Return Crate name
54 virtual TString GetCrate() const {return fMpLocalBoard->GetCrate();}
55
8af755f4 56
be972727 57 virtual void Module(char *mod);
58
71a2d3aa 59 /// Return X34
f4678817 60 virtual void GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];}
be972727 61
71a2d3aa 62 /// Set X34
be972727 63 virtual void SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];}
64
71a2d3aa 65 /// Return Y
f4678817 66 virtual void GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];}
be972727 67
71a2d3aa 68 /// Set Y
be972727 69 virtual void SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];}
70
71a2d3aa 71 /// Return XY
f4678817 72 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 73
71a2d3aa 74 /// Return XY
f4678817 75 virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];}
be972727 76
71a2d3aa 77 /// Set XY
be972727 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
e93b11d0 86 virtual void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32]);
be972727 87
88 virtual void Sort2x5(Int_t dev1[6], Int_t dev2[6],
89 Int_t minDev[6], Int_t &dev1GTdev2);
90
91 virtual void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16],
e93b11d0 92 Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16]);
be972727 93
71a2d3aa 94 /// Set XYU
be972727 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
71a2d3aa 97 /// Set XYD
be972727 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
71a2d3aa 106 /// Return info if Board has triggered
f4678817 107 virtual Int_t Triggered() const {return fOutput;}
be972727 108
71a2d3aa 109 /// Return MT1 X position of the valid road
f4678817 110 virtual Int_t GetStripX11() const {return fStripX11;}
be972727 111
71a2d3aa 112 /// Return MT1 Y position of the valid road
f4678817 113 virtual Int_t GetStripY11() const {return fStripY11;}
be972727 114
8aac6cce 115 /// Return Deviation
f4678817 116 virtual Int_t GetDev() const {return fDev;}
8aac6cce 117
118 /// Return Sign of Deviation
119 virtual Int_t GetSdev() const {return fMinDev[4];}
120
121 /// Return Sign of Deviation
122 virtual Int_t GetTrigY() const {return fTrigY;}
be972727 123
be972727 124 protected:
125
71a2d3aa 126 static const Int_t fgkCircuitId[234]; ///< old numbering (to be removed)
127
128 virtual void Resp(Option_t *option) const; ///< local trigger info before ("I") and after ("F") LUT
be972727 129
71a2d3aa 130 virtual void BP(Option_t *option) const; ///< display X/Y bp
be972727 131
132 private:
71a2d3aa 133 /// Not implemented
134 AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right);
135 /// Not implemented
136 AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right);
be972727 137
ac809573 138 AliMpLocalBoard* fMpLocalBoard; ///< pointer to the local board mapping
8af755f4 139
829425a5 140 UShort_t fXY[2][4]; ///< Bit pattern
141 UShort_t fXYU[2][4]; ///< Bit pattern UP
142 UShort_t fXYD[2][4]; ///< Bit pattern DOWN
143 UShort_t fMask[2][4]; ///< Mask
be972727 144
829425a5 145 Int_t fStripX11; ///< MT1 X position of the valid road
be972727 146
829425a5 147 Int_t fStripY11; ///< MT1 Y position of the valid road
be972727 148
8aac6cce 149 Int_t fDev; ///< X deviation as in table 3-1 of Local Trigger Board PRR
150 Int_t fTrigY; ///< Trigger in Y
151
829425a5 152 Int_t fLutLpt[2]; ///< Low Pt cuts estimated from LUT
153 Int_t fLutHpt[2]; ///< High Pt cuts estimated from LUT
be972727 154
155// Outputs of the local logic
829425a5 156 Int_t fOutput; ///< Board has triggered
157 Int_t fMinDevStrip[5]; ///< X (from algo)
158 Int_t fMinDev[5]; ///< Dev (from algo)
159 Int_t fCoordY[5]; ///< Y (from algo)
e93b11d0 160
829425a5 161 AliMUONTriggerLut *fLUT; //!< Pointer to trigger LUT, that we do not own.
e93b11d0 162 Int_t fCoinc44; ///< Coinc 44 (0/1 = coinc34/coinc44)
be972727 163
69d7ac2e 164 ClassDef(AliMUONLocalTriggerBoard,1) //Implementation of local trigger board objects
be972727 165};
166#endif