AliPhysics  3abf71f (3abf71f)
AliAnalysisTaskEmcalEmbeddingHelper Class Reference

Implementation of task to embed external events. More...

#include <AliAnalysisTaskEmcalEmbeddingHelper.h>

Inheritance diagram for AliAnalysisTaskEmcalEmbeddingHelper:

Public Member Functions

 AliAnalysisTaskEmcalEmbeddingHelper ()
 
 AliAnalysisTaskEmcalEmbeddingHelper (const char *name)
 
virtual ~AliAnalysisTaskEmcalEmbeddingHelper ()
 
AliVEvent * GetExternalEvent () const
 Retrieve the embedded event from the embedding helper. More...
 
Inherited from AliAnalysisTaskSE
void UserExec (Option_t *option)
 
void UserCreateOutputObjects ()
 
void Terminate (Option_t *option)
 
Properties of the embedding helper
bool Initialize (bool removeDummyTask=false)
 
Int_t GetPtHardBin () const
 
Int_t GetNPtHardBins () const
 
TString GetTreeName () const
 
Bool_t GetRandomEventNumberAccess () const
 
Bool_t GetRandomFileAccess () const
 
TString GetFilePattern () const
 
TString GetInputFilename () const
 
Int_t GetStartingFileIndex () const
 
TString GetFileListFilename () const
 
bool GetCreateHistos () const
 
void SetPtHardBin (Int_t n)
 Set the pt hard bin which will be added into the file pattern. Can also be omitted and set directly in the pattern. More...
 
void SetNPtHardBins (Int_t n)
 Set the number of pt hard bins in the production to properly format the histograms. More...
 
void SetESD (const char *treeName="esdTree")
 Set to embed from ESD. More...
 
void SetAOD (const char *treeName="aodTree")
 Set to embed from AOD. More...
 
void SetPrintTimingInfoToLog (bool b)
 Set whether to print and plot execution time of InitTree() More...
 
void SetRandomEventNumberAccess (Bool_t b)
 
void SetRandomFileAccess (Bool_t b)
 Randomly select the first file to embed from the file list. Continues sequentially afterwards. More...
 
void SetFilePattern (const char *pattern)
 Sets the file pattern to select AliEn files. This pattern is used as input to the alien_find command. More...
 
void SetInputFilename (const char *filename)
 
void SetStartingFileIndex (Int_t n)
 Select the file ID to start embedding from. More...
 
void SetFileListFilename (const char *filename)
 Set the path to a file containing the list of files to embed. More...
 
void SetCreateHistos (bool b)
 Create QA histograms. These are necessary for proper scaling, so be careful disabling them! More...
 
void SetConfigurationPath (const char *path)
 Set path to YAML configuration file. More...
 
Internal event selection
bool GetUseInternalEventSelection () const
 Whether internal event selection is enabled. More...
 
void SetUseInternalEventSelection (bool b=true)
 Enable internal event selection. Can also be enabled through the YAML configuration. More...
 
bool EmbeddedEventUsed () const
 
bool GetUseManualInternalEventSelection () const
 Whether to use manual cuts for AliEventCuts. More...
 
void SetUseManualInternalEventCuts (bool b=true)
 
const AliEventCuts * GetInternalEventCuts () const
 Event cuts object for accessing centrality, etc from another task if so inclined. More...
 
AliEventCuts * GetInternalEventCuts ()
 
void SetCentralityRange (double min, double max)
 Set internal event centrality selection. More...
 
Options for the embedded event
UInt_t GetTriggerMask () const
 
bool GetMCRejectOutliers () const
 
Double_t GetPtHardJetPtRejectionFactor () const
 
Double_t GetZVertexCut () const
 
Double_t GetMaxVertexDistance () const
 
void SetTriggerMask (UInt_t triggerMask)
 
void SetMCRejectOutliers (bool reject=true)
 
void SetPtHardJetPtRejectionFactor (double factor)
 
void SetZVertexCut (Double_t zVertex)
 
void SetMaxVertexDistance (Double_t distance)
 
Properties of the embedded event
AliVHeader * GetEventHeader () const
 
AliGenPythiaEventHeader * GetPythiaHeader () const
 
double GetPythiaXSection () const
 
int GetPythiaTrials () const
 
double GetPythiaPtHard () const
 
pT hard bin auto configuration

Setup pt hard bin auto configuration to be used on the LEGO train. See AutoConfigurePtHardBins() and the variable definitions for the purpose of each variable.

bool GetAutoConfigurePtHardBins () const
 
std::string GetAutoConfigureBasePath () const
 
std::string GetAutoConfigureTrainTypePath () const
 
std::string GetAutoConfigureIdentifier () const
 
void SetAutoConfigurePtHardBins (bool configure=true)
 
void SetAutoConfigureBasePath (std::string path)
 
void SetAutoConfigureTrainTypePath (std::string path)
 
void SetAutoConfigureIdentifier (std::string path)
 
To be ignored
AliVEvent * InputEvent () const
 SHOULD NOT BE USED! Use GetExternalEvent()! SHOULD NOT BE USED! Use GetExternalEvent()! Returns the external event by overloading InputEvent() defined in AliAnalysisTaskSE. This is used by AliEmcalCorrectionEventManager, but it should not be used by the user! Instead, use GetExternalEvent(). More...
 

Static Public Member Functions

static const AliAnalysisTaskEmcalEmbeddingHelperGetInstance ()
 

Protected Member Functions

void RetrieveTaskPropertiesFromYAMLConfig ()
 
bool GetFilenames ()
 
void DeterminePythiaXSecFilename ()
 
bool IsRunInRunlist (const std::string &path) const
 
bool InitializeYamlConfig ()
 
bool AutoConfigurePtHardBins ()
 
std::string GenerateUniqueFileListFilename () const
 
std::string RemoveTrailingSlashes (std::string filename) const
 
void DetermineFirstFileToEmbed ()
 
void SetupEmbedding ()
 
Bool_t SetupInputFiles ()
 
std::string ConstructFullPythiaXSecFilename (std::string inputFilename, const std::string &pythiaFilename, bool testIfExists) const
 
Bool_t GetNextEntry ()
 
void SetEmbeddedEventProperties ()
 
void RecordEmbeddedEventProperties ()
 
Bool_t IsEventSelected ()
 
Bool_t CheckIsEmbeddedEventSelected ()
 
Bool_t InitEvent ()
 
void InitTree ()
 
bool PythiaInfoFromCrossSectionFile (std::string filename)
 
bool IsFileAccessible () const
 
void ConnectToAliEn () const
 
void RemoveDummyTask () const
 

Protected Attributes

UInt_t fTriggerMask
 Trigger selection mask. More...
 
bool fMCRejectOutliers
 If true, MC outliers will be rejected. More...
 
Double_t fPtHardJetPtRejectionFactor
 Factor which the pt hard bin is multiplied by to compare against pythia header jets pt. More...
 
Double_t fZVertexCut
 Z vertex cut on embedded event. More...
 
Double_t fMaxVertexDist
 Max distance between Z vertex of internal and embedded event. More...
 
bool fInitializedConfiguration
 Notes if the configuration has been initialized. More...
 
bool fInitializedNewFile
 ! Notes where the entry indices have been initialized for a new tree in the chain More...
 
bool fInitializedEmbedding
 ! Notes where the TChain has been initialized for embedding More...
 
bool fWrappedAroundTree
 ! Notes whether we have wrapped around the tree, which is important if the offset into the tree is non-zero More...
 
TString fTreeName
 Name of the ESD/AOD tree where the events are to be found. More...
 
Int_t fNPtHardBins
 Total number of pt hard bins. More...
 
Int_t fPtHardBin
 ptHard bin for the given pythia production More...
 
Bool_t fRandomEventNumberAccess
 If true, it will start embedding from a random entry in the file rather than from the first. More...
 
Bool_t fRandomFileAccess
 If true, it will start embedding from a random file in the input files list. More...
 
bool fCreateHisto
 If true, create QA histograms. More...
 
PWG::Tools::AliYAMLConfiguration fYAMLConfig
 Hanldes configuration from YAML. More...
 
bool fUseInternalEventSelection
 If true, apply internal event selection though AliEventCuts. More...
 
bool fUseManualInternalEventCuts
 If true, manual event cuts mode will be used for AliEventCuts. More...
 
AliEventCuts fInternalEventCuts
 If enabled, Handles internal event selection. More...
 
bool fEmbeddedEventUsed
 ! If true, the internal event was selected, so the embedded event is used. Defaults to true so other tasks are not disrupted if internal event selection is disabled. More...
 
double fCentMin
 Minimum centrality for internal event selection. More...
 
double fCentMax
 Maximum centrality for internal event selection. More...
 
bool fAutoConfigurePtHardBins
 If true, attempt to auto configure pt hard bins. Only works on the LEGO train. More...
 
std::string fAutoConfigureBasePath
 The base path to the auto configuration (for example, "/alice/cern.ch/user/a/alitrain/") More...
 
std::string fAutoConfigureTrainTypePath
 The path associated with the train type (for example, "PWGJE/Jets_EMC_PbPb/") More...
 
std::string fAutoConfigureIdentifier
 How the auto configuration YAML file should be identified. (for example, "rehlersTrain") More...
 
TString fFilePattern
 File pattern to select AliEn files using alien_find. More...
 
TString fInputFilename
 Filename of input root files. More...
 
TString fFileListFilename
 Name of the file list containing paths to files to embed. More...
 
Int_t fFilenameIndex
 Index of vector containing paths to files to embed. More...
 
std::vector< std::string > fFilenames
 Paths to the files to embed. More...
 
std::string fConfigurationPath
 Path to YAML configuration. More...
 
std::vector< std::string > fEmbeddedRunlist
 Good runlist for files to embed. More...
 
std::string fPythiaXSecFilename
 Name of the pythia x sec filename (either "pyxsec.root" or "pyxsec_hists.root") More...
 
std::vector< std::string > fPythiaCrossSectionFilenames
 Paths to the pythia xsection files. More...
 
TFile * fExternalFile
 ! External file used for embedding More...
 
TChainfChain
 ! External TChain (tree) containing the events available for embedding More...
 
Int_t fCurrentEntry
 ! Current entry in the current tree More...
 
Int_t fLowerEntry
 ! First entry of the current tree to be used for embedding More...
 
Int_t fUpperEntry
 ! Last entry of the current tree to be used for embedding More...
 
Int_t fOffset
 ! Offset from fLowerEntry where the loop over the tree should start More...
 
UInt_t fMaxNumberOfFiles
 ! Max number of files that are in the TChain More...
 
UInt_t fFileNumber
 ! File number corresponding to the current tree More...
 
THistManager fHistManager
 Manages access to all histograms. More...
 
AliEmcalListfOutput
 ! List which owns the output histograms to be saved More...
 
AliVEvent * fExternalEvent
 ! Current external event available for embedding More...
 
AliVHeader * fExternalHeader
 ! Header of the current external event More...
 
AliGenPythiaEventHeader * fPythiaHeader
 ! Pythia header of the current external event More...
 
int fPythiaTrials
 ! Number of pythia trials for the current event (extracted from the pythia header). More...
 
int fPythiaTrialsFromFile
 ! Average number of trials extracted from a xsec file. More...
 
double fPythiaCrossSection
 ! Pythia cross section for the current event (extracted from the pythia header). More...
 
double fPythiaCrossSectionFromFile
 ! Average pythia cross section extracted from a xsec file. More...
 
double fPythiaPtHard
 ! Pt hard of the current event (extracted from the pythia header). More...
 
bool fPrintTimingInfoToLog
 Flag to print time to execute InitTree(), for logging purposes. More...
 
TStopwatch fTimer
 ! Timer for the InitTree() function More...
 

Static Protected Attributes

static AliAnalysisTaskEmcalEmbeddingHelperfgInstance = nullptr
 ! Global instance of this class More...
 

Private Member Functions

 AliAnalysisTaskEmcalEmbeddingHelper (const AliAnalysisTaskEmcalEmbeddingHelper &)
 
AliAnalysisTaskEmcalEmbeddingHelperoperator= (const AliAnalysisTaskEmcalEmbeddingHelper &)
 

