Skip to content

Commit 4c9abbb

Browse files
authored
[PWGCF] support for centrality weights (#8512)
1 parent 884d8a4 commit 4c9abbb

File tree

5 files changed

+394
-32
lines changed

5 files changed

+394
-32
lines changed

PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct : ConfigurableGroup {
2626
Configurable<bool> cfVerboseForEachParticle{"cfVerboseForEachParticle", false, "run or not in verbose mode (also for function calls per particle)"};
2727
Configurable<bool> cfDoAdditionalInsanityChecks{"cfDoAdditionalInsanityChecks", false, "do additional insanity checks at run time (this leads to small loss of performance)"};
2828
Configurable<bool> cfInsanityCheckForEachParticle{"cfInsanityCheckForEachParticle", false, "do insanity checks at run time for each particle, at the expense of losing a lot of performance. Use only during debugging."};
29-
Configurable<bool> cfUseCCDB{"cfUseCCDB", true, "if requested, access personal files from CCDB (true) or from home dir in AliEn (false)"};
3029
Configurable<unsigned int> cfRandomSeed{"cfRandomSeed", 0, "0 = random seed is guaranteed to be unique in space and time"};
3130
Configurable<bool> cfUseFisherYates{"cfUseFisherYates", false, "use or not Fisher-Yates algorithm to randomize particle indices"};
3231
Configurable<int> cfFixedNumberOfRandomlySelectedTracks{"cfFixedNumberOfRandomlySelectedTracks", -1, "set to some integer > 0, to apply and use. Set to <=0, to ignore."};
@@ -91,7 +90,7 @@ struct : ConfigurableGroup {
9190
Configurable<bool> cfFillParticleHistograms{"cfFillParticleHistograms", true, "if false, all 1D particle histograms are not filled. if kTRUE, the ones for which fBookParticleHistograms[...] is kTRUE, are filled"};
9291
Configurable<vector<string>> cfBookParticleHistograms{"cfBookParticleHistograms", {"Phi-1", "Pt-1", "Eta-1", "Charge-1", "tpcNClsFindable-1", "tpcNClsShared-1", "tpcNClsFound-1", "tpcNClsCrossedRows-1", "itsNCls-1", "itsNClsInnerBarrel-1", "tpcCrossedRowsOverFindableCls-1", "tpcFoundOverFindableCls-1", "tpcFractionSharedCls-1", "dcaXY-1", "dcaZ-1", "PDG-1"}, "Book (1) or do not book (0) particle histogram"};
9392
Configurable<bool> cfFillParticleHistograms2D{"cfFillParticleHistograms2D", true, "if false, all 2D particle histograms are not filled. if kTRUE, the ones for which fBookParticleHistograms2D[...] is kTRUE, are filled"};
94-
Configurable<vector<string>> cfBookParticleHistograms2D{"cfBookParticleHistograms2D", {"Phi_vs_Pt-1", "Phi_vs_Eta-1"}, "Book (1) or do not book (0) event histogram"};
93+
Configurable<vector<string>> cfBookParticleHistograms2D{"cfBookParticleHistograms2D", {"Phi_vs_Pt-1", "Phi_vs_Eta-1"}, "Book (1) or do not book (0) 2D particle histograms"};
9594
} cf_ph;
9695

9796
// *) Particle cuts:
@@ -164,6 +163,12 @@ struct : ConfigurableGroup {
164163
Configurable<string> cfFileWithWeights{"cfFileWithWeights", "/home/abilandz/DatasetsO2/weights.root", "path to external ROOT file which holds all particle weights in O2 format"}; // for AliEn file prepend "/alice/cern.ch/", for CCDB prepend "/alice-ccdb.cern.ch"
165164
} cf_pw;
166165

166+
// *) Centrality weights:
167+
struct : ConfigurableGroup {
168+
Configurable<bool> cfUseCentralityWeights{"cfUseCentralityWeights", false, "use or not centrality weights"};
169+
Configurable<string> cfFileWithCentralityWeights{"cfFileWithCentralityWeights", "/home/abilandz/DatasetsO2/centralityWeights.root", "path to external ROOT file which holds centrality weights in O2 format"}; // for AliEn file prepend "/alice/cern.ch/", for CCDB prepend "/alice-ccdb.cern.ch"
170+
} cf_cw;
171+
167172
// *) Nested loops:
168173
struct : ConfigurableGroup {
169174
Configurable<bool> cfCalculateNestedLoops{"cfCalculateNestedLoops", false, "cross-check for all events all correlations with nested loops"};

PWGCF/MultiparticleCorrelations/Core/MuPa-DataMembers.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ struct TaskConfiguration {
4848
Bool_t fDoAdditionalInsanityChecks = kFALSE; // do additional insanity checks at run time, at the expense of losing a bit of performance
4949
// (for instance, check if the run number in the current 'collision' is the same as run number in the first 'collision', etc.)
5050
Bool_t fInsanityCheckForEachParticle = kFALSE; // do additional insanity checks at run time for each particle, at the expense of losing a lot of performance. Use only during debugging.
51-
Bool_t fUseCCDB = kFALSE; // access personal files from CCDB (kTRUE, this is set as default in Configurables),
52-
// or from home dir in AliEn (kFALSE, use with care, as this is discouraged)
5351
Bool_t fProcess[eProcess_N] = {kFALSE}; // set what to process. See enum eProcess for full description. Set via implicit variables within a PROCESS_SWITCH clause.
5452
TString fWhichProcess = "ProcessRec"; // dump in this variable which process was used
5553
UInt_t fRandomSeed = 0; // argument for TRandom3 constructor. By default it is 0 (seed is guaranteed to be unique in time and space)
@@ -202,6 +200,16 @@ struct ParticleWeights {
202200
Bool_t fParticleWeightsAreFetched = kFALSE; // ensures that particle weights are fetched only once
203201
} pw; // "pw" labels an instance of this group of histograms
204202

203+
// *) Centrality weights:
204+
struct CentralityWeights {
205+
TList* fCentralityWeightsList = NULL; // list to hold all Q-vector objects
206+
TProfile* fCentralityWeightsFlagsPro = NULL; // profile to hold all flags for CentralityWeights
207+
Bool_t fUseCentralityWeights = false; // use centrality weights
208+
TH1D* fCentralityWeightsHist = NULL; // histograms holding centrality weights
209+
TString fFileWithCentralityWeights = ""; // path to external ROOT file which holds all centrality weights
210+
Bool_t fCentralityWeightsAreFetched = kFALSE; // ensures that centrality weights are fetched only once
211+
} cw;
212+
205213
// *) Nested loops:
206214
struct NestedLoops {
207215
TList* fNestedLoopsList = NULL; // list to hold all nested loops objects

PWGCF/MultiparticleCorrelations/Core/MuPa-Enums.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ enum eConfiguration {
2121
eVerboseForEachParticle,
2222
eDoAdditionalInsanityChecks,
2323
eInsanityCheckForEachParticle,
24-
eUseCCDB,
2524
eWhichProcess,
2625
eRandomSeed,
2726
eUseFisherYates,

0 commit comments

Comments
 (0)