Always delete TObjArrays created by TString::Tokenize (Ruben)
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalTrigger.h
CommitLineData
a9e2aefa 1#ifndef ALIMUONLOCALTRIGGER_H
2#define ALIMUONLOCALTRIGGER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
30178c30 7/* $Id$ */
8// Revision of includes 07/05/2004
a9e2aefa 9
c1975ba7 10/// \ingroup trigger
692de412 11/// \class AliMUONLocalTrigger
12/// \brief Reconstructed Local Trigger object
5398f946 13// Author Ph. Crochet
692de412 14
a9e2aefa 15#include <TObject.h>
a026ce9e 16#include "AliMUONRawStreamTriggerHP.h"
a9e2aefa 17
8d7dfec2 18class AliMUONLocalStruct;
89976fde 19class TArrayS;
8d7dfec2 20
a9e2aefa 21class AliMUONLocalTrigger : public TObject {
22 public:
402fb06e 23 AliMUONLocalTrigger();
d694b6f6 24 AliMUONLocalTrigger(const AliMUONLocalTrigger& rhs); // copy constructor !
71a2d3aa 25 virtual ~AliMUONLocalTrigger();
d694b6f6 26 AliMUONLocalTrigger& operator=(const AliMUONLocalTrigger& rhs);
e9b63742 27
ce6a659c 28 // getter methods
5398f946 29 //
30 /// Return Circuit number
b8fdc4dd 31 Int_t LoCircuit() const {return fLoCircuit;}
5398f946 32 /// Return X strip in MT11
b8fdc4dd 33 Int_t LoStripX() const {return fLoStripX;}
5398f946 34 /// Return Deviation
b8fdc4dd 35 Int_t LoDev() const {return fLoDev;}
8aac6cce 36 /// Return Sign of Deviation
37 Int_t LoSdev() const {return fLoSdev;}
38 /// Return Trig Y
39 Int_t LoTrigY() const {return fLoTrigY;}
5398f946 40 /// Return Y strip in MT11
b8fdc4dd 41 Int_t LoStripY() const {return fLoStripY;}
5398f946 42 /// Return Low pt
b8fdc4dd 43 Int_t LoLpt() const {return fLoLpt;}
5398f946 44 /// Return High p
b8fdc4dd 45 Int_t LoHpt() const {return fLoHpt;}
4a69b40c 46
5398f946 47 /// Return X strip pattern for chamber 11
6dc7fcdf 48 UShort_t GetX1Pattern() const {return fX1Pattern;}
5398f946 49 /// Return X strip pattern for chamber 12
6dc7fcdf 50 UShort_t GetX2Pattern() const {return fX2Pattern;}
5398f946 51 /// Return X strip pattern for chamber 21
6dc7fcdf 52 UShort_t GetX3Pattern() const {return fX3Pattern;}
5398f946 53 /// Return X strip pattern for chamber 22
6dc7fcdf 54 UShort_t GetX4Pattern() const {return fX4Pattern;}
9016450b 55 /// return X pattern array
56 void GetXPattern(TArrayS& array) const;
57
6dc7fcdf 58
5398f946 59 /// Return Y strip pattern for chamber 11
6dc7fcdf 60 UShort_t GetY1Pattern() const {return fY1Pattern;}
5398f946 61 /// Return Y strip pattern for chamber 12
6dc7fcdf 62 UShort_t GetY2Pattern() const {return fY2Pattern;}
5398f946 63 /// Return Y strip pattern for chamber 21
6dc7fcdf 64 UShort_t GetY3Pattern() const {return fY3Pattern;}
5398f946 65 /// Return Y strip pattern for chamber 22
6dc7fcdf 66 UShort_t GetY4Pattern() const {return fY4Pattern;}
9016450b 67 /// return Y pattern array
68 void GetYPattern(TArrayS& array) const;
6dc7fcdf 69
89976fde 70 Char_t GetLoDecision() const;
d72d7b9e 71
d72d7b9e 72 Int_t GetDeviation() const;
5a240757 73 void SetDeviation(Int_t deviation);
d72d7b9e 74
75 /// Trigger response X strips
9ee1d6ff 76 Bool_t IsTrigX() const;
d72d7b9e 77 /// Trigger response Y strips
9ee1d6ff 78 Bool_t IsTrigY() const;
6dc7fcdf 79
00d46f24 80 /// Hit pattern from the re-calculated trigger response after removing chambers one-by-one
81 UShort_t GetHitPatternFromResponse() const {return fHitPatternFromResponse; }
82
83 /// Triggers from the re-calculated trigger response after removing chambers one-by-one
84 UChar_t GetTriggerWithoutChamber() const {return fTriggerWithoutChamber; }
85
ce6a659c 86 // setter methods
5398f946 87 //
88 /// Set Circuit number
ce6a659c 89 void SetLoCircuit(Int_t loCir) {fLoCircuit = loCir;}
5398f946 90 /// Set X strip in MT11
ce6a659c 91 void SetLoStripX(Int_t loStrX) {fLoStripX = loStrX;}
5398f946 92 /// Set Deviation
ce6a659c 93 void SetLoDev(Int_t loDev) {fLoDev = loDev;}
8aac6cce 94 /// Set Sign of Deviation
95 void SetLoSdev(Int_t loSdev) {fLoSdev = loSdev;}
96 /// Set Trig Y
97 void SetLoTrigY(Int_t loTrigY) {fLoTrigY = loTrigY;}
5398f946 98 /// Set Y strip in MT11
ce6a659c 99 void SetLoStripY(Int_t loStrY) {fLoStripY = loStrY;}
5398f946 100 /// Set Low pt
ce6a659c 101 void SetLoLpt(Int_t loLpt) {fLoLpt = loLpt;}
5398f946 102 /// Set High pt
ce6a659c 103 void SetLoHpt(Int_t loHpt) {fLoHpt = loHpt;}
94d65ea1 104
5398f946 105 /// Set X strip pattern for chamber 11
ce6a659c 106 void SetX1Pattern(UShort_t pat) {fX1Pattern = pat;}
5398f946 107 /// Set X strip pattern for chamber 12
ce6a659c 108 void SetX2Pattern(UShort_t pat) {fX2Pattern = pat;}
5398f946 109 /// Set X strip pattern for chamber 21
ce6a659c 110 void SetX3Pattern(UShort_t pat) {fX3Pattern = pat;}
5398f946 111 /// Set X strip pattern for chamber 22
ce6a659c 112 void SetX4Pattern(UShort_t pat) {fX4Pattern = pat;}
113
5398f946 114 /// Set Y strip pattern for chamber 11
ce6a659c 115 void SetY1Pattern(UShort_t pat) {fY1Pattern = pat;}
5398f946 116 /// Set Y strip pattern for chamber 12
ce6a659c 117 void SetY2Pattern(UShort_t pat) {fY2Pattern = pat;}
5398f946 118 /// Set Y strip pattern for chamber 21
ce6a659c 119 void SetY3Pattern(UShort_t pat) {fY3Pattern = pat;}
5398f946 120 /// Set Y strip pattern for chamber 22
ce6a659c 121 void SetY4Pattern(UShort_t pat) {fY4Pattern = pat;}
122
8d7dfec2 123 void SetLocalStruct(Int_t loCircuit, AliMUONLocalStruct& localStruct);
a026ce9e 124 void SetLocalStruct(Int_t loCircuit, const AliMUONRawStreamTriggerHP::AliLocalStruct& localStruct);
8d7dfec2 125
89976fde 126 Bool_t IsNull() const;
127
eba3379e 128 virtual void Print(Option_t* opt="") const;
129
89976fde 130 virtual const char* GetName() const;
00d46f24 131
132 /// The board would provide a trigger even after removing chamber ich [0,3]
133 void SetTriggerWithoutChamber(Int_t ich){ fTriggerWithoutChamber |= 1 << (3 - ich); }
134
135 /// Trigger algorithm did NOT find hit in the specified chamber and cathode
136 void SetNoHitInPlane(Int_t icath, Int_t ich){ fHitPatternFromResponse &= ~(1 << (7 - 4*icath - ich)); }
137
402fb06e 138private:
18b6b8c7 139 Int_t fLoCircuit; ///< Circuit number
140 Int_t fLoStripX; ///< X strip in MT11
8aac6cce 141 Int_t fLoDev; ///< Deviation
142 Int_t fLoSdev; ///< Sign of Deviation
143 Int_t fLoTrigY; ///< Trig Y
18b6b8c7 144 Int_t fLoStripY; ///< Y strip in MT11
145 Int_t fLoLpt; ///< Low pt 0 : nothing, 1 : Minus, 2 : Plus, 3 : Undef
146 Int_t fLoHpt; ///< High pt 0 : nothing, 1 : Minus, 2 : Plus, 3 : Undef
94d65ea1 147
18b6b8c7 148 UShort_t fX1Pattern; ///< X strip pattern for chamber 11
149 UShort_t fX2Pattern; ///< X strip pattern for chamber 12
150 UShort_t fX3Pattern; ///< X strip pattern for chamber 21
151 UShort_t fX4Pattern; ///< X strip pattern for chamber 22
8d7dfec2 152
18b6b8c7 153 UShort_t fY1Pattern; ///< Y strip pattern for chamber 11
154 UShort_t fY2Pattern; ///< Y strip pattern for chamber 12
155 UShort_t fY3Pattern; ///< Y strip pattern for chamber 21
156 UShort_t fY4Pattern; ///< Y strip pattern for chamber 22
6dc7fcdf 157
00d46f24 158 UShort_t fHitPatternFromResponse; ///< Fired plane according to re-computed repsonse
159 UChar_t fTriggerWithoutChamber; ///< Pattern of triggers after chamber removal
160
628fd563 161 ClassDef(AliMUONLocalTrigger,5) // reconstructed Local Trigger object
a9e2aefa 162};
163#endif
164
165
166
167
168
169