AliPhysics  1976924 (1976924)
PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection Class Reference

Task providing an event selection for EMCAL-triggered events based on the reconstructed EMCAL trigger patches. More...

#include <AliAnalysisTaskEmcalTriggerSelection.h>

Inheritance diagram for PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection:

Classes

class  AliEmcalTriggerSelectionQA
 Helper class for the trigger selection. More...
 
class  ConfigValueException
 Handling of incorrect values in YAML configuration files. More...
 

Public Member Functions

 AliAnalysisTaskEmcalTriggerSelection ()
 Dummy constructor. More...
 
 AliAnalysisTaskEmcalTriggerSelection (const char *name)
 Main constructor. More...
 
virtual ~AliAnalysisTaskEmcalTriggerSelection ()
 Destructor. More...
 
void AddTriggerSelection (AliEmcalTriggerSelection *const selection)
 Add trigger selection to the trigger selection task. More...
 
const TListGetListOfTriggerSelections () const
 Access to the trigger selection objects attached to the task. More...
 
void SetGlobalDecisionContainerName (const char *name)
 Set the name of the global trigger decision container. More...
 
const TStringGetGlobalDecisionContainerName () const
 Provide access to the name of the global trigger decision container name. More...
 
void ConfigureFromYAML (const char *yamlconfig)
 Configure task using YAML configuration file. More...
 
void AutoConfigure (const char *period)
 Automatically configure trigger decision handler for different periods. More...
 
void ConfigurePP2012 ()
 Trigger configuration for run1 pp (2012) - data mode. More...
 
void ConfigureMCPP2012 ()
 Trigger configuration for MC anchored to run1 pp (2012) More...
 
void ConfigurePP2016 ()
 Trigger configuration for run2 pp (2016 - 2018) - data mode. More...
 
void ConfigureMCPP2016 ()
 Trigger configuration for MC anchored to run2 pp (2016-2018) More...
 
- Public Member Functions inherited from AliAnalysisTaskEmcal
 AliAnalysisTaskEmcal ()
 Default constructor. More...
 
 AliAnalysisTaskEmcal (const char *name, Bool_t histo=kFALSE)
 Standard constructor. Should be used by the user. More...
 
virtual ~AliAnalysisTaskEmcal ()
 Destructor. More...
 
AliParticleContainerAddParticleContainer (const char *n)
 Create new particle container and attach it to the task. More...
 
AliTrackContainerAddTrackContainer (const char *n)
 Create new track container and attach it to the task. More...
 
AliMCParticleContainerAddMCParticleContainer (const char *n)
 Create new container for MC particles and attach it to the task. More...
 
AliClusterContainerAddClusterContainer (const char *n)
 Create new cluster container and attach it to the task. More...
 
void AdoptParticleContainer (AliParticleContainer *cont)
 
void AdoptTrackContainer (AliTrackContainer *cont)
 
void AdoptMCParticleContainer (AliMCParticleContainer *cont)
 
void AdoptClusterContainer (AliClusterContainer *cont)
 
AliParticleContainerGetParticleContainer (Int_t i=0) const
 Get \( i^{th} \) particle container attached to this task. More...
 
AliParticleContainerGetParticleContainer (const char *name) const
 Find particle container attached to this task according to its name. More...
 
AliClusterContainerGetClusterContainer (Int_t i=0) const
 Get \( i^{th} \) cluster container attached to this task. More...
 
AliClusterContainerGetClusterContainer (const char *name) const
 Find cluster container attached to this task according to its name. More...
 
AliMCParticleContainerGetMCParticleContainer (Int_t i=0) const
 
AliMCParticleContainerGetMCParticleContainer (const char *name) const
 
AliTrackContainerGetTrackContainer (Int_t i=0) const
 
AliTrackContainerGetTrackContainer (const char *name) const
 
void RemoveParticleContainer (Int_t i=0)
 
void RemoveClusterContainer (Int_t i=0)
 
void SetCaloCellsName (const char *n)
 
void SetCaloTriggerPatchInfoName (const char *n)
 
void SetCaloTriggersName (const char *n)
 
void SetCentRange (Double_t min, Double_t max)
 
void SetCentralityEstimator (const char *c)
 
void SetClusPtCut (Double_t cut, Int_t c=0)
 Apply cut on \( p_{t} \) for all clusters in container with index c. More...
 
void SetClusTimeCut (Double_t min, Double_t max, Int_t c=0)
 Apply cut on cluster time for clusters in container with index c. More...
 
void SetEventPlaneVsEmcal (Double_t ep)
 
void SetForceBeamType (BeamType f)
 
void SetHistoBins (Int_t nbins, Double_t min, Double_t max)
 
void SetRecycleUnusedEmbeddedEventsMode (Bool_t b)
 
void SetIsEmbedded (Bool_t i)
 
void SetIsPythia (Bool_t i)
 
void SetIsHerwig (Bool_t i)
 
void SetMakeGeneralHistograms (Bool_t g)
 
void SetGetPtHardBinFromPath (Bool_t docheck)
 Switch on/off getting \( p_{t,hard}\) bin from the file path. More...
 
