![]() |
AliPhysics
0bb4a45 (0bb4a45)
|
Helper class selecting events on the presence of a trigger patch for the given type above threshold. More...
#include <AliEmcalTriggerOfflineSelection.h>
Public Types | |
enum | EmcalTriggerClass { kTrgEL0 = 0, kTrgEG1, kTrgEG2, kTrgEJ1, kTrgEJ2, kTrgDL0, kTrgDG1, kTrgDG2, kTrgDJ1, kTrgDJ2, kTrgn } |
Definition of the various supported trigger types. More... | |
enum | EmcalEnergyDefinition_t { kFEEEnergy, kFEETransverseEnergy, kFEEADC, kFEETransverseADC, kClusterEnergy, kClusterTransverseEnergy } |
Definition of EMCAL patch energy measurements. More... | |
Public Member Functions | |
AliEmcalTriggerOfflineSelection () | |
Default constructor. More... | |
virtual | ~AliEmcalTriggerOfflineSelection () |
Destructor. More... | |
void | SetOfflineEnergyThreshold (EmcalTriggerClass trgcls, double threshold) |
Specify threshold for a given offline trigger class. More... | |
void | SetEnergyDefinition (EmcalEnergyDefinition_t endef) |
Define according to which energy measurement a patch is selected as trigger patch. More... | |
void | SetAcceptanceMap (EmcalTriggerClass trgcls, const TH2 *accmap) |
Set acceptance map for a given trigger class. More... | |
void | SetClusterContainer (const TString &clustercont) |
Bool_t | IsOfflineSelected (EmcalTriggerClass trgcls, const AliVEvent *const data) const |
Select event as triggered event. More... | |
Double_t | GetThresholdForTrigger (EmcalTriggerClass trgcls) const |
Get the offline trigger threshold (on energy) for a given trigger class. More... | |
const TString & | GetNameClusterContainer () const |
Get the name of the cluster container. More... | |
void | SetEnergyResolution (Double_t resolution) |
Set the energy resolution used to smear the threshold. More... | |
void | SetUseSmearedEnergy (Bool_t doUse) |
Switch whether to use original or smeared energy. More... | |
Static Public Member Functions | |
static Bool_t | IsSingleShower (EmcalTriggerClass cls) |
Checks if the trigger class is a single shower patch trigger class. More... | |
static Bool_t | IsDCAL (EmcalTriggerClass cls) |
Checks if the trigger class is a jet patch trigger class. More... | |
static const TString & | GetTriggerName (EmcalTriggerClass cls) |
Get the name of the trigger class as string representation. More... | |
Protected Member Functions | |
bool | ApplyPatchTrigger (EmcalTriggerClass trgcls, const TClonesArray *const triggerpatches) const |
Run event selection using trigger patches. More... | |
bool | ApplyClusterTrigger (EmcalTriggerClass trgcls, const AliVEvent *const event) const |
Run event selection using a EMCAL clusters. More... | |
bool | UseClusters () const |
Check whether the trigger observable is based on clusters. More... | |
bool | UsePatches () const |
Check whether the trigger observable is based on trigger patches. More... | |
Protected Attributes | |
Double_t | fOfflineEnergyThreshold [kTrgn] |
Thresholds applied on offline energy. More... | |
const TH2 * | fAcceptanceMaps [kTrgn] |
! Online acceptance distribution More... | |
EmcalEnergyDefinition_t | fEnergyDefinition |
Define type of energy to be use for the patch selection. More... | |
TString | fNameClusterContainer |
Name of the cluster container. More... | |
Double_t | fResolution |
Resolution for threshold smearing. More... | |
Bool_t | fUseSmearedEnergy |
Switch whether to use smeared or original energy. More... | |
Static Protected Attributes | |
static const TString | fgkTriggerNames [kTrgn] |
Names of the various trigger classes. More... | |
Helper class selecting events on the presence of a trigger patch for the given type above threshold.
AliEmcalTriggerOffline selection provides the functionality to select triggered events based on the presence of a trigger patch for the given type above energy threshold. As convention the calibrated energy from cells is used to select patches above threshold. Energy thresholds can be set via
In order to mimic non-uniform trigger acceptance, acceptance maps from Data can be used in the trigger patch selection. When available, trigger patches are selected on a statistical basis using the map, which is expected to be normalized to the position with the maximum trigger counts, in order to provide a probability value. Acceptance maps are set via
Attention: This class takes over ownership and expects the histogram to not belong to a directory. In case no acceptance map is providede, no acceptance mimicing is applied.
Definition at line 47 of file AliEmcalTriggerOfflineSelection.h.
Definition of EMCAL patch energy measurements.
Definition at line 71 of file AliEmcalTriggerOfflineSelection.h.
Definition of the various supported trigger types.
Enumerator | |
---|---|
kTrgEL0 |
EMCAL L0 trigger. |
kTrgEG1 |
EMCAL L1 Gamma trigger, high threshold. |
kTrgEG2 |
EMCAL L1 Gamma trigger, low threshold. |
kTrgEJ1 |
EMCAL L1 Jet trigger, high threshold. |
kTrgEJ2 |
EMCAL L1 Jet trigger, low threshold. |
kTrgDL0 |
DCAL L0 trigger. |
kTrgDG1 |
DCAL L1 Gamma trigger, high threshold. |
kTrgDG2 |
DCAL L1 Gamma trigger, low threshold. |
kTrgDJ1 |
DCAL L1 Jet trigger, high threshold. |
kTrgDJ2 |
DCAL L1 Jet trigger, low threshold. |
kTrgn |
Number of supported triggers. |
Definition at line 53 of file AliEmcalTriggerOfflineSelection.h.
EMCalTriggerPtAnalysis::AliEmcalTriggerOfflineSelection::AliEmcalTriggerOfflineSelection | ( | ) |
Default constructor.
Definition at line 41 of file AliEmcalTriggerOfflineSelection.cxx.
|
virtual |
Destructor.
Definition at line 52 of file AliEmcalTriggerOfflineSelection.cxx.
|
protected |
Run event selection using a EMCAL clusters.
Events are selected requiring at least one EMCAL cluster with energy above threshold. The energy can be either the total cluster energy ot the cluster transverse energy. Note that this trigger is a hypothetical trigger, used for principal studies, and is not implemented as such in the hardware.
[in] | trgcls | EMCAL trigger classs |
[in] | event | Input event, containing the cluster container |
Definition at line 145 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by IsOfflineSelected(), and SetUseSmearedEnergy().
|
protected |
Run event selection using trigger patches.
Events are selected in case at least one trigger patch is found with an energy above threshold. The energy can be of different types (energy, transverse energy, ADC, transverse ADC). Note that triggers with transverse energy definitions are hypothetical triggers, used for principal studies, and are not implemented in the hardware.
Trigger patches must match the correct type. This means that for L0 or gamma triggers only gamma patches are used, while for jet triggers only jet patches are used.
Effects of the energy resolution are studied using randomized thresholds.
[in] | trgcls | EMCAL trigger class to be triggered |
[in] | triggerpatches | Container of trigger patches used to trigger the event |
Definition at line 67 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by IsOfflineSelected(), and SetUseSmearedEnergy().
|
inline |
Get the name of the cluster container.
Definition at line 156 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::UserCreateOutputObjects().
|
inline |
Get the offline trigger threshold (on energy) for a given trigger class.
[in] | trgcls | Trigger class for which to check the threshold |
Definition at line 150 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::FindPatchesForTrigger().
|
inlinestatic |
Get the name of the trigger class as string representation.
[in] | cls | EMCAL/DCAL trigger class |
Definition at line 177 of file AliEmcalTriggerOfflineSelection.h.
Referenced by ApplyPatchTrigger(), and IsOfflineSelected().
|
static |
Checks if the trigger class is a jet patch trigger class.
[in] | cls | Type of the trigger class to check |
Definition at line 180 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by ApplyPatchTrigger(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::FindPatchesForTrigger(), and GetNameClusterContainer().
Bool_t EMCalTriggerPtAnalysis::AliEmcalTriggerOfflineSelection::IsOfflineSelected | ( | EmcalTriggerClass | trgcls, |
const AliVEvent *const | data | ||
) | const |
Select event as triggered event.
Apply additional cut requiring at least one offline patch above a given energy (not fake ADC!) Attention: This task groups into single shower triggers (L0, EG1, EG2) and jet triggers (EJ1 and EJ2). Per convention the low threshold patch is selected. No energy cut should be applied in the trigger maker.
Patches are supposed to contain masking done in the trigger maker. If available, an acceptance map can be used to mimic patch azimuthal acceptance in simulation.
Attention: The component take over ownership of the histogram. Need to be set to nullptr once the histogram is read in.
[in] | trgcls | Trigger class for which to apply additional offline patch selection |
[in] | triggerpatches | Array of trigger patches |
Definition at line 58 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by SetClusterContainer(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::TriggerSelection(), and EMCalTriggerPtAnalysis::AliAnalysisTaskEventSelectionRef::UserExec().
|
static |
Checks if the trigger class is a single shower patch trigger class.
[in] | cls | Type of the trigger class to check |
Definition at line 175 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by ApplyPatchTrigger(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::FindPatchesForTrigger(), GetNameClusterContainer(), and EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::SelectOnlineTrigger().
|
inline |
Set acceptance map for a given trigger class.
The acceptance map is expected to be normalized to 1 for the position with the largest trigger patch.
[in] | trgcls | Trigger class for which to set then acceptance map |
[in] | accmap | Acceptance map as 2D histogram |
Definition at line 118 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::ExecOnce().
|
inline |
Define name of the cluster container (for cluster trigger)
[in] | clustercont | Name of the cluster container |
Definition at line 124 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalTriggerBase::UserCreateOutputObjects().
|
inline |
Define according to which energy measurement a patch is selected as trigger patch.
See EmcalEnergyDefinition_t for possible settings.
[in] | endef | Type of the energy measurement. |
Definition at line 107 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliEmcalAnalysisFactory::TriggerSelectionFactory().
|
inline |
Set the energy resolution used to smear the threshold.
Note that an absolute value for the energy is used. In case the resolution is set to 0, no smearing is applied.
[in] | resolution | Energy resolution used for smearing |
Definition at line 187 of file AliEmcalTriggerOfflineSelection.h.
|
inline |
Specify threshold for a given offline trigger class.
Convention is a threshold on the patch energy (from cells) in GeV
[in] | trgcls | Trigger class for which to set the threshold |
[in] | threshold | Threshold value for the trigger class |
Definition at line 98 of file AliEmcalTriggerOfflineSelection.h.
Referenced by EMCalTriggerPtAnalysis::AliEmcalAnalysisFactory::TriggerSelectionFactory().
|
inline |
Switch whether to use original or smeared energy.
[in] | doUse | If true then the smeared energy is used |
Definition at line 193 of file AliEmcalTriggerOfflineSelection.h.
|
protected |
Check whether the trigger observable is based on clusters.
Definition at line 184 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by IsOfflineSelected(), and SetUseSmearedEnergy().
|
protected |
Check whether the trigger observable is based on trigger patches.
Definition at line 188 of file AliEmcalTriggerOfflineSelection.cxx.
Referenced by SetUseSmearedEnergy().
|
protected |
! Online acceptance distribution
Definition at line 251 of file AliEmcalTriggerOfflineSelection.h.
Referenced by AliEmcalTriggerOfflineSelection(), ApplyPatchTrigger(), SetAcceptanceMap(), and ~AliEmcalTriggerOfflineSelection().
|
protected |
Define type of energy to be use for the patch selection.
Definition at line 252 of file AliEmcalTriggerOfflineSelection.h.
Referenced by ApplyClusterTrigger(), ApplyPatchTrigger(), SetEnergyDefinition(), UseClusters(), and UsePatches().
|
staticprotected |
Names of the various trigger classes.
Definition at line 249 of file AliEmcalTriggerOfflineSelection.h.
Referenced by GetTriggerName().
|
protected |
Name of the cluster container.
Definition at line 253 of file AliEmcalTriggerOfflineSelection.h.
Referenced by ApplyClusterTrigger(), GetNameClusterContainer(), and SetClusterContainer().
|
protected |
Thresholds applied on offline energy.
Definition at line 250 of file AliEmcalTriggerOfflineSelection.h.
Referenced by AliEmcalTriggerOfflineSelection(), ApplyClusterTrigger(), ApplyPatchTrigger(), GetThresholdForTrigger(), IsOfflineSelected(), and SetOfflineEnergyThreshold().
|
protected |
Resolution for threshold smearing.
Definition at line 254 of file AliEmcalTriggerOfflineSelection.h.
Referenced by ApplyClusterTrigger(), ApplyPatchTrigger(), and SetEnergyResolution().
|
protected |
Switch whether to use smeared or original energy.
Definition at line 255 of file AliEmcalTriggerOfflineSelection.h.
Referenced by ApplyPatchTrigger(), and SetUseSmearedEnergy().