Utility functions

void Print (Option_t *opt="") const
 
std::ostream & Print (std::ostream &in) const
 
std::string toString (bool includeFileList=false) const
 
static AliAnalysisTaskEmcalEmbeddingHelperAddTaskEmcalEmbeddingHelper ()
 
static AliAnalysisTaskEmcalEmbeddingHelperConfigureEmcalEmbeddingHelperOnLEGOTrain ()
 
std::ostream & operator<< (std::ostream &in, const AliAnalysisTaskEmcalEmbeddingHelper &myTask)
 

Detailed Description

Implementation of task to embed external events.

This class derives from AliAnalysisTaskSE and allows the user to open an external ESD or AOD file, providing access to the events.

The capabilities of the task are as follows:

  • Open an ESD/AOD file according to certain customizable options, such as production tag, pt hard bin, run number, file pattern, etc.
  • It selects an event according to customizable criteria, such as vertex, centrality, high pt track, pt hard bin, etc.
  • Load the event in memory: this is the "external" event, as opposed to the "internal" event provided by the analysis manager
  • Provide a public method GetExternalEvent() that allows to retrieve a pointer to the external event.

Note that only one instance of this class is allowed in each train (singleton class).

For the user, most of these details are handled by AliEmcalContainer derived tasks. To access the embedded input objects, the user simply needs to set AliEmcalContainer::SetIsEmbedding(Bool_t). This design ensures that usage is nearly seamless. For instance, it will "just work" in an analysis task, and it very nearly "just works" in the (new) EMCal correction framework (it only requires one small change in the normal correction procedure beyond noting that the input objects are embedded).

For further information on usage (including with the EMCal corrections), see the EMCal Embedding Documentation.

Author
Salvatore Aiola salva.nosp@m.tore.nosp@m..aiol.nosp@m.a@ce.nosp@m.rn.ch, Yale University
Raymond Ehlers raymo.nosp@m.nd.e.nosp@m.hlers.nosp@m.@cer.nosp@m.n.ch, Yale University
Date
Apr 28, 2016

Definition at line 70 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Constructor & Destructor Documentation

AliAnalysisTaskEmcalEmbeddingHelper::AliAnalysisTaskEmcalEmbeddingHelper ( )

Default constructor. Needed by ROOT I/O

Definition at line 113 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by AddTaskEmcalEmbeddingHelper().

AliAnalysisTaskEmcalEmbeddingHelper::AliAnalysisTaskEmcalEmbeddingHelper ( const char *  name)

Standard constructor. Should be used by the user.

Parameters
[in]nameName of the task

Definition at line 183 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

AliAnalysisTaskEmcalEmbeddingHelper::~AliAnalysisTaskEmcalEmbeddingHelper ( )
virtual

Destructor

Deletes the singleton instance and ensures that any open file is closed.

Definition at line 257 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

AliAnalysisTaskEmcalEmbeddingHelper::AliAnalysisTaskEmcalEmbeddingHelper ( const AliAnalysisTaskEmcalEmbeddingHelper )
private

Member Function Documentation

AliAnalysisTaskEmcalEmbeddingHelper * AliAnalysisTaskEmcalEmbeddingHelper::AddTaskEmcalEmbeddingHelper ( )
static

Add task function. This contains the normal AddTask functionality, except in compiled code, making errors easier to spot than in CINT. The AddTask macro still exists for use on the LEGO train, but simply wraps this function.

Returns
An properly instance of AliAnalysisTaskEmcalEmbeddingHelper, added to the current analysis manager.

Definition at line 1685 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by SetAutoConfigureIdentifier().

bool AliAnalysisTaskEmcalEmbeddingHelper::AutoConfigurePtHardBins ( )
protected

Handle auto-configuration of pt hard bins on LEGO trains. It gets the train number from the LEGO train environment, thereby assigning a pt hard bin to a particular train. This assignment is written out to a YAML file so all of the trains can determine which pt hard bins are available. The YAML file that is written contains a map of ptHardBin to train number.

Note that when the number of pt hard bins is exhausted and all trains are assigned, the file is removed.

Relevant directory information for an example train:

  • PWD=/home/alitrain/train-workdir/PWGJE/Jets_EMC_PbPb/2558_20170930-2042/config
  • Grid workdir relative to user $HOME: _________ /alice/cern.ch/user/a/alitrain/PWGJE/Jets_EMC_PbPb/2558_20170930-2042
  • Grid output directory relative to workdir: ___ $1/PWGJE/Jets_EMC_PbPb/2558_20170930-2042
Returns
true if the pt hard bin was successfully extracted.

Definition at line 641 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetFilenames(), and InputEvent().

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::CheckIsEmbeddedEventSelected ( )
protected

Performs the embedded event selection on the current external event.

Returns
kTRUE if the event successfully passes all criteria.

Definition at line 964 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), and IsEventSelected().

AliAnalysisTaskEmcalEmbeddingHelper * AliAnalysisTaskEmcalEmbeddingHelper::ConfigureEmcalEmbeddingHelperOnLEGOTrain ( )
static

Retrieve an existing embedding helper to perform further configuration. This should ONLY be used on the LEGO train.

To achieve this, a dummy task is created when the configure task is called because AliAnalysisTaskCfg requires that all wagons add a task. Then, when Initialize(true) is called on the embedding helper task, the dummy task is removed. This is a hack, but is required to work around constraints in AliAnalysisTaskCfg.

Returns
An existing (usually unconfigured) EMCal Embedding Helper.

Definition at line 1736 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by SetAutoConfigureIdentifier().

void AliAnalysisTaskEmcalEmbeddingHelper::ConnectToAliEn ( ) const
protected
std::string AliAnalysisTaskEmcalEmbeddingHelper::ConstructFullPythiaXSecFilename ( std::string  externalEventFilename,
const std::string &  pythiaFilename,
bool  testIfExists 
) const
protected

Check if the file pythia base filename can be found in the folder or archive corresponding where the external event input file is found.

Parameters
externalEventFilenamePath to external event input file.
pythiaFilenameName of the pythia cross section file to try.
testIfExistsIf true, will check if the filename that it has determined actually exists.
Returns
True if the file was found

