16 #include <TClonesArray.h>
18 #include "AliVEvent.h"
19 #include "AliEmcalTriggerPatchInfo.h"
25 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerAnaTriggerDecisionConfig)
28 namespace EMCalTriggerPtAnalysis {
33 AliEMCalTriggerAnaTriggerDecision::AliEMCalTriggerAnaTriggerDecision() :
57 for(
int itrg = 0; itrg < 4; itrg++){
83 for(
int icls = 0; icls < 4; icls++){
96 TIter patchIter(&listOfPatches);
97 AliEmcalTriggerPatchInfo *mypatch(NULL);
99 std::cout <<
"Generating trigger decision from found patches: " << listOfPatches.GetEntries() << std::endl;
101 else std::cout <<
"Using online patches\n";
103 int foundpatches[4] = {0,0,0,0};
105 while((mypatch = dynamic_cast<AliEmcalTriggerPatchInfo *>(patchIter()))){
106 if(
fDoDebug) std::cout <<
"Next patch: " << (mypatch->IsOfflineSimple() ?
"offline" :
"online:") << std::endl;
107 for(
int icase = 0; icase < 4; icase++){
110 foundpatches[icase]++;
115 std::cout <<
"Found patches:" << std::endl;
116 std::cout <<
"Jet high: " << foundpatches[
kTAEMCJHigh] << std::endl;
117 std::cout <<
"Jet low: " << foundpatches[
kTAEMCJLow] << std::endl;
118 std::cout <<
"Gamma high: " << foundpatches[
kTAEMCGHigh] << std::endl;
119 std::cout <<
"Gamma low: " << foundpatches[
kTAEMCGLow] << std::endl;
135 bool selectPatchType = kFALSE;
137 if(!recpatch->IsOfflineSimple())
return kFALSE;
139 case kTAEMCJHigh: selectPatchType = swapThresholds ? recpatch->IsJetLowSimple() : recpatch->IsJetHighSimple();
break;
140 case kTAEMCJLow: selectPatchType = swapThresholds ? recpatch->IsJetHighSimple() : recpatch->IsJetLowSimple();
break;
141 case kTAEMCGHigh: selectPatchType = swapThresholds ? recpatch->IsGammaLowSimple() : recpatch->IsGammaHighSimple();
break;
142 case kTAEMCGLow: selectPatchType = swapThresholds ? recpatch->IsGammaHighSimple() : recpatch->IsGammaLowSimple();
break;
145 if(recpatch->IsOfflineSimple())
return kFALSE;
147 case kTAEMCJHigh: selectPatchType = swapThresholds ? recpatch->IsJetLow() : recpatch->IsJetHigh();
break;
148 case kTAEMCJLow: selectPatchType = swapThresholds ? recpatch->IsJetHigh() : recpatch->IsJetLow();
break;
149 case kTAEMCGHigh: selectPatchType = swapThresholds ? recpatch->IsGammaLow() : recpatch->IsGammaHigh();
break;
150 case kTAEMCGLow: selectPatchType = swapThresholds ? recpatch->IsGammaHigh() : recpatch->IsGammaLow();
break;
154 if(!selectPatchType)
return kFALSE;
169 Double_t energy = 0.;
173 case kEnergyOnline: energy = patch->GetADCAmpGeVRough();
break;
185 std::cout <<
"Trigger decision" << std::endl;
186 std::cout <<
"===============================" << std::endl;
187 std::cout <<
"MinBias: " << (
fIsMinBias ?
"yes" :
"no") << std::endl;
188 std::string triggertitles[4] = {
"Jet High",
"Jet Low",
"Gamma High",
"Gamma Low"};
189 for(
int icase = 0; icase < 4; icase++){
190 std::cout << triggertitles[icase] <<
": String[" << (
fDecisionFromString[icase] ?
"yes" :
"no")
203 fSwapThresholds(kFALSE),
204 fUseOfflinePatches(kFALSE),
Bool_t SelectTriggerPatch(ETATriggerType trigger, const AliEmcalTriggerPatchInfo *const recpatch) const
AliVEvent * GetRecEvent() const
Class performing the selection of triggered events.
Online energy, estimated from L0 time sums.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Double_t GetPatchEnergy(EPatchEnergyType_t energytype, const AliEmcalTriggerPatchInfo *const patch) const
Declaration of class AliEMCalTriggerAnaTriggerDecision, a container for trigger decision in EMCAL-tri...
void Print(Option_t *opt=NULL) const
Gamma trigger, low threshold.
Offline amplitude, estimated from EMCAL cells.
Online amplitude of the patch, from L0 time sums.
void MakeDecisionFromPatches(const TClonesArray &listOfPatches)
Bool_t IsUsingOfflinePatches() const
ETATriggerType
Trigger types defined for this analysis.
EPatchEnergyType_t GetPatchEnergyType() const
AliEMCalTriggerAnaTriggerDecisionConfig()
Bool_t fDecisionFromPatches[4]
Storage for result from trigger string.
bool CheckConsistency() const
Jet trigger, high threshold.
Bool_t fIsMinBias
Marker for event as minimum bias event.
const TClonesArray * GetTriggerPatchContainer() const
Bool_t IsSwapThresholds() const
void MakeDecisionFromString(const TString &triggerstring)
AliEMCalTriggerAnaTriggerDecisionConfig fConfiguration
Configuration for the trigger decision handler.
Double_t fEnergyThresholds[4]
Energy thresholds applied in the analysis.
Jet trigger, low threshold.
Double_t GetEnergyThreshold(ETATriggerType trigger) const
Bool_t fDecisionFromString[4]
Storage for result from trigger patches.
Offline energy, from cells, calibrated, exluding hot towers.
Bool_t fDoDebug
Switch for debug mode.
void Create(const AliEMCalTriggerEventData *const data)
Gamma trigger, high threshold.
Bool_t HasEnergyThreshold(ETATriggerType trigger) const