30 #include <TGridResult.h>
39 #include <AliAnalysisManager.h>
40 #include <AliVEvent.h>
41 #include <AliAODEvent.h>
42 #include <AliESDEvent.h>
43 #include <AliMCEvent.h>
44 #include <AliInputEventHandler.h>
45 #include <AliVHeader.h>
46 #include <AliAODMCHeader.h>
47 #include <AliGenPythiaEventHeader.h>
65 fTriggerMask(AliVEvent::kAny),
66 fMCRejectOutliers(false),
67 fPtHardJetPtRejectionFactor(4),
70 fInitializedConfiguration(false),
71 fInitializedNewFile(false),
72 fInitializedEmbedding(false),
73 fWrappedAroundTree(false),
77 fRandomEventNumberAccess(kFALSE),
78 fRandomFileAccess(kTRUE),
80 fAutoConfigurePtHardBins(false),
81 fAutoConfigureBasePath(
""),
82 fAutoConfigureTrainTypePath(
""),
83 fAutoConfigureIdentifier(
""),
86 fFileListFilename(
""),
89 fConfigurationPath(
""),
91 fPythiaCrossSectionFilenames(),
106 fPythiaTrialsFromFile(0),
107 fPythiaCrossSection(0.),
108 fPythiaCrossSectionFromFile(0.),
112 AliError(
"An instance of AliAnalysisTaskEmcalEmbeddingHelper already exists: it will be deleted!!!");
126 fTriggerMask(AliVEvent::kAny),
127 fMCRejectOutliers(false),
128 fPtHardJetPtRejectionFactor(4),
131 fInitializedConfiguration(false),
132 fInitializedNewFile(false),
133 fInitializedEmbedding(false),
134 fWrappedAroundTree(false),
135 fTreeName(
"aodTree"),
138 fRandomEventNumberAccess(kFALSE),
139 fRandomFileAccess(kTRUE),
141 fAutoConfigurePtHardBins(false),
142 fAutoConfigureBasePath(
"alien:///alice/cern.ch/user/a/alitrain/"),
143 fAutoConfigureTrainTypePath(
"PWGJE/Jets_EMC_PbPb/"),
144 fAutoConfigureIdentifier(
"autoConfigIdentifier"),
147 fFileListFilename(
""),
150 fConfigurationPath(
""),
152 fPythiaCrossSectionFilenames(),
159 fMaxNumberOfFiles(0),
167 fPythiaTrialsFromFile(0),
168 fPythiaCrossSection(0.),
169 fPythiaCrossSectionFromFile(0.),
173 AliError(
"An instance of AliAnalysisTaskEmcalEmbeddingHelper already exists: it will be deleted!!!");
180 DefineOutput(1, AliEmcalList::Class());
211 if (result && initializedYAML) {
252 AliFatal(TString::Format(
"Requested default (pattern) input filename, but could not determine file type from tree name \"%s\". Please check the tree name and set the pattern input filename",
fTreeName.Data()));
263 AliFatal(
"Requested both pt hard bin auto configuration and selected a non-zero pt hard bin. These are incompatible options. Please check your configuration.");
266 if (success ==
false) {
267 AliFatal(
"Pt hard bin auto configuration requested, but it failed. Please check the logs.\n");
280 AliInfo(
"Trying to connect to AliEn ...");
281 TGrid::Connect(
"alien://");
284 AliFatal(TString::Format(
"Cannot access AliEn to retrieve file list with pattern %s!",
fFilePattern.Data()));
289 bool usedFilePattern =
false;
291 usedFilePattern =
true;
292 AliDebug(2, TString::Format(
"Trying to retrieve file list from AliEn with pattern file %s...",
fFilePattern.Data()));
301 filePattern.ReplaceAll(
"alien://",
"");
304 AliDebug(2, TString::Format(
"Trying to retrieve file list from AliEn with pattern \"%s\" and input filename \"%s\"", filePattern.Data(),
fInputFilename.Data()));
305 auto result = gGrid->Query(filePattern.Data(),
fInputFilename.Data());
310 for (
int i = 0; i < result->GetEntries(); i++)
312 TString path = result->GetKey(i,
"turl");
317 outFile << path <<
"\n";
323 AliErrorStream() <<
"Failed to run grid query\n";
331 if (usedFilePattern) {
332 AliErrorStream() <<
"You set both the file pattern and the file list filename! The file list filename will override the pattern! Pattern: \"" <<
fFilePattern <<
"\", filename: \"" <<
fFileListFilename <<
"\"\nPlease check that this is the desired behavior!\n";
347 std::copy(std::istream_iterator<std::string>(inputFile),
348 std::istream_iterator<std::string>(),
355 AliFatal(TString::Format(
"Filenames from pattern \"%s\" and file list \"%s\" yielded an empty list!",
fFilePattern.Data(),
fFileListFilename.Data()));
362 if (
filename.find(
".zip") != std::string::npos &&
filename.find(
"#") == std::string::npos) {
372 AliError(TString::Format(
"Filename %s contains \".zip\" and not \"#\", but tree name %s is not recognized. Please check the file list to ensure that the proper path is set.",
filename.c_str(),
fTreeName.Data()));
378 AliInfoStream() <<
"Found " << fFilenames.size() <<
" files to embed\n";
395 if (path.Contains(run)) {
406 AliInfo(
"No Embedding YAML configuration was provided");
409 AliInfoStream() <<
"Embedding YAML configuration was provided: \"" <<
fConfigurationPath <<
"\".\n";
414 if (addedConfig < 0) {
415 AliError(
"YAML Configuration not found!");
442 bool returnValue =
false;
444 AliInfoStream() <<
"Attempting to auto configure pt hard bins.\n";
450 AliInfo(
"Trying to connect to AliEn ...");
451 TGrid::Connect(
"alien://");
456 const char * trainNumberStr =
gSystem->Getenv(
"TRAIN_RUN_ID");
457 std::stringstream trainNumberSS;
458 if (trainNumberStr) {
459 trainNumberSS << trainNumberStr;
461 if (trainNumberSS.str() ==
"") {
462 AliFatal(
"Cannot retrieve train ID.");
466 trainNumberSS >> trainNumber;
475 std::string yamlExtension =
".yaml";
476 if (
filename.find(yamlExtension) == std::string::npos) {
483 AliInfoStream() <<
"Train pt hard bin configuration file not available, so creating a new empty configuration named \"" <<
fAutoConfigureIdentifier <<
"\".\n";
488 AliInfoStream() <<
"Opening configuration located at \"" <<
filename <<
"\".\n";
495 int tempTrainNumber = -1;
496 bool getPropertyReturnValue =
false;
497 std::stringstream propertyName;
498 for (
int ptHardBin = 1; ptHardBin <=
fNPtHardBins; ptHardBin++)
500 propertyName.str(
"");
501 propertyName << ptHardBin;
502 getPropertyReturnValue = config.
GetProperty(propertyName.str(), tempTrainNumber,
false);
503 if (getPropertyReturnValue !=
true) {
504 AliInfoStream() <<
"Train " << trainNumber <<
" will use pt hard bin " << ptHardBin <<
".\n";
521 AliDebugStream(2) <<
"Found pt hard bin " << ptHardBin <<
" corresponding to train number " << trainNumber <<
".\n";
523 if (tempTrainNumber == trainNumber) {
524 AliInfoStream() <<
"Train run number " << trainNumber <<
" was already found assigned to pt hard bin " << ptHardBin <<
". That pt hard bin will be used.\n";
547 std::string tempStr =
"";
549 tempStr =
"fileList";
553 tempStr += tempUUID.AsString();
568 while (filename.rbegin() != filename.rend() && *(filename.rbegin()) ==
'/') {
588 AliInfo(TString::Format(
"Starting with random file number %i!",
fFilenameIndex+1));
594 AliWarning(TString::Format(
"File index %i out of range from 0 to %lu! Resetting to 0!",
fFilenameIndex,
fFilenames.size()));
642 AliError(
"====================================================================================================");
643 AliError(
"== No more files available to embed from the TChain! Restarting from the beginning of the TChain! ==");
644 AliError(
"== Be careful to check that this is the desired action! ==");
645 AliError(
"====================================================================================================");
669 if (attempts == 1000)
670 AliWarning(
"After 1000 attempts no event has been accepted by the event selection (trigger, centrality...)!");
684 if (!
fChain)
return kFALSE;
695 AliDebug(4,
"Set event properties");
699 AliAODMCHeader* aodMCH =
dynamic_cast<AliAODMCHeader*
>(
fExternalEvent->FindListObject(AliAODMCHeader::StdBranchName()));
701 for (
UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
702 fPythiaHeader =
dynamic_cast<AliGenPythiaEventHeader*
>(aodMCH->GetCocktailHeader(i));
714 AliDebugStream(4) <<
"Taking the pythia cross section avg from the xsec file.\n";
719 AliDebugStream(4) <<
"Taking the pythia trials avg from the xsec file.\n";
724 AliDebugStream(4) <<
"Pythia header is defined!\n";
771 AliFatal(
"Event selection is not implemented for embedding ESDs.");
781 res = (
dynamic_cast<AliVAODHeader*
>(aev->GetHeader()))->GetOfflineTrigger();
786 AliDebug(3, Form(
"Event rejected due to physics selection. Event trigger mask: %d, trigger mask selection: %d.",
798 const AliVVertex *externalVert =
fExternalEvent->GetPrimaryVertex();
799 const AliVVertex *inputVert = AliAnalysisTaskSE::InputEvent()->GetPrimaryVertex();
800 if (externalVert && inputVert) {
801 externalVert->GetXYZ(externalVertex);
802 inputVert->GetXYZ(inputVertex);
805 AliDebug(3, Form(
"Event rejected due to Z vertex selection. Event Z vertex: %f, Z vertex cut: %f",
812 Double_t dist = TMath::Sqrt((externalVertex[0]-inputVertex[0])*(externalVertex[0]-inputVertex[0])+(externalVertex[1]-inputVertex[1])*(externalVertex[1]-inputVertex[1])+(externalVertex[2]-inputVertex[2])*(externalVertex[2]-inputVertex[2]));
814 AliDebug(3, Form(
"Event rejected because the distance between the current and embedded vertices is > %f. "
815 "Current event vertex (%f, %f, %f), embedded event vertex (%f, %f, %f). Distance = %f",
816 fMaxVertexDist, inputVertex[0], inputVertex[1], inputVertex[2], externalVertex[0], externalVertex[1], externalVertex[2], dist));
836 AliDebugStream(4) <<
"Pythia Njets: " << nTriggerJets <<
", pT Hard: " <<
fPythiaPtHard <<
"\n";
839 for (
Int_t iJet = 0; iJet< nTriggerJets; iJet++) {
842 jet.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
844 AliDebugStream(5) <<
"Pythia jet " << iJet <<
", pycell jet pT: " << jet.Pt() <<
"\n";
848 AliDebugStream(3) <<
"Event rejected because of MC outlier removal. Pythia header jet with: pT Hard " << fPythiaPtHard <<
", pycell jet pT " << jet.Pt() <<
", rejection factor " <<
fPtHardJetPtRejectionFactor <<
"\n";
866 if (!
fChain)
return kFALSE;
876 AliError(Form(
"Tree name %s not recognized!",
fTreeName.Data()));
909 histName =
"fHistXsection";
910 histTitle =
"Pythia Cross Section;p_{T} hard bin; XSection";
914 histName =
"fHistTrials";
915 histTitle =
"Number of Pythia Trials;p_{T} hard bin;Trials";
919 histName =
"fHistPtHard";
920 histTitle =
"p_{T} Hard Spectra;p_{T} hard;Counts";
924 histName =
"fHistEventCount";
925 histTitle =
"fHistEventCount;Result;Count";
927 histEventCount->GetXaxis()->SetBinLabel(1,
"Accepted");
928 histEventCount->GetXaxis()->SetBinLabel(2,
"Rejected");
931 histName =
"fHistEmbeddedEventRejection";
932 histTitle =
"Reasons to reject embedded event";
933 std::vector<std::string> binLabels = {
"PhysSel",
"MCOutlier",
"Vz",
"VertexDist"};
934 auto fHistEmbeddedEventRejection =
fHistManager.
CreateTH1(histName, histTitle, binLabels.size(), 0, binLabels.size());
936 for (
unsigned int i = 1; i <= binLabels.size(); i++) {
937 fHistEmbeddedEventRejection->GetXaxis()->SetBinLabel(i, binLabels.at(i-1).c_str());
939 fHistEmbeddedEventRejection->GetYaxis()->SetTitle(
"Counts");
942 histName =
"fHistEmbeddedEventsAttempted";
943 histTitle =
"Number of embedded events rejected by event selection before success;Number of rejected events;Counts";
947 histName =
"fHistNumberOfFilesEmbedded";
948 histTitle =
"Number of files which contributed events to be embedded";
952 histName =
"fHistAbsoluteFileNumber";
953 histTitle =
"Number of times each absolute file number was embedded";
959 while ((obj = next())) {
981 bool requiresAlien =
false;
984 if (
filename.find(
"alien://") != std::string::npos) {
985 requiresAlien =
true;
989 if (requiresAlien && !gGrid) {
990 AliInfo(
"Trying to connect to AliEn ...");
991 TGrid::Connect(
"alien://");
996 bool wrapped =
false;
999 bool failedEntirelyToFindFile =
false;
1000 TString pythiaXSecFilename =
"";
1001 TString pythiaBaseFilename =
"";
1002 std::vector <std::string> pythiaBaseFilenames = {
"pyxsec.root",
"pyxsec_hists.root"};
1018 if (baseFileName.Contains(
".zip#")) {
1019 Ssiz_t pos = baseFileName.Last(
'#');
1020 baseFileName.Remove(pos);
1024 if (
gSystem->AccessPathName(baseFileName)) {
1025 AliError(Form(
"File %s does not exist! Skipping!", baseFileName.Data()));
1031 AliDebugStream(4) <<
"Adding file to the embedded input chain \"" <<
filename->c_str() <<
"\".\n";
1036 if (pythiaBaseFilename ==
"" && failedEntirelyToFindFile ==
false) {
1037 AliInfoStream() <<
"Attempting to determine pythia cross section filename. It can be normal to see some TFile::Init() errors!\n";
1038 for (
auto name : pythiaBaseFilenames) {
1040 if (pythiaXSecFilename !=
"") {
1041 AliDebugStream(4) <<
"Found pythia cross section base filename \"" << name.c_str() <<
"\"\n";
1042 pythiaBaseFilename = name;
1047 if (pythiaBaseFilename ==
"") {
1049 AliErrorStream() <<
"Failed to find pythia x sec file! Continuing with only the pythia header!\n";
1050 failedEntirelyToFindFile =
true;
1053 AliInfoStream() <<
"Found pythia cross section file \"" << pythiaBaseFilename.Data() <<
"\".\n";
1058 if (failedEntirelyToFindFile ==
false) {
1063 AliDebugStream(4) <<
"Adding pythia cross section file \"" << pythiaXSecFilename.Data() <<
"\".\n";
1074 AliWarning(TString::Format(
"Number of input files (%lu) is larger than the number of available files (%i). Some filenames were likely invalid!", fFilenames.size(),
fMaxNumberOfFiles));
1079 if (!res)
return kFALSE;
1096 std::string pythiaXSecFilename =
"";
1099 if (baseFileName.Contains(
".zip"))
1102 pythiaXSecFilename = baseFileName;
1103 pythiaXSecFilename +=
"#";
1104 pythiaXSecFilename += pythiaBaseFilename;
1110 std::unique_ptr<TFile> fTemp(TFile::Open(pythiaXSecFilename.c_str(),
"READ"));
1113 AliDebugStream(4) <<
"File " << pythiaXSecFilename.c_str() <<
" does not exist!\n";
1114 pythiaXSecFilename =
"";
1117 AliDebugStream(4) <<
"Found pythia cross section file \"" << pythiaXSecFilename.c_str() <<
"\".\n";
1124 pythiaXSecFilename =
gSystem->DirName(baseFileName);
1125 pythiaXSecFilename +=
"/";
1126 pythiaXSecFilename += pythiaBaseFilename;
1130 if (
gSystem->AccessPathName(pythiaXSecFilename.c_str())) {
1131 AliDebugStream(4) <<
"File " << pythiaXSecFilename.c_str() <<
" does not exist!\n";
1132 pythiaXSecFilename =
"";
1135 AliDebugStream(4) <<
"Found pythia cross section file \"" << pythiaXSecFilename.c_str() <<
"\".\n";
1140 return pythiaXSecFilename;
1151 AliFatal(
"The configuration is not initialized. Check that Initialize() was called!");
1156 if (!res) {
return; }
1160 AliInfo(
"Random event number access enabled!");
1223 AliDebugStream(3) <<
"Failed to retrieve cross section from xsec file. Will still attempt to get the information from the header.\n";
1227 AliErrorStream() <<
"Attempted to read past the end of the pythia cross section filenames vector. File number: " <<
fFileNumber <<
", vector size: " <<
fPythiaCrossSectionFilenames.size() <<
".\nThis should only occur if we have run out of files to embed!\n";
1231 AliDebug(2, TString::Format(
"Will start embedding file %i beginning from entry %i (entry %i within the file). NOTE: This file number is not equal to the absolute file number in the file list!",
fFileNumber,
fCurrentEntry,
fCurrentEntry -
fLowerEntry));
1252 std::unique_ptr<TFile> fxsec(TFile::Open(pythiaFileName.c_str()));
1257 double crossSection = 0;
1260 TTree *xtree =
dynamic_cast<TTree*
>(fxsec->Get(
"Xsection"));
1264 xtree->SetBranchAddress(
"xsection",&xsection);
1265 xtree->SetBranchAddress(
"ntrials",&ntrials);
1268 crossSection = xsection;
1271 AliFatal(
"Have no tested pyxsec.root files. Need to determine the proper way to get nevents!!");
1276 TKey* key =
static_cast<TKey*
>(fxsec->GetListOfKeys()->At(0));
1277 if (!key)
return false;
1279 if (!list)
return false;
1280 TProfile * crossSectionHist =
static_cast<TProfile*
>(list->FindObject(
"h1Xsec"));
1282 if(!(crossSectionHist->GetEntries())) {
1284 AliErrorStream() <<
"No cross section information available in file \"" << fxsec->GetName() <<
"\". Will still attempt to extract cross section information from pythia header.\n";
1287 crossSection = crossSectionHist->GetBinContent(1);
1288 if(!crossSection) AliErrorStream() << GetName() <<
": Cross section 0 for file " << pythiaFileName << std::endl;
1290 TH1F * trialsHist =
static_cast<TH1F*
>(list->FindObject(
"h1Trials"));
1291 trials = trialsHist->GetBinContent(1);
1292 nEvents = trialsHist->GetEntries();
1307 AliDebugStream(3) <<
"Unable to open file \"" << pythiaFileName <<
"\". Will attempt to use values from the hader.";
1322 AliError(
"Chain not initialized before running! Setting up now.");
1333 AliError(
"Unable to get the event to embed. Nothing will be embedded.");
1363 ::Error(
"AddTaskEmcalEmbeddingHelper",
"No analysis manager to connect to.");
1369 AliVEventHandler* handler = mgr->GetInputEventHandler();
1372 ::Error(
"AddTaskEmcalEmbeddingHelper",
"This task requires an input event handler");
1376 TString name =
"AliAnalysisTaskEmcalEmbeddingHelper";
1379 if (mgrTask)
return mgrTask;
1388 mgr->AddTask(embeddingHelper);
1391 AliAnalysisDataContainer* cInput = mgr->GetCommonInputContainer();
1393 TString outputContainerName(name);
1394 outputContainerName +=
"_histos";
1396 AliAnalysisDataContainer * cOutput = mgr->CreateContainer(outputContainerName.Data(),
1398 AliAnalysisManager::kOutputContainer,
1399 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1401 mgr->ConnectInput(embeddingHelper, 0, cInput);
1402 mgr->ConnectOutput(embeddingHelper, 1, cOutput);
1404 return embeddingHelper;
1414 std::stringstream tempSS;
1417 tempSS << std::boolalpha;
1418 tempSS << GetName() <<
": Embedding helper configuration:\n";
1420 tempSS <<
"Pt Hard Bin: " <<
fPtHardBin <<
"\n";
1422 tempSS <<
"File pattern: \"" <<
fFilePattern <<
"\"\n";
1425 tempSS <<
"Tree name: " <<
fTreeName <<
"\n";
1429 tempSS <<
"Number of files to embed: " <<
fFilenames.size() <<
"\n";
1433 tempSS <<
"\nEmbedded event settings:\n";
1434 tempSS <<
"Trigger mask (binary): " << triggerMask <<
"\n";
1437 tempSS <<
"Z vertex cut: " <<
fZVertexCut <<
"\n";
1440 if (includeFileList) {
1441 tempSS <<
"\nFiles to embed:\n";
1443 tempSS <<
"\t" <<
filename <<
"\n";
1447 return tempSS.str();
1472 std::ostream & result = myTask.
Print(in);
1484 std::string temp(opt);
1485 bool includeFileList =
false;
1486 if (temp ==
"FILELIST") {
1487 includeFileList =
true;
1489 Printf(
"%s",
toString(includeFileList).c_str());
Bool_t fRandomEventNumberAccess
If true, it will start embedding from a random entry in the file rather than from the first...
Double_t fZVertexCut
Z vertex cut on embedded event.
void UserExec(Option_t *option)
void RecordEmbeddedEventProperties()
Int_t fPtHardBin
ptHard bin for the given pythia production
bool fMCRejectOutliers
If true, MC outliers will be rejected.
double fPythiaCrossSection
! Pythia cross section for the current event (extracted from the pythia header).
Int_t fLowerEntry
! First entry of the current tree to be used for embedding
TString fFileListFilename
Name of the file list containing paths to files to embed.
void SetEmbeddedEventProperties()
int fPythiaTrialsFromFile
! Average number of trials extracted from a xsec file.
Bool_t fRandomFileAccess
If true, it will start embedding from a random file in the input files list.
Int_t fCurrentEntry
! Current entry in the current tree
TFile * fExternalFile
! External file used for embedding
TList * list
TDirectory file where lists per trigger are stored in train ouput.
Int_t fNPtHardBins
Total number of pt hard bins.
TChain * fChain
! External TChain (tree) containing the events available for embedding
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
bool fAutoConfigurePtHardBins
If true, attempt to auto configure pt hard bins. Only works on the LEGO train.
bool fInitializedConfiguration
Notes if the configuration has been initialized.
AliVHeader * fExternalHeader
! Header of the current external event
AliGenPythiaEventHeader * fPythiaHeader
! Pythia header of the current external event
void DetermineFirstFileToEmbed()
TString fInputFilename
Filename of input root files.
std::vector< std::string > fEmbeddedRunlist
Good runlist for files to embed.
std::string fAutoConfigureBasePath
The base path to the auto configuration (for example, "/alice/cern.ch/user/a/alitrain/") ...
void Terminate(Option_t *option)
std::string fConfigurationPath
Path to YAML configuration.
void CreateTProfile(const char *name, const char *title, int nbinsX, double xmin, double xmax, Option_t *opt="")
Create a new TProfile within the container.
AliAnalysisTaskEmcalEmbeddingHelper()
THashList * GetListOfHistograms() const
Get the list of histograms.
bool fInitializedEmbedding
! Notes where the TChain has been initialized for embedding
virtual ~AliAnalysisTaskEmcalEmbeddingHelper()
std::string toString(bool includeFileList=false) const
Implementation of task to embed external events.
UInt_t fMaxNumberOfFiles
! Max number of files that are in the TChain
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
bool PythiaInfoFromCrossSectionFile(std::string filename)
Bool_t CheckIsEmbeddedEventSelected()
void FillProfile(const char *name, double x, double y, double weight=1.)
std::string GenerateUniqueFileListFilename() const
Double_t nEvents
plot quality messages
Double_t fMaxVertexDist
Max distance between Z vertex of internal and embedded event.
AliVEvent * fExternalEvent
! Current external event available for embedding
std::vector< std::string > fPythiaCrossSectionFilenames
Paths to the pythia xsection files.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TString fTreeName
Name of the ESD/AOD tree where the events are to be found.
void Print(Option_t *opt="") const
Bool_t IsGoodEmbeddedRun(TString path)
Int_t fOffset
! Offset from fLowerEntry where the loop over the tree should start
bool fCreateHisto
If true, create QA histograms.
UInt_t fTriggerMask
Trigger selection mask.
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
bool fWrappedAroundTree
! Notes whether we have wrapped around the tree, which is important if the offset into the tree is no...
Double_t fPtHardJetPtRejectionFactor
Factor which the pt hard bin is multiplied by to compare against pythia header jets pt...
double fPythiaPtHard
! Pt hard of the current event (extracted from the pythia header).
static AliAnalysisTaskEmcalEmbeddingHelper * AddTaskEmcalEmbeddingHelper()
std::ostream & operator<<(std::ostream &in, const AliAnalysisTaskEmcalEmbeddingHelper &myTask)
THistManager fHistManager
Manages access to all histograms.
bool fInitializedNewFile
! Notes where the entry indices have been initialized for a new tree in the chain ...
static AliAnalysisTaskEmcalEmbeddingHelper * fgInstance
! Global instance of this class
UInt_t fFileNumber
! File number corresponding to the current tree
std::string RemoveTrailingSlashes(std::string filename) const
AliEmcalList * fOutput
! List which owns the output histograms to be saved
void UserCreateOutputObjects()
std::string fAutoConfigureIdentifier
How the auto configuration YAML file should be identified. (for example, "rehlersTrain") ...
bool AutoConfigurePtHardBins()
std::string DeterminePythiaXSecFilename(TString baseFileName, TString pythiaBaseFilename, bool testIfExists) const
Int_t fUpperEntry
! Last entry of the current tree to be used for embedding
Int_t fFilenameIndex
Index of vector containing paths to files to embed.
double fPythiaCrossSectionFromFile
! Average pythia cross section extracted from a xsec file.
std::vector< std::string > fFilenames
Paths to the files to embed.
bool InitializeYamlConfig()
std::string fAutoConfigureTrainTypePath
The path associated with the train type (for example, "PWGJE/Jets_EMC_PbPb/")
TString fFilePattern
File pattern to select AliEn files using alien_find.
int fPythiaTrials
! Number of pythia trials for the current event (extracted from the pythia header).
TList * OpenFile(const char *fname)