]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | |
2 | /* $Id$ */ | |
3 | ||
aba89748 | 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 | |
7 | // | |
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 | |
14 | // muon triggers). | |
15 | // | |
71b7d225 | 16 | |
17 | #include "AliAODEventInfo.h" | |
aba89748 | 18 | #include "AliAODHeader.h" |
71b7d225 | 19 | #define AliAODEventInfo_CXX |
20 | ||
21 | // ************************************************************************** // | |
22 | ClassImp(AliAODEventInfo) | |
23 | ||
24 | //______________________________________________________________________________ | |
25 | AliAODEventInfo::AliAODEventInfo():fBeamEnergy(0), | |
aba89748 | 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) | |
71b7d225 | 29 | { |
aba89748 | 30 | // Default constructor |
71b7d225 | 31 | } |
32 | ||
33 | //______________________________________________________________________________ | |
34 | AliAODEventInfo::~AliAODEventInfo() | |
35 | { | |
aba89748 | 36 | // Default destructor |
71b7d225 | 37 | } |
38 | ||
39 | //______________________________________________________________________________ | |
a6e0ebfe | 40 | Bool_t AliAODEventInfo::IsHeaderAccessible(const Char_t *msg) const { |
aba89748 | 41 | // Tests if the header pointer is set |
42 | if(fHe!=0){ | |
71b7d225 | 43 | return 1; |
44 | }else{ | |
45 | if(msg)printf("Error! Header is not accessible: %s",msg); | |
46 | return 0; | |
47 | } | |
48 | } | |
49 | ||
50 | //______________________________________________________________________________ | |
aba89748 | 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; | |
61 | } | |
62 | ||
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; | |
71b7d225 | 68 | else |
69 | return 0; | |
70 | } | |
71 | ||
aba89748 | 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; | |
71b7d225 | 77 | else |
78 | return 0; | |
79 | } | |
80 | ||
aba89748 | 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; | |
71b7d225 | 86 | else |
87 | return 0; | |
88 | } | |
89 | ||
aba89748 | 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; | |
71b7d225 | 95 | else |
96 | return 0; | |
97 | } | |
98 | ||
aba89748 | 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; | |
71b7d225 | 104 | else |
105 | return 0; | |
106 | } | |
107 | ||
aba89748 | 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; | |
71b7d225 | 113 | else |
114 | return 0; | |
115 | } |