![]() |
AliPhysics
1adf5bd (1adf5bd)
|
Steering task for the EMCal correction frameworkThis class is the steering class for the cell and cluster level corrections for the EMCal. A YAML configuration file is utilized to determine which corrections should be run and how they should be configured. The corrections are initialized by calling their Initialize() function. Similar to AliAnalysisTaskEmcal, the relevant event information is loaded, and then the Run() function of each correction is called. More...
#include <AliEmcalCorrectionTask.h>
Public Types | |
enum | BeamType { kNA = -1, kpp = 0, kAA = 1, kpA = 2 } |
Switch for the beam type. More... | |
Private Member Functions | |
AliEmcalCorrectionTask (const AliEmcalCorrectionTask &) | |
AliEmcalCorrectionTask & | operator= (const AliEmcalCorrectionTask &) |
void | SetupConfigurationFilePath (std::string &filename, bool userFile=false) |
void | RetrieveExecutionOrder (std::vector< std::string > &componentsToAdd) |
void | InitializeComponents () |
void | CreateNewObjectBranches () |
void | CopyBranchesToNewObjects () |
void | CopyClusters (TClonesArray *orig, TClonesArray *dest) |
Bool_t | RetrieveEventObjects () |
void | ExecOnceComponents () |
BeamType | GetBeamType () |
Static Private Member Functions | |
static bool | doesFileExist (const std::string &filename) |
Private Attributes | |
YAML::Node | fUserConfiguration |
YAML::Node | fDefaultConfiguration |
User YAML Configuration. More... | |
std::string | fUserConfigurationString |
Default YAML Configuration. More... | |
std::string | fDefaultConfigurationString |
Store the default YAML configuration as a string so that it can be streamed. More... | |
std::string | fUserConfigurationFilename |
! User YAML configruation filename More... | |
std::string | fDefaultConfigurationFilename |
! Default YAML configuration filename More... | |
std::vector < AliEmcalCorrectionComponent * > | fCorrectionComponents |
! Contains the correction components More... | |
bool | fConfigurationInitialized |
True if the YAML files are initialized. More... | |
bool | fIsEsd |
File type. More... | |
bool | fCreateNewObjectBranches |
Create new branches for cells and clusters. More... | |
std::string | fCreatedCellBranchName |
Name of created cell branch. More... | |
std::string | fCreatedClusterBranchName |
Name of created cluster branch. More... | |
std::string | fCreatedTrackBranchName |
Name of created track branch. More... | |
TString | fRunPeriod |
Run period (passed by user) More... | |
bool | fEventInitialized |
If the event is initialized properly. More... | |
Double_t | fCent |
! Event centrality More... | |
Int_t | fCentBin |
! Event centrality bin More... | |
Double_t | fMinCent |
min centrality for event selection More... | |
Double_t | fMaxCent |
max centrality for event selection More... | |
Int_t | fNcentBins |
how many centrality bins More... | |
TString | fCentEst |
name of V0 centrality estimator More... | |
Bool_t | fUseNewCentralityEstimation |
Use new centrality estimation (for 2015 data) More... | |
Double_t | fVertex [3] |
!event vertex More... | |
Int_t | fNVertCont |
!event vertex number of contributors More... | |
BeamType | fBeamType |
!event beam type More... | |
BeamType | fForceBeamType |
forced beam type More... | |
TString | fCaloCellsName |
name of calo cell collection More... | |
Bool_t | fNeedEmcalGeom |
whether or not the task needs the emcal geometry More... | |
AliEMCALGeometry * | fGeom |
!emcal geometry More... | |
TObjArray | fParticleCollArray |
particle/track collection array More... | |
TObjArray | fClusterCollArray |
cluster collection array More... | |
AliVCaloCells * | fCaloCells |
! pointer to calo cells More... | |
AliVCaloCells * | fCaloCellsFromInputEvent |
! pointer to calo cells from the input event More... | |
TList * | fOutput |
! Output for histograms More... | |
Steering task for the EMCal correction framework
This class is the steering class for the cell and cluster level corrections for the EMCal. A YAML configuration file is utilized to determine which corrections should be run and how they should be configured. The corrections are initialized by calling their Initialize() function. Similar to AliAnalysisTaskEmcal, the relevant event information is loaded, and then the Run() function of each correction is called.
In general, this steering class handles all of the configuration of the corrections, including passing the relevant EMCal containers and event objects.
Note: YAML does not play nicely with CINT and dictionary generation, so it is hidden using conditional inclusion.
Definition at line 41 of file AliEmcalCorrectionTask.h.
Switch for the beam type.
Enumerator | |
---|---|
kNA |
! Undefined |
kpp |
! Proton-Proton |
kAA |
! Nucleus-Nucleus |
kpA |
! Proton-Nucleus |
Definition at line 47 of file AliEmcalCorrectionTask.h.
AliEmcalCorrectionTask::AliEmcalCorrectionTask | ( | ) |
Definition at line 42 of file AliEmcalCorrectionTask.cxx.
AliEmcalCorrectionTask::AliEmcalCorrectionTask | ( | const char * | name | ) |
Definition at line 93 of file AliEmcalCorrectionTask.cxx.
|
virtual |
Definition at line 1141 of file AliEmcalCorrectionTask.cxx.
|
private |
AliClusterContainer * AliEmcalCorrectionTask::AddClusterContainer | ( | const char * | n | ) |
Create new cluster container and attach it to the task. The name provided to this function must match the name of the array attached to the new container inside the input event.
[in] | n | Name of the container and the array the container points to |
Definition at line 985 of file AliEmcalCorrectionTask.cxx.
AliMCParticleContainer * AliEmcalCorrectionTask::AddMCParticleContainer | ( | const char * | n | ) |
Create new container for MC particles and attach it to the task. The name provided to this function must match the name of the array attached to the new container inside the input event.
[in] | n | Name of the container and the array the container points to |
Definition at line 931 of file AliEmcalCorrectionTask.cxx.
AliParticleContainer * AliEmcalCorrectionTask::AddParticleContainer | ( | const char * | n | ) |
Create new particle container and attach it to the task. The name provided to this function must match the name of the array attached to the new container inside the input event.
[in] | n | Name of the container and the array the container points to |
Definition at line 967 of file AliEmcalCorrectionTask.cxx.
AliTrackContainer * AliEmcalCorrectionTask::AddTrackContainer | ( | const char * | n | ) |
Create new track container and attach it to the task. The name provided to this function must match the name of the array attached to the new container inside the input event.
[in] | n | Name of the container and the array the container points to |
Definition at line 949 of file AliEmcalCorrectionTask.cxx.
|
inline |
Definition at line 87 of file AliEmcalCorrectionTask.h.
Referenced by InitializeComponents().
|
inline |
Definition at line 86 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 84 of file AliEmcalCorrectionTask.h.
Referenced by AdoptMCParticleContainer(), AdoptTrackContainer(), and InitializeComponents().
|
inline |
Definition at line 85 of file AliEmcalCorrectionTask.h.
|
private |
Definition at line 640 of file AliEmcalCorrectionTask.cxx.
Referenced by UserExec().
|
private |
Definition at line 720 of file AliEmcalCorrectionTask.cxx.
Referenced by CopyBranchesToNewObjects().
|
inline |
Definition at line 107 of file AliEmcalCorrectionTask.h.
|
private |
Definition at line 554 of file AliEmcalCorrectionTask.cxx.
Referenced by ExecOnce().
|
inlinestaticprivate |
Checks if a file exists. This is done inline to make it efficient. See: https://stackoverflow.com/a/19841704
filename | String containing the filename of the file to check. |
Definition at line 150 of file AliEmcalCorrectionTask.cxx.
Referenced by InitializeConfiguration().
|
virtual |
Executed once per event to initialize objects. The user probably does not need to overload it.
Perform steps needed to initialize the analysis. This function relies on the presence of an input event (ESD or AOD event). Consequently it is called internally by UserExec for the first event.
This function connects all containers attached to this task to the corresponding arrays in the input event. Furthermore it initializes the geometry.
Definition at line 879 of file AliEmcalCorrectionTask.cxx.
Referenced by UserExec().
|
private |
Definition at line 540 of file AliEmcalCorrectionTask.cxx.
Referenced by ExecOnce().
|
private |
Get beam type : pp-AA-pA ESDs have it directly, AODs get it from hardcoded run number ranges
Definition at line 1151 of file AliEmcalCorrectionTask.cxx.
Referenced by RetrieveEventObjects().
AliClusterContainer * AliEmcalCorrectionTask::GetClusterContainer | ( | Int_t | i = 0 | ) | const |
Get \( i^{th} \) cluster container attached to this task
[in] | i | Index of the cluster container |
Definition at line 1013 of file AliEmcalCorrectionTask.cxx.
Referenced by Run().
AliClusterContainer * AliEmcalCorrectionTask::GetClusterContainer | ( | const char * | name | ) | const |
Find cluster container attached to this task according to its name
[in] | name | Name of the cluster container |
Definition at line 1036 of file AliEmcalCorrectionTask.cxx.
|
inline |
Definition at line 92 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 93 of file AliEmcalCorrectionTask.h.
AliParticleContainer * AliEmcalCorrectionTask::GetParticleContainer | ( | Int_t | i = 0 | ) | const |
Get \( i^{th} \) particle container attached to this task
[in] | i | Index of the particle container |
Definition at line 1001 of file AliEmcalCorrectionTask.cxx.
Referenced by GetMCParticleContainer(), GetTrackContainer(), and Run().
AliParticleContainer * AliEmcalCorrectionTask::GetParticleContainer | ( | const char * | name | ) | const |
Find particle container attached to this task according to its name
[in] | name | Name of the particle container |
Definition at line 1025 of file AliEmcalCorrectionTask.cxx.
|
inline |
Definition at line 102 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 94 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 95 of file AliEmcalCorrectionTask.h.
|
private |
Definition at line 354 of file AliEmcalCorrectionTask.cxx.
Referenced by UserCreateOutputObjects().
void AliEmcalCorrectionTask::InitializeConfiguration | ( | ) |
Definition at line 202 of file AliEmcalCorrectionTask.cxx.
|
private |
|
inline |
Definition at line 97 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 96 of file AliEmcalCorrectionTask.h.
|
private |
Retrieve objects from event.
Definition at line 779 of file AliEmcalCorrectionTask.cxx.
Referenced by UserExec().
|
private |
Definition at line 338 of file AliEmcalCorrectionTask.cxx.
Referenced by InitializeComponents().
|
virtual |
Executed each event once all objects are available
Definition at line 1085 of file AliEmcalCorrectionTask.cxx.
Referenced by UserExec().
|
inline |
Definition at line 98 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 104 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 75 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 100 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 101 of file AliEmcalCorrectionTask.h.
|
private |
Handles expanding ALICE_PHYSICS and copying the file from the grid if necessary.
Definition at line 160 of file AliEmcalCorrectionTask.cxx.
Referenced by InitializeConfiguration().
|
inline |
Definition at line 105 of file AliEmcalCorrectionTask.h.
|
inline |
Definition at line 74 of file AliEmcalCorrectionTask.h.
void AliEmcalCorrectionTask::UserCreateOutputObjects | ( | ) |
Definition at line 464 of file AliEmcalCorrectionTask.cxx.
void AliEmcalCorrectionTask::UserExec | ( | Option_t * | option | ) |
Definition at line 1048 of file AliEmcalCorrectionTask.cxx.
Bool_t AliEmcalCorrectionTask::UserNotify | ( | ) |
Definition at line 1124 of file AliEmcalCorrectionTask.cxx.
bool AliEmcalCorrectionTask::WriteConfigurationFile | ( | std::string | filename, |
bool | userConfig = false |
||
) |
Writes the desired yaml configuration to a file.
filename | The name of the file to write. |
userCofig | True to write the user configuration. |
Definition at line 303 of file AliEmcalCorrectionTask.cxx.
|
private |
!event beam type
Definition at line 160 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects().
|
private |
! pointer to calo cells
Definition at line 168 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), CreateNewObjectBranches(), Run(), and UserExec().
|
private |
! pointer to calo cells from the input event
Definition at line 169 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), ExecOnce(), and UserExec().
|
private |
name of calo cell collection
Definition at line 162 of file AliEmcalCorrectionTask.h.
Referenced by ExecOnce(), SetCaloCellsName(), and UserCreateOutputObjects().
|
private |
! Event centrality
Definition at line 151 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects(), and Run().
|
private |
! Event centrality bin
Definition at line 152 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects(), and Run().
|
private |
name of V0 centrality estimator
Definition at line 156 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects().
|
private |
cluster collection array
Definition at line 167 of file AliEmcalCorrectionTask.h.
Referenced by AddClusterContainer(), AdoptClusterContainer(), AliEmcalCorrectionTask(), ExecOnce(), GetClusterContainer(), RemoveClusterContainer(), and RetrieveEventObjects().
|
private |
True if the YAML files are initialized.
Definition at line 142 of file AliEmcalCorrectionTask.h.
Referenced by InitializeConfiguration(), UserCreateOutputObjects(), and WriteConfigurationFile().
|
private |
! Contains the correction components
Definition at line 141 of file AliEmcalCorrectionTask.h.
Referenced by CorrectionComponents(), ExecOnceComponents(), InitializeComponents(), Run(), and UserNotify().
|
private |
Name of created cell branch.
Definition at line 146 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), and CreateNewObjectBranches().
|
private |
Name of created cluster branch.
Definition at line 147 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), and CreateNewObjectBranches().
|
private |
Name of created track branch.
Definition at line 148 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), and CreateNewObjectBranches().
|
private |
Create new branches for cells and clusters.
Definition at line 145 of file AliEmcalCorrectionTask.h.
Referenced by ExecOnce(), SetCreateNewObjectBranches(), UserCreateOutputObjects(), and UserExec().
|
private |
User YAML Configuration.
Definition at line 132 of file AliEmcalCorrectionTask.h.
Referenced by CreateNewObjectBranches(), InitializeComponents(), InitializeConfiguration(), RetrieveExecutionOrder(), and UserCreateOutputObjects().
|
private |
! Default YAML configuration filename
Definition at line 139 of file AliEmcalCorrectionTask.h.
Referenced by InitializeConfiguration(), and SetDefaultConfigurationFilename().
|
private |
Store the default YAML configuration as a string so that it can be streamed.
Definition at line 136 of file AliEmcalCorrectionTask.h.
Referenced by InitializeConfiguration(), UserCreateOutputObjects(), and WriteConfigurationFile().
|
private |
If the event is initialized properly.
Definition at line 150 of file AliEmcalCorrectionTask.h.
Referenced by ExecOnce(), and UserExec().
|
private |
forced beam type
Definition at line 161 of file AliEmcalCorrectionTask.h.
Referenced by GetBeamType(), SetForceBeamType(), and UserCreateOutputObjects().
|
private |
!emcal geometry
Definition at line 164 of file AliEmcalCorrectionTask.h.
Referenced by ExecOnce(), and Run().
|
private |
File type.
Definition at line 144 of file AliEmcalCorrectionTask.h.
Referenced by CopyBranchesToNewObjects(), CreateNewObjectBranches(), InitializeComponents(), and UserCreateOutputObjects().
|
private |
max centrality for event selection
Definition at line 154 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects().
|
private |
min centrality for event selection
Definition at line 153 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects().
|
private |
how many centrality bins
Definition at line 155 of file AliEmcalCorrectionTask.h.
Referenced by InitializeComponents(), RetrieveEventObjects(), Run(), and UserCreateOutputObjects().
|
private |
whether or not the task needs the emcal geometry
Definition at line 163 of file AliEmcalCorrectionTask.h.
Referenced by ExecOnce().
|
private |
!event vertex number of contributors
Definition at line 159 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects().
|
private |
! Output for histograms
Definition at line 171 of file AliEmcalCorrectionTask.h.
Referenced by InitializeComponents(), and Run().
|
private |
particle/track collection array
Definition at line 166 of file AliEmcalCorrectionTask.h.
Referenced by AddMCParticleContainer(), AddParticleContainer(), AddTrackContainer(), AdoptParticleContainer(), AliEmcalCorrectionTask(), ExecOnce(), GetParticleContainer(), RemoveParticleContainer(), and RetrieveEventObjects().
|
private |
Run period (passed by user)
Definition at line 149 of file AliEmcalCorrectionTask.h.
Referenced by GetRunPeriod(), InitializeConfiguration(), and SetRunPeriod().
|
private |
Use new centrality estimation (for 2015 data)
Definition at line 157 of file AliEmcalCorrectionTask.h.
Referenced by RetrieveEventObjects(), and SetUseNewCentralityEstimation().
|
private |
Definition at line 131 of file AliEmcalCorrectionTask.h.
Referenced by CreateNewObjectBranches(), InitializeComponents(), InitializeConfiguration(), RetrieveExecutionOrder(), and UserCreateOutputObjects().
|
private |
! User YAML configruation filename
Definition at line 138 of file AliEmcalCorrectionTask.h.
Referenced by InitializeConfiguration(), and SetUserConfigurationFilename().
|
private |
Default YAML Configuration.
Store the User YAML configuration as a string so that it can be streamed
Definition at line 135 of file AliEmcalCorrectionTask.h.
Referenced by InitializeConfiguration(), UserCreateOutputObjects(), and WriteConfigurationFile().
|
private |
!event vertex
Definition at line 158 of file AliEmcalCorrectionTask.h.
Referenced by AliEmcalCorrectionTask(), and RetrieveEventObjects().