]>
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. * | |
8c343c7c | 14 | **************************************************************************/ |
15 | ||
e516b01d | 16 | |
30178c30 | 17 | /* $Id$ */ |
a9e2aefa | 18 | |
d1525c79 | 19 | |
a9e2aefa | 20 | #include "AliMUONGlobalTrigger.h" |
eba3379e | 21 | #include "AliLog.h" |
22 | #include "AliMUONLocalStruct.h" | |
a9e2aefa | 23 | |
3d1463c8 | 24 | //----------------------------------------------------------------------------- |
5398f946 | 25 | /// \class AliMUONGlobalTrigger |
26 | /// Global Trigger algorithm data output. | |
27 | /// Built from Local and Regional algorithms. \n | |
28 | /// Update for copy & assigment operator, | |
29 | /// add SetGlobalPattern and GetGlobalPattern method for rawdata | |
30 | /// (Ch. Finck) | |
31 | /// \author Ph. Crochet | |
3d1463c8 | 32 | //----------------------------------------------------------------------------- |
5398f946 | 33 | |
34 | /// \cond CLASSIMP | |
925e6570 | 35 | ClassImp(AliMUONGlobalTrigger) |
5398f946 | 36 | /// \endcond |
8d7dfec2 | 37 | |
a9e2aefa | 38 | //---------------------------------------------------------------------- |
39 | AliMUONGlobalTrigger::AliMUONGlobalTrigger() | |
8d7dfec2 | 40 | : TObject(), |
8d4fefab | 41 | fSingleLpt(0), |
42 | fSingleHpt(0), | |
43 | ||
8d7dfec2 | 44 | fPairUnlikeLpt(0), |
45 | fPairUnlikeHpt(0), | |
8d7dfec2 | 46 | |
47 | fPairLikeLpt(0), | |
ad705f30 | 48 | fPairLikeHpt(0) |
8d7dfec2 | 49 | { |
5398f946 | 50 | /// Default constructor |
fcf99e71 | 51 | AliDebug(1,Form("this=%p",this)); |
a9e2aefa | 52 | } |
5398f946 | 53 | |
e9b63742 | 54 | //---------------------------------------------------------------------- |
30178c30 | 55 | AliMUONGlobalTrigger::AliMUONGlobalTrigger(const AliMUONGlobalTrigger& theMUONGlobalTrig) |
5398f946 | 56 | : TObject(theMUONGlobalTrig), |
e9b63742 | 57 | |
8d4fefab | 58 | fSingleLpt(theMUONGlobalTrig.fSingleLpt), |
59 | fSingleHpt(theMUONGlobalTrig.fSingleHpt), | |
5398f946 | 60 | |
61 | fPairUnlikeLpt(theMUONGlobalTrig.fPairUnlikeLpt), | |
62 | fPairUnlikeHpt(theMUONGlobalTrig.fPairUnlikeHpt), | |
5398f946 | 63 | |
64 | fPairLikeLpt(theMUONGlobalTrig.fPairLikeLpt), | |
ad705f30 | 65 | fPairLikeHpt(theMUONGlobalTrig.fPairLikeHpt) |
5398f946 | 66 | { |
67 | /// Copy constructor | |
fcf99e71 | 68 | AliDebug(1,Form("this=%p copy ctor",this)); |
69 | ||
5398f946 | 70 | } |
71 | ||
72 | //---------------------------------------------------------------------- | |
73 | AliMUONGlobalTrigger::~AliMUONGlobalTrigger() | |
74 | { | |
75 | /// Destructor | |
fcf99e71 | 76 | AliDebug(1,Form("this=%p",this)); |
e9b63742 | 77 | } |
78 | ||
79 | //---------------------------------------------------------------------- | |
30178c30 | 80 | AliMUONGlobalTrigger& AliMUONGlobalTrigger::operator=(const AliMUONGlobalTrigger& theMUONGlobalTrig) |
e9b63742 | 81 | { |
5398f946 | 82 | /// Assignement operator; |
83 | /// equal operator (useful for non-pointer member in TClonesArray) | |
8d7dfec2 | 84 | |
30178c30 | 85 | if (this == &theMUONGlobalTrig) |
e9b63742 | 86 | return *this; |
30178c30 | 87 | |
88 | // base class assignement | |
89 | TObject::operator=(theMUONGlobalTrig); | |
e9b63742 | 90 | |
8d4fefab | 91 | fSingleLpt = theMUONGlobalTrig.fSingleLpt; |
92 | fSingleHpt = theMUONGlobalTrig.fSingleHpt; | |
e9b63742 | 93 | |
30178c30 | 94 | fPairUnlikeLpt = theMUONGlobalTrig.fPairUnlikeLpt; |
95 | fPairUnlikeHpt = theMUONGlobalTrig.fPairUnlikeHpt; | |
e9b63742 | 96 | |
30178c30 | 97 | fPairLikeLpt = theMUONGlobalTrig.fPairLikeLpt; |
98 | fPairLikeHpt = theMUONGlobalTrig.fPairLikeHpt; | |
e9b63742 | 99 | |
100 | return *this; | |
101 | } | |
102 | ||
1908473e | 103 | //----------------------------------------------------------- |
8d4fefab | 104 | void AliMUONGlobalTrigger::SetFromGlobalResponse(UShort_t globalResponse) |
1908473e | 105 | { |
106 | /// Set class members from global response | |
8d4fefab | 107 | /// coming from rawdata & global trigger board |
1908473e | 108 | /// [US:2, LS:2, Single:2] with [Hpt, Lpt] |
109 | /// remove Apt | |
110 | ||
111 | // don't have the information anymore of the sign | |
8d4fefab | 112 | fSingleLpt = globalResponse & 0x1; |
113 | fSingleHpt = (globalResponse >> 1) & 0x1; | |
1908473e | 114 | |
115 | fPairUnlikeLpt = (globalResponse >> 4) & 0x1; | |
116 | fPairUnlikeHpt = (globalResponse >> 5) & 0x1; | |
117 | ||
118 | fPairLikeLpt = (globalResponse >> 2) & 0x1; | |
119 | fPairLikeHpt = (globalResponse >> 3) & 0x1; | |
120 | ||
121 | } | |
402fb06e | 122 | |
1908473e | 123 | //----------------------------------------------------------- |
124 | UChar_t AliMUONGlobalTrigger::GetGlobalResponse() const | |
125 | { | |
126 | /// Global trigger response | |
127 | /// from class member values | |
128 | /// [US:2, LS:2, Single:2] with [Hpt, Lpt] | |
1908473e | 129 | |
79e561d6 | 130 | Int_t response = 0; |
1908473e | 131 | |
79e561d6 | 132 | if (SingleLpt()) response|= 0x1; |
133 | if (SingleHpt()) response|= 0x2; | |
1908473e | 134 | |
79e561d6 | 135 | if (PairLikeLpt()) response|= 0x4; |
136 | if (PairLikeHpt()) response|= 0x8; | |
137 | ||
138 | if (PairUnlikeLpt()) response|= 0x10; | |
139 | if (PairUnlikeHpt()) response|= 0x20; | |
1908473e | 140 | |
141 | return response; | |
1908473e | 142 | } |
eba3379e | 143 | //---------------------------------------------------------------------- |
fcf99e71 | 144 | void AliMUONGlobalTrigger::Print(Option_t*) const |
eba3379e | 145 | { |
71a2d3aa | 146 | /// |
147 | /// Printing Global Trigger information | |
148 | /// | |
ad705f30 | 149 | printf("=============================================\n"); |
150 | printf(" Global Trigger output Low pt High pt\n"); | |
86a4c9ca | 151 | printf(" Single :\t"); |
8d4fefab | 152 | printf("%i\t%i\t",SingleLpt(),SingleHpt()); |
eba3379e | 153 | printf("\n"); |
154 | ||
86a4c9ca | 155 | printf(" UnlikeSign pair :\t"); |
ad705f30 | 156 | printf("%i\t%i\t",PairUnlikeLpt(),PairUnlikeHpt()); |
eba3379e | 157 | printf("\n"); |
158 | ||
86a4c9ca | 159 | printf(" LikeSign pair :\t"); |
ad705f30 | 160 | printf("%i\t%i\t",PairLikeLpt(),PairLikeHpt()); |
eba3379e | 161 | printf("\n"); |
162 | ||
ad705f30 | 163 | printf("=============================================\n"); |
fcf99e71 | 164 | |
eba3379e | 165 | } |
402fb06e | 166 | |
167 |