4 // AliAODEventInfo: a class for AODs for the MUON Arm of the ALICE Experiment
5 // Author: P. Cortese, Universita' del Piemonte Orientale in Alessandria and
6 // INFN of Torino - Italy
8 // This class provides additional information about the AliAODEvent, some
9 // of this is specific to MUON. The information stored in this class will
10 // follow the evolution of the framework (i.e. some data members may be
11 // moved into the header in the future).
12 // Currently it stores the beam energy and the information needed to decode
13 // the trigger pattern (which are the bits corresponding to the different
17 #include "AliAODEventInfo.h"
18 #include "AliAODHeader.h"
19 #define AliAODEventInfo_CXX
21 // ************************************************************************** //
22 ClassImp(AliAODEventInfo)
24 //______________________________________________________________________________
25 AliAODEventInfo::AliAODEventInfo():fBeamEnergy(0),
26 fMuonSingleLPtL0(0),fMuonSingleHPtL0(0),fMuonLikeLPtL0(0),
27 fMuonLikeHPtL0(0),fMuonUnlikeLPtL0(0),fMuonUnlikeHPtL0(0),
28 fEv(0),fEi(this),fHe(0),fTr(0),fDi(0)
30 // Default constructor
33 //______________________________________________________________________________
34 AliAODEventInfo::~AliAODEventInfo()
39 //______________________________________________________________________________
40 Bool_t AliAODEventInfo::IsHeaderAccessible(const Char_t *msg) const {
41 // Tests if the header pointer is set
45 if(msg)printf("Error! Header is not accessible: %s",msg);
50 //______________________________________________________________________________
51 void AliAODEventInfo::SelectTriggerBits(UChar_t muonSingleLPtL0,
52 UChar_t muonSingleHPtL0,UChar_t muonLikeLPtL0, UChar_t muonLikeHPtL0,
53 UChar_t muonUnlikeLPtL0, UChar_t muonUnlikeHPtL0){
54 // Define which bit in the trigger pattern corresponds to the given trigger condition
55 fMuonSingleLPtL0=muonSingleLPtL0;
56 fMuonSingleHPtL0=muonSingleHPtL0;
57 fMuonLikeLPtL0=muonLikeLPtL0;
58 fMuonLikeHPtL0=muonLikeHPtL0;
59 fMuonUnlikeLPtL0=muonUnlikeLPtL0;
60 fMuonUnlikeHPtL0=muonUnlikeHPtL0;
63 //______________________________________________________________________________
64 Bool_t AliAODEventInfo::MuonSingleLPtL0() const {
65 // Test if the event fired MUON_Single_LPt_L0
66 if(IsHeaderAccessible("MuonSingleLPtL0"))
67 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleLPtL0)&0x1;
72 //__________________________________________
73 Bool_t AliAODEventInfo::MuonSingleHPtL0() const {
74 // Test if the event fired MUON_Single_HPt_L0
75 if(IsHeaderAccessible("MuonSingleHPtL0"))
76 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleHPtL0)&0x1;
81 //__________________________________________
82 Bool_t AliAODEventInfo::MuonLikeLPtL0() const {
83 // Test if the event fired MUON_Like_LPt_L0
84 if(IsHeaderAccessible("MuonLikeLPtL0"))
85 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeLPtL0)&0x1;
90 //__________________________________________
91 Bool_t AliAODEventInfo::MuonLikeHPtL0() const {
92 // Test if the event fired MUON_Like_HPt_L0
93 if(IsHeaderAccessible("MuonLikeHPtL0"))
94 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeHPtL0)&0x1;
99 //__________________________________________
100 Bool_t AliAODEventInfo::MuonUnlikeLPtL0() const {
101 // Test if the event fired MUON_Unlike_LPt_L0
102 if(IsHeaderAccessible("MuonUnlikeLPtL0"))
103 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeLPtL0)&0x1;
108 //__________________________________________
109 Bool_t AliAODEventInfo::MuonUnlikeHPtL0() const {
110 // Test if the event fired MUON_Unlike_HPt_L0
111 if(IsHeaderAccessible("MuonUnlikeHPtL0"))
112 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeHPtL0)&0x1;