16 #include <TClonesArray.h>
18 #include "AliVEvent.h"
19 #include "AliEMCALTriggerPatchInfo.h"
27 namespace EMCalTriggerPtAnalysis {
32 AliEMCalTriggerAnaTriggerDecision::AliEMCalTriggerAnaTriggerDecision() :
55 for(
int itrg = 0; itrg < 4; itrg++){
81 for(
int icls = 0; icls < 4; icls++){
94 TIter patchIter(&listOfPatches);
95 AliEMCALTriggerPatchInfo *mypatch(NULL);
97 std::cout <<
"Generating trigger decision from found patches: " << listOfPatches.GetEntries() << std::endl;
99 else std::cout <<
"Using online patches\n";
101 int foundpatches[4] = {0,0,0,0};
103 while((mypatch = dynamic_cast<AliEMCALTriggerPatchInfo *>(patchIter()))){
104 if(
fDoDebug) std::cout <<
"Next patch: " << (mypatch->IsOfflineSimple() ?
"offline" :
"online:") << std::endl;
105 for(
int icase = 0; icase < 4; icase++){
108 foundpatches[icase]++;
113 std::cout <<
"Found patches:" << std::endl;
114 std::cout <<
"Jet high: " << foundpatches[
kTAEMCJHigh] << std::endl;
115 std::cout <<
"Jet low: " << foundpatches[
kTAEMCJLow] << std::endl;
116 std::cout <<
"Gamma high: " << foundpatches[
kTAEMCGHigh] << std::endl;
117 std::cout <<
"Gamma low: " << foundpatches[
kTAEMCGLow] << std::endl;
133 bool selectPatchType = kFALSE;
135 if(!recpatch->IsOfflineSimple())
return kFALSE;
137 case kTAEMCJHigh: selectPatchType = swapThresholds ? recpatch->IsJetLowSimple() : recpatch->IsJetHighSimple();
break;
138 case kTAEMCJLow: selectPatchType = swapThresholds ? recpatch->IsJetHighSimple() : recpatch->IsJetLowSimple();
break;
139 case kTAEMCGHigh: selectPatchType = swapThresholds ? recpatch->IsGammaLowSimple() : recpatch->IsGammaHighSimple();
break;
140 case kTAEMCGLow: selectPatchType = swapThresholds ? recpatch->IsGammaHighSimple() : recpatch->IsGammaLowSimple();
break;
144 if(recpatch->IsOfflineSimple())
return kFALSE;
146 case kTAEMCJHigh: selectPatchType = swapThresholds ? recpatch->IsJetLow() : recpatch->IsJetHigh();
break;
147 case kTAEMCJLow: selectPatchType = swapThresholds ? recpatch->IsJetHigh() : recpatch->IsJetLow();
break;
148 case kTAEMCGHigh: selectPatchType = swapThresholds ? recpatch->IsGammaLow() : recpatch->IsGammaHigh();
break;
149 case kTAEMCGLow: selectPatchType = swapThresholds ? recpatch->IsGammaHigh() : recpatch->IsGammaLow();
break;
154 if(!selectPatchType)
return kFALSE;
173 case kEnergyOnline: energy = patch->GetADCAmpGeVRough();
break;
185 std::cout <<
"Trigger decision" << std::endl;
186 std::cout <<
"===============================" << std::endl;
187 std::string triggertitles[4] = {
"Jet High",
"Jet Low",
"Gamma High",
"Gamma Low"};
188 for(
int icase = 0; icase < 4; icase++){
189 std::cout << triggertitles[icase] <<
": String[" << (
fDecisionFromString[icase] ?
"yes" :
"no")
AliVEvent * GetRecEvent() const
Class performing the selection of triggered events.
Online energy, estimated from L0 time sums.
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
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
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void MakeDecisionFromString(const TString &triggerstring)
AliEMCalTriggerAnaTriggerDecisionConfig fConfiguration
Configuration for the trigger decision handler.
Double_t GetPatchEnergy(EPatchEnergyType_t energytype, const AliEMCALTriggerPatchInfo *const patch) const
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)
Bool_t SelectTriggerPatch(ETATriggerType trigger, const AliEMCALTriggerPatchInfo *const recpatch) const
Gamma trigger, high threshold.
Bool_t HasEnergyThreshold(ETATriggerType trigger) const