35 #include "AliEMCALTriggerPatchInfo.h"
44 AliAnalysisTaskEmcalTriggerSelection::AliAnalysisTaskEmcalTriggerSelection():
46 fTriggerDecisionContainer(
nullptr),
47 fGlobalDecisionContainerName(
"EmcalTriggerDecision"),
57 fTriggerDecisionContainer(
nullptr),
58 fGlobalDecisionContainerName(
"EmcalTriggerDecision"),
87 while((selection = dynamic_cast<AliEmcalTriggerSelection *>(selectionIter()))){
111 std::vector<TString> pp2016periods = {
"LHC16h",
"LHC16i",
"LHC16j",
"LHC16k",
"LHC16l",
"LHC16o",
"LHC16p"};
112 std::vector<TString> mcpp2016periods = {
"LHC17f8",
"LHC17f8a",
"LHC17f8b",
"LHC178c",
"LHC17f8d",
"LHC17f8e",
113 "LHC17f8f",
"LHC17f8g",
"LHC17f8h",
"LHC17f8i",
"LHC17f8j",
"LHC17f8k"};
115 if(std::find(pp2016periods.begin(), pp2016periods.end(), periodstring) != pp2016periods.end())
ConfigurePP2016();
116 if(std::find(mcpp2016periods.begin(), mcpp2016periods.end(), periodstring) != mcpp2016periods.end())
ConfigureMCPP2016();
257 fMaxPatchEnergySmeared(
nullptr)
262 TNamed(sel->GetName(),
""),
265 fMaxPatchEnergySmeared(
nullptr)
267 fMaxPatchADC =
new TH1D(Form(
"hMaxPatchADC%s", GetName()),
"Max. patch ADC", 1000, 0., 1000);
268 fMaxPatchEnergy =
new TH1D(Form(
"hMaxPatchEnergy%s", GetName()),
"Max. patch energy", 1000, 0., 100);
274 fMaxPatchADC(ref.fMaxPatchADC),
275 fMaxPatchEnergy(ref.fMaxPatchEnergy),
276 fMaxPatchEnergySmeared(ref.fMaxPatchEnergySmeared)
281 TNamed::operator=(ref);
292 fMaxPatchADC->Fill(decision->
GetMainPatch()->GetADCAmp());
293 fMaxPatchEnergy->Fill(decision->
GetMainPatch()->GetPatchE());
294 fMaxPatchEnergySmeared->Fill(decision->
GetMainPatch()->GetSmearedEnergy());
299 targetlist->Add(fMaxPatchADC);
300 targetlist->Add(fMaxPatchEnergy);
301 targetlist->Add(fMaxPatchEnergySmeared);
Class for the selection of trigger patches in the EMCAL triggered event selection.
Object performing offline EMCAL trigger selection.
virtual Bool_t Run()
Run over all trigger selections, and append the selection to the global trigger selection container...
void ConfigurePP2016()
Configure the trigger selection task for pp anchored to 2016.
Container for trigger decision.
void MakeQA(const AliEmcalTriggerDecisionContainer *cont)
Fill QA histograms for the event.
virtual void UserExecOnce()
Initializing common output container for trigger decision.
void SetSelectionMethod(SelectionMethod_t selectionMethod)
void AutoConfigure(const char *period)
Automatically configure trigger decision handler for different periods.
TString fGlobalDecisionContainerName
Name of the global trigger selection.
Base task in the EMCAL framework.
virtual Bool_t FillHistograms()
Filling basic QA Histograms of the trigger selection task.
TH1 * fMaxPatchADC
Histogram with patch ADC of the max patch.
virtual void UserCreateOutputObjects()
Initialize QA histograms.
void InitQA(const AliEmcalTriggerSelection *const sel)
Initialize QA histograms for trigger selection.
AliAnalysisTaskEmcalTriggerSelection()
Dummy constructor.
void SetUseSimpleOfflinePatches(Bool_t doUse=kTRUE)
void SetCaloTriggerPatchInfoName(const char *n)
const AliEMCALTriggerPatchInfo * GetMainPatch() const
Get the highest energetic trigger patch of the event firing the trigger.
AliEmcalTriggerDecisionContainer * GetGlobalTriggerDecisionContainer() const
Find the main trigger container in the input event.
void GetHistos(Double_t lowLim, Double_t highLim, Dir *resp, Dir *data, TDirectory *out)
const TList * GetListOfTriggerDecisions() const
Get container with trigger decision results.
void SetThreshold(Double_t threshold)
void Fill(const AliEmcalTriggerDecision *const decision)
AliEmcalTriggerSelectionQA & operator=(const AliEmcalTriggerSelectionQA &ref)
Assignment operator.
TList fSelectionQA
Trigger selection QA.
void GetHistos(TList *targetlist) const
Fill histograms of this QA component into the targetlist.
void Reset()
Clear container with trigger decisions.
Container for trigger decision object.
TH1 * fMaxPatchEnergy
Histogram with patch energy of the max patch.
TH1 * fMaxPatchEnergySmeared
Histogram with smeared patch energy of the max patch.
AliEmcalTriggerDecision * MakeDecison(const TClonesArray *const reconstructedPatches) const
AliEmcalList * fOutput
!output list
TList fTriggerSelections
List of trigger selections.
Task providing an event selection for EMCAL-triggered events based on the reconstructed EMCAL trigger...
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
void SetAcceptanceType(AcceptanceType_t acceptance)
void ConfigureMCPP2016()
Configure the trigger selection task for MC anchored to pp 2016.
Helper class for the trigger selection.
AliEmcalTriggerSelectionQA()
Dummy constructor.
AliEmcalTriggerDecisionContainer * fTriggerDecisionContainer
void UserCreateOutputObjects()
Main initialization function on the worker.
void AddTriggerSelection(AliEmcalTriggerSelection *const selection)
void AddTriggerDecision(AliEmcalTriggerDecision *const decision)
Add trigger decision to the container.
void SetPatchType(PatchType_t patchType)
void SetUseRecalcPatches(Bool_t doUse=kTRUE)