Skip to content

Commit f6c9165

Browse files
authored
support for NUA, part 2 (the custom case) (#5935)
* support for NUA, part 2 (the custom case) * fix for MegaLinter
1 parent 0998d71 commit f6c9165

File tree

3 files changed

+396
-135
lines changed

3 files changed

+396
-135
lines changed

PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ struct : ConfigurableGroup {
120120
struct : ConfigurableGroup {
121121
Configurable<vector<int>> cfApplyNUAPDF{"cfApplyNUAPDF", {0, 0, 0}, "Apply (1) or do not apply (0) NUA on variable, ordering is the same as in enum eNUAPDF (phi, pt, eta)"};
122122
Configurable<vector<int>> cfUseDefaultNUAPDF{"cfUseDefaultNUAPDF", {1, 1, 1}, "Use (1) or do not use (0) default NUA profile, ordering is the same as in enum eNUAPDF (phi, pt, eta)"};
123+
Configurable<vector<string>> cfCustomNUAPDFHistNames{"cfCustomNUAPDFHistNames", {"a", "bb", "ccc"}, "the names of histograms holding custom NUA in an external file."};
124+
Configurable<string> cfFileWithCustomNUA{"cfFileWithCustomNUA", "/home/abilandz/DatasetsO2/customNUA.root", "path to external ROOT file which holds all histograms with custom NUA"}; // for AliEn file prepend "/alice/cern.ch/", for CCDB prepend "/alice-ccdb.cern.ch"
123125
} cf_nua;
124126

125127
// *) Internal validation:

PWGCF/MultiparticleCorrelations/Core/MuPa-DataMembers.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,15 @@ struct NestedLoops {
168168

169169
// *) Toy NUA (can be applied both in real data analysis and in analysis 'on-the-fly'):
170170
struct NUA {
171-
TList* fNUAList = NULL; // list to hold all NUA objects
172-
TProfile* fNUAFlagsPro = NULL; // profile to hold all flags for NUA objects
173-
Bool_t fApplyNUAPDF[eNUAPDF_N] = {kFALSE}; // apply NUA to particular kine variable (see the corresponding enum eNUAPDF)
174-
Bool_t fUseDefaultNUAPDF[eNUAPDF_N] = {kTRUE}; // by default, use simple hardcoded expressions for NUA acceptance profile
175-
TF1* fDefaultNUAPDF[eNUAPDF_N] = {NULL}; // default distributions used as pdfs to simulate events on-the-fly
176-
TH1D* fCustomNUAPDF[eNUAPDF_N] = {NULL}; // custom, user-supplied distributions used to simulate NUA
177-
Double_t fMaxValuePDF[eNUAPDF_N] = {0.}; // see algorithm used in Accept(...). I implemented it as a data member, so that it is not calculated again and again at each particle call
171+
TList* fNUAList = NULL; // list to hold all NUA objects
172+
TProfile* fNUAFlagsPro = NULL; // profile to hold all flags for NUA objects
173+
Bool_t fApplyNUAPDF[eNUAPDF_N] = {kFALSE}; // apply NUA to particular kine variable (see the corresponding enum eNUAPDF)
174+
Bool_t fUseDefaultNUAPDF[eNUAPDF_N] = {kTRUE}; // by default, use simple hardcoded expressions for NUA acceptance profile
175+
TF1* fDefaultNUAPDF[eNUAPDF_N] = {NULL}; // default distributions used as pdfs to simulate events on-the-fly
176+
TH1D* fCustomNUAPDF[eNUAPDF_N] = {NULL}; // custom, user-supplied distributions used to simulate NUA
177+
TString* fCustomNUAPDFHistNames[eNUAPDF_N] = {NULL}; // these are the names of histograms holding custom NUA in an external file. There is a configurable for this one.
178+
TString fFileWithCustomNUA = ""; // path to external ROOT file which holds all histograms with custom NUA
179+
Double_t fMaxValuePDF[eNUAPDF_N] = {0.}; // see algorithm used in Accept(...). I implemented it as a data member, so that it is not calculated again and again at each particle call
178180
} nua;
179181

180182
// *) Internal validation:

0 commit comments

Comments
 (0)