]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTriggerGUIboard.h
New classes for finding multiple vertices (in case of pile-up). They will be used...
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGUIboard.h
CommitLineData
905654c2 1#ifndef ALIMUONTRIGGERGUIBOARD_H
2#define ALIMUONTRIGGERGUIBOARD_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/// \ingroup evaluation
8/// \class AliMUONTriggerGUIboard
9/// \brief Trigger GUI utility class: single board object
37391c63 10// Author Bogdan Vulpescu, LPC Clermont-Ferrand
905654c2 11
8b067dfe 12#include "AliMpPad.h"
13
905654c2 14#include <TString.h>
15#include <TObject.h>
16
8b067dfe 17class TClonesArray;
905654c2 18class TBox;
19
20class AliMUONTriggerGUIboard : public TObject
21{
22
23public:
24
8b067dfe 25 AliMUONTriggerGUIboard();
905654c2 26 virtual ~AliMUONTriggerGUIboard();
27
8b067dfe 28 /// get the standard name of this board
905654c2 29 Char_t *GetBoardName() const { return (Char_t*)(fName->Data()); };
8b067dfe 30 /// get the name of the crate containing this board
31 Char_t *GetCrateName() const { return (Char_t*)(fCrateName->Data()); };
32 /// get the working status of this board
905654c2 33 UShort_t GetStatus() const { return fStatus; };
8b067dfe 34 /// get the number of this board
905654c2 35 Int_t GetNumber() const { return fID; };
8b067dfe 36 /// get the id of the detector element
37 Int_t GetDetElemId() const { return fDetElemId; };
38 /// get the id of the circuit
39 Int_t GetIdCircuit() const { return fIdCircuit; };
40 /// get detector side (Left=0 , Right=1)
41 Int_t GetSide() const;
42 /// get line
43 Int_t GetLine() const;
44 /// get column
45 Int_t GetCol() const;
905654c2 46
47 /// initialize the board
48 void Init() {};
49 /// set the working status of this board
50 void SetStatus(UShort_t s) { fStatus = s; };
51 /// set the standard name of this board
8b067dfe 52 void SetBoardName(const Char_t *name) { fName = new TString(name); };
53 /// set the name of the crate containing this board
54 void SetCrateName(const Char_t *name) { fCrateName = new TString(name); };
905654c2 55 /// set the number of the detector element containing this board
56 void SetDetElemId(Int_t id) { fDetElemId = id; };
8b067dfe 57 /// set the number of this board
58 void SetNumber(Int_t id) { fID = id; }
59
60 /// add a mapping x-pad
61 void AddPadX(const AliMpPad &pad, Int_t ich)
62 {
63 new ((*fPadsX[ich])[fNPadsX[ich]++]) AliMpPad(pad);
64 }
65 /// add a mapping y-pad
66 void AddPadY(const AliMpPad &pad, Int_t ich)
67 {
68 new ((*fPadsY[ich])[fNPadsY[ich]++]) AliMpPad(pad);
69 }
70 /// create the display geometry from the mapping pads
71 void MakeGeometry();
72
905654c2 73 /// set an x-strip digit in a chamber with amplitude = amp
74 void SetDigitX(Int_t imt, Int_t is, Int_t amp) {
75 fXDig[imt][is] = (UChar_t)amp; };
76 /// set a y-strip digit in a chamber with amplitude = amp
77 void SetDigitY(Int_t imt, Int_t is, Int_t amp) {
78 fYDig[imt][is] = (UChar_t)amp; };
905654c2 79 /// get neighbouring boards with common y strips
80 UChar_t GetYOver() const { return fYOver; };
905654c2 81 /// get the board position inside the detector element in y direction
82 UChar_t GetPosition() const { return fPosition; };
83 /// get the digit amplitude for an x-strip in a given chamber
84 Int_t GetXDig(Int_t imt, Int_t is) const { return fXDig[imt][is]; };
85 /// get the digit amplitude for a y-strip in a given chamber
86 Int_t GetYDig(Int_t imt, Int_t is) const { return fYDig[imt][is]; };
87
8b067dfe 88 /// set x-strip box for display
905654c2 89 void SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
8b067dfe 90 /// set y-strip box for display
905654c2 91 void SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
8b067dfe 92
93 /// get x-strip box for display
905654c2 94 TBox *GetXDigBox(Int_t imt, Int_t is) const { return fXDigBox[imt][is]; };
8b067dfe 95 /// get y-strip box for display
905654c2 96 TBox *GetYDigBox(Int_t imt, Int_t is) const { return fYDigBox[imt][is]; };
97
98 /// get x-center of the board in chamber imt
99 Float_t GetXCenter(Int_t imt) const { return fXCenter[imt]; };
100 /// get y-center of the board in chamber imt
101 Float_t GetYCenter(Int_t imt) const { return fYCenter[imt]; };
102 /// get z-center of the board in chamber imt
103 Float_t GetZCenter(Int_t imt) const { return fZCenter[imt]; };
104 /// get x-width of the board in chamber imt
105 Float_t GetXWidth(Int_t imt) const { return fXWidth[imt]; };
106 /// get y-width of the board in chamber imt
107 Float_t GetYWidth(Int_t imt) const { return fYWidth[imt]; };
108
109 /// get x-index in detector element for an x-strip
110 Int_t GetXSix() const { return fXSix; };
111 /// get first y-index in detector element for an x-strip
112 Int_t GetXSiy1() const { return fXSiy1; };
113 /// get last y-index in detector element for an x-strip
114 Int_t GetXSiy2() const { return fXSiy2; };
115 /// get first x-index in detector element for a y-strip
116 Int_t GetYSix1() const { return fYSix1; };
117 /// get last x-index in detector element for a y-strip
118 Int_t GetYSix2() const { return fYSix2; };
119 /// get y-index in detector element for a y-strip
120 Int_t GetYSiy() const { return fYSiy; };
121 /// get number of x strips
122 Int_t GetNStripX() const { return GetXSiy2() - GetXSiy1() + 1; };
123 /// get number of y strips
124 Int_t GetNStripY() const { return GetYSix2() - GetYSix1() + 1; };
905654c2 125
126 /// set true if this board has a gui active
127 void SetOpen(Bool_t open) { fIsOpen = open; };
128 /// true if this board has a gui active
129 Bool_t IsOpen() const { return fIsOpen; };
130
8b067dfe 131 /// delete the set x-digits
905654c2 132 void ClearXDigits();
8b067dfe 133 /// delete the set y-digits
905654c2 134 void ClearYDigits();
135
8b067dfe 136 /// print information on this board
137 void PrintBoard() const;
138
905654c2 139private:
140
141 enum { kNMT = 4, kNS = 16 }; ///< constants
142
37391c63 143 /// Not implemented
144 AliMUONTriggerGUIboard (const AliMUONTriggerGUIboard& board);
145 /// Not implemented
146 AliMUONTriggerGUIboard& operator=(const AliMUONTriggerGUIboard& board);
147
905654c2 148 TString *fName; ///< Board name LCxLxBx or RCxLxBx
8b067dfe 149 TString *fCrateName; ///< Crate name
150 Int_t fID; ///< Board array number
905654c2 151 UShort_t fStatus; ///< Board status
152 UChar_t fPosition; ///< Y-boards position
153 UChar_t fYOver; ///< Y-boards with common y-strips
154
155 Float_t fXCenter[kNMT]; ///< X-center of the board
156 Float_t fYCenter[kNMT]; ///< Y-center of the board
157 Float_t fZCenter[kNMT]; ///< Z-center of the board
158 Float_t fXWidth[kNMT]; ///< X-width of the board
159 Float_t fYWidth[kNMT]; ///< Y-width of the board
160
161 Int_t fXSix; ///< X-strips ix index in the board
162 Int_t fXSiy1; ///< X-strips first iy index in the board
163 Int_t fXSiy2; ///< X-strips last iy index in the board
164
165 Int_t fYSix1; ///< Y-strips first ix index in the board
166 Int_t fYSix2; ///< Y-strips last ix index in the board
167 Int_t fYSiy; ///< Y-strips iy index in the board
168
169 Int_t fDetElemId; ///< Detector element ID (modulo 100)
170
171 Int_t fIdCircuit; ///< Circuit number
172
173 UChar_t fXDig[kNMT][kNS]; ///< X-digits amplitude, set by GUI
174 UChar_t fYDig[kNMT][kNS]; ///< Y-digits amplitude, set by GUI
175
176 TBox *fXDigBox[kNMT][kNS]; ///< X-digits boxes
177 TBox *fYDigBox[kNMT][kNS]; ///< Y-digits boxes
178
179 Bool_t fIsOpen; ///< Selection flag for the digits map
180
8b067dfe 181 /// adding pads from mapping to calculate the board geometry
182 Int_t fNPadsX[kNMT]; ///< nr of added mapping pads in x
183 Int_t fNPadsY[kNMT]; ///< nr of added mapping pads in y
184 TClonesArray *fPadsX[kNMT]; ///< array of mapping pads in x
185 TClonesArray *fPadsY[kNMT]; ///< array of mapping pads in y
186
187 ClassDef(AliMUONTriggerGUIboard,2) //Trigger GUI utility class: single board object
905654c2 188
189};
190
191#endif