1 // AliAODEventInfo: a class for AODs for the MUON Arm of the ALICE Experiment
2 // Author: P. Cortese, Universita' del Piemonte Orientale in Alessandria and
3 // INFN of Torino - Italy
5 // This class provides additional information about the AliAODEvent, some
6 // of this is specific to MUON. The information stored in this class will
7 // follow the evolution of the framework (i.e. some data members may be
8 // moved into the header in the future).
9 // Currently it stores the beam energy and the information needed to decode
10 // the trigger pattern (which are the bits corresponding to the different
14 #include "AliAODEventInfo.h"
15 #include "AliAODHeader.h"
16 #define AliAODEventInfo_CXX
18 // ************************************************************************** //
19 ClassImp(AliAODEventInfo)
21 //______________________________________________________________________________
22 AliAODEventInfo::AliAODEventInfo():fBeamEnergy(0),
23 fMuonSingleLPtL0(0),fMuonSingleHPtL0(0),fMuonLikeLPtL0(0),
24 fMuonLikeHPtL0(0),fMuonUnlikeLPtL0(0),fMuonUnlikeHPtL0(0),
25 fEv(0),fEi(this),fHe(0),fTr(0),fDi(0)
27 // Default constructor
30 //______________________________________________________________________________
31 AliAODEventInfo::~AliAODEventInfo()
36 //______________________________________________________________________________
37 Bool_t AliAODEventInfo::IsHeaderAccessible(const Char_t *msg) const {
38 // Tests if the header pointer is set
42 if(msg)printf("Error! Header is not accessible: %s",msg);
47 //______________________________________________________________________________
48 void AliAODEventInfo::SelectTriggerBits(UChar_t muonSingleLPtL0,
49 UChar_t muonSingleHPtL0,UChar_t muonLikeLPtL0, UChar_t muonLikeHPtL0,
50 UChar_t muonUnlikeLPtL0, UChar_t muonUnlikeHPtL0){
51 // Define which bit in the trigger pattern corresponds to the given trigger condition
52 fMuonSingleLPtL0=muonSingleLPtL0;
53 fMuonSingleHPtL0=muonSingleHPtL0;
54 fMuonLikeLPtL0=muonLikeLPtL0;
55 fMuonLikeHPtL0=muonLikeHPtL0;
56 fMuonUnlikeLPtL0=muonUnlikeLPtL0;
57 fMuonUnlikeHPtL0=muonUnlikeHPtL0;
60 //______________________________________________________________________________
61 Bool_t AliAODEventInfo::MuonSingleLPtL0() const {
62 // Test if the event fired MUON_Single_LPt_L0
63 if(IsHeaderAccessible("MuonSingleLPtL0"))
64 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleLPtL0)&0x1;
69 //__________________________________________
70 Bool_t AliAODEventInfo::MuonSingleHPtL0() const {
71 // Test if the event fired MUON_Single_HPt_L0
72 if(IsHeaderAccessible("MuonSingleHPtL0"))
73 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleHPtL0)&0x1;
78 //__________________________________________
79 Bool_t AliAODEventInfo::MuonLikeLPtL0() const {
80 // Test if the event fired MUON_Like_LPt_L0
81 if(IsHeaderAccessible("MuonLikeLPtL0"))
82 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeLPtL0)&0x1;
87 //__________________________________________
88 Bool_t AliAODEventInfo::MuonLikeHPtL0() const {
89 // Test if the event fired MUON_Like_HPt_L0
90 if(IsHeaderAccessible("MuonLikeHPtL0"))
91 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeHPtL0)&0x1;
96 //__________________________________________
97 Bool_t AliAODEventInfo::MuonUnlikeLPtL0() const {
98 // Test if the event fired MUON_Unlike_LPt_L0
99 if(IsHeaderAccessible("MuonUnlikeLPtL0"))
100 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeLPtL0)&0x1;
105 //__________________________________________
106 Bool_t AliAODEventInfo::MuonUnlikeHPtL0() const {
107 // Test if the event fired MUON_Unlike_HPt_L0
108 if(IsHeaderAccessible("MuonUnlikeHPtL0"))
109 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeHPtL0)&0x1;