![]() |
AliPhysics
45476af (45476af)
|
Implementation of task to embed external events. More...
#include <AliAnalysisTaskEmcalEmbeddingHelper.h>
Public Member Functions | |
AliAnalysisTaskEmcalEmbeddingHelper () | |
AliAnalysisTaskEmcalEmbeddingHelper (const char *name) | |
virtual | ~AliAnalysisTaskEmcalEmbeddingHelper () |
void | UserExec (Option_t *option) |
void | UserCreateOutputObjects () |
void | Terminate (Option_t *option) |
AliVEvent * | GetExternalEvent () const |
Retrieve the embedded event from the embedding helper. More... | |
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... | |
Properties of the embedding helper | |
bool | Initialize () |
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 | 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... | |
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 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) |
Static Public Member Functions | |
static const AliAnalysisTaskEmcalEmbeddingHelper * | GetInstance () |
Protected Member Functions | |
bool | GetFilenames () |
bool | InitializeYamlConfig () |
bool | AutoConfigurePtHardBins () |
std::string | GenerateUniqueFileListFilename () const |
std::string | RemoveTrailingSlashes (std::string filename) const |
void | DetermineFirstFileToEmbed () |
void | SetupEmbedding () |
Bool_t | SetupInputFiles () |
std::string | DeterminePythiaXSecFilename (TString baseFileName, TString pythiaBaseFilename, 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_t | IsGoodEmbeddedRun (TString path) |
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... | |
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::vector< std::string > | fPythiaCrossSectionFilenames |
Paths to the pythia xsection files. More... | |
TFile * | fExternalFile |
! External file used for embedding More... | |
TChain * | fChain |
! 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... | |
AliEmcalList * | fOutput |
! 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... | |
Static Protected Attributes | |
static AliAnalysisTaskEmcalEmbeddingHelper * | fgInstance = nullptr |
! Global instance of this class More... | |
Private Member Functions | |
AliAnalysisTaskEmcalEmbeddingHelper (const AliAnalysisTaskEmcalEmbeddingHelper &) | |
AliAnalysisTaskEmcalEmbeddingHelper & | operator= (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 AliAnalysisTaskEmcalEmbeddingHelper * | AddTaskEmcalEmbeddingHelper () |
std::ostream & | operator<< (std::ostream &in, const AliAnalysisTaskEmcalEmbeddingHelper &myTask) |
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:
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.
Definition at line 67 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
AliAnalysisTaskEmcalEmbeddingHelper::AliAnalysisTaskEmcalEmbeddingHelper | ( | ) |
Default constructor. Needed by ROOT I/O
Definition at line 63 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by AddTaskEmcalEmbeddingHelper().
AliAnalysisTaskEmcalEmbeddingHelper::AliAnalysisTaskEmcalEmbeddingHelper | ( | const char * | name | ) |
Standard constructor. Should be used by the user.
[in] | name | Name of the task |
Definition at line 124 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
|
virtual |
Destructor
Deletes the singleton instance and ensures that any open file is closed.
Definition at line 189 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
|
private |
|
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.
Definition at line 1356 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by SetAutoConfigureIdentifier().
|
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:
Definition at line 440 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetFilenames(), and InputEvent().
|
protected |
Performs the embedded event selection on the current external event.
Definition at line 764 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and IsEventSelected().
|
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 579 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and SetupInputFiles().
|
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.
baseFileName | Path to external event input file with "#*.root" already remove (it if existed). |
pythiaBaseFilename | Name of the pythia cross section file to try. |
testIfExists | If true, will check if the filename that it has determined actually exists. |
Definition at line 1094 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and SetupInputFiles().
|
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".
Definition at line 545 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetFilenames(), and InputEvent().
|
inline |
Definition at line 171 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 173 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 170 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 172 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 102 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 158 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Retrieve the embedded event from the embedding helper.
Definition at line 84 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalCorrectionCellCombineCollections::CreateCombinedCells(), AliEmcalContainerUtils::GetEvent(), and InputEvent().
|
inline |
Definition at line 101 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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:
The file pattern can be specified by a number of different options:
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 241 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by Initialize(), and InputEvent().
|
inline |
Definition at line 98 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 99 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inlinestatic |
Definition at line 78 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalCorrectionCellCombineCollections::CreateCombinedCells(), AliEmcalContainerUtils::GetEvent(), AliEmcalEmbeddingQA::Initialize(), AliEmcalEmbeddingQA::RecordEmbeddedEventProperties(), AliAnalysisTaskEmcalJetHCorrelations::RetrieveTriggerMask(), AliJetResponseMaker::UserCreateOutputObjects(), AliAnalysisTaskEmcalDijetImbalance::UserCreateOutputObjects(), and AliAnalysisTaskEmcalJetPerformance::UserCreateOutputObjects().
|
inline |
Definition at line 145 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 142 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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.
Definition at line 611 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and UserExec().
|
inline |
Definition at line 94 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalEmbeddingQA::Initialize().
|
inline |
Definition at line 93 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalEmbeddingQA::RecordEmbeddedEventProperties().
|
inline |
Definition at line 143 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 159 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 162 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalEmbeddingQA::RecordEmbeddedEventProperties().
|
inline |
Definition at line 161 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalEmbeddingQA::RecordEmbeddedEventProperties().
|
inline |
Definition at line 160 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliEmcalEmbeddingQA::RecordEmbeddedEventProperties().
|
inline |
Definition at line 96 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 97 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 100 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 95 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 141 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 144 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
protected |
Initialize the external event by creating an event and then reading the event info from the TChain.
Definition at line 864 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and SetupInputFiles().
bool AliAnalysisTaskEmcalEmbeddingHelper::Initialize | ( | ) |
Initialize the Embedding Helper task. Must be called after configuring the task, either during the run macro or wagon configuration.
Definition at line 203 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetExternalEvent().
|
protected |
Definition at line 403 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by Initialize(), and InputEvent().
|
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 1176 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetNextEntry(), InputEvent(), and UserExec().
|
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.
Definition at line 206 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
protected |
Handles (ie wraps) event selection and proper event counting.
Definition at line 745 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetNextEntry(), and InputEvent().
|
protected |
Check if a given filename is from a run in the good embedded runlist.
path | path of a single filename |
Definition at line 388 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetFilenames(), and InputEvent().
|
private |
void AliAnalysisTaskEmcalEmbeddingHelper::Print | ( | Option_t * | opt = "" | ) | const |
Print basic correction task information using the string representation provided by AliAnalysisTaskEmcalEmbeddingHelper::toString()
opt | If "FILELIST" is passed, then the list of files to embed is also printed |
Definition at line 1482 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by operator<<(), and SetAutoConfigureIdentifier().
std::ostream & AliAnalysisTaskEmcalEmbeddingHelper::Print | ( | std::ostream & | in | ) | const |
Print correction task information on an output stream using the string representation provided by AliAnalysisTaskEmcalEmbeddingHelper::toString(). Used by operator<<
in | output stream stream |
Definition at line 1457 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
|
protected |
Extract pythia information from a cross section file. Modified from AliAnalysisTaskEmcal::PythiaInfoFromFile().
pythiaFileName | Path to the pythia cross section file. |
Definition at line 1250 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InitTree(), and InputEvent().
|
protected |
Record event properties
Definition at line 732 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetNextEntry(), and InputEvent().
|
protected |
Remove slashes at the end of strings. See: https://stackoverflow.com/a/14878124
[in] | filename | String containing a filename with some number of extra trailing slashes. |
Definition at line 566 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by AutoConfigurePtHardBins(), and InputEvent().
|
inline |
Set to embed from AOD.
Definition at line 112 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 176 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 178 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 175 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 177 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Set path to YAML configuration file.
Definition at line 134 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Create QA histograms. These are necessary for proper scaling, so be careful disabling them!
Definition at line 132 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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 693 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by GetNextEntry(), and InputEvent().
|
inline |
Set to embed from ESD.
Definition at line 110 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Set the path to a file containing the list of files to embed.
Definition at line 130 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Sets the file pattern to select AliEn files. This pattern is used as input to the alien_find command.
Definition at line 121 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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 126 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 151 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 148 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Set the number of pt hard bins in the production to properly format the histograms.
Definition at line 108 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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 106 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 149 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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 117 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Randomly select the first file to embed from the file list. Continues sequentially afterwards.
Definition at line 119 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Select the file ID to start embedding from.
Definition at line 128 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
inline |
Definition at line 147 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
|
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 1148 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), UserCreateOutputObjects(), and UserExec().
|
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.
Definition at line 972 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by InputEvent(), and SetupEmbedding().
|
inline |
Definition at line 150 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
void AliAnalysisTaskEmcalEmbeddingHelper::Terminate | ( | Option_t * | option | ) |
This function is called once at the end of the analysis.
Definition at line 1345 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
std::string AliAnalysisTaskEmcalEmbeddingHelper::toString | ( | bool | includeFileList = false | ) | const |
Prints information about the correction task.
Definition at line 1412 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 891 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 1319 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
|
friend |
Implementation of the output stream operator for AliAnalysisTaskEmcalEmbeddingHelper. Printing basic correction task information provided by function toString()
in | output stream |
myTask | Task which will be printed |
Definition at line 1470 of file AliAnalysisTaskEmcalEmbeddingHelper.cxx.
Referenced by SetAutoConfigureIdentifier().
|
protected |
The base path to the auto configuration (for example, "/alice/cern.ch/user/a/alitrain/")
Definition at line 247 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AutoConfigurePtHardBins(), GetAutoConfigureBasePath(), and SetAutoConfigureBasePath().
|
protected |
How the auto configuration YAML file should be identified. (for example, "rehlersTrain")
Definition at line 249 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AutoConfigurePtHardBins(), GetAutoConfigureIdentifier(), and SetAutoConfigureIdentifier().
|
protected |
If true, attempt to auto configure pt hard bins. Only works on the LEGO train.
Definition at line 246 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetAutoConfigurePtHardBins(), GetFilenames(), and SetAutoConfigurePtHardBins().
|
protected |
The path associated with the train type (for example, "PWGJE/Jets_EMC_PbPb/")
Definition at line 248 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AutoConfigurePtHardBins(), GetAutoConfigureTrainTypePath(), and SetAutoConfigureTrainTypePath().
|
protected |
! External TChain (tree) containing the events available for embedding
Definition at line 260 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), InitEvent(), InitTree(), and SetupInputFiles().
|
protected |
Path to YAML configuration.
Definition at line 256 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by InitializeYamlConfig(), SetConfigurationPath(), and toString().
|
protected |
If true, create QA histograms.
Definition at line 244 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliAnalysisTaskEmcalEmbeddingHelper(), CheckIsEmbeddedEventSelected(), GetCreateHistos(), GetNextEntry(), IsEventSelected(), SetCreateHistos(), toString(), UserCreateOutputObjects(), and UserExec().
|
protected |
! Current entry in the current tree
Definition at line 261 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
Good runlist for files to embed.
Definition at line 257 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by InitializeYamlConfig(), and IsGoodEmbeddedRun().
|
protected |
! Current external event available for embedding
Definition at line 269 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetExternalEvent(), InitEvent(), SetEmbeddedEventProperties(), and ~AliAnalysisTaskEmcalEmbeddingHelper().
|
protected |
! External file used for embedding
Definition at line 259 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by ~AliAnalysisTaskEmcalEmbeddingHelper().
|
protected |
! Header of the current external event
Definition at line 270 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetEventHeader(), and SetEmbeddedEventProperties().
|
protected |
Name of the file list containing paths to files to embed.
Definition at line 253 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GenerateUniqueFileListFilename(), GetFileListFilename(), GetFilenames(), SetFileListFilename(), and toString().
|
protected |
Index of vector containing paths to files to embed.
Definition at line 254 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by DetermineFirstFileToEmbed(), GetStartingFileIndex(), InitTree(), SetStartingFileIndex(), SetupInputFiles(), and toString().
|
protected |
Paths to the files to embed.
Definition at line 255 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by DetermineFirstFileToEmbed(), GetFilenames(), SetupInputFiles(), and toString().
|
protected |
! File number corresponding to the current tree
Definition at line 266 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
File pattern to select AliEn files using alien_find.
Definition at line 251 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetFilenames(), GetFilePattern(), SetFilePattern(), and toString().
|
staticprotected |
! Global instance of this class
Definition at line 279 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AliAnalysisTaskEmcalEmbeddingHelper(), GetInstance(), and ~AliAnalysisTaskEmcalEmbeddingHelper().
|
protected |
Manages access to all histograms.
Definition at line 267 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetNextEntry(), InitTree(), IsEventSelected(), RecordEmbeddedEventProperties(), and UserCreateOutputObjects().
|
protected |
Notes if the configuration has been initialized.
Definition at line 234 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by Initialize(), and SetupEmbedding().
|
protected |
! Notes where the TChain has been initialized for embedding
Definition at line 236 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by SetupEmbedding(), and UserExec().
|
protected |
! Notes where the entry indices have been initialized for a new tree in the chain
Definition at line 235 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by InitTree(), and UserExec().
|
protected |
Filename of input root files.
Definition at line 252 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetFilenames(), GetInputFilename(), SetInputFilename(), and toString().
|
protected |
! First entry of the current tree to be used for embedding
Definition at line 262 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
! Max number of files that are in the TChain
Definition at line 265 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), InitTree(), SetupInputFiles(), and UserCreateOutputObjects().
|
protected |
Max distance between Z vertex of internal and embedded event.
Definition at line 232 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetMaxVertexDistance(), SetMaxVertexDistance(), and toString().
|
protected |
If true, MC outliers will be rejected.
Definition at line 229 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetMCRejectOutliers(), SetMCRejectOutliers(), and toString().
|
protected |
Total number of pt hard bins.
Definition at line 240 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AutoConfigurePtHardBins(), GetNPtHardBins(), SetNPtHardBins(), toString(), and UserCreateOutputObjects().
|
protected |
! Offset from fLowerEntry where the loop over the tree should start
Definition at line 264 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
! List which owns the output histograms to be saved
Definition at line 268 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by UserCreateOutputObjects(), and UserExec().
|
protected |
ptHard bin for the given pythia production
Definition at line 241 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by AutoConfigurePtHardBins(), GetFilenames(), GetPtHardBin(), RecordEmbeddedEventProperties(), SetPtHardBin(), and toString().
|
protected |
Factor which the pt hard bin is multiplied by to compare against pythia header jets pt.
Definition at line 230 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetPtHardJetPtRejectionFactor(), SetPtHardJetPtRejectionFactor(), and toString().
|
protected |
! Pythia cross section for the current event (extracted from the pythia header).
Definition at line 275 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetPythiaXSection(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().
|
protected |
Paths to the pythia xsection files.
Definition at line 258 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by InitTree(), and SetupInputFiles().
|
protected |
! Average pythia cross section extracted from a xsec file.
Definition at line 276 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by PythiaInfoFromCrossSectionFile(), and SetEmbeddedEventProperties().
|
protected |
! Pythia header of the current external event
Definition at line 271 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetPythiaHeader(), and SetEmbeddedEventProperties().
|
protected |
! Pt hard of the current event (extracted from the pythia header).
Definition at line 277 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetPythiaPtHard(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().
|
protected |
! Number of pythia trials for the current event (extracted from the pythia header).
Definition at line 273 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetPythiaTrials(), RecordEmbeddedEventProperties(), and SetEmbeddedEventProperties().
|
protected |
! Average number of trials extracted from a xsec file.
Definition at line 274 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by PythiaInfoFromCrossSectionFile(), and SetEmbeddedEventProperties().
|
protected |
If true, it will start embedding from a random entry in the file rather than from the first.
Definition at line 242 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetRandomEventNumberAccess(), InitTree(), SetRandomEventNumberAccess(), SetupEmbedding(), and toString().
|
protected |
If true, it will start embedding from a random file in the input files list.
Definition at line 243 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by DetermineFirstFileToEmbed(), GetRandomFileAccess(), SetRandomFileAccess(), and toString().
|
protected |
Name of the ESD/AOD tree where the events are to be found.
Definition at line 239 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetFilenames(), GetTreeName(), InitEvent(), SetAOD(), SetESD(), SetupInputFiles(), and toString().
|
protected |
Trigger selection mask.
Definition at line 228 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetTriggerMask(), SetTriggerMask(), and toString().
|
protected |
! Last entry of the current tree to be used for embedding
Definition at line 263 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
! Notes whether we have wrapped around the tree, which is important if the offset into the tree is non-zero
Definition at line 237 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by GetNextEntry(), and InitTree().
|
protected |
Z vertex cut on embedded event.
Definition at line 231 of file AliAnalysisTaskEmcalEmbeddingHelper.h.
Referenced by CheckIsEmbeddedEventSelected(), GetZVertexCut(), SetZVertexCut(), and toString().