]>
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" |
a9e2aefa | 22 | |
5398f946 | 23 | /// \class AliMUONLocalTrigger |
8d7dfec2 | 24 | /// Local Trigger algorithm data outputs |
5398f946 | 25 | /// (contains local trigger decision and bit patterns) \n |
26 | /// Add SetLocalStruct method for rawdata (Ch. Finck) | |
27 | /// \author Ph. Crochet | |
28 | ||
29 | /// \cond CLASSIMP | |
30 | ClassImp(AliMUONLocalTrigger) | |
31 | /// \endcond | |
8d7dfec2 | 32 | |
a9e2aefa | 33 | //---------------------------------------------------------------------- |
34 | AliMUONLocalTrigger::AliMUONLocalTrigger() | |
8d7dfec2 | 35 | : TObject(), |
36 | fLoCircuit(0), | |
37 | fLoStripX(0), | |
38 | fLoDev(0), | |
39 | fLoStripY(0), | |
40 | fLoLpt(0), | |
41 | fLoHpt(0), | |
8d7dfec2 | 42 | |
43 | fX1Pattern(0), | |
44 | fX2Pattern(0), | |
45 | fX3Pattern(0), | |
46 | fX4Pattern(0), | |
47 | ||
48 | fY1Pattern(0), | |
49 | fY2Pattern(0), | |
50 | fY3Pattern(0), | |
51 | fY4Pattern(0), | |
52 | ||
2f013ecd | 53 | fLoDecision(0) |
a9e2aefa | 54 | { |
5398f946 | 55 | /// Default constructor |
a9e2aefa | 56 | } |
e9b63742 | 57 | //---------------------------------------------------------------------- |
30178c30 | 58 | AliMUONLocalTrigger::AliMUONLocalTrigger(const AliMUONLocalTrigger& theMUONLocalTrig) |
1657f946 | 59 | : TObject(theMUONLocalTrig), |
60 | fLoCircuit(theMUONLocalTrig.fLoCircuit), | |
61 | fLoStripX(theMUONLocalTrig.fLoStripX), | |
62 | fLoDev(theMUONLocalTrig.fLoDev), | |
63 | fLoStripY(theMUONLocalTrig.fLoStripY), | |
64 | fLoLpt(theMUONLocalTrig.fLoLpt), | |
65 | fLoHpt(theMUONLocalTrig.fLoHpt), | |
1657f946 | 66 | |
67 | fX1Pattern(theMUONLocalTrig.fX1Pattern), | |
68 | fX2Pattern(theMUONLocalTrig.fX2Pattern), | |
69 | fX3Pattern(theMUONLocalTrig.fX3Pattern), | |
70 | fX4Pattern(theMUONLocalTrig.fX4Pattern), | |
71 | ||
72 | fY1Pattern(theMUONLocalTrig.fY1Pattern), | |
73 | fY2Pattern(theMUONLocalTrig.fY2Pattern), | |
74 | fY3Pattern(theMUONLocalTrig.fY3Pattern), | |
75 | fY4Pattern(theMUONLocalTrig.fY4Pattern), | |
76 | ||
2f013ecd | 77 | fLoDecision(theMUONLocalTrig.fLoDecision) |
e9b63742 | 78 | { |
5398f946 | 79 | /// Copy constructor (useful for TClonesArray) |
80 | ||
e9b63742 | 81 | } |
82 | //---------------------------------------------------------------------- | |
30178c30 | 83 | AliMUONLocalTrigger& AliMUONLocalTrigger::operator=(const AliMUONLocalTrigger& theMUONLocalTrig) |
e9b63742 | 84 | { |
5398f946 | 85 | /// Assigment operator; |
86 | /// equal operator (useful for non-pointer member in TClonesArray) | |
8d7dfec2 | 87 | |
30178c30 | 88 | if (this == &theMUONLocalTrig) |
e9b63742 | 89 | return *this; |
90 | ||
30178c30 | 91 | // base class assignement |
92 | TObject::operator=(theMUONLocalTrig); | |
93 | ||
94 | fLoCircuit = theMUONLocalTrig.fLoCircuit; | |
95 | fLoStripX = theMUONLocalTrig.fLoStripX; | |
96 | fLoDev = theMUONLocalTrig.fLoDev; | |
97 | fLoStripY = theMUONLocalTrig.fLoStripY; | |
98 | fLoLpt = theMUONLocalTrig.fLoLpt; | |
99 | fLoHpt = theMUONLocalTrig.fLoHpt; | |
e9b63742 | 100 | |
6dc7fcdf | 101 | fX1Pattern = theMUONLocalTrig.fX1Pattern; |
102 | fX2Pattern = theMUONLocalTrig.fX2Pattern; | |
103 | fX3Pattern = theMUONLocalTrig.fX3Pattern; | |
104 | fX4Pattern = theMUONLocalTrig.fX4Pattern; | |
105 | ||
106 | fY1Pattern = theMUONLocalTrig.fY1Pattern; | |
107 | fY2Pattern = theMUONLocalTrig.fY2Pattern; | |
108 | fY3Pattern = theMUONLocalTrig.fY3Pattern; | |
109 | fY4Pattern = theMUONLocalTrig.fY4Pattern; | |
110 | ||
111 | fLoDecision = theMUONLocalTrig.fLoDecision; | |
112 | ||
e9b63742 | 113 | return *this; |
114 | } | |
115 | ||
1657f946 | 116 | |
6dc7fcdf | 117 | //---------------------------------------------------------------------- |
118 | Char_t AliMUONLocalTrigger::GetLoDecision() | |
119 | { | |
5398f946 | 120 | /// Get local decision |
121 | /// from H(L)pt; | |
122 | /// returns local trigger decision | |
8d7dfec2 | 123 | |
6dc7fcdf | 124 | fLoDecision = (fLoLpt & 0x3); |
125 | fLoDecision |= (fLoHpt << 2) & 0xC; | |
402fb06e | 126 | |
6dc7fcdf | 127 | return fLoDecision; |
128 | } | |
2be06f1e | 129 | |
2be06f1e | 130 | |
8d7dfec2 | 131 | //---------------------------------------------------------------------- |
132 | void AliMUONLocalTrigger::SetLocalStruct(Int_t loCircuit, AliMUONLocalStruct& localStruct) | |
133 | { | |
5398f946 | 134 | /// Set local trigger info from rawdata localStruct |
8d7dfec2 | 135 | |
136 | // set id' | |
137 | SetLoCircuit(loCircuit); | |
138 | ||
139 | // set X, Y dev | |
140 | SetLoStripX((Int_t)localStruct.GetXPos()); | |
141 | SetLoStripY((Int_t)localStruct.GetYPos()); | |
142 | SetLoDev((Int_t)localStruct.GetXDev()); | |
143 | ||
144 | // set L(H)pt | |
145 | SetLoLpt(localStruct.GetLpt()); | |
146 | SetLoHpt(localStruct.GetHpt()); | |
147 | ||
148 | // set pattern X | |
149 | SetX1Pattern(localStruct.GetX1()); | |
150 | SetX2Pattern(localStruct.GetX2()); | |
151 | SetX3Pattern(localStruct.GetX3()); | |
152 | SetX4Pattern(localStruct.GetX4()); | |
153 | ||
154 | // set pattern Y | |
155 | SetY1Pattern(localStruct.GetY1()); | |
156 | SetY2Pattern(localStruct.GetY2()); | |
157 | SetY3Pattern(localStruct.GetY3()); | |
158 | SetY4Pattern(localStruct.GetY4()); | |
159 | ||
160 | } | |
eba3379e | 161 | |
162 | //---------------------------------------------------------------------- | |
163 | void AliMUONLocalTrigger::Print(Option_t* opt) const | |
164 | { | |
165 | // | |
166 | // Printing Local Trigger information | |
167 | // | |
168 | TString sopt(opt); | |
169 | sopt.ToUpper(); | |
170 | ||
171 | if ( sopt.Contains("FULL") ) { | |
172 | ||
ad705f30 | 173 | printf("<AliMUONLocalTrigger> Circuit %d StripX %d Dev %d StripY %d Lpt %d Hpt %d \n",LoCircuit(),LoStripX(),LoDev(),LoStripY(),LoLpt(),LoHpt()); |
eba3379e | 174 | |
175 | } | |
176 | } | |
177 |