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