1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 #include "AliMUONGlobalTrigger.h"
23 #include "AliMUONLocalStruct.h"
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
31 /// \author Ph. Crochet
34 ClassImp(AliMUONGlobalTrigger)
37 //----------------------------------------------------------------------
38 AliMUONGlobalTrigger::AliMUONGlobalTrigger()
49 /// Default constructor
52 //----------------------------------------------------------------------
53 AliMUONGlobalTrigger::AliMUONGlobalTrigger(const AliMUONGlobalTrigger& theMUONGlobalTrig)
54 : TObject(theMUONGlobalTrig),
56 fSingleLpt(theMUONGlobalTrig.fSingleLpt),
57 fSingleHpt(theMUONGlobalTrig.fSingleHpt),
59 fPairUnlikeLpt(theMUONGlobalTrig.fPairUnlikeLpt),
60 fPairUnlikeHpt(theMUONGlobalTrig.fPairUnlikeHpt),
62 fPairLikeLpt(theMUONGlobalTrig.fPairLikeLpt),
63 fPairLikeHpt(theMUONGlobalTrig.fPairLikeHpt)
68 //----------------------------------------------------------------------
69 AliMUONGlobalTrigger::~AliMUONGlobalTrigger()
74 //----------------------------------------------------------------------
75 AliMUONGlobalTrigger& AliMUONGlobalTrigger::operator=(const AliMUONGlobalTrigger& theMUONGlobalTrig)
77 /// Assignement operator;
78 /// equal operator (useful for non-pointer member in TClonesArray)
80 if (this == &theMUONGlobalTrig)
83 // base class assignement
84 TObject::operator=(theMUONGlobalTrig);
86 fSingleLpt = theMUONGlobalTrig.fSingleLpt;
87 fSingleHpt = theMUONGlobalTrig.fSingleHpt;
89 fPairUnlikeLpt = theMUONGlobalTrig.fPairUnlikeLpt;
90 fPairUnlikeHpt = theMUONGlobalTrig.fPairUnlikeHpt;
92 fPairLikeLpt = theMUONGlobalTrig.fPairLikeLpt;
93 fPairLikeHpt = theMUONGlobalTrig.fPairLikeHpt;
98 //-----------------------------------------------------------
99 void AliMUONGlobalTrigger::SetFromGlobalResponse(UShort_t globalResponse)
101 /// Set class members from global response
102 /// coming from rawdata & global trigger board
103 /// [US:2, LS:2, Single:2] with [Hpt, Lpt]
106 // don't have the information anymore of the sign
107 fSingleLpt = globalResponse & 0x1;
108 fSingleHpt = (globalResponse >> 1) & 0x1;
110 fPairUnlikeLpt = (globalResponse >> 4) & 0x1;
111 fPairUnlikeHpt = (globalResponse >> 5) & 0x1;
113 fPairLikeLpt = (globalResponse >> 2) & 0x1;
114 fPairLikeHpt = (globalResponse >> 3) & 0x1;
118 //-----------------------------------------------------------
119 UChar_t AliMUONGlobalTrigger::GetGlobalResponse() const
121 /// Global trigger response
122 /// from class member values
123 /// [US:2, LS:2, Single:2] with [Hpt, Lpt]
127 if (SingleLpt()) response|= 0x1;
128 if (SingleHpt()) response|= 0x2;
130 if (PairLikeLpt()) response|= 0x4;
131 if (PairLikeHpt()) response|= 0x8;
133 if (PairUnlikeLpt()) response|= 0x10;
134 if (PairUnlikeHpt()) response|= 0x20;
138 //----------------------------------------------------------------------
139 void AliMUONGlobalTrigger::Print(Option_t* opt) const
142 // Printing Global Trigger information
146 if ( sopt.Contains("FULL") ) {
148 printf("=============================================\n");
149 printf(" Global Trigger output Low pt High pt\n");
150 printf(" number of Single :\t");
151 printf("%i\t%i\t",SingleLpt(),SingleHpt());
154 printf(" number of UnlikeSign pair :\t");
155 printf("%i\t%i\t",PairUnlikeLpt(),PairUnlikeHpt());
158 printf(" number of LikeSign pair :\t");
159 printf("%i\t%i\t",PairLikeLpt(),PairLikeHpt());
162 printf("=============================================\n");