void SetNumberOfPtHardBins (Int_t nbins)
 Set the number of \( p_{t}\)-hard bins. More...
 
void SetUserPtHardBinning (const TArrayI &binning)
 Set a non-standard \( p_{t}\)-hard binning. More...
 
void SetMCLabelShift (Int_t s)
 
void SetMinMCLabel (Int_t s)
 
void SetMinNTrack (Int_t min)
 
void SetZvertexDiffValue (Double_t cut)
 
void SetMinPtTrackInEmcal (Double_t min)
 
virtual void SetNCentBins (Int_t n)
 
void SetNeedEmcalGeom (Bool_t n)
 
void SetCountDownscaleCorrectedEvents (Bool_t d)
 
void SetOffTrigger (UInt_t t)
 
void SetTrackEtaLimits (Double_t min, Double_t max, Int_t c=0)
 Apply cut on the pseudorapidity \( \eta \) of the all tracks in the track container with index c. More...
 
void SetTrackPhiLimits (Double_t min, Double_t max, Int_t c=0)
 Apply cut on azimuthal angle \( \phi \) of the all tracks in the track container with index c. More...
 
void SetTrackPtCut (Double_t cut, Int_t c=0)
 Apply cut on the transverse momentum \( p_{t} \) of all tracks in the track container with index c. More...
 
void SetTrigClass (const char *n)
 
void SetMinBiasTriggerClassName (const char *n)
 
void SetTriggerTypeSel (TriggerType t)
 
void SetUseAliAnaUtils (Bool_t b, Bool_t bRejPilup=kTRUE)
 
void SetVzRange (Double_t min, Double_t max)
 
void SetUseSPDTrackletVsClusterBG (Bool_t b)
 
void SetEMCalTriggerMode (EMCalTriggerMode_t m)
 
void SetUseNewCentralityEstimation (Bool_t b)
 
void SetGeneratePythiaInfoObject (Bool_t b)
 
void SetPythiaInfoName (const char *n)
 
const TStringGetPythiaInfoName () const
 
const AliEmcalPythiaInfoGetPythiaInfo () const
 
void SetUsePtHardBinScaling (Bool_t b)
 
void SetMCFilter ()
 
void ResetMCFilter ()
 
void SetJetPtFactor (Float_t f)
 
Float_t JetPtFactor ()
 
void SetClusterPtFactor (Float_t f)
 
Float_t ClusterPtFactor ()
 
void SetTrackPtFactor (Float_t f)
 
Float_t TrackPtFactor ()
 

Protected Member Functions

virtual void UserCreateOutputObjects ()
 Initialization of output container. More...
 
virtual void UserExecOnce ()
 Initializations performed when the first event is created. More...
 
virtual Bool_t Run ()
 User event loop. More...
 
virtual Bool_t FillHistograms ()
 Filling basic QA Histograms of the trigger selection task. More...
 
AliEmcalTriggerDecisionContainerGetGlobalTriggerDecisionContainer () const
 Find the main trigger container in the input event. More...
 
void MakeQA (const AliEmcalTriggerDecisionContainer *cont)
 Fill QA histograms for the event. More...
 
void InitQA (const AliEmcalTriggerSelection *const sel)
 Initialize QA histograms for trigger selection. More...
 
Bool_t Is2012PP (const char *dataset) const
 
Bool_t Is2012MCPP (const char *dataset) const
 
Bool_t Is2016PP (const char *dataset) const
 
Bool_t Is2016MCPP (const char *dataset) const
 
Bool_t IsSupportedMCSample (const char *period, std::vector< TString > &supportedProductions) const
 
AliEmcalTriggerSelectionCuts::AcceptanceType_t DecodeAcceptanceString (const std::string &acceptancestring)
 
AliEmcalTriggerSelectionCuts::PatchType_t DecodePatchTypeString (const std::string &patchtypestring)
 
AliEmcalTriggerSelectionCuts::SelectionMethod_t DecodeEnergyDefinition (const std::string &energydefstring)
 
- Protected Member Functions inherited from AliAnalysisTaskEmcal
void LoadPythiaInfo (AliVEvent *event)
 Load parton info. More...
 
void SetRejectionReasonLabels (TAxis *axis)
 
Bool_t AcceptCluster (AliVCluster *clus, Int_t c=0) const
 Cluster selection. More...
 
Bool_t AcceptTrack (AliVParticle *track, Int_t c=0) const
 
void AddObjectToEvent (TObject *obj, Bool_t attempt=kFALSE)
 Add object to event. More...
 
AliVParticle * GetAcceptParticleFromArray (Int_t p, Int_t c=0) const
 Get particle p if accepted from container with index c If particle not accepted return 0. More...
 
AliVCluster * GetAcceptClusterFromArray (Int_t cl, Int_t c=0) const
 Get cluster cl if accepted from container c If particle not accepted return 0. More...
 
TClonesArray * GetArrayFromEvent (const char *name, const char *clname=0)
 Read a TClonesArray from event. More...
 
BeamType GetBeamType () const
 Get beam type. More...
 
TClonesArray * GetParticleArray (Int_t i=0) const
 Get \( i^{th} \) TClonesArray with particles. More...
 
TClonesArray * GetClusterArray (Int_t i=0) const
 Get \( i^{th} \) TClonesArray with EMCAL clusters. More...
 
Int_t GetNParticles (Int_t i=0) const
 Get number of particles in container attached to this task with index i. More...
 
Int_t GetNClusters (Int_t i=0) const
 Get number of clusters in the cluster container attached to this task with index i. More...
 
AliEMCALTriggerPatchInfo * GetMainTriggerPatch (TriggerCategory triggersel=kTriggerLevel1Jet, Bool_t doSimpleOffline=kFALSE)
 Get main trigger match. More...
 
Bool_t HasTriggerType (TriggerType triggersel)
 Check if event has a given trigger type. More...
 
ULong_t GetTriggerList ()
 Get list of selected triggers of the given event. More...
 
Bool_t PythiaInfoFromFile (const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard)
 Loading PYTHIA information from external cross section file into the task. More...
 
Bool_t IsTrackInEmcalAcceptance (AliVParticle *part, Double_t edges=0.9) const
 Determines if a track is inside the EMCal acceptance. More...
 
void GeneratePythiaInfoObject (AliMCEvent *mcEvent)
 Copy some information about the Pythia event in a PythaInfo object. More...
 
Bool_t CheckMCOutliers ()
 Filter the mc tails in pt-hard distributions. More...
 
void UserCreateOutputObjects ()
 Main initialization function on the worker. More...
 
void UserExec (Option_t *option)
 Event loop, called for each event. More...
 
Bool_t UserNotify ()
 Notifying the user that the input data file has changed and performing steps needed to be done. More...
 
Bool_t FileChanged ()
 Steps to be executed when a few file is loaded into the input handler. More...
 
virtual void ExecOnce ()
 Perform steps needed to initialize the analysis. More...
 
virtual Bool_t FillGeneralHistograms ()
 Filling general histograms. More...
 
virtual Bool_t IsEventSelected ()
 Performing event selection. More...
 
virtual Bool_t RetrieveEventObjects ()
 Retrieve common objects from event. More...
 
virtual void RunChanged (Int_t)
 Process tasks relevant when a file with a different run number is processed. More...
 
virtual void UserFileChanged ()
 Virtual method for user code to be executed when a file changed. More...
 

Protected Attributes

AliEmcalTriggerDecisionContainerfTriggerDecisionContainer
 Trigger decision container objects. More...
 
TString fGlobalDecisionContainerName
 Name of the global trigger selection. More...
 
TList fTriggerSelections
 List of trigger selections. More...
 
TList fSelectionQA
 Trigger selection QA. More...
 
- Protected Attributes inherited from AliAnalysisTaskEmcal
TString fPythiaInfoName
 name of pythia info object More...
 
BeamType fForceBeamType
 forced beam type More...
 
Bool_t fGeneralHistograms
 whether or not it should fill some general histograms More...
 
Bool_t fLocalInitialized
 whether or not the task has been already initialized More...
 
Bool_t fFileChanged
 ! Signal triggered when the file has changed More...
 
Bool_t fCreateHisto
 whether or not create histograms More...
 
TString fCaloCellsName
 name of calo cell collection More...
 
TString fCaloTriggersName
 name of calo triggers collection More...
 
TString fCaloTriggerPatchInfoName
 trigger patch info array name More...
 
Double_t fMinCent
 min centrality for event selection More...
 
Double_t fMaxCent
 max centrality for event selection More...
 
Double_t fMinVz
 min vertex for event selection More...
 
Double_t fMaxVz
 max vertex for event selection More...
 
Double_t fTrackPtCut
 cut on track pt in event selection More...
 
Int_t fMinNTrack
 minimum nr of tracks in event with pT>fTrackPtCut More...
 
Double_t fZvertexDiff
 upper limit for distance between primary and SPD vertex More...
 
Bool_t fUseAliAnaUtils
 used for LHC13* data: z-vtx, Ncontributors, z-vtx resolution cuts More...
 
Bool_t fRejectPileup
 Reject pilup using function AliAnalysisUtils::IsPileUpEvent() More...
 
Bool_t fTklVsClusSPDCut
 Apply tracklet-vs-cluster SPD cut to reject background events in pp. More...
 
UInt_t fOffTrigger
 offline trigger for event selection More...
 
TString fTrigClass
 trigger class name for event selection More...
 
TString fMinBiasRefTrigger
 Name of the minmum bias reference trigger, used in the calculation of downscale-corrected event numbers. More...
 
TriggerType fTriggerTypeSel
 trigger type to select based on trigger patches More...
 
Int_t fNbins
 no. of pt bins More...
 
Double_t fMinBinPt
 min pt in histograms More...
 
Double_t fMaxBinPt
 max pt in histograms More...
 
Double_t fMinPtTrackInEmcal
 min pt track in emcal More...
 
Double_t fEventPlaneVsEmcal
 select events which have a certain event plane wrt the emcal More...
 
Double_t fMinEventPlane
 minimum event plane value More...
 
Double_t fMaxEventPlane
 maximum event plane value More...
 
TString fCentEst
 name of V0 centrality estimator More...
 
Bool_t fRecycleUnusedEmbeddedEventsMode
 Allows the recycling of embedded events which fail internal event selection. See the embedding helper. More...
 
Bool_t fIsEmbedded
 trigger, embedded signal More...
 
Bool_t fIsPythia
 trigger, if it is a PYTHIA production More...
 
Bool_t fIsHerwig
 trigger, if it is a HERWIG production More...
 
Bool_t fGetPtHardBinFromName
 Obtain pt-hard bin from file path. More...
 
Int_t fSelectPtHardBin
 select one pt hard bin for analysis More...
 
Int_t fMinMCLabel
 minimum MC label value for the tracks/clusters being considered MC particles More...
 
Int_t fMCLabelShift
 if MC label > fMCLabelShift, MC label -= fMCLabelShift More...
 
Int_t fNcentBins
 how many centrality bins More...
 
Bool_t fNeedEmcalGeom
 whether or not the task needs the emcal geometry More...
 
TObjArray fParticleCollArray
 particle/track collection array More...
 
TObjArray fClusterCollArray
 cluster collection array More...
 
ULong_t fTriggers
 list of fired triggers More...
 
EMCalTriggerMode_t fEMCalTriggerMode
 EMCal trigger selection mode. More...
 
Bool_t fUseNewCentralityEstimation
 Use new centrality estimation (for 2015 data) More...
 
Bool_t fGeneratePythiaInfoObject
 Generate Pythia info object. More...
 
Bool_t fUsePtHardBinScaling
 Use \( p_{t}\)-hard bin scaling in merging. More...
 
Bool_t fUseXsecFromHeader
 ! Use cross section from header instead of pyxsec.root (purely transient) More...
 
Bool_t fMCRejectFilter
 enable the filtering of events by tail rejection More...
 
Bool_t fCountDownscaleCorrectedEvents
 Count event number corrected for downscaling. More...
 
Float_t fPtHardAndJetPtFactor
 Factor between ptHard and jet pT to reject/accept event. More...
 
Float_t fPtHardAndClusterPtFactor
 Factor between ptHard and cluster pT to reject/accept event. More...
 
Float_t fPtHardAndTrackPtFactor
 Factor between ptHard and track pT to reject/accept event. More...
 
Int_t fRunNumber
 !run number (triggering RunChanged() More...
 
AliAnalysisUtils * fAliAnalysisUtils
 !vertex selection (optional) More...
 
Bool_t fIsEsd
 !whether it's an ESD analysis More...
 
AliEMCALGeometry * fGeom
 !emcal geometry More...
 
TClonesArray * fTracks
 !tracks More...
 
TClonesArray * fCaloClusters
 !clusters More...
 
AliVCaloCells * fCaloCells
 !cells More...
 
AliVCaloTrigger * fCaloTriggers
 !calo triggers More...
 
TClonesArray * fTriggerPatchInfo
 !trigger patch info array More...
 
Double_t fCent
 !event centrality More...
 
Int_t fCentBin
 !event centrality bin More...
 
Double_t fEPV0
 !event plane V0 More...
 
Double_t fEPV0A
 !event plane V0A More...
 
Double_t fEPV0C
 !event plane V0C More...
 
Double_t fVertex [3]
 !event vertex More...
 
Double_t fVertexSPD [3]
 !event Svertex More...
 
Int_t fNVertCont
 !event vertex number of contributors More...
 
Int_t fNVertSPDCont
 !event SPD vertex number of contributors More...
 
BeamType fBeamType
 !event beam type More...
 
AliGenPythiaEventHeader * fPythiaHeader
 !event Pythia header More...
 
AliGenHerwigEventHeader * fHerwigHeader
 !event Herwig header More...
 
Float_t fPtHard
 !event \( p_{t}\)-hard More...
 
Int_t fPtHardBin
 !event \( p_{t}\)-hard bin More...
 
Int_t fPtHardBinGlobal
 !event \( p_{t}\)-hard bin, detected from filename More...
 
Bool_t fPtHardInitialized
 !flag whether the \( p_{t}\)-hard bin was initialized, purely for internal processing More...
 
Int_t fNPtHardBins
 Number of \( p_{t}\)-hard bins in the dataset. More...
 
TArrayI fPtHardBinning
 \( p_{t}\)-hard binning More...
 
Int_t fNTrials
 !event trials More...
 
Float_t fXsection
 !x-section from pythia header More...
 
AliEmcalPythiaInfofPythiaInfo
 !event parton info More...
 
AliEmcalListfOutput
 !output list More...
 
TH1fHistEventCount
 !incoming and selected events More...
 
TH1fHistTrialsAfterSel
 !total number of trials per pt hard bin after selection More...
 
TH1fHistEventsAfterSel
 !total number of events per pt hard bin after selection More...
 
TProfile * fHistXsectionAfterSel
 !x section from pythia header More...
 
TH1fHistTrials
 !trials from pyxsec.root More...
 
TH1fHistEvents
 !total number of events per pt hard bin More...
 
TProfile * fHistXsection
 !x section from pyxsec.root More...
 
TH1fHistPtHard
 ! \( p_{t}\)-hard distribution More...
 
TH2fHistPtHardCorr
 !Correlation between \( p_{t}\)-hard value and bin More...
 
TH2fHistPtHardCorrGlobal
 !Correlation between \( p_{t}\)-hard value and global bin More...
 
TH2fHistPtHardBinCorr
 !Correlation between global and local (per-event) \( p_{t}\)-hard bin More...
 
TH1fHistCentrality
 !event centrality distribution More...
 
TH1fHistZVertex
 !z vertex position More...
 
TH1fHistEventPlane
 !event plane distribution More...
 
TH1fHistEventRejection
 !book keep reasons for rejecting event More...
 
TH1fHistTriggerClasses
 !number of events in each trigger class More...
 
TH1fHistTriggerClassesCorr
 !corrected number of events in each trigger class More...
 

Private Member Functions

void PrintStream (std::ostream &stream) const
 Print information about the trigger decision container to the output stream. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const AliAnalysisTaskEmcalTriggerSelection &task)
 Output stream operator. More...
 

Additional Inherited Members

- Public Types inherited from AliAnalysisTaskEmcal
enum  EDataType_t { kUnknownDataType, kESD, kAOD }
 Switch for the data type. More...
 
enum  BeamType { kNA = -1, kpp = 0, kAA = 1, kpA = 2 }
 Switch for the beam type. More...
 
enum  TriggerType {
  kND = -1, kJ1 = 0, kJ2 = 1, kG1 = 2,
  kG2 = 3, kL0 = 4
}
 Switch for EMCAL trigger types. More...
 
enum  TriggerCategory {
  kTriggerLevel0 = 0, kTriggerLevel1Jet = 1, kTriggerLevel1Gamma = 2, kTriggerRecalcJet = 3,
  kTriggerRecalcGamma = 4
}
 Online trigger categories. More...
 
enum  EMCalTriggerMode_t { kNoSpecialTreatment, kOverlapWithLowThreshold }
 Handling of the EMCAL trigger thresholds. More...
 
- Static Public Member Functions inherited from AliAnalysisTaskEmcal
static AliAODInputHandler * AddAODHandler ()
 Add an AOD handler to the analysis manager. More...
 
static AliESDInputHandler * AddESDHandler ()
 Add a ESD handler to the analysis manager. More...
 
- Static Protected Member Functions inherited from AliAnalysisTaskEmcal
static void GetEtaPhiDiff (const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
 Calculate \(\phi\) and \(\eta\) difference between a track (t) and a cluster (c). More...
 
static Byte_t GetTrackType (const AliVTrack *t)
 Get track type encoded from bits 20 and 21. More...
 
static Byte_t GetTrackType (const AliAODTrack *aodTrack, UInt_t filterBit1, UInt_t filterBit2)
 Decode track type. More...
 
static Double_t DeltaPhi (Double_t phia, Double_t phib, Double_t rMin=-TMath::Pi()/2, Double_t rMax=3 *TMath::Pi()/2)
 
static Double_tGenerateFixedBinArray (Int_t n, Double_t min, Double_t max)
 
static void GenerateFixedBinArray (Int_t n, Double_t min, Double_t max, Double_t *array)
 
static Double_t GetParallelFraction (AliVParticle *part1, AliVParticle *part2)
 Calculates the fraction of momentum z of part 1 w.r.t. part 2 in the direction of part 2. More...
 
static Double_t GetParallelFraction (const TVector3 &vect1, AliVParticle *part2)
 Calculates the fraction of momentum z of vect 1 w.r.t. part 2 in the direction of part 2. More...
 
- Static Protected Attributes inherited from AliAnalysisTaskEmcal
static Double_t fgkEMCalDCalPhiDivide = 4.
 phi value used to distinguish between DCal and EMCal More...
 

Detailed Description

Task providing an event selection for EMCAL-triggered events based on the reconstructed EMCAL trigger patches.

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

Perparation wagon for transparent trigger selection by users

Trigger event selection is centralized in this task. The trigger selecion is implemented in trigger selecion object, selecting all trigger patches firing the trigger using a trigger patch cut object fully describing the trigger. Trigger selections have to be configured by the user and should fully describe all Level1 triggers supported in the corresponding dataset (for simulation the dataset it is anchored to). Typically different modes are used on data and simulation:

  • Data: Selection based on FastOR ADC, used to cleanup noisy triggers or equalize triggers for different periods with different settings
  • Simulation: Selection based on FEE energy with an energy threshold corresponding to the ADC threshold applied in data, used to simulate the trigger response

Users have to configure the task acording to the different modes and the settings matching the dataset. For several datasets default configurations are already implemented. Missing configurations are implemented by the author on user request.

The trigger selection tasks appends an object to the event where users can easily query the trigger selection so the selection based on trigger primitives (patches) is centralized and not needed in the user analysis. The object can be retrieved by the users from the event.

The task has also a builtin QA for each trigger class, monitoring the energy spectra of all trigger patches and of the main trigger patches. It is recommended to always run the trigger selection QA - resource consumption should not be an issue.

Adding the wagon to the train

An add macro is provided under PWG/EMCAL/AddEmcalTriggerSelectionTask.C which can be used to configure the train wagon. The macro customization should include the following lines:

__R_ADDTASK__->SetGlobalDecisionContainerName("EmcalTriggerDecision");
__R_ADDTASK__->AutoConfigure(kDataset);

kDataset should be the name of a supported dataset. Please refer to the description of class PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection for supported datasets.

Configuring the trigger selection task for the corresponding period

Default configurations exists for run 1 pp (2012, 8 TeV) and for run2 pp (2016-2018, 13 TeV) and the corresponding datasets. For existing configurations and the corresponing cut settings please refer to the matching Configure function.

An AutoConfigure function provides a frontend for the user to configure the task based on the dataset name, and internally mapping datasets to configurations. On the data side pp datasets for 2012 and 2016-2018 are fully supported. Unfortunately the situation is more complicated on the simulation side: Due to the absence of a logical naming scheme where an algorithm can extract whether it is a simulation dataset or what period it is anchored to, supported datasets must be handled by a lookup table, and this can by far not be complete. Users should contact the author in case a new dataset should be added to the configuration.

Configuration by hand is also possible. This is of relevance for systematic studies of the trigger response via cut variations. Users have to provide a trigger selection via the function AddTriggerSelection. Each trigger selection object represents one Level1 trigger. For such configurations it is recommended to use a config macro.

Accessing the trigger selection in the user task

After processing the trigger selection the task appends a container with the selection results for each trigger supported for the dataset to the input event. The trigger decision container provides information about

  • Trigger selection status
  • Main patch according to the energy and patch specification
  • All trigger patches firing the trigger
  • The trigger selection cuts

Users can use the trigger selection container in order to select events as triggered events for the given trigger in case the selection status is true. The name of the trigger must match the name in the configuration. Names of trigger classes follow the EMCAL naming convention. The following example reads the trigger decision container from the event and selects events as EG1 event:

auto trgsel = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(input->FindListObject("EmcalTriggerDecision"))
if(trgsel->IsEventSelected("EG1")) std::cout << "Event selected as EG1 event" << std::endl;

Definition at line 144 of file AliAnalysisTaskEmcalTriggerSelection.h.

Constructor & Destructor Documentation

PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::AliAnalysisTaskEmcalTriggerSelection ( )

Dummy constructor.

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

Definition at line 46 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::AliAnalysisTaskEmcalTriggerSelection ( const char *  name)

Main constructor.

Initializing an empty task with default settings (i.e. name of the trigger decision container). The task is not yet configured and has no trigger selection object attached - users must use the function AutoConfigure or an appropriate Configure function. The name of the task is used to retrieve the task from the AliAnlysisManager and must be unique.

Parameters
[in]nameName of the task

Definition at line 57 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

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

Destructor.

Definition at line 213 of file AliAnalysisTaskEmcalTriggerSelection.h.

Member Function Documentation

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::AddTriggerSelection ( AliEmcalTriggerSelection *const  selection)

Add trigger selection to the trigger selection task.

This function is used to configure the trigger maker manually by providing trigger selection objects configured by hand. Each trigger selection object corresponds to one trigger class. The method is forseen for systematic settings. For default settings please refer to the AutoConfigure function or the appropriate Configure function.

Parameters
[in]selectionthe trigger selection to be added

Definition at line 81 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by ConfigureFromYAML(), ConfigureMCPP2012(), ConfigureMCPP2016(), ConfigurePP2012(), and ConfigurePP2016().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::AutoConfigure ( const char *  period)

Automatically configure trigger decision handler for different periods.

Definition at line 112 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::ConfigureFromYAML ( const char *  yamlconfig)

Configure task using YAML configuration file.

This interface allows to setup a complicated trigger scheme using a singe YAML file. The YAML file consists of a global part with settings in common for all triggers and a trigger specific part. Global configurations are (keyname):

  • containername: Name of the output container
  • energydef: Energy definition
  • energysource: Offline (FEE) or Recalc (ADC, ignoring online STU decision)
  • triggerclasses: Array with the names of the trigger classes

Supported values for key energydef:

Value name Energy definition
ADC ADC from FastORs
Energy FEE Energy
EnergyRough Energy estimated from FastORs
EnergySmeared FEE Energy with offline smearing

The key for the trigger class is the name of the trigger class. Configurations for the specific triggers are (keyname):

  • acceptance: Acceptance type
  • patchtype: Patch type
  • Threshold: ADC / Energy threshold

Supported values for acceptance:

Value name Acceptance type
EMCAL EMCAL acceptance
DCAL DCAL+PHOS acceptance

Supported values for patchtype:

Value type Type of the patch
L1Gamma Level1 gamma patch, any threshold
L1GammaHigh Level1 gamma patch, high threshold
L1GammaLow Level1 gamma patch, low threshold
L1Jet Level1 jet patch, any threshold
L1JetHigh Level1 jet patch, high threshold
L1JetLow Level1 jet patch, low threshold

Here is an example for a valid config file

1 containername: "EmcalTriggerDecisionV1"
2 energysource: "Recalc"
3 energydef: "ADC"
4 triggerclasses:
5 - EGA
6 - EJE
7 EGA:
8  acceptance: "EMCAL"
9  patchtype" "L1Gamma"
10  threshold: 130
11 EJE:
12  acceptance: "EMCAL"
13  patchtype: "L1Jet"
14  threshold: 200
Parameters
yamlconfigName of the YAML configuration file

Definition at line 343 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::ConfigureMCPP2012 ( )

Trigger configuration for MC anchored to run1 pp (2012)

Configuration is representing all Level1 triggers available in the run2 data taking for pp in 2012. This configuration is for the simulation mode, correspondingly the trigger patch selection is applied on trigger patches calulated from FEE energies with energy smearing applied. The following table lists the trigger classes supported together with the corresponding settings:

Trigger class Acceptance type Patch Type Threshold (GeV)
EG1 EMCAL EGA (2x2) 10
EJ1 EMCAL EJE (16x16) 15.5

The size of the jet patch and the subregion size are defined in the configuration of the trigger maker kernel.

The trigger thresholds are tuned to describe the data.

Definition at line 191 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::ConfigureMCPP2016 ( )

Trigger configuration for MC anchored to run2 pp (2016-2018)

Configuration is representing all Level1 triggers available in the run2 data taking for pp 2016 to 2018. This configuration is for the simulation mode, correspondingly the trigger patch selection is applied on trigger patches calulated from FEE energies with energy smearing applied. The following table lists the trigger classes supported together with the corresponding settings:

Trigger class Acceptance type Patch Type Threshold (GeV)
EG1 EMCAL EGA (2x2) 9
EG2 EMCAL EGA (2x2) 4
DG1 DCAL EGA (2x2) 9
DG2 DCAL EGA (2x2) 4
EJ1 EMCAL EJE (16x16) 14
EJ2 EMCAL EJE (16x16) 14
DJ1 DCAL EJE (8x8) 19
DJ2 DCAL EJE (8x8) 14

The size of the jet patch and the subregion size are defined in the configuration of the trigger maker kernel.

The trigger thresholds are tuned to describe the data.

Definition at line 277 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::ConfigurePP2012 ( )

Trigger configuration for run1 pp (2012) - data mode.

Configuration is representing all Level1 triggers available in the run1 data taking for pp in 2012. This configuration is for the online mode (data events), correspondingly the trigger patch selection is applied on trigger patches fulfilling the recalc type. The following table lists the trigger classes supported together with the corresponding settings:

Trigger class Acceptance type Patch Type Threshold (ADC)
EGA EMCAL EGA (2x2) 130
EJE EMCAL EJE (16x16) 200

The size of the jet patch and the subregion size are defined in the configuration of the trigger maker kernel.

The trigger thresholds match the ones in https://twiki.cern.ch/twiki/bin/view/ALICE/EMCalTriggerOffline

Definition at line 173 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::ConfigurePP2016 ( )

Trigger configuration for run2 pp (2016 - 2018) - data mode.

Configuration is representing all Level1 triggers available in the run2 data taking for pp 2016 to 2018. This configuration is for the online mode (data events), correspondingly the trigger patch selection is applied on trigger patches fulfilling the recalc type. The following table lists the trigger classes supported together with the corresponding settings:

Trigger class Acceptance type Patch Type Threshold (ADC)
EG1 EMCAL EGA (2x2) 115
EG2 EMCAL EGA (2x2) 51
DG1 DCAL EGA (2x2) 115
DG2 DCAL EGA (2x2) 51
EJ1 EMCAL EJE (16x16) 255
EJ2 EMCAL EJE (16x16) 204
DJ1 DCAL EJE (8x8) 255
DJ2 DCAL EJE (8x8) 204

The size of the jet patch and the subregion size are defined in the configuration of the trigger maker kernel.

The trigger thresholds match the ones in https://twiki.cern.ch/twiki/bin/view/ALICE/EMCalTriggerOffline

Attention: Selection of jet triggered events will not work for LHC16o+p, incorrect patchsize was applied at hardware level, therefore too strong thresholds.

Definition at line 209 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

AliEmcalTriggerSelectionCuts::AcceptanceType_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::DecodeAcceptanceString ( const std::string &  acceptancestring)
protected

Definition at line 390 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by ConfigureFromYAML().

AliEmcalTriggerSelectionCuts::SelectionMethod_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::DecodeEnergyDefinition ( const std::string &  energydefstring)
protected

Definition at line 414 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by ConfigureFromYAML().

AliEmcalTriggerSelectionCuts::PatchType_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::DecodePatchTypeString ( const std::string &  patchtypestring)
protected

Definition at line 400 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by ConfigureFromYAML().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::FillHistograms ( )
protectedvirtual

Filling basic QA Histograms of the trigger selection task.

The QA histograms are connected to the main patch and monitor

  • ADC Amplitude
  • Energy
  • Smeared energy
    Returns
    Always true

Reimplemented from AliAnalysisTaskEmcal.

Definition at line 95 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

const TString& PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::GetGlobalDecisionContainerName ( ) const
inline

Provide access to the name of the global trigger decision container name.

Returns
Name of the trigger decision container

Definition at line 260 of file AliAnalysisTaskEmcalTriggerSelection.h.

AliEmcalTriggerDecisionContainer* PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::GetGlobalTriggerDecisionContainer ( ) const
inlineprotected

Find the main trigger container in the input event.

If not available, create it and add it to the input event

Definition at line 570 of file AliAnalysisTaskEmcalTriggerSelection.h.

Referenced by FillHistograms().

const TList& PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::GetListOfTriggerSelections ( ) const
inline

Access to the trigger selection objects attached to the task.

Returns
List of trigger selections

Definition at line 233 of file AliAnalysisTaskEmcalTriggerSelection.h.

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::InitQA ( const AliEmcalTriggerSelection *const  sel)
protected

Initialize QA histograms for trigger selection.

Parameters
sel

Definition at line 100 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by UserCreateOutputObjects().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Is2012MCPP ( const char *  dataset) const
protected

Definition at line 150 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Is2012PP ( const char *  dataset) const
protected

Definition at line 119 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Is2016MCPP ( const char *  dataset) const
protected

Definition at line 155 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Is2016PP ( const char *  dataset) const
protected

Definition at line 130 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by AutoConfigure().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::IsSupportedMCSample ( const char *  period,
std::vector< TString > &  supportedProductions 
) const
protected

Definition at line 160 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by Is2012MCPP(), and Is2016MCPP().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::MakeQA ( const AliEmcalTriggerDecisionContainer cont)
protected

Fill QA histograms for the event.

Parameters
cont

Definition at line 105 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by FillHistograms().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::PrintStream ( std::ostream &  stream) const
private

Print information about the trigger decision container to the output stream.

Parameters
streamOutput stream used from printing

Definition at line 427 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Referenced by operator<<().

Bool_t PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::Run ( )
protectedvirtual

User event loop.

The user event loop performs the trigger selection. The selection process is implemented in AliEmcalTriggerSelection objects. The event loop processes all trigger selection objects configured in this task and collects the result in the trigger selection container which is attached to the event.

Function overrides Run from AliAnalysisTaskEmcal

Returns
Always true

Reimplemented from AliAnalysisTaskEmcal.

Definition at line 85 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::SetGlobalDecisionContainerName ( const char *  name)
inline

Set the name of the global trigger decision container.

The AliAnalysisTaskEmcalTriggerSelection appends an object of type PWG::EMCAL::AliEmcalTriggerDecisionContainer with the status of the trigger selecion for all trigger classes supported by the configuration to the event. Users can query the object in their task via

auto trgcont = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->FindListObject(nametriggercontainer));

The name must match the name specified here. If no name is specified the default one ("EmcalTriggerDecision") is used.

Parameters
[in]nameName of the trigger decision container

Definition at line 254 of file AliAnalysisTaskEmcalTriggerSelection.h.

Referenced by ConfigureFromYAML().

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::UserCreateOutputObjects ( )
protectedvirtual

Initialization of output container.

Initialization will take care of the QA histograms specified by the various trigger selections in the corresponding QA objects.

Function overrides UserCreateOutputObjects from AliAnalysisTaskSE

Definition at line 69 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

void PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::UserExecOnce ( )
protectedvirtual

Initializations performed when the first event is created.

Initializing common output container for trigger decision

Function overrides UserExecOnce from AliAnalysisTaskEmcal

Reimplemented from AliAnalysisTaskEmcal.

Definition at line 76 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const AliAnalysisTaskEmcalTriggerSelection task 
)
friend

Output stream operator.

Logging all settings (output container, trigger classes, trigger selection cuts) to the output stream

Parameters
streamOutput stream used for logging
taskTrigger selection task to be put on the stream
Returns
stream after logging

Definition at line 501 of file AliAnalysisTaskEmcalTriggerSelection.cxx.

Member Data Documentation

TString PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::fGlobalDecisionContainerName
protected

Name of the global trigger selection.

Definition at line 595 of file AliAnalysisTaskEmcalTriggerSelection.h.

Referenced by PrintStream(), and UserExecOnce().

TList PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::fSelectionQA
protected

Trigger selection QA.

Definition at line 597 of file AliAnalysisTaskEmcalTriggerSelection.h.

Referenced by InitQA(), MakeQA(), and UserCreateOutputObjects().

AliEmcalTriggerDecisionContainer* PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::fTriggerDecisionContainer
protected

Trigger decision container objects.

Definition at line 594 of file AliAnalysisTaskEmcalTriggerSelection.h.

Referenced by Run(), and UserExecOnce().

TList PWG::EMCAL::AliAnalysisTaskEmcalTriggerSelection::fTriggerSelections
protected

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