![]() |
AliPhysics
3b4a69f (3b4a69f)
|
Container for trigger decision object. More...
#include <AliEmcalTriggerDecisionContainer.h>
Public Member Functions | |
AliEmcalTriggerDecisionContainer () | |
Dummy constructor. More... | |
AliEmcalTriggerDecisionContainer (const char *name) | |
Main constructor. More... | |
virtual | ~AliEmcalTriggerDecisionContainer () |
Destructor. More... | |
void | Reset () |
Clear container with trigger decisions. More... | |
virtual void | Clear (Option_t *option="") |
Clear function of the trigger decision container. More... | |
void | AddTriggerDecision (AliEmcalTriggerDecision *const decision) |
Add trigger decision to the container. More... | |
const AliEmcalTriggerDecision * | FindTriggerDecision (const char *name) const |
Find a trigger decision with a given name in the trigger decision container. More... | |
const TList * | GetListOfTriggerDecisions () const |
Get container with trigger decision results. More... | |
bool | IsEventSelected (const char *name) const |
Checks whether the events is selected for a given trigger type. More... | |
Protected Attributes | |
TList | fContainer |
List of trigger decisions. More... | |
Container for trigger decision object.
In case the event selection of EMCAL Level1 triggers is done from trigger patches, the selection results for all supported triggers are stored in the AliEmcalTriggerDecision container for easy event selection. In case the event is selected as triggered event the primitives firing the trigger are also linked so they can be accessed in user analyses.
In order to get the trigger decision the AliAnalysisTaskEmcalTriggerSelection needs to run together with the AliEmcalTriggerMakerTask before the actual user task. In this case the trigger selection task creates an object of type PWG::EMCAL::AliEmcalTriggerDecisionContainer, if not specified differently with name EmcalTriggerDecision, and adds it to the input event as list object. Users can then access it in the task via
Once the trigger selection container is available, EMCAL Level1 triggers can be queried using the function IsEventSelected(trigger) with a valid trigger name. Trigger names are expected to be valid Level1 trigger names according to the EMCAL convention
The following example selects events as EMCAL EG1 events:
More information about the trigger selection for a given triggers are attached as objects of type PWG::EMCAL::AliEmcalTriggerDecision to the AliEmcalTriggerDecisionContainer. They can be queried from the trigger decision container via the function FindTriggerDecision(triggername).
The following example extracts the maximum trigger patch firing the trigger for the EG1 trigger:
Definition at line 105 of file AliEmcalTriggerDecisionContainer.h.
PWG::EMCAL::AliEmcalTriggerDecisionContainer::AliEmcalTriggerDecisionContainer | ( | ) |
Dummy constructor.
For I/O, not to be called by the user
Definition at line 37 of file AliEmcalTriggerDecisionContainer.cxx.
PWG::EMCAL::AliEmcalTriggerDecisionContainer::AliEmcalTriggerDecisionContainer | ( | const char * | name | ) |
Main constructor.
Called by the user. The name of the trigger decision container is used in user analyses for the query of the container from the event.
[in] | name | Name of the trigger decision container |
Definition at line 44 of file AliEmcalTriggerDecisionContainer.cxx.
|
inlinevirtual |
Destructor.
Definition at line 128 of file AliEmcalTriggerDecisionContainer.h.
void PWG::EMCAL::AliEmcalTriggerDecisionContainer::AddTriggerDecision | ( | AliEmcalTriggerDecision *const | decision | ) |
Add trigger decision to the container.
The name of the trigger decision corresponds to the name of the trigger class according to the EMCAL naming convention and is used by the user to query the event trigger selection status.
[in] | decision | Trigger decision, created by the trigger selection task |
Definition at line 55 of file AliEmcalTriggerDecisionContainer.cxx.
Referenced by Clear(), and PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Run().
|
inlinevirtual |
Clear function of the trigger decision container.
Overwriting the Clear function preventing to reset the name. Only clearing the trigger decision objects content.
option | Not used |
Definition at line 145 of file AliEmcalTriggerDecisionContainer.h.
const AliEmcalTriggerDecision * PWG::EMCAL::AliEmcalTriggerDecisionContainer::FindTriggerDecision | ( | const char * | name | ) | const |
Find a trigger decision with a given name in the trigger decision container.
Objects of type PWG::EMCAL::AliEmcalTriggerDecision contain additional information beside the event selection status
The name of the trigger decision object must be a valid trigger class name according to the EMCAL convention, where the trigger class is supported for the dataset to be analyzed.
[in] | decname | Name of the EMCAL Level1 trigger class |
Definition at line 59 of file AliEmcalTriggerDecisionContainer.cxx.
Referenced by Clear(), IsEventSelected(), and EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::IsExoticsTrigger().
|
inline |
Get container with trigger decision results.
Objects of type PWG::EMCAL::AliEmcalTriggerDecision contain additional information beside the event selection status
The list concerns the trigger decision objects for all Level1 triggers supported in the dataset, no matter whether the trigger was fired or not. For a specific dataset the trigger decision object can be found in the output list by the name of the trigger class, following the EMCAL nameing convention.
Definition at line 192 of file AliEmcalTriggerDecisionContainer.h.
Referenced by PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::MakeQA(), and PWGJE::EMCALJetTasks::Test::AliAnalysisTaskEmcalTriggerSelectionTest::Run().
bool PWG::EMCAL::AliEmcalTriggerDecisionContainer::IsEventSelected | ( | const char * | name | ) | const |
Checks whether the events is selected for a given trigger type.
Selecting the trigger selection status for the given Level1 trigger. The trigger decision is done base on the existence of a trigger patch of a given type in the event above threshold, where patch type and threshold are defined in the configuration of task PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection as in the trigger selection cuts. The name of the trigger must be a valid Level1 trigger name according to the EMCAL naming convention.
[in] | name | Name of the EMCAL trigger |
Definition at line 63 of file AliEmcalTriggerDecisionContainer.cxx.
Referenced by GetListOfTriggerDecisions(), and EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::MatchTriggerFromContainer().
void PWG::EMCAL::AliEmcalTriggerDecisionContainer::Reset | ( | ) |
Clear container with trigger decisions.
Removing all trigger decision objects from the container. The container will be empty at this point.
Definition at line 51 of file AliEmcalTriggerDecisionContainer.cxx.
Referenced by Clear(), PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Run(), and ~AliEmcalTriggerDecisionContainer().
|
protected |
List of trigger decisions.
Definition at line 211 of file AliEmcalTriggerDecisionContainer.h.
Referenced by AddTriggerDecision(), AliEmcalTriggerDecisionContainer(), FindTriggerDecision(), GetListOfTriggerDecisions(), and Reset().