16 #include <TClonesArray.h>
18 #include "AliVEvent.h"
19 #include "AliEmcalTriggerPatchInfoAP.h"
25 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerAnaTriggerDecisionConfig)
28 namespace EMCalTriggerPtAnalysis {
33 AliEMCalTriggerAnaTriggerDecision::AliEMCalTriggerAnaTriggerDecision() :
56 for(
int itrg = 0; itrg < 4; itrg++){
82 for(
int icls = 0; icls < 4; icls++){
95 TIter patchIter(&listOfPatches);
96 AliEmcalTriggerPatchInfo *mypatch(NULL);
98 std::cout <<
"Generating trigger decision from found patches: " << listOfPatches.GetEntries() << std::endl;
100 else std::cout <<
"Using online patches\n";
102 int foundpatches[4] = {0,0,0,0};
104 while((mypatch = dynamic_cast<AliEmcalTriggerPatchInfo *>(patchIter()))){
105 if(
fDoDebug) std::cout <<
"Next patch: " << (mypatch->IsOfflineSimple() ?
"offline" :
"online:") << std::endl;
106 for(
int icase = 0; icase < 4; icase++){
109 foundpatches[icase]++;
114 std::cout <<
"Found patches:" << std::endl;
115 std::cout <<
"Jet high: " << foundpatches[
kTAEMCJHigh] << std::endl;
116 std::cout <<
"Jet low: " << foundpatches[
kTAEMCJLow] << std::endl;
117 std::cout <<
"Gamma high: " << foundpatches[
kTAEMCGHigh] << std::endl;
118 std::cout <<
"Gamma low: " << foundpatches[
kTAEMCGLow] << std::endl;
134 bool selectPatchType = kFALSE;
136 if(!recpatch->IsOfflineSimple())
return kFALSE;
138 case kTAEMCJHigh: selectPatchType = swapThresholds ? recpatch->IsJetLowSimple() : recpatch->IsJetHighSimple();
break;
139 case kTAEMCJLow: selectPatchType = swapThresholds ? recpatch->IsJetHighSimple() : recpatch->IsJetLowSimple();
break;
140 case kTAEMCGHigh: selectPatchType = swapThresholds ? recpatch->IsGammaLowSimple() : recpatch->IsGammaHighSimple();
break;
141 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;
155 if(!selectPatchType)
return kFALSE;
174 case kEnergyOnline: energy = patch->GetADCAmpGeVRough();
break;
186 std::cout <<
"Trigger decision" << std::endl;
187 std::cout <<
"===============================" << 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.
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.
Simple event container within the high- track 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.
Event Data used in exchange to the different analysis components.
void Create(const AliEMCalTriggerEventData *const data)
Gamma trigger, high threshold.
Bool_t HasEnergyThreshold(ETATriggerType trigger) const