Definition at line 1330 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by DeterminePythiaXSecFilename(), InputEvent(), and SetupInputFiles().

void AliAnalysisTaskEmcalEmbeddingHelper::DetermineFirstFileToEmbed ( )
protected

Determine the first file to embed and store the index. The index will either be random or the first file in the list, depending on the task configuration.

Definition at line 779 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), and SetupInputFiles().

void AliAnalysisTaskEmcalEmbeddingHelper::DeterminePythiaXSecFilename ( )
protected

Determine the Pythia cross section filename by checking for the existance of files with various possible filenames. Note that it uses the first input filename as a proxy for all other input files following the same pattern.

Definition at line 548 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetFilenames(), and InputEvent().

bool AliAnalysisTaskEmcalEmbeddingHelper::EmbeddedEventUsed ( ) const
inline

If true, it indicates that the embedded event was used by the embedding helper and that it is available for use. If false, this internal event should be ignored.

This value can return false if internal event selection is enabled and the internal event was rejected.

Returns
true if the embedded event was actually embedded and should be used.

Definition at line 171 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

std::string AliAnalysisTaskEmcalEmbeddingHelper::GenerateUniqueFileListFilename ( ) const
protected

Simple helper function to generate a unique file list filename. This filename will be used to store the filelist locally. It will be of the form fFileListFilename + ".UUID.txt". If fFileListFilename is empty, then the beginning of the filename will be "fileList".

Returns
std::string containing the rest of the file to be appended to fFileListFilename

Definition at line 745 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetFilenames(), and InputEvent().

std::string AliAnalysisTaskEmcalEmbeddingHelper::GetAutoConfigureBasePath ( ) const
inline

Definition at line 221 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

std::string AliAnalysisTaskEmcalEmbeddingHelper::GetAutoConfigureIdentifier ( ) const
inline

Definition at line 223 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

bool AliAnalysisTaskEmcalEmbeddingHelper::GetAutoConfigurePtHardBins ( ) const
inline

Definition at line 220 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

std::string AliAnalysisTaskEmcalEmbeddingHelper::GetAutoConfigureTrainTypePath ( ) const
inline

Definition at line 222 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

bool AliAnalysisTaskEmcalEmbeddingHelper::GetCreateHistos ( ) const
inline

Definition at line 117 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

AliVHeader* AliAnalysisTaskEmcalEmbeddingHelper::GetEventHeader ( ) const
inline

Definition at line 208 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

AliVEvent* AliAnalysisTaskEmcalEmbeddingHelper::GetExternalEvent ( ) const
inline

Retrieve the embedded event from the embedding helper.

Returns
The embedded event

Definition at line 92 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by AliEmcalCorrectionCellCombineCollections::CreateCombinedCells(), AliEmcalContainerUtils::GetEvent(), and InputEvent().

TString AliAnalysisTaskEmcalEmbeddingHelper::GetFileListFilename ( ) const
inline

Definition at line 116 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

bool AliAnalysisTaskEmcalEmbeddingHelper::GetFilenames ( )
protected

Get the names of the files to embed and determine which file to start from. The filenames will be used to initialize a TChain. Filenames can either be specified in a local file with one filename per line or found on AliEn by specifying any pattern that would work in alien_find.

Notes on this function:

  • In the case that the passed files contain ".zip", the root file name will be appended. Be certain to set the proper file type (AOD or ESD)!
  • In the case of AliEn, the result will be copied into a local file.
  • The file to start from can be randomized if requested.

The file pattern can be specified by a number of different options:

  • The simplest is pass a fully formed path to a file either locally or on AliEn.
  • You could specify a pT hard bin, which will be added into the passed file pattern. For example, "/period/runNumber/%d/aod_archive.root", where the d will the be the pT hard bin.
  • You could specify a pT hard bin and anchor run, which will both be added into the passed file pattern. "/period/%d/%d/aod_archive.root", where the first d will the be the anchor run number, and the second d will be the pT hard bin.

NOTE: The file pattern only makes sense in terms of AliEn. Passing a local pattern will not work! NOTE: Exercise care if you set both the file pattern and the filename! Doing so will probably cause your file to be overwritten!

Definition at line 388 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by Initialize(), and InputEvent().

TString AliAnalysisTaskEmcalEmbeddingHelper::GetFilePattern ( ) const
inline

Definition at line 113 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

TString AliAnalysisTaskEmcalEmbeddingHelper::GetInputFilename ( ) const
inline

Definition at line 114 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

const AliEventCuts* AliAnalysisTaskEmcalEmbeddingHelper::GetInternalEventCuts ( ) const
inline

Event cuts object for accessing centrality, etc from another task if so inclined.

Definition at line 179 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

AliEventCuts * AliAnalysisTaskEmcalEmbeddingHelper::GetInternalEventCuts ( )

Event cuts object for configuring for setting manual cuts To access this object, manual event cuts must be enabled!

Definition at line 1674 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Double_t AliAnalysisTaskEmcalEmbeddingHelper::GetMaxVertexDistance ( ) const
inline

Definition at line 195 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

bool AliAnalysisTaskEmcalEmbeddingHelper::GetMCRejectOutliers ( ) const
inline

Definition at line 192 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::GetNextEntry ( )
protected

Get the next event (entry) in the TChain to make it available for embedding. The event will be selected according to the conditions determined in IsEventSelected(). If needed it calls InitTree() to setup the next tree within the TChain. In the case of running of out files to embed, an error is thrown and embedding begins again from the start of the file list.

Returns
kTRUE if successful

Definition at line 811 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), and UserExec().

Int_t AliAnalysisTaskEmcalEmbeddingHelper::GetNPtHardBins ( ) const
inline
Int_t AliAnalysisTaskEmcalEmbeddingHelper::GetPtHardBin ( ) const
inline
Double_t AliAnalysisTaskEmcalEmbeddingHelper::GetPtHardJetPtRejectionFactor ( ) const
inline

Definition at line 193 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

AliGenPythiaEventHeader* AliAnalysisTaskEmcalEmbeddingHelper::GetPythiaHeader ( ) const
inline

Definition at line 209 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

