AliPhysics  3b4a69f (3b4a69f)
PWG::EMCAL::AliEmcalTriggerDecisionContainer Class Reference

Container for trigger decision object. More...

#include <AliEmcalTriggerDecisionContainer.h>

Inheritance diagram for PWG::EMCAL::AliEmcalTriggerDecisionContainer:

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 AliEmcalTriggerDecisionFindTriggerDecision (const char *name) const
 Find a trigger decision with a given name in the trigger decision container. More...
 
const TListGetListOfTriggerDecisions () 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...
 

Detailed Description

Container for trigger decision object.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch Oak Ridge National Laboratory
Since
Dec 17, 2014

Event selection status of EMCAL level 1 triggers

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.

1) Accessing the trigger decision container in user task

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

auto trgsel = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->FindListObject("EmcalTriggerDecision"));

2) Selection of Level1 triggers from the trigger decision container

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

  • pp, 2012: EGA (gamma trigger), EJE (jet trigger)
  • p-Pb, 2013: EG1, EG2 (gamma triggers), EJ1, EJ2 (jet triggers)
  • run2 pp/p-Pb: EG1, EG2 (gamma triggers, EMCAL), DG1, DG2 (gamma triggers, DCAL) EJ1, EJ2 (jet trigger, EMCAL), DJ1, DJ2 (jet triggers, DCAL)

The following example selects events as EMCAL EG1 events:

bool SelectEG1(const AliVEvent *input){
auto trgsel = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(input->FindListObject("EmcalTriggerDecision"))
if(!trgsel->IsEventSelected("EG1")) return false;
return true;
}

3) Retrieving trigger primitives for fired triggers

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:

auto trgdec = trgsel->FindTriggerDecision("EG1");
if(trgsel){
auto maxpatch = trgdec->GetMainPatch();
if(maxpatch){
std::cout << "Max patch found - event was triggered" << std::endl;
}
}

Definition at line 105 of file AliEmcalTriggerDecisionContainer.h.

Constructor & Destructor Documentation

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.

Parameters
[in]nameName of the trigger decision container

Definition at line 44 of file AliEmcalTriggerDecisionContainer.cxx.

virtual PWG::EMCAL::AliEmcalTriggerDecisionContainer::~AliEmcalTriggerDecisionContainer ( )
inlinevirtual

Destructor.

Definition at line 128 of file AliEmcalTriggerDecisionContainer.h.

Member Function Documentation

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.

Parameters
[in]decisionTrigger decision, created by the trigger selection task

Definition at line 55 of file AliEmcalTriggerDecisionContainer.cxx.

Referenced by Clear(), and PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Run().

virtual void PWG::EMCAL::AliEmcalTriggerDecisionContainer::Clear ( Option_t option = "")
inlinevirtual

Clear function of the trigger decision container.

Overwriting the Clear function preventing to reset the name. Only clearing the trigger decision objects content.

Parameters
optionNot 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

  • Main patch (highest-energetic patch)
  • All patches firing the trigger condition

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.

Parameters
[in]decnameName of the EMCAL Level1 trigger class
Returns
the trigger decision (NULL if not found)

Definition at line 59 of file AliEmcalTriggerDecisionContainer.cxx.

Referenced by Clear(), IsEventSelected(), and EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::IsExoticsTrigger().

const TList* PWG::EMCAL::AliEmcalTriggerDecisionContainer::GetListOfTriggerDecisions ( ) const
inline

Get container with trigger decision results.

Objects of type PWG::EMCAL::AliEmcalTriggerDecision contain additional information beside the event selection status

  • Main patch (highest-energetic patch)
  • All patches firing the trigger condition

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.

Returns
List of trigger decision objects

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.

Parameters
[in]nameName of the EMCAL trigger
Returns
True if the event is selected, false otherwise

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().

Member Data Documentation

TList PWG::EMCAL::AliEmcalTriggerDecisionContainer::fContainer
protected

The documentation for this class was generated from the following files: