AliPhysics  421aab4 (421aab4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalCorrectionComponent Class Reference

Base class for correction components in the EMCal correction framework. More...

#include <AliEmcalCorrectionComponent.h>

Inheritance diagram for AliEmcalCorrectionComponent:

Public Member Functions

 AliEmcalCorrectionComponent ()
 
 AliEmcalCorrectionComponent (const char *name)
 
virtual ~AliEmcalCorrectionComponent ()
 
virtual Bool_t Initialize ()
 
virtual void UserCreateOutputObjects ()
 
virtual void ExecOnce ()
 
virtual Bool_t Run ()
 
virtual Bool_t UserNotify ()
 
virtual Bool_t CheckIfRunChanged ()
 
void GetEtaPhiDiff (const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
 
void UpdateCells ()
 
void GetPass ()
 
void FillCellQA (TH1F *h)
 
Int_t InitBadChannels ()
 
AliParticleContainerAddParticleContainer (const char *n)
 
AliTrackContainerAddTrackContainer (const char *n)
 
AliMCParticleContainerAddMCParticleContainer (const char *n)
 
AliClusterContainerAddClusterContainer (const char *n)
 
void AdoptParticleContainer (AliParticleContainer *cont)
 
void AdoptTrackContainer (AliTrackContainer *cont)
 
void AdoptMCParticleContainer (AliMCParticleContainer *cont)
 
void AdoptClusterContainer (AliClusterContainer *cont)
 
AliParticleContainerGetParticleContainer (Int_t i=0) const
 
AliParticleContainerGetParticleContainer (const char *name) const
 
AliClusterContainerGetClusterContainer (Int_t i=0) const
 
AliClusterContainerGetClusterContainer (const char *name) const
 
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)
 
AliVCaloCells * GetCaloCells () const
 
TListGetOutputList () const
 
void SetCaloCells (AliVCaloCells *cells)
 
void SetRecoUtils (AliEMCALRecoUtils *ru)
 
void SetInputEvent (AliVEvent *event)
 
void SetMCEvent (AliMCEvent *mcevent)
 
void SetUsingInputEvent (bool b=true)
 
void SetEMCALGeometry (AliEMCALGeometry *geometry)
 
void SetCentralityBin (Int_t bin)
 
void SetCentrality (Double_t cent)
 
void SetNcentralityBins (Int_t n)
 
void SetVertex (Double_t *vertex)
 
void SetIsESD (Bool_t isESD)
 
void SetUserConfiguration (YAML::Node &node)
 Make copy to ensure that the nodes do not point to each other (?) More...
 
void SetDefaultConfiguration (YAML::Node &node)
 
template<typename T >
bool GetProperty (std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
 Retrieve property. More...
 

Static Public Member Functions

template<typename T >
static bool GetProperty (std::string propertyName, T &property, const YAML::Node &userConfiguration, const YAML::Node &defaultConfiguration, bool requiredProperty=true, std::string correctionName="")
 Retrieve property driver function. It is static so that it can be used by other classes. More...
 
static bool IsSharedValue (std::string &value)
 

Static Protected Member Functions

template<typename T >
static bool GetPropertyFromNodes (const YAML::Node &node, const YAML::Node &sharedParametersNode, std::string propertyName, T &property, const std::string correctionName, const std::string configurationType, int nodesDeep=0)
 
template<typename T >
static bool GetPropertyFromNode (const YAML::Node &node, std::string propertyName, T &property)
 
template<typename T >
static std::enable_if
<!std::is_arithmetic< T >
::value &&!std::is_same< T,
std::string >::value
&&!std::is_same< T, bool >
::value >::type 
PrintRetrievedPropertyValue (T &property, std::stringstream &tempMessage)
 
template<typename T >
static std::enable_if
< std::is_arithmetic< T >
::value||std::is_same< T,
std::string >::value||std::is_same
< T, bool >::value >::type 
PrintRetrievedPropertyValue (T &property, std::stringstream &tempMessage)
 

Protected Attributes

YAML::Node fUserConfiguration
 ! User YAML configuration More...
 
YAML::Node fDefaultConfiguration
 ! Default YAML configuration More...
 
Bool_t fCreateHisto
 Flag to make some basic histograms. More...
 
Int_t fRun
 ! Run number More...
 
TString fFilepass
 Input data pass number. More...
 
Bool_t fGetPassFromFileName
 Get fFilepass from file name. More...
 
AliEmcalCorrectionEventManager fEventManager
 Minimal task which inherits from AliAnalysisTaskSE and manages access to the event. More...
 
Bool_t fEsdMode
 flag for ESD More...
 
AliMCEvent * fMCEvent
 ! MC More...
 
Double_t fCent
 ! Event centrality More...
 
Int_t fNcentBins
 How many centrality bins (this member copied from AliAnalysisTaskEmcal) More...
 
Int_t fCentBin
 ! Event centrality bin 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 fVertex [3]
 ! Event vertex More...
 
AliEMCALGeometry * fGeom
 ! Geometry object More...
 
Bool_t fIsEmbedded
 Trigger, embedded signal. More...
 
Int_t fMinMCLabel
 Minimum MC label value for the tracks/clusters being considered MC particles. More...
 
TObjArray fClusterCollArray
 Cluster collection array. More...
 
TObjArray fParticleCollArray
 Particle/track collection array. More...
 
AliVCaloCells * fCaloCells
 ! Pointer to CaloCells More...
 
AliEMCALRecoUtils * fRecoUtils
 Pointer to RecoUtils. More...
 
TListfOutput
 ! List of output histograms More...
 
TString fBasePath
 Base folder path to get root files. More...
 

Private Member Functions

 AliEmcalCorrectionComponent (const AliEmcalCorrectionComponent &)
 
AliEmcalCorrectionComponentoperator= (const AliEmcalCorrectionComponent &)
 

Detailed Description

Base class for correction components in the EMCal correction framework.

Base class for all correction components in the EMCal Correction Framework. Each correction component corresponds to a correction needed for the EMCal. Creation, configuration, and execution of all of the components is handled by AliEmcalCorrectionTask. Each new component is automatically registered through the AliEmcalCorrectionComponentFactory class, and is thus automatically available to execute. Components are configured through a set of YAML configuration files. For more information about the steering, see AliEmcalCorrectionTask.

Author
Raymond Ehlers raymo.nosp@m.nd.e.nosp@m.hlers.nosp@m.@yal.nosp@m.e.edu, Yale University
James Mulligan james.nosp@m..mul.nosp@m.ligan.nosp@m.@yal.nosp@m.e.edu, Yale University
Date
Jul 8, 2016

Definition at line 47 of file AliEmcalCorrectionComponent.h.

Constructor & Destructor Documentation

AliEmcalCorrectionComponent::AliEmcalCorrectionComponent ( )

Default constructor

Definition at line 29 of file AliEmcalCorrectionComponent.cxx.

AliEmcalCorrectionComponent::AliEmcalCorrectionComponent ( const char *  name)

Standard constructor

Definition at line 65 of file AliEmcalCorrectionComponent.cxx.

AliEmcalCorrectionComponent::~AliEmcalCorrectionComponent ( )
virtual

Destructor

Definition at line 100 of file AliEmcalCorrectionComponent.cxx.

AliEmcalCorrectionComponent::AliEmcalCorrectionComponent ( const AliEmcalCorrectionComponent )
private

Member Function Documentation

AliClusterContainer* AliEmcalCorrectionComponent::AddClusterContainer ( const char *  n)
inline

Definition at line 71 of file AliEmcalCorrectionComponent.h.

AliMCParticleContainer* AliEmcalCorrectionComponent::AddMCParticleContainer ( const char *  n)
inline

Definition at line 70 of file AliEmcalCorrectionComponent.h.

AliParticleContainer* AliEmcalCorrectionComponent::AddParticleContainer ( const char *  n)
inline

Definition at line 68 of file AliEmcalCorrectionComponent.h.

AliTrackContainer* AliEmcalCorrectionComponent::AddTrackContainer ( const char *  n)
inline

Definition at line 69 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::AdoptClusterContainer ( AliClusterContainer cont)
inline
void AliEmcalCorrectionComponent::AdoptMCParticleContainer ( AliMCParticleContainer cont)
inline

Definition at line 74 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::AdoptParticleContainer ( AliParticleContainer cont)
inline
void AliEmcalCorrectionComponent::AdoptTrackContainer ( AliTrackContainer cont)
inline

Definition at line 73 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::ExecOnce ( )
virtual

Execute once for the first event to initialize the analysis. Similar to ExecOnce() in AliAnalysisTaskEmcal

Reimplemented in AliEmcalCorrectionClusterTrackMatcher, AliEmcalCorrectionClusterHadronicCorrection, and AliEmcalCorrectionCellCombineCollections.

Definition at line 140 of file AliEmcalCorrectionComponent.cxx.

void AliEmcalCorrectionComponent::FillCellQA ( TH1F *  h)
AliVCaloCells* AliEmcalCorrectionComponent::GetCaloCells ( ) const
inline
AliClusterContainer* AliEmcalCorrectionComponent::GetClusterContainer ( Int_t  i = 0) const
inline

Definition at line 78 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionClusterizer::Run().

AliClusterContainer* AliEmcalCorrectionComponent::GetClusterContainer ( const char *  name) const
inline

Definition at line 79 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::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). The position of the track is obtained on the EMCAL surface

Parameters
[in]tTrack to check
[in]vCluster to check
[out]phidiffDistance in \(\phi\) between cluster and track
[out]etadiffDistance in \(\eta\) between cluster and track

Definition at line 176 of file AliEmcalCorrectionComponent.cxx.

Referenced by AliEmcalCorrectionClusterHadronicCorrection::ApplyHadCorrOneTrack(), AliEmcalCorrectionClusterHadronicCorrection::DoMatchedTracksLoop(), AliEmcalCorrectionClusterTrackMatcher::DoMatching(), and AliEmcalCorrectionClusterTrackMatcher::UpdateClusters().

AliMCParticleContainer* AliEmcalCorrectionComponent::GetMCParticleContainer ( Int_t  i = 0) const
inline

Definition at line 80 of file AliEmcalCorrectionComponent.h.

AliMCParticleContainer* AliEmcalCorrectionComponent::GetMCParticleContainer ( const char *  name) const
inline

Definition at line 81 of file AliEmcalCorrectionComponent.h.

TList* AliEmcalCorrectionComponent::GetOutputList ( ) const
inline

Definition at line 87 of file AliEmcalCorrectionComponent.h.

AliParticleContainer* AliEmcalCorrectionComponent::GetParticleContainer ( const char *  name) const
inline

Definition at line 77 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::GetPass ( )

Get pass from filename. Sets pass in fFilepass.

Definition at line 260 of file AliEmcalCorrectionComponent.cxx.

Referenced by Run().

template<typename T >
bool AliEmcalCorrectionComponent::GetProperty ( std::string  propertyName,
T property,
bool  requiredProperty = true,
std::string  correctionName = "" 
)
template<typename T >
bool AliEmcalCorrectionComponent::GetProperty ( std::string  propertyName,
T property,
const YAML::Node &  userConfiguration,
const YAML::Node &  defaultConfiguration,
bool  requiredProperty = true,
std::string  correctionName = "" 
)
static

Retrieve property driver function. It is static so that it can be used by other classes.

General function to get a property from a set of YAML configuration files. It first calls checks the user configuration, and then if the property is not found, it then checks the default configuration. If the property is required but it is not found, a fatal error is thrown.

Parameters
[in]propertyNameName of the property to retrieve
[out]propertyContains the retrieved property
[in]userConfigurationYAML user configuration node
[in]defaultConfigurationYAML default configuration node
[in]requiredPropertyTrue if the property is required
[in]correctionNameName of the correction from where the property should be retrieved
Returns
True if the property was set successfully

Definition at line 210 of file AliEmcalCorrectionComponent.h.

template<typename T >
bool AliEmcalCorrectionComponent::GetPropertyFromNode ( const YAML::Node &  node,
std::string  propertyName,
T property 
)
staticprotected

Utility function to retrieve the property from a already selected YAML node.

Parameters
[in]nodeYAML node from which the property should be retrieved
[in]propertyNameName of the property to retrieve
[out]propertyContains the retrieved property

Definition at line 449 of file AliEmcalCorrectionComponent.h.

Referenced by GetPropertyFromNodes().

template<typename T >
bool AliEmcalCorrectionComponent::GetPropertyFromNodes ( const YAML::Node &  node,
const YAML::Node &  sharedParametersNode,
std::string  propertyName,
T property,
const std::string  correctionName,
const std::string  configurationType,
int  nodesDeep = 0 
)
staticprotected

Actually handles retrieving parameters from YAML nodes.

The retrieval procedure is as follows:

  • Check if the property is defined in the base of the node
  • If the property is found:
    • Check whether it requests a shared parameter
      • If so, attempt to retrieve the property from the shared parameter.
    • If not, attempt to retrieve the parameter from the correction name
    • In either case, through a warning (or fatal if requested) if it is not found
  • If not found, attempt to find a node named by the correction name:
    • If it exists, recurse in this function. It will not go more than two levels deep!
    • If it does not exist, attempt to find a substring name by removing all characters after the first "_"
      • Recurse if found
Parameters
[in]nodeMain YAML node containing the properties
[in]sharedParametersNodeYAML node containing the shared parameters
[in]propertyNameName of the property to retrieve
[out]propertyContains the retrieved property
[in]correctionNameName of the correction from where the property should be retrieved
[in]configurationTypeName of the configuration type. Either "user" or "default"
[in]nodesDeepKeeps track of how many nodes deep we have recursed. Optional parameter that the user does not need to set.
Returns
True if the property was set successfully

Definition at line 279 of file AliEmcalCorrectionComponent.h.

Referenced by GetProperty().

AliTrackContainer* AliEmcalCorrectionComponent::GetTrackContainer ( Int_t  i = 0) const
inline

Definition at line 82 of file AliEmcalCorrectionComponent.h.

AliTrackContainer* AliEmcalCorrectionComponent::GetTrackContainer ( const char *  name) const
inline

Definition at line 83 of file AliEmcalCorrectionComponent.h.

Int_t AliEmcalCorrectionComponent::InitBadChannels ( )
bool AliEmcalCorrectionComponent::IsSharedValue ( std::string &  value)
static

Check if value is a shared parameter, meaning we should look at another node. Also edits the input string to remove "sharedParameters:" if it exists, making it ready for use.

Parameters
[in]valueString containing the string value return by the parameter.
Returns
True if the value is shared.

Definition at line 244 of file AliEmcalCorrectionComponent.cxx.

Referenced by GetPropertyFromNodes().

AliEmcalCorrectionComponent& AliEmcalCorrectionComponent::operator= ( const AliEmcalCorrectionComponent )
private
template<typename T >
std::enable_if<!std::is_arithmetic< T >::value &&!std::is_same< T, std::string >::value &&!std::is_same< T, bool >::value >::type AliEmcalCorrectionComponent::PrintRetrievedPropertyValue ( T property,
std::stringstream &  tempMessage 
)
staticprotected

Handles all other cases where the property cannot be printed.

NOTE: This function retunrs void! See: https://stackoverflow.com/a/29044828

Parameters
[in]propertyProperty to be printed
[in,out]tempMessageStringstream into which the property should be streamed

Definition at line 435 of file AliEmcalCorrectionComponent.h.

Referenced by GetPropertyFromNodes().

template<typename T >
std::enable_if< std::is_arithmetic< T >::value||std::is_same< T, std::string >::value||std::is_same< T, bool >::value >::type AliEmcalCorrectionComponent::PrintRetrievedPropertyValue ( T property,
std::stringstream &  tempMessage 
)
staticprotected

Prints the retrieved property value if the type is easily printable. This function handles arithmetic values, strings, and bools. Further types could be handled by other functions that are selectively enabled by std::enable_if<>.

NOTE: This function retunrs void! See: https://stackoverflow.com/a/29044828

Parameters
[in]propertyProperty to be printed
[in,out]tempMessageStringstream into which the property should be streamed

Definition at line 419 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::RemoveClusterContainer ( Int_t  i = 0)
inline

Definition at line 85 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::RemoveParticleContainer ( Int_t  i = 0)
inline

Definition at line 84 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetCaloCells ( AliVCaloCells *  cells)
inline
void AliEmcalCorrectionComponent::SetCentrality ( Double_t  cent)
inline

Definition at line 104 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetCentralityBin ( Int_t  bin)
inline

Definition at line 103 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetDefaultConfiguration ( YAML::Node &  node)
inline
void AliEmcalCorrectionComponent::SetEMCALGeometry ( AliEMCALGeometry *  geometry)
inline

Definition at line 102 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetInputEvent ( AliVEvent *  event)
inline

Definition at line 92 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetIsESD ( Bool_t  isESD)
inline
void AliEmcalCorrectionComponent::SetMCEvent ( AliMCEvent *  mcevent)
inline

Definition at line 93 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetNcentralityBins ( Int_t  n)
inline

Definition at line 105 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetRecoUtils ( AliEMCALRecoUtils *  ru)
inline

Definition at line 90 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::SetUserConfiguration ( YAML::Node &  node)
inline

Make copy to ensure that the nodes do not point to each other (?)

Definition at line 111 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionTask::InitializeComponents().

void AliEmcalCorrectionComponent::SetUsingInputEvent ( bool  b = true)
inline

If we are using standard input event then the embedded event should not be used! We store whether the embedding event should be used, so we invert the bool here. Then, if it is only set when we see the standard input event, then any single input with the standard input event will be enough to disable the embedded event.

Definition at line 100 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionTask::AddContainersToComponent(), and AliEmcalCorrectionPHOSCorrections::Initialize().

void AliEmcalCorrectionComponent::SetVertex ( Double_t vertex)
inline

Definition at line 106 of file AliEmcalCorrectionComponent.h.

void AliEmcalCorrectionComponent::UpdateCells ( )

Remove bad cells from the cell list Recalibrate energy and time cells

Definition at line 199 of file AliEmcalCorrectionComponent.cxx.

Referenced by AliEmcalCorrectionCellBadChannel::Run(), AliEmcalCorrectionCellTimeCalib::Run(), and AliEmcalCorrectionCellEnergy::Run().

Bool_t AliEmcalCorrectionComponent::UserNotify ( )
virtual

Notifying the user that the input data file has changed and performing steps needed to be done.

Definition at line 163 of file AliEmcalCorrectionComponent.cxx.

Member Data Documentation

Bool_t AliEmcalCorrectionComponent::fCreateHisto
protected

Flag to make some basic histograms.

Definition at line 135 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionClusterHadronicCorrection::ApplyHadCorrAllTracks(), AliEmcalCorrectionClusterHadronicCorrection::ApplyHadCorrOneTrack(), AliEmcalCorrectionClusterHadronicCorrection::DoMatchedTracksLoop(), AliEmcalCorrectionClusterTrackMatcher::DoMatching(), AliEmcalCorrectionCellEnergy::Initialize(), AliEmcalCorrectionCellBadChannel::Initialize(), AliEmcalCorrectionCellTimeCalib::Initialize(), AliEmcalCorrectionClusterExotics::Initialize(), AliEmcalCorrectionClusterNonLinearity::Initialize(), AliEmcalCorrectionClusterHadronicCorrection::Initialize(), AliEmcalCorrectionClusterTrackMatcher::Initialize(), AliEmcalCorrectionCellEnergy::Run(), AliEmcalCorrectionCellTimeCalib::Run(), AliEmcalCorrectionCellBadChannel::Run(), AliEmcalCorrectionClusterExotics::Run(), AliEmcalCorrectionClusterNonLinearity::Run(), AliEmcalCorrectionClusterHadronicCorrection::Run(), AliEmcalCorrectionClusterizer::Run(), AliEmcalCorrectionCellTimeCalib::UserCreateOutputObjects(), AliEmcalCorrectionCellBadChannel::UserCreateOutputObjects(), AliEmcalCorrectionCellEnergy::UserCreateOutputObjects(), AliEmcalCorrectionClusterExotics::UserCreateOutputObjects(), AliEmcalCorrectionClusterNonLinearity::UserCreateOutputObjects(), AliEmcalCorrectionClusterHadronicCorrection::UserCreateOutputObjects(), AliEmcalCorrectionClusterizer::UserCreateOutputObjects(), and AliEmcalCorrectionClusterTrackMatcher::UserCreateOutputObjects().

YAML::Node AliEmcalCorrectionComponent::fDefaultConfiguration
protected

! Default YAML configuration

Definition at line 132 of file AliEmcalCorrectionComponent.h.

Referenced by GetProperty(), and SetDefaultConfiguration().

Bool_t AliEmcalCorrectionComponent::fGetPassFromFileName
protected

Get fFilepass from file name.

Definition at line 138 of file AliEmcalCorrectionComponent.h.

Referenced by Initialize(), and Run().

Bool_t AliEmcalCorrectionComponent::fIsEmbedded
protected
Double_t AliEmcalCorrectionComponent::fMaxBinPt
protected

Max pt in histograms.

Definition at line 147 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionClusterHadronicCorrection::UserCreateOutputObjects().

Double_t AliEmcalCorrectionComponent::fMinBinPt
protected

Min pt in histograms.

Definition at line 146 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionClusterHadronicCorrection::UserCreateOutputObjects().

Int_t AliEmcalCorrectionComponent::fMinMCLabel
protected

Minimum MC label value for the tracks/clusters being considered MC particles.

Definition at line 151 of file AliEmcalCorrectionComponent.h.

Referenced by AliEmcalCorrectionClusterHadronicCorrection::DoMatchedTracksLoop().

Int_t AliEmcalCorrectionComponent::fNbins
protected
YAML::Node AliEmcalCorrectionComponent::fUserConfiguration
protected

! User YAML configuration

Definition at line 131 of file AliEmcalCorrectionComponent.h.

Referenced by GetProperty().

Double_t AliEmcalCorrectionComponent::fVertex[3]
protected

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