AliPhysics  0937c79 (0937c79)
PWG::EMCAL::AliEmcalTriggerDecision Class Reference

Container for trigger decision. More...

#include <AliEmcalTriggerDecision.h>

Inheritance diagram for PWG::EMCAL::AliEmcalTriggerDecision:

Public Member Functions

 AliEmcalTriggerDecision ()
 Dummy constructor. More...
 
 AliEmcalTriggerDecision (const char *name, const char *title="")
 The main (named) constructor. More...
 
virtual ~AliEmcalTriggerDecision ()
 Destructor. More...
 
const AliEMCALTriggerPatchInfo * GetMainPatch () const
 Get the highest energetic trigger patch of the event firing the trigger. More...
 
const AliEmcalTriggerSelectionCutsGetSelectionCuts () const
 Get the selection cuts used in the trigger selection. More...
 
const TListGetAcceptedPatches () const
 Get the list of all patches in the event satisfying the trigger condition. More...
 
Bool_t IsSelected () const
 Check whether event is selected under the given trigger. More...
 
void SetSelectionCuts (const AliEmcalTriggerSelectionCuts *const cuts)
 Set the selection cuts used in the trigger selection. More...
 
void SetMainPatch (const AliEMCALTriggerPatchInfo *const mainpatch)
 Set the main (highest-energetic) trigger patch. More...
 
void AddAcceptedPatch (AliEMCALTriggerPatchInfo *const acceptedPatch)
 

Protected Attributes

const AliEMCALTriggerPatchInfo * fMainPatch
 Main trigger patch which fires the decision. More...
 
const AliEmcalTriggerSelectionCutsfSelectionCuts
 Pointer to the cuts used for the trigger selection. More...
 
TList fAcceptedPatches
 All trigger patches which are accepted as well. More...
 

Private Member Functions

 AliEmcalTriggerDecision (const AliEmcalTriggerDecision &ref)
 
AliEmcalTriggerDecisionoperator= (const AliEmcalTriggerDecision &ref)
 

Detailed Description

Container for trigger decision.

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

Status of the trigger selection process for a given Level1 trigger

AliEmcalTriggerDecision object collect all relevant information for a given Level1 trigger:

  • Maximum patch firing the trigger
  • All other patches firing the trigger
  • A corresponding trigger selection cuts object defining the selection process

An AliEmcalTriggerDecision object handles only one Level1 trigger class, each trigger class supported by the dataset has its own AliEmcalTriggerDecision object.

Checking whether an event was triggered for the given Level1 trigger

The presence of a maximum patch marks an event as triggered. Consequently it is sufficient to check for the presence of this. The following example selects events triggered by the EG1 trigger:

auto trgcont = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer*>(fInputEvent->FindListObject("EmcalTriggerDecision"));
auto eg1 = trgcont->FindTriggerDecision("EG1");
if(eg1->GetMainPatch()) {
std::cout << "Event is an EG1 event";
}

Getting informatinon about all patches firing the trigger

The trigger is fired if at least one patch above threshold according to the definition in the associated trigger selection cuts is found. Consequently all patches above threshold are valid trigger patches. They are attached to the event and can be queried via GetAcceptedPatches(). The following example draws the energy spectrum of all accepted trigger patches:

auto hPatchEnergy = new TH1F("hPatchEnergy", "PatchEnergy", 200, 0., 200.);
auto trgcont = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer*>(fInputEvent->FindListObject("EmcalTriggerDecision"));
auto eg1 = trgcont->FindTriggerDecision("EG1");
for(auto p : eg1) {
auto patch = static_cast<AliEMCALTriggerPatchInfo *>(p);
hPatchEnergy->Fill(patch->GetPatchE());
}

The AliEmcalTriggerDecision object is not owner of the patches. Delete calls would probably lead to double delets. Users must not delete patches attached.

Specification of the level1 trigger

The level1 trigger is specified in the corresponding AliEmcalTriggerSelectionCuts object. The specifications consist of

  • Patch type (Gamma or Jet patch)
  • Energy definition (FastOR ADC amplitude or FEE energy, smeared or non-smeared)
  • Trigger threshold

The associated trigger selection cut object is used in the trigger selection process and linked to this trigger selection object. It can be queried via GetSelectionCuts(). The following example indicates how to query the trigger threshold:

auto trgcont = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer*>(fInputEvent->FindListObject("EmcalTriggerDecision"));
auto eg1 = trgcont->FindTriggerDecision("EG1");
auto cuts = eg1->GetSelectionCuts();
std::cout << "Threshold for EG1: " << cuts->GetThreshold() << std::endl;

The trigger decision object is not owner of the trigger selection cuts. Users must not delete them.

Definition at line 117 of file AliEmcalTriggerDecision.h.

Constructor & Destructor Documentation

PWG::EMCAL::AliEmcalTriggerDecision::AliEmcalTriggerDecision ( )

Dummy constructor.

Needed for I/O, not to be used by the user

Definition at line 36 of file AliEmcalTriggerDecision.cxx.

PWG::EMCAL::AliEmcalTriggerDecision::AliEmcalTriggerDecision ( const char *  name,
const char *  title = "" 
)

The main (named) constructor.

The decision object can be read out later by the consumer task according to the name. The name has to be a valid Level1 trigger name of the corresponding Level1 trigger supported in the data set, according to the EMCAL naming convention.

Parameters
[in]nameName of the decision object
[in]titleTitle of the decision object

Definition at line 45 of file AliEmcalTriggerDecision.cxx.

PWG::EMCAL::AliEmcalTriggerDecision::~AliEmcalTriggerDecision ( )
virtual

Destructor.

As this class is not owner of the trigger patches the destructor will not delete them. Deleting trigger patches has to be the responsibility of the owner (typically the TClonesArray created by the trigger maker attached to the input event).

Definition at line 54 of file AliEmcalTriggerDecision.cxx.

PWG::EMCAL::AliEmcalTriggerDecision::AliEmcalTriggerDecision ( const AliEmcalTriggerDecision ref)
private

Member Function Documentation

void PWG::EMCAL::AliEmcalTriggerDecision::AddAcceptedPatch ( AliEMCALTriggerPatchInfo *const  acceptedPatch)

Add accepted patch to the trigger decision

Patches added to the trigger selection object must comply with the trigger definition specified in the corresponding AliEmcalTriggerDecision object. All accepted patches would have fired the corresponding Level1 trigger.

Parameters
[in]patchthe accepted patch

Definition at line 58 of file AliEmcalTriggerDecision.cxx.

Referenced by PWG::EMCAL::AliEmcalTriggerSelection::MakeDecison(), and SetMainPatch().

const TList* PWG::EMCAL::AliEmcalTriggerDecision::GetAcceptedPatches ( ) const
inline

Get the list of all patches in the event satisfying the trigger condition.

The trigger patch selection is specified in the PWG::EMCAL::AliEmcalTriggerSelectionCuts object which can be obtained via GetSelectionCuts() and is configured in the task PWG::EMCAL::AliAnalysisTaskEmcalTrigger selection. Selected trigger patches must be above the trigger threshold for the given trigger class according to the energy definition specified in the corresponding AliEmcalTriggerSelectionCuts (ADC amplitude or offline patch energy)

Returns
List of acccepted patches: Containing all patches which would fire the trigger. Returning an empty list in case the event was not selected.

Definition at line 187 of file AliEmcalTriggerDecision.h.

const AliEMCALTriggerPatchInfo* PWG::EMCAL::AliEmcalTriggerDecision::GetMainPatch ( ) const
inline

Get the highest energetic trigger patch of the event firing the trigger.

The highest energic patch is defined according to the energy definition (FastOR ADC amplitude or FEE energy) and matching patch type above threshold. The presence of a main patch indicates that the event was fired for the Level1 trigger handled by this trigger selection.

Returns
Highest energetic trigger patch of the event. In case the event was not triggered returning null.

Definition at line 161 of file AliEmcalTriggerDecision.h.

Referenced by PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::AliEmcalTriggerSelectionQA::Fill().

const AliEmcalTriggerSelectionCuts* PWG::EMCAL::AliEmcalTriggerDecision::GetSelectionCuts ( ) const
inline

Get the selection cuts used in the trigger selection.

Selection cuts specify the trigger patch selection configuration for the Level1 trigger producing this trigger selection result (patch type, energy definition, trigger threshold) and process the trigger patch selection.

Returns
Selection cuts used for the corresponding trigger class

Definition at line 172 of file AliEmcalTriggerDecision.h.

Bool_t PWG::EMCAL::AliEmcalTriggerDecision::IsSelected ( ) const
inline

Check whether event is selected under the given trigger.

An event is selected if a main (highest energy) patch was found, indicating at least one patch was above nominal threshold according to the energy definition specified in the corresponding AliEmcalTriggerSelectionCuts object.

Returns
True if the event was selected, false otherwise

Definition at line 199 of file AliEmcalTriggerDecision.h.

Referenced by PWG::EMCAL::AliEmcalTriggerDecisionContainer::IsEventSelected(), and PWGJE::EMCALJetTasks::Test::AliAnalysisTaskEmcalTriggerSelectionTest::Run().

AliEmcalTriggerDecision& PWG::EMCAL::AliEmcalTriggerDecision::operator= ( const AliEmcalTriggerDecision ref)
private
void PWG::EMCAL::AliEmcalTriggerDecision::SetMainPatch ( const AliEMCALTriggerPatchInfo *const  mainpatch)
inline

Set the main (highest-energetic) trigger patch.

The main patch is defined as the highest energetic trigger patch according to patch type and energy definition selected by the associated trigger selection cuts.

Setting the main patch marks the event as triggered for the given Level1 trigger producing this result.

Parameters
[in]mainpatchHighest energetic trigger patch of the event firing the trigger

Definition at line 227 of file AliEmcalTriggerDecision.h.

Referenced by PWG::EMCAL::AliEmcalTriggerSelection::MakeDecison().

void PWG::EMCAL::AliEmcalTriggerDecision::SetSelectionCuts ( const AliEmcalTriggerSelectionCuts *const  cuts)
inline

Set the selection cuts used in the trigger selection.

Selection cuts specify the trigger patch selection configuration for the Level1 trigger producing this trigger selection result (patch type, energy definition, trigger threshold) and process the trigger patch selection.

Users can access the trigger selection cuts in thier task via the corresponding getter (GetSelectionCuts)

Parameters
[in]cutsSelection cuts for the given trigger class

Definition at line 213 of file AliEmcalTriggerDecision.h.

Referenced by PWG::EMCAL::AliEmcalTriggerSelection::MakeDecison().

Member Data Documentation

TList PWG::EMCAL::AliEmcalTriggerDecision::fAcceptedPatches
protected

All trigger patches which are accepted as well.

Definition at line 244 of file AliEmcalTriggerDecision.h.

Referenced by AddAcceptedPatch(), AliEmcalTriggerDecision(), GetAcceptedPatches(), and ~AliEmcalTriggerDecision().

const AliEMCALTriggerPatchInfo* PWG::EMCAL::AliEmcalTriggerDecision::fMainPatch
protected

Main trigger patch which fires the decision.

Definition at line 242 of file AliEmcalTriggerDecision.h.

Referenced by GetMainPatch(), IsSelected(), and SetMainPatch().

const AliEmcalTriggerSelectionCuts* PWG::EMCAL::AliEmcalTriggerDecision::fSelectionCuts
protected

Pointer to the cuts used for the trigger selection.

Definition at line 243 of file AliEmcalTriggerDecision.h.

Referenced by GetSelectionCuts(), and SetSelectionCuts().


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