Add AliMUONTriggerCircuitNew and AliMUONTriggerCrateStore
[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:
24 AliMUONLocalTriggerBoard();
41922e78 25 AliMUONLocalTriggerBoard(const char *name, Int_t a, AliMUONTriggerLut* lut);
be972727 26 virtual ~AliMUONLocalTriggerBoard() {;}
27
28 virtual void Setbit(Int_t strip, Int_t cathode, Int_t chamber);
8af755f4 29 virtual void SetbitM(Int_t strip, Int_t cathode, Int_t chamber);
be972727 30
8af755f4 31 virtual void Pattern(Option_t *option = "X Y"); // default option displays X then Y bp
be972727 32
33 virtual void Reset();
34
35 virtual void SetSwitch(Int_t i, Int_t value) {fSwitch[i] = value;}
36
f4678817 37 virtual UShort_t GetSwitch(Int_t i) const {return fSwitch[i];}
be972727 38
39 virtual void SetTC(Bool_t con) {fTC = con;}
40
f4678817 41 virtual Bool_t GetTC() const {return fTC;}
be972727 42
8af755f4 43 virtual void SetNumber(Int_t nb) {fNumber = nb;}
44
f4678817 45 virtual Int_t GetNumber() const {return fNumber;}
8af755f4 46
be972727 47 virtual void Module(char *mod);
48
f4678817 49 virtual void GetX34(UShort_t *X) const {for (Int_t i=0;i<2;i++) X[i] = fXY[0][i+2];}
be972727 50
51 virtual void SetX34(UShort_t *X) {for (Int_t i=0;i<2;i++) fXY[0][i+2] = X[i];}
52
f4678817 53 virtual void GetY(UShort_t *Y) const {for (Int_t i=0;i<4;i++) Y[i] = fXY[1][i];}
be972727 54
55 virtual void SetY(UShort_t *Y) {for (Int_t i=0;i<4;i++) fXY[1][i] = Y[i];}
56
f4678817 57 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 58
f4678817 59 virtual UShort_t GetXY(Int_t i, Int_t j) const {return fXY[i][j];}
be972727 60
61 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];}
62
63 virtual void Conf();
64
65 virtual void Response();
66
41922e78 67 virtual void Mask(Int_t index, UShort_t value);
be972727 68
69 virtual void TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32],
70 Int_t coinc44);
71
72 virtual void Sort2x5(Int_t dev1[6], Int_t dev2[6],
73 Int_t minDev[6], Int_t &dev1GTdev2);
74
75 virtual void TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], Int_t y4[16],
76 Int_t y3u[16], Int_t y3d[16], Int_t y4u[16], Int_t y4d[16],
77 Int_t coinc44);
78
79 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];}
80
81 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];}
82
83 virtual void Scan(Option_t *option = "");
84
85 virtual Int_t GetI();
86
87 virtual void LocalTrigger();
88
f4678817 89 virtual Int_t Triggered() const {return fOutput;}
be972727 90
f4678817 91 virtual Int_t GetStripX11() const {return fStripX11;}
be972727 92
f4678817 93 virtual Int_t GetStripY11() const {return fStripY11;}
be972727 94
f4678817 95 virtual Int_t GetDev() const {return fDev;}
be972727 96
8af755f4 97 virtual void SetCrate(TString crate) {fCrate = crate;}
f4678817 98
99 virtual TString GetCrate() const {return fCrate;}
8af755f4 100
be972727 101 protected:
884a73f1 102 AliMUONLocalTriggerBoard(const AliMUONLocalTriggerBoard& right);
103 AliMUONLocalTriggerBoard& operator = (const AliMUONLocalTriggerBoard& right);
104
be972727 105
106 virtual void Resp(Option_t *option); // local trigger info before ("I") and after ("F") LUT
107
108 virtual void BP(Option_t *option); // display X/Y bp
109
110 private:
111
f4678817 112 Int_t fNumber; // Board number
be972727 113
f4678817 114 TString fCrate; // Crate name
8af755f4 115
f4678817 116 UShort_t fSwitch[10]; // Switch
117 UShort_t fXY[2][4]; // Bit pattern
118 UShort_t fXYU[2][4]; // Bit pattern UP
119 UShort_t fXYD[2][4]; // Bit pattern DOWN
120 UShort_t fMask[2][4]; // Mask
be972727 121
f4678817 122 Bool_t fTC; // Transverse connector
be972727 123
f4678817 124 Int_t fStripX11; // MT1 X position of the valid road
be972727 125
f4678817 126 Int_t fStripY11; // MT1 Y position of the valid road
be972727 127
f4678817 128 Int_t fDev; // Deviation in [0;+30]
be972727 129
f4678817 130 Int_t fLutLpt[2]; // Low Pt cuts estimated from LUT
131 Int_t fLutHpt[2]; // High Pt cuts estimated from LUT
132 Int_t fLutApt[2]; // All Pt cuts estimated from LUT
be972727 133
134// Outputs of the local logic
f4678817 135 Int_t fOutput; // Board has triggered
136 Int_t fMinDevStrip[5]; // X (from algo)
137 Int_t fMinDev[5]; // Dev (from algo)
138 Int_t fCoordY[5]; // Y (from algo)
be972727 139
f4678817 140 AliMUONTriggerLut *fLUT; //! Pointer to trigger LUT, that we do not own.
be972727 141
142 ClassDef(AliMUONLocalTriggerBoard,1)
143};
144#endif