]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
30178c30 | 16 | /* $Id$ */ |
a9e2aefa | 17 | |
8d7dfec2 | 18 | |
a9e2aefa | 19 | #include "AliMUONLocalTrigger.h" |
2be06f1e | 20 | #include "AliLog.h" |
8d7dfec2 | 21 | #include "AliMUONLocalStruct.h" |
8aac6cce | 22 | #include <Riostream.h> |
a9e2aefa | 23 | |
5398f946 | 24 | /// \class AliMUONLocalTrigger |
8d7dfec2 | 25 | /// Local Trigger algorithm data outputs |
5398f946 | 26 | /// (contains local trigger decision and bit patterns) \n |
27 | /// Add SetLocalStruct method for rawdata (Ch. Finck) | |
28 | /// \author Ph. Crochet | |
29 | ||
30 | /// \cond CLASSIMP | |
31 | ClassImp(AliMUONLocalTrigger) | |
32 | /// \endcond | |
8d7dfec2 | 33 | |
a9e2aefa | 34 | //---------------------------------------------------------------------- |
35 | AliMUONLocalTrigger::AliMUONLocalTrigger() | |
8d7dfec2 | 36 | : TObject(), |
37 | fLoCircuit(0), | |
38 | fLoStripX(0), | |
39 | fLoDev(0), | |
8aac6cce | 40 | fLoSdev(1), |
41 | fLoTrigY(1), | |
42 | fLoStripY(15), | |
8d7dfec2 | 43 | fLoLpt(0), |
44 | fLoHpt(0), | |
8d7dfec2 | 45 | |
46 | fX1Pattern(0), | |
47 | fX2Pattern(0), | |
48 | fX3Pattern(0), | |
49 | fX4Pattern(0), | |
50 | ||
51 | fY1Pattern(0), | |
52 | fY2Pattern(0), | |
53 | fY3Pattern(0), | |
54 | fY4Pattern(0), | |
55 | ||
2f013ecd | 56 | fLoDecision(0) |
a9e2aefa | 57 | { |
5398f946 | 58 | /// Default constructor |
a9e2aefa | 59 | } |
e9b63742 | 60 | //---------------------------------------------------------------------- |
30178c30 | 61 | AliMUONLocalTrigger::AliMUONLocalTrigger(const AliMUONLocalTrigger& theMUONLocalTrig) |
1657f946 | 62 | : TObject(theMUONLocalTrig), |
63 | fLoCircuit(theMUONLocalTrig.fLoCircuit), | |
64 | fLoStripX(theMUONLocalTrig.fLoStripX), | |
65 | fLoDev(theMUONLocalTrig.fLoDev), | |
8aac6cce | 66 | fLoSdev(theMUONLocalTrig.fLoSdev), |
67 | fLoTrigY(theMUONLocalTrig.fLoTrigY), | |
1657f946 | 68 | fLoStripY(theMUONLocalTrig.fLoStripY), |
69 | fLoLpt(theMUONLocalTrig.fLoLpt), | |
70 | fLoHpt(theMUONLocalTrig.fLoHpt), | |
1657f946 | 71 | |
72 | fX1Pattern(theMUONLocalTrig.fX1Pattern), | |
73 | fX2Pattern(theMUONLocalTrig.fX2Pattern), | |
74 | fX3Pattern(theMUONLocalTrig.fX3Pattern), | |
75 | fX4Pattern(theMUONLocalTrig.fX4Pattern), | |
76 | ||
77 | fY1Pattern(theMUONLocalTrig.fY1Pattern), | |
78 | fY2Pattern(theMUONLocalTrig.fY2Pattern), | |
79 | fY3Pattern(theMUONLocalTrig.fY3Pattern), | |
80 | fY4Pattern(theMUONLocalTrig.fY4Pattern), | |
81 | ||
2f013ecd | 82 | fLoDecision(theMUONLocalTrig.fLoDecision) |
e9b63742 | 83 | { |
5398f946 | 84 | /// Copy constructor (useful for TClonesArray) |
85 | ||
e9b63742 | 86 | } |
71a2d3aa | 87 | |
88 | //---------------------------------------------------------------------- | |
89 | AliMUONLocalTrigger::~AliMUONLocalTrigger() | |
90 | { | |
91 | /// Destructor | |
92 | } | |
93 | ||
e9b63742 | 94 | //---------------------------------------------------------------------- |
30178c30 | 95 | AliMUONLocalTrigger& AliMUONLocalTrigger::operator=(const AliMUONLocalTrigger& theMUONLocalTrig) |
e9b63742 | 96 | { |
5398f946 | 97 | /// Assigment operator; |
98 | /// equal operator (useful for non-pointer member in TClonesArray) | |
8d7dfec2 | 99 | |
30178c30 | 100 | if (this == &theMUONLocalTrig) |
e9b63742 | 101 | return *this; |
102 | ||
30178c30 | 103 | // base class assignement |
104 | TObject::operator=(theMUONLocalTrig); | |
105 | ||
106 | fLoCircuit = theMUONLocalTrig.fLoCircuit; | |
107 | fLoStripX = theMUONLocalTrig.fLoStripX; | |
108 | fLoDev = theMUONLocalTrig.fLoDev; | |
8aac6cce | 109 | fLoSdev = theMUONLocalTrig.fLoSdev; |
110 | fLoTrigY = theMUONLocalTrig.fLoTrigY; | |
30178c30 | 111 | fLoStripY = theMUONLocalTrig.fLoStripY; |
112 | fLoLpt = theMUONLocalTrig.fLoLpt; | |
113 | fLoHpt = theMUONLocalTrig.fLoHpt; | |
e9b63742 | 114 | |
6dc7fcdf | 115 | fX1Pattern = theMUONLocalTrig.fX1Pattern; |
116 | fX2Pattern = theMUONLocalTrig.fX2Pattern; | |
117 | fX3Pattern = theMUONLocalTrig.fX3Pattern; | |
118 | fX4Pattern = theMUONLocalTrig.fX4Pattern; | |
119 | ||
120 | fY1Pattern = theMUONLocalTrig.fY1Pattern; | |
121 | fY2Pattern = theMUONLocalTrig.fY2Pattern; | |
122 | fY3Pattern = theMUONLocalTrig.fY3Pattern; | |
123 | fY4Pattern = theMUONLocalTrig.fY4Pattern; | |
124 | ||
125 | fLoDecision = theMUONLocalTrig.fLoDecision; | |
126 | ||
e9b63742 | 127 | return *this; |
128 | } | |
129 | ||
1657f946 | 130 | |
6dc7fcdf | 131 | //---------------------------------------------------------------------- |
132 | Char_t AliMUONLocalTrigger::GetLoDecision() | |
133 | { | |
5398f946 | 134 | /// Get local decision |
135 | /// from H(L)pt; | |
136 | /// returns local trigger decision | |
8d7dfec2 | 137 | |
6dc7fcdf | 138 | fLoDecision = (fLoLpt & 0x3); |
139 | fLoDecision |= (fLoHpt << 2) & 0xC; | |
402fb06e | 140 | |
6dc7fcdf | 141 | return fLoDecision; |
142 | } | |
2be06f1e | 143 | |
2be06f1e | 144 | |
8d7dfec2 | 145 | //---------------------------------------------------------------------- |
146 | void AliMUONLocalTrigger::SetLocalStruct(Int_t loCircuit, AliMUONLocalStruct& localStruct) | |
147 | { | |
5398f946 | 148 | /// Set local trigger info from rawdata localStruct |
8d7dfec2 | 149 | |
150 | // set id' | |
151 | SetLoCircuit(loCircuit); | |
152 | ||
8aac6cce | 153 | // set X, Y, dev, Sdev and TrigY |
8d7dfec2 | 154 | SetLoStripX((Int_t)localStruct.GetXPos()); |
155 | SetLoStripY((Int_t)localStruct.GetYPos()); | |
156 | SetLoDev((Int_t)localStruct.GetXDev()); | |
8aac6cce | 157 | SetLoSdev((Int_t)localStruct.GetSXDev()); |
158 | SetLoTrigY((Int_t)localStruct.GetTriggerY()); | |
8d7dfec2 | 159 | |
160 | // set L(H)pt | |
161 | SetLoLpt(localStruct.GetLpt()); | |
162 | SetLoHpt(localStruct.GetHpt()); | |
163 | ||
164 | // set pattern X | |
165 | SetX1Pattern(localStruct.GetX1()); | |
166 | SetX2Pattern(localStruct.GetX2()); | |
167 | SetX3Pattern(localStruct.GetX3()); | |
168 | SetX4Pattern(localStruct.GetX4()); | |
169 | ||
170 | // set pattern Y | |
171 | SetY1Pattern(localStruct.GetY1()); | |
172 | SetY2Pattern(localStruct.GetY2()); | |
173 | SetY3Pattern(localStruct.GetY3()); | |
174 | SetY4Pattern(localStruct.GetY4()); | |
175 | ||
176 | } | |
eba3379e | 177 | |
178 | //---------------------------------------------------------------------- | |
179 | void AliMUONLocalTrigger::Print(Option_t* opt) const | |
180 | { | |
71a2d3aa | 181 | /// Printing Local Trigger information |
182 | ||
eba3379e | 183 | TString sopt(opt); |
184 | sopt.ToUpper(); | |
185 | ||
186 | if ( sopt.Contains("FULL") ) { | |
187 | ||
ad705f30 | 188 | printf("<AliMUONLocalTrigger> Circuit %d StripX %d Dev %d StripY %d Lpt %d Hpt %d \n",LoCircuit(),LoStripX(),LoDev(),LoStripY(),LoLpt(),LoHpt()); |
eba3379e | 189 | |
190 | } | |
191 | } | |
192 |