double AliAnalysisTaskEmcalEmbeddingHelper::GetPythiaPtHard ( ) const
inline
int AliAnalysisTaskEmcalEmbeddingHelper::GetPythiaTrials ( ) const
inline
double AliAnalysisTaskEmcalEmbeddingHelper::GetPythiaXSection ( ) const
inline
Bool_t AliAnalysisTaskEmcalEmbeddingHelper::GetRandomEventNumberAccess ( ) const
inline

Definition at line 111 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::GetRandomFileAccess ( ) const
inline

Definition at line 112 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Int_t AliAnalysisTaskEmcalEmbeddingHelper::GetStartingFileIndex ( ) const
inline

Definition at line 115 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

TString AliAnalysisTaskEmcalEmbeddingHelper::GetTreeName ( ) const
inline

Definition at line 110 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

UInt_t AliAnalysisTaskEmcalEmbeddingHelper::GetTriggerMask ( ) const
inline

Definition at line 191 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

bool AliAnalysisTaskEmcalEmbeddingHelper::GetUseInternalEventSelection ( ) const
inline

Whether internal event selection is enabled.

Definition at line 159 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by SetConfigurationPath().

bool AliAnalysisTaskEmcalEmbeddingHelper::GetUseManualInternalEventSelection ( ) const
inline

Whether to use manual cuts for AliEventCuts.

Definition at line 173 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Double_t AliAnalysisTaskEmcalEmbeddingHelper::GetZVertexCut ( ) const
inline

Definition at line 194 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::InitEvent ( )
protected

Initialize the external event by creating an event and then reading the event info from the TChain.

Returns
kTRUE if successful

Definition at line 1076 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), and SetupInputFiles().

bool AliAnalysisTaskEmcalEmbeddingHelper::Initialize ( bool  removeDummyTask = false)

Initialize the Embedding Helper task. Must be called setting configuration for the task, either during the run macro or wagon configuration. Once called, most of the configuration is locked in, so be certain to change any configuration options before calling it.

Parameters
[in]removeDummyTaskIf true, the dummy task created with the configure wagon is removed.

Definition at line 267 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetExternalEvent().

bool AliAnalysisTaskEmcalEmbeddingHelper::InitializeYamlConfig ( )
protected

Initialize the YAML configuration with a potentially specified YAML configuration file.

Returns
true if no yaml file or it exists and was successfully accessed.

Definition at line 608 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by Initialize(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::InitTree ( )
protected

Initializes a new TTree within the TChain by determining the limits of the current TTree within the TChain. By carefully keeping track of the first and lest entry of the current tree in the opened file, we allow a random entry point into the event in the tree without jumping between files, which would not perform well on the grid.

This function sets up a random entry point into the file if requested.

Sets fInitializedNewFile to kTRUE when the new entries in the tree have been initialized.

Definition at line 1418 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetNextEntry(), InputEvent(), and UserExec().

AliVEvent* AliAnalysisTaskEmcalEmbeddingHelper::InputEvent ( ) const
inline

SHOULD NOT BE USED! Use GetExternalEvent()! SHOULD NOT BE USED! Use GetExternalEvent()! Returns the external event by overloading InputEvent() defined in AliAnalysisTaskSE. This is used by AliEmcalCorrectionEventManager, but it should not be used by the user! Instead, use GetExternalEvent().

Note that it cannot be protected, because we need to call it externally.

Returns
The external event

Definition at line 277 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::IsEventSelected ( )
protected

Handles (ie wraps) event selection and proper event counting.

Returns
kTRUE if the event successfully passes all criteria.

Definition at line 945 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetNextEntry(), and InputEvent().

bool AliAnalysisTaskEmcalEmbeddingHelper::IsFileAccessible ( ) const
protected
bool AliAnalysisTaskEmcalEmbeddingHelper::IsRunInRunlist ( const std::string &  path) const
protected

Check if a given filename is from a run in the good embedded runlist. If no runlist was defined, it will always return true.

Parameters
pathpath of a single filename
Returns
true if the path contains a run in the good embedded runlist.

Definition at line 589 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetFilenames(), and InputEvent().

AliAnalysisTaskEmcalEmbeddingHelper& AliAnalysisTaskEmcalEmbeddingHelper::operator= ( const AliAnalysisTaskEmcalEmbeddingHelper )
private
void AliAnalysisTaskEmcalEmbeddingHelper::Print ( Option_t opt = "") const

Print basic embedding helper information using the string representation provided by AliAnalysisTaskEmcalEmbeddingHelper::toString()

Parameters
optIf "FILELIST" is passed, then the list of files to embed is also printed

Definition at line 1851 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by operator<<(), and SetAutoConfigureIdentifier().

std::ostream & AliAnalysisTaskEmcalEmbeddingHelper::Print ( std::ostream &  in) const

Print embedding helper information on an output stream using the string representation provided by AliAnalysisTaskEmcalEmbeddingHelper::toString(). Used by operator<<

Parameters
inoutput stream stream
Returns
reference to the output stream

Definition at line 1826 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

bool AliAnalysisTaskEmcalEmbeddingHelper::PythiaInfoFromCrossSectionFile ( std::string  pythiaFileName)
protected

Extract pythia information from a cross section file. Modified from AliAnalysisTaskEmcal::PythiaInfoFromFile().

Parameters
pythiaFileNamePath to the pythia cross section file.
Returns
True if the information has been successfully extracted.

Definition at line 1507 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InitTree(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::RecordEmbeddedEventProperties ( )
protected

Record event properties

Definition at line 932 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetNextEntry(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::RemoveDummyTask ( ) const
protected

Remove the dummy task which had to be added by ConfigureEmcalEmbeddingHelperOnLEGOTrain() from the Analysis Mangaer. This is the same function as in AliEmcalCorrectionTask.

Definition at line 1647 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by Initialize(), and InputEvent().

std::string AliAnalysisTaskEmcalEmbeddingHelper::RemoveTrailingSlashes ( std::string  filename) const
protected

Remove slashes at the end of strings. See: https://stackoverflow.com/a/14878124

Parameters
[in]filenameString containing a filename with some number of extra trailing slashes.
Returns
string without trailing slahes.

Definition at line 766 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by AutoConfigurePtHardBins(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::RetrieveTaskPropertiesFromYAMLConfig ( )
protected

Retrieve embedding helper properties from a YAML configuration file.

Unlike the yaml configuration used in the correction task, there is no "default" yaml configuration file - nothing is required to exist in the yaml file

Definition at line 301 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by Initialize(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::SetAOD ( const char *  treeName = "aodTree")
inline

Set to embed from AOD.

Definition at line 127 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetAutoConfigureBasePath ( std::string  path)
inline

Definition at line 226 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetAutoConfigureIdentifier ( std::string  path)
inline

Definition at line 228 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetAutoConfigurePtHardBins ( bool  configure = true)
inline

Definition at line 225 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetAutoConfigureTrainTypePath ( std::string  path)
inline

Definition at line 227 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetCentralityRange ( double  min,
double  max 
)
inline

Set internal event centrality selection.

Definition at line 184 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetConfigurationPath ( const char *  path)
inline

Set path to YAML configuration file.

Definition at line 151 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetCreateHistos ( bool  b)
inline

Create QA histograms. These are necessary for proper scaling, so be careful disabling them!

Definition at line 149 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetEmbeddedEventProperties ( )
protected

Set some properties of the event that are not immediately available from the external event to make them available to user tasks.

Definition at line 893 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by GetNextEntry(), and InputEvent().

void AliAnalysisTaskEmcalEmbeddingHelper::SetESD ( const char *  treeName = "esdTree")
inline

Set to embed from ESD.

Definition at line 125 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetFileListFilename ( const char *  filename)
inline

Set the path to a file containing the list of files to embed.

Definition at line 147 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetFilePattern ( const char *  pattern)
inline

Sets the file pattern to select AliEn files. This pattern is used as input to the alien_find command.

Definition at line 138 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetInputFilename ( const char *  filename)
inline

Sets the input filename used to select and open files. Note that this is just the filename, not the path! This filename is also used as input to the alien_find command.

Definition at line 143 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetMaxVertexDistance ( Double_t  distance)
inline

Definition at line 201 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetMCRejectOutliers ( bool  reject = true)
inline

Definition at line 198 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetNPtHardBins ( Int_t  n)
inline

Set the number of pt hard bins in the production to properly format the histograms.

Definition at line 123 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetPrintTimingInfoToLog ( bool  b)
inline

Set whether to print and plot execution time of InitTree()

Definition at line 129 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetPtHardBin ( Int_t  n)
inline

Set the pt hard bin which will be added into the file pattern. Can also be omitted and set directly in the pattern.

Definition at line 121 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetPtHardJetPtRejectionFactor ( double  factor)
inline

Definition at line 199 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetRandomEventNumberAccess ( Bool_t  b)
inline

Enable to begin embedding at a random entry in each embedded file. Will then loop around in order so that all entries are made available.

Definition at line 134 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetRandomFileAccess ( Bool_t  b)
inline

Randomly select the first file to embed from the file list. Continues sequentially afterwards.

Definition at line 136 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetStartingFileIndex ( Int_t  n)
inline

Select the file ID to start embedding from.

Definition at line 145 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetTriggerMask ( UInt_t  triggerMask)
inline

Definition at line 197 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetupEmbedding ( )
protected

Setup embedding by retrieving the file list and then setting up the TChain based on that file list.

Sets fInitializedEmbedding to kTRUE when the initialization is completed.

Definition at line 1390 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), UserCreateOutputObjects(), and UserExec().

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::SetupInputFiles ( )
protected

Use the input files to setup the TChain. This involves accessing the files on AliEn and ensuring that each file actually exists. If the TChain is successfully set up, then embedding is ready to proceed.

Returns
kTRUE if successful in setting up the TChain.

Definition at line 1252 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by InputEvent(), and SetupEmbedding().

void AliAnalysisTaskEmcalEmbeddingHelper::SetUseInternalEventSelection ( bool  b = true)
inline

Enable internal event selection. Can also be enabled through the YAML configuration.

Definition at line 161 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetUseManualInternalEventCuts ( bool  b = true)
inline

Enable manual internal event cuts. Can also be enabled through the YAML configuration. Must be configured through the retrieving the AliEventCuts object and configuring the cuts. It is not included via YAML because it is rather difficult to fully map, especially for an infrequently used mode.

Definition at line 177 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::SetZVertexCut ( Double_t  zVertex)
inline

Definition at line 200 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

void AliAnalysisTaskEmcalEmbeddingHelper::Terminate ( Option_t option)

This function is called once at the end of the analysis.

Definition at line 1639 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

std::string AliAnalysisTaskEmcalEmbeddingHelper::toString ( bool  includeFileList = false) const

Prints information about the embedding helper.

Returns
std::string containing information about the task.

Definition at line 1771 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by Print(), and SetAutoConfigureIdentifier().

void AliAnalysisTaskEmcalEmbeddingHelper::UserCreateOutputObjects ( )

Performing run-independent initialization to setup embedding.

If the setup is not successful here, it will be repeated in UserExec().

Definition at line 1103 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

void AliAnalysisTaskEmcalEmbeddingHelper::UserExec ( Option_t option)

Run the main analysis code here. If for some reason the embedding was not successfully set up in UserCreateOutputObjects(), it is set up against before continuing. It also ensures that the current tree is available before attempting to get the next entry.

Definition at line 1576 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  in,
const AliAnalysisTaskEmcalEmbeddingHelper myTask 
)
friend

Implementation of the output stream operator for AliAnalysisTaskEmcalEmbeddingHelper. Printing basic embedding helper information provided by function toString()

Parameters
inoutput stream
myTaskTask which will be printed
Returns
Reference to the output stream

Definition at line 1839 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.

Referenced by SetAutoConfigureIdentifier().

Member Data Documentation

std::string AliAnalysisTaskEmcalEmbeddingHelper::fAutoConfigureBasePath
protected

The base path to the auto configuration (for example, "/alice/cern.ch/user/a/alitrain/")

Definition at line 334 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by AutoConfigurePtHardBins(), GetAutoConfigureBasePath(), RetrieveTaskPropertiesFromYAMLConfig(), and SetAutoConfigureBasePath().

std::string AliAnalysisTaskEmcalEmbeddingHelper::fAutoConfigureIdentifier
protected

How the auto configuration YAML file should be identified. (for example, "rehlersTrain")

Definition at line 336 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by AutoConfigurePtHardBins(), GetAutoConfigureIdentifier(), RetrieveTaskPropertiesFromYAMLConfig(), and SetAutoConfigureIdentifier().

bool AliAnalysisTaskEmcalEmbeddingHelper::fAutoConfigurePtHardBins
protected

If true, attempt to auto configure pt hard bins. Only works on the LEGO train.

Definition at line 333 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetAutoConfigurePtHardBins(), GetFilenames(), RetrieveTaskPropertiesFromYAMLConfig(), and SetAutoConfigurePtHardBins().

std::string AliAnalysisTaskEmcalEmbeddingHelper::fAutoConfigureTrainTypePath
protected

The path associated with the train type (for example, "PWGJE/Jets_EMC_PbPb/")

Definition at line 335 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by AutoConfigurePtHardBins(), GetAutoConfigureTrainTypePath(), RetrieveTaskPropertiesFromYAMLConfig(), and SetAutoConfigureTrainTypePath().

double AliAnalysisTaskEmcalEmbeddingHelper::fCentMax
protected

Maximum centrality for internal event selection.

Definition at line 331 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by RetrieveTaskPropertiesFromYAMLConfig(), SetCentralityRange(), toString(), and UserExec().

double AliAnalysisTaskEmcalEmbeddingHelper::fCentMin
protected

Minimum centrality for internal event selection.

Definition at line 330 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by RetrieveTaskPropertiesFromYAMLConfig(), SetCentralityRange(), toString(), and UserExec().

TChain* AliAnalysisTaskEmcalEmbeddingHelper::fChain
protected

! External TChain (tree) containing the events available for embedding

Definition at line 348 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), InitEvent(), InitTree(), and SetupInputFiles().

std::string AliAnalysisTaskEmcalEmbeddingHelper::fConfigurationPath
protected

Path to YAML configuration.

Definition at line 343 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by InitializeYamlConfig(), SetConfigurationPath(), and toString().

Int_t AliAnalysisTaskEmcalEmbeddingHelper::fCurrentEntry
protected

! Current entry in the current tree

Definition at line 349 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

bool AliAnalysisTaskEmcalEmbeddingHelper::fEmbeddedEventUsed
protected

! If true, the internal event was selected, so the embedded event is used. Defaults to true so other tasks are not disrupted if internal event selection is disabled.

Definition at line 329 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by EmbeddedEventUsed(), and UserExec().

std::vector<std::string> AliAnalysisTaskEmcalEmbeddingHelper::fEmbeddedRunlist
protected

Good runlist for files to embed.

Definition at line 344 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by IsRunInRunlist(), and RetrieveTaskPropertiesFromYAMLConfig().

AliVEvent* AliAnalysisTaskEmcalEmbeddingHelper::fExternalEvent
protected
TFile* AliAnalysisTaskEmcalEmbeddingHelper::fExternalFile
protected

! External file used for embedding

Definition at line 347 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by ~AliAnalysisTaskEmcalEmbeddingHelper().

AliVHeader* AliAnalysisTaskEmcalEmbeddingHelper::fExternalHeader
protected

! Header of the current external event

Definition at line 358 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetEventHeader(), and SetEmbeddedEventProperties().

TString AliAnalysisTaskEmcalEmbeddingHelper::fFileListFilename
protected

Name of the file list containing paths to files to embed.

Definition at line 340 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GenerateUniqueFileListFilename(), GetFileListFilename(), GetFilenames(), RetrieveTaskPropertiesFromYAMLConfig(), SetFileListFilename(), and toString().

Int_t AliAnalysisTaskEmcalEmbeddingHelper::fFilenameIndex
protected
std::vector<std::string> AliAnalysisTaskEmcalEmbeddingHelper::fFilenames
protected
UInt_t AliAnalysisTaskEmcalEmbeddingHelper::fFileNumber
protected

! File number corresponding to the current tree

Definition at line 354 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

TString AliAnalysisTaskEmcalEmbeddingHelper::fFilePattern
protected

File pattern to select AliEn files using alien_find.

Definition at line 338 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetFilenames(), GetFilePattern(), RetrieveTaskPropertiesFromYAMLConfig(), SetFilePattern(), and toString().

AliAnalysisTaskEmcalEmbeddingHelper * AliAnalysisTaskEmcalEmbeddingHelper::fgInstance = nullptr
staticprotected
THistManager AliAnalysisTaskEmcalEmbeddingHelper::fHistManager
protected
bool AliAnalysisTaskEmcalEmbeddingHelper::fInitializedConfiguration
protected

Notes if the configuration has been initialized.

Definition at line 313 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by Initialize(), and SetupEmbedding().

bool AliAnalysisTaskEmcalEmbeddingHelper::fInitializedEmbedding
protected

! Notes where the TChain has been initialized for embedding

Definition at line 315 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by SetupEmbedding(), and UserExec().

bool AliAnalysisTaskEmcalEmbeddingHelper::fInitializedNewFile
protected

! Notes where the entry indices have been initialized for a new tree in the chain

Definition at line 314 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by InitTree(), and UserExec().

TString AliAnalysisTaskEmcalEmbeddingHelper::fInputFilename
protected
AliEventCuts AliAnalysisTaskEmcalEmbeddingHelper::fInternalEventCuts
protected

If enabled, Handles internal event selection.

Definition at line 328 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetInternalEventCuts(), UserCreateOutputObjects(), and UserExec().

Int_t AliAnalysisTaskEmcalEmbeddingHelper::fLowerEntry
protected

! First entry of the current tree to be used for embedding

Definition at line 350 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

UInt_t AliAnalysisTaskEmcalEmbeddingHelper::fMaxNumberOfFiles
protected

! Max number of files that are in the TChain

Definition at line 353 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), InitTree(), SetupInputFiles(), and UserCreateOutputObjects().

Double_t AliAnalysisTaskEmcalEmbeddingHelper::fMaxVertexDist
protected

Max distance between Z vertex of internal and embedded event.

Definition at line 311 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by CheckIsEmbeddedEventSelected(), GetMaxVertexDistance(), RetrieveTaskPropertiesFromYAMLConfig(), SetMaxVertexDistance(), and toString().

bool AliAnalysisTaskEmcalEmbeddingHelper::fMCRejectOutliers
protected
Int_t AliAnalysisTaskEmcalEmbeddingHelper::fNPtHardBins
protected
Int_t AliAnalysisTaskEmcalEmbeddingHelper::fOffset
protected

! Offset from fLowerEntry where the loop over the tree should start

Definition at line 352 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

AliEmcalList* AliAnalysisTaskEmcalEmbeddingHelper::fOutput
protected

! List which owns the output histograms to be saved

Definition at line 356 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by UserCreateOutputObjects(), and UserExec().

bool AliAnalysisTaskEmcalEmbeddingHelper::fPrintTimingInfoToLog
protected

Flag to print time to execute InitTree(), for logging purposes.

Definition at line 367 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by InitTree(), RetrieveTaskPropertiesFromYAMLConfig(), SetPrintTimingInfoToLog(), toString(), and UserCreateOutputObjects().

Int_t AliAnalysisTaskEmcalEmbeddingHelper::fPtHardBin
protected
Double_t AliAnalysisTaskEmcalEmbeddingHelper::fPtHardJetPtRejectionFactor
protected

Factor which the pt hard bin is multiplied by to compare against pythia header jets pt.

Definition at line 309 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by CheckIsEmbeddedEventSelected(), GetPtHardJetPtRejectionFactor(), RetrieveTaskPropertiesFromYAMLConfig(), SetPtHardJetPtRejectionFactor(), and toString().

double AliAnalysisTaskEmcalEmbeddingHelper::fPythiaCrossSection
protected

! Pythia cross section for the current event (extracted from the pythia header).

Definition at line 363 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetPythiaXSection(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().

std::vector<std::string> AliAnalysisTaskEmcalEmbeddingHelper::fPythiaCrossSectionFilenames
protected

Paths to the pythia xsection files.

Definition at line 346 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by InitTree(), RetrieveTaskPropertiesFromYAMLConfig(), and SetupInputFiles().

double AliAnalysisTaskEmcalEmbeddingHelper::fPythiaCrossSectionFromFile
protected

! Average pythia cross section extracted from a xsec file.

Definition at line 364 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by PythiaInfoFromCrossSectionFile(), and SetEmbeddedEventProperties().

AliGenPythiaEventHeader* AliAnalysisTaskEmcalEmbeddingHelper::fPythiaHeader
protected

! Pythia header of the current external event

Definition at line 359 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by CheckIsEmbeddedEventSelected(), GetPythiaHeader(), and SetEmbeddedEventProperties().

double AliAnalysisTaskEmcalEmbeddingHelper::fPythiaPtHard
protected

! Pt hard of the current event (extracted from the pythia header).

Definition at line 365 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by CheckIsEmbeddedEventSelected(), GetPythiaPtHard(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().

int AliAnalysisTaskEmcalEmbeddingHelper::fPythiaTrials
protected

! Number of pythia trials for the current event (extracted from the pythia header).

Definition at line 361 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetPythiaTrials(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().

int AliAnalysisTaskEmcalEmbeddingHelper::fPythiaTrialsFromFile
protected

! Average number of trials extracted from a xsec file.

Definition at line 362 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by PythiaInfoFromCrossSectionFile(), and SetEmbeddedEventProperties().

std::string AliAnalysisTaskEmcalEmbeddingHelper::fPythiaXSecFilename
protected

Name of the pythia x sec filename (either "pyxsec.root" or "pyxsec_hists.root")

Definition at line 345 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by DeterminePythiaXSecFilename(), SetupInputFiles(), and toString().

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::fRandomEventNumberAccess
protected

If true, it will start embedding from a random entry in the file rather than from the first.

Definition at line 321 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetRandomEventNumberAccess(), InitTree(), RetrieveTaskPropertiesFromYAMLConfig(), SetRandomEventNumberAccess(), SetupEmbedding(), and toString().

Bool_t AliAnalysisTaskEmcalEmbeddingHelper::fRandomFileAccess
protected

If true, it will start embedding from a random file in the input files list.

Definition at line 322 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by DetermineFirstFileToEmbed(), GetRandomFileAccess(), RetrieveTaskPropertiesFromYAMLConfig(), SetRandomFileAccess(), and toString().

TStopwatch AliAnalysisTaskEmcalEmbeddingHelper::fTimer
protected

! Timer for the InitTree() function

Definition at line 368 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by InitTree(), and UserCreateOutputObjects().

TString AliAnalysisTaskEmcalEmbeddingHelper::fTreeName
protected

Name of the ESD/AOD tree where the events are to be found.

Definition at line 318 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetFilenames(), GetTreeName(), InitEvent(), RetrieveTaskPropertiesFromYAMLConfig(), SetAOD(), SetESD(), SetupInputFiles(), and toString().

UInt_t AliAnalysisTaskEmcalEmbeddingHelper::fTriggerMask
protected
Int_t AliAnalysisTaskEmcalEmbeddingHelper::fUpperEntry
protected

! Last entry of the current tree to be used for embedding

Definition at line 351 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

bool AliAnalysisTaskEmcalEmbeddingHelper::fUseInternalEventSelection
protected
bool AliAnalysisTaskEmcalEmbeddingHelper::fUseManualInternalEventCuts
protected
bool AliAnalysisTaskEmcalEmbeddingHelper::fWrappedAroundTree
protected

! Notes whether we have wrapped around the tree, which is important if the offset into the tree is non-zero

Definition at line 316 of file AliAnalysisTaskEmcalEmbeddingHelper.h.

Referenced by GetNextEntry(), and InitTree().

PWG::Tools::AliYAMLConfiguration AliAnalysisTaskEmcalEmbeddingHelper::fYAMLConfig
protected
Double_t AliAnalysisTaskEmcalEmbeddingHelper::fZVertexCut
protected

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