8 #include <TClonesArray.h>
13 #include "AliVEvent.h"
14 #include "AliEMCALTriggerPatchInfo.h"
33 DefineOutput(1, TList::Class());
42 fHistos->
CreateTH2(
"posRecalcEG1",
"Position of recalc EG1 patches", 48, -0.5, 47.5, 104, -0.5, 103.5);
43 fHistos->
CreateTH2(
"posOnlineEG1",
"Position of recalc EG1 patches", 48, -0.5, 47.5, 104, -0.5, 103.5);
50 TString firedtriggers(InputEvent()->GetFiredTriggerClasses());
51 if(!firedtriggers.Contains(
"EG1"))
return;
52 if(!(fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA))
return;
54 TClonesArray *triggerpatches =
dynamic_cast<TClonesArray *
>(InputEvent()->FindListObject(
"EmcalTriggers"));
56 AliErrorStream() <<
"Trigger patch container EmcalTriggers not found in task " << GetName() << std::endl;
58 AliEMCALTriggerPatchInfo *currentpatch(
nullptr);
59 for(TIter patchiter = TIter(triggerpatches).Begin(); patchiter != TIter::End(); ++patchiter){
60 currentpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(*patchiter);
61 if(currentpatch->GetPatchSize() != 2)
continue;
63 if(currentpatch->IsLevel0() || currentpatch->IsLevel0Recalc() || currentpatch->IsLevel0Simple())
continue;
65 fHistos->
FillTH1(
"posRecalcEG1", currentpatch->GetColStart(), currentpatch->GetRowStart());
66 if(currentpatch->IsGammaHigh())
67 fHistos->
FillTH1(
"posOnlineEG1", currentpatch->GetColStart(), currentpatch->GetRowStart());
AliAnalysisTaskEmcalTriggerPosition()
virtual void UserCreateOutputObjects()
virtual ~AliAnalysisTaskEmcalTriggerPosition()
ClassImp(AliAnalysisTaskEmcalTriggerPosition) AliAnalysisTaskEmcalTriggerPosition
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
THashList * GetListOfHistograms() const
virtual void UserExec(Option_t *opt)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Container class for histograms for the high- charged particle analysis.