Skip to content

Commit

Permalink
[PWGCF] added support for IR and current run duration (AliceO2Group#8710
Browse files Browse the repository at this point in the history
)
  • Loading branch information
abilandz authored Nov 29, 2024
1 parent e6ed01b commit ceff0a9
Show file tree
Hide file tree
Showing 6 changed files with 756 additions and 308 deletions.
44 changes: 30 additions & 14 deletions PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// *) Task configuration:
struct : ConfigurableGroup {
// std::string prefix = "Task configuration"; // AA: now these configurables also appear grouped on hyperloop => TBI 20240522 check if this work, and if further modifications in init are needed
Configurable<string> cfTaskIsConfiguredFromJson{"cfTaskIsConfiguredFromJson", "no", "always set manaully to \"yes\" via JSON, merely to ensure that settings are not ignored silently"};
Configurable<string> cfTaskName{"cfTaskName", "Default task name", "set task name - use eventually to determine weights for this task"};
Configurable<bool> cfDryRun{"cfDryRun", false, "book all histos and run without storing and calculating anything"};
Configurable<bool> cfVerbose{"cfVerbose", false, "run or not in verbose mode (but not for simple utility functions or function calls per particle)"};
Expand All @@ -44,20 +45,20 @@ struct : ConfigurableGroup {
Configurable<bool> cfCheckUnderflowAndOverflow{"cfCheckUnderflowAndOverflow", false, "check and bail out if in event and particle histograms there are entries which went to underflow or overflow bins (use only locally)"};
Configurable<int> cfRebin{"cfRebin", 1, "number of bins of selected heavy 2D histograms are devided with this number"};
Configurable<bool> cfFillQAEventHistograms2D{"cfFillQAEventHistograms2D", false, "if false, all QA 2D event histograms are not filled. if true, only the ones for which fBookQAEventHistograms2D[...] is true, are filled"};
Configurable<vector<string>> cfBookQAEventHistograms2D{"cfBookQAEventHistograms2D", {"Multiplicity_vs_ReferenceMultiplicity-1", "Multiplicity_vs_NContributors-1", "Multiplicity_vs_Centrality-1", "Multiplicity_vs_Vertex_z-1", "Multiplicity_vs_Occupancy-1", "ReferenceMultiplicity_vs_NContributors-1", "ReferenceMultiplicity_vs_Centrality-1", "ReferenceMultiplicity_vs_Vertex_z-1", "ReferenceMultiplicity_vs_Occupancy-1", "NContributors_vs_Centrality-1", "NContributors_vs_Vertex_z-1", "NContributors_vs_Occupancy-1", "Centrality_vs_Vertex_z-1", "Centrality_vs_Occupancy-1", "Vertex_z_vs_Occupancy-1", "CentFT0C_vs_CentNTPV-0", "CentFT0M_vs_CentNTPV-0", "CentRun2V0M_vs_CentRun2SPDTracklets-0", "TrackOccupancyInTimeRange_vs_FT0COccupancyInTimeRange-1"}, "book (1) or do not book (0) this QA 2D event histogram"};
Configurable<vector<string>> cfBookQAEventHistograms2D{"cfBookQAEventHistograms2D", {"Multiplicity_vs_ReferenceMultiplicity-1", "Multiplicity_vs_NContributors-1", "Multiplicity_vs_Centrality-1", "Multiplicity_vs_Vertex_z-1", "Multiplicity_vs_Occupancy-1", "ReferenceMultiplicity_vs_NContributors-1", "ReferenceMultiplicity_vs_Centrality-1", "ReferenceMultiplicity_vs_Vertex_z-1", "ReferenceMultiplicity_vs_Occupancy-1", "NContributors_vs_Centrality-1", "NContributors_vs_Vertex_z-1", "NContributors_vs_Occupancy-1", "Centrality_vs_Vertex_z-1", "Centrality_vs_Occupancy-1", "Vertex_z_vs_Occupancy-1", "CentFT0C_vs_CentNTPV-0", "CentFT0M_vs_CentNTPV-0", "CentRun2V0M_vs_CentRun2SPDTracklets-0", "TrackOccupancyInTimeRange_vs_FT0COccupancyInTimeRange-1", "CurrentRunDuration_vs_InteractionRate-1"}, "book (1) or do not book (0) this QA 2D event histogram"};
Configurable<bool> cfFillQAParticleHistograms2D{"cfFillQAParticleHistograms2D", false, "if false, all QA 2D particle histograms are not filled. if true, only the ones for which fBookQAParticleHistograms2D[...] is true, are filled"};
Configurable<vector<string>> cfBookQAParticleHistograms2D{"cfBookQAParticleHistograms2D", {"Pt_vs_dcaXY-1"}, "book (1) or do not book (0) this QA 2D particle histogram"};
} cf_qa;

// *) Event histograms:
struct : ConfigurableGroup {
Configurable<bool> cfFillEventHistograms{"cfFillEventHistograms", true, "if false, all event histograms are not filled. if true, only the ones for which fBookEventHistograms[...] is true, are filled"};
Configurable<vector<string>> cfBookEventHistograms{"cfBookEventHistograms", {"NumberOfEvents-1", "TotalMultiplicity-1", "Multiplicity-1", "ReferenceMultiplicity-1", "Centrality-1", "Vertex_x-1", "Vertex_y-1", "Vertex_z-1", "NContributors-1", "ImpactParameter-1", "Occupancy-1", "MultMCNParticlesEta08-1"}, "Book (1) or do not book (0) event histogram"};
Configurable<vector<string>> cfBookEventHistograms{"cfBookEventHistograms", {"NumberOfEvents-1", "TotalMultiplicity-1", "Multiplicity-1", "ReferenceMultiplicity-1", "Centrality-1", "Vertex_x-1", "Vertex_y-1", "Vertex_z-1", "NContributors-1", "ImpactParameter-1", "Occupancy-1", "InteractionRate-1", "CurrentRunDuration-1", "MultMCNParticlesEta08-0"}, "Book (1) or do not book (0) event histogram"};
} cf_eh;

// *) Event cuts:
struct : ConfigurableGroup {
Configurable<vector<string>> cfUseEventCuts{"cfUseEventCuts", {"NumberOfEvents-1", "TotalMultiplicity-1", "Multiplicity-1", "ReferenceMultiplicity-1", "Centrality-1", "Vertex_x-1", "Vertex_y-1", "Vertex_z-1", "NContributors-1", "ImpactParameter-1", "Occupancy-1", "MultMCNParticlesEta08-1", "Trigger-0", "Sel7-1", "Sel8-1", "MultiplicityEstimator-1", "ReferenceMultiplicityEstimator-1", "CentralityEstimator-1", "SelectedEvents-1", "NoSameBunchPileup-1", "IsGoodZvtxFT0vsPV-1", "IsVertexITSTPC-1", "IsVertexTOFmatched-1", "IsVertexTRDmatched-1", "OccupancyEstimator-1"}, "use (1) or do not use (0) event cuts"};
Configurable<vector<string>> cfUseEventCuts{"cfUseEventCuts", {"NumberOfEvents-1", "TotalMultiplicity-1", "Multiplicity-1", "ReferenceMultiplicity-1", "Centrality-1", "Vertex_x-1", "Vertex_y-1", "Vertex_z-1", "NContributors-1", "ImpactParameter-1", "Occupancy-1", "InteractionRate-1", "CurrentRunDuration-1", "MultMCNParticlesEta08-0", "Trigger-0", "Sel7-0", "Sel8-1", "MultiplicityEstimator-1", "ReferenceMultiplicityEstimator-1", "CentralityEstimator-1", "SelectedEvents-1", "NoSameBunchPileup-1", "IsGoodZvtxFT0vsPV-1", "IsVertexITSTPC-1", "IsVertexTOFmatched-1", "IsVertexTRDmatched-1", "OccupancyEstimator-1"}, "use (1) or do not use (0) event cuts"};
Configurable<bool> cfUseEventCutCounterAbsolute{"cfUseEventCutCounterAbsolute", false, "profile and save how many times each event cut counter triggered (absolute). Use with care, as this is computationally heavy"};
Configurable<bool> cfUseEventCutCounterSequential{"cfUseEventCutCounterSequential", false, "profile and save how many times each event cut counter triggered (sequential). Use with care, as this is computationally heavy"};
Configurable<bool> cfPrintCutCounterContent{"cfPrintCutCounterContent", false, "if true, prints on the screen after each event the content of fEventCutCounterHist[*][*] (all which were booked)"};
Expand All @@ -73,27 +74,32 @@ struct : ConfigurableGroup {
Configurable<vector<int>> cfNContributors{"cfNContributors", {2, 1000000000}, "Number of vertex contributors: {min, max}, with convention: min <= N < max"};
Configurable<vector<float>> cfImpactParameter{"cfImpactParameter", {-1, 1000000000}, "Impact parameter range (can be used only for sim): {min, max}, with convention: min <= IP < max"};
Configurable<vector<float>> cfOccupancy{"cfOccupancy", {-2, 1000000000}, "Range for occupancy (use cfOccupancyEstimator to set specific estimator): {min, max}, with convention: min <= X < max"};
Configurable<vector<float>> cfInteractionRate{"cfInteractionRate", {-2, 1000000000}, "Range for interaction rate: {min, max}, with convention: min <= X < max"};
Configurable<vector<float>> cfCurrentRunDuration{"cfCurrentRunDuration", {-2, 1000000000}, "Range for current run duration (i.e. seconds since start of run) in seconds: {min, max}, with convention: min <= X < max. Only collisions taken in this range (measured from SOR) are taken for analysis"};
Configurable<vector<float>> cfMultMCNParticlesEta08{"cfMultMCNParticlesEta08", {-1, 1000000000}, "Range for MultMCNParticlesEta08 : {min, max}, with convention: min <= X < max"};
Configurable<string> cfTrigger{"cfTrigger", "some supported trigger (e.g. kINT7, ...)", "set here some supported trigger"};
Configurable<bool> cfUseSel7{"cfUseSel7", false, "use for Run 1 and 2 data and MC (see official doc)"};
Configurable<bool> cfUseSel8{"cfUseSel8", false, "use for Run 3 data and MC (see official doc)"};
Configurable<string> cfMultiplicityEstimator{"cfMultiplicityEstimator", "SelectedTracks", "all results vs. mult are calculated against this multiplicity. Can be set to SelectedTracks (calculated internally), ReferenceMultiplicity (calculated outside of my code), etc."};
Configurable<string> cfReferenceMultiplicityEstimator{"cfReferenceMultiplicityEstimator", "some supported option for ref. mult. (MultTPC, MultFV0M, etc.)", "Reference multiplicity, calculated outside of my code. Can be MultTPC, MultFV0M, etc."};
Configurable<string> cfCentralityEstimator{"cfCentralityEstimator", "some supported centrality estimator (e.g. CentFT0C, ...)", "set here some supported centrality estimator (CentFT0C, CentFT0M, CentFV0A, CentNTPV, ... for Run 3, and CentRun2V0M, CentRun2SPDTracklets, ..., for Run 2 and 1) "};
// Configurable<string> cfReferenceMultiplicityEstimator{"cfReferenceMultiplicityEstimator", "some supported option for ref. mult. (MultFT0C, MultFV0M, MultTPC, etc.)", "Reference multiplicity, calculated outside of my code. Can be MultFT0C, MultFV0M, MultTPC, etc."};
Configurable<string> cfReferenceMultiplicityEstimator{"cfReferenceMultiplicityEstimator", "MultFT0C", "Reference multiplicity, calculated outside of my code. Can be MultFT0C, MultFV0M, MultTPC, etc."};
// Configurable<string> cfCentralityEstimator{"cfCentralityEstimator", "some supported centrality estimator (e.g. CentFT0C, ...)", "set here some supported centrality estimator (CentFT0C, CentFT0M, CentFV0A, CentNTPV, ... for Run 3, and CentRun2V0M, CentRun2SPDTracklets, ..., for Run 2 and 1) "};
Configurable<string> cfCentralityEstimator{"cfCentralityEstimator", "CentFT0C", "set here some supported centrality estimator (CentFT0C, CentFT0M, CentFV0A, CentNTPV, ... for Run 3, and CentRun2V0M, CentRun2SPDTracklets, ..., for Run 2 and 1) "};
Configurable<vector<int>> cfSelectedEvents{"cfSelectedEvents", {-1, 1000000000}, "Selected number of events to process (i.e. only events which survive event cuts): {min, max}, with convention: min <= N < max"};
Configurable<bool> cfUseNoSameBunchPileup{"cfUseNoSameBunchPileup", false, "TBI 20240521 explanation"};
Configurable<bool> cfUseIsGoodZvtxFT0vsPV{"cfUseIsGoodZvtxFT0vsPV", false, "TBI 20240521 explanation"};
Configurable<bool> cfUseIsVertexITSTPC{"cfUseIsVertexITSTPC", false, "TBI 20240521 explanation"};
Configurable<bool> cfUseIsVertexTOFmatched{"cfUseIsVertexTOFmatched", false, "TBI 20240521 explanation"};
Configurable<bool> cfUseIsVertexTRDmatched{"cfUseIsVertexTRDmatched", false, "TBI 20240521 explanation"};
Configurable<string> cfOccupancyEstimator{"cfOccupancyEstimator", "some supported occupancy estimator (e.g. TrackOccupancyInTimeRange, FT0COccupancyInTimeRange, ...)", "set here some supported occupancy estimator (TrackOccupancyInTimeRange, FT0COccupancyInTimeRange, ..."};
// Configurable<string> cfOccupancyEstimator{"cfOccupancyEstimator", "some supported occupancy estimator (e.g. TrackOccupancyInTimeRange, FT0COccupancyInTimeRange, ...)", "set here some supported occupancy estimator (TrackOccupancyInTimeRange, FT0COccupancyInTimeRange, ..."};
Configurable<string> cfOccupancyEstimator{"cfOccupancyEstimator", "FT0COccupancyInTimeRange", "set here some supported occupancy estimator (TrackOccupancyInTimeRange, FT0COccupancyInTimeRange, ..."};
} cf_ec;

// *) Particle histograms:
struct : ConfigurableGroup {
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"};
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"};
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"};
Configurable<bool> cfFillParticleHistograms{"cfFillParticleHistograms", false, "if false, all 1D particle histograms are not filled. if kTRUE, the ones for which fBookParticleHistograms[...] is kTRUE, are filled"};
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-0"}, "Book (1) or do not book (0) particle histogram"};
Configurable<bool> cfFillParticleHistograms2D{"cfFillParticleHistograms2D", false, "if false, all 2D particle histograms are not filled. if kTRUE, the ones for which fBookParticleHistograms2D[...] is kTRUE, are filled"};
Configurable<vector<string>> cfBookParticleHistograms2D{"cfBookParticleHistograms2D", {"Phi_vs_Pt-1", "Phi_vs_Eta-1"}, "Book (1) or do not book (0) 2D particle histograms"};
} cf_ph;

Expand Down Expand Up @@ -142,6 +148,8 @@ struct : ConfigurableGroup {
Configurable<bool> cfCalculateCorrelationsAsFunctionOfPt{"cfCalculateCorrelationsAsFunctionOfPt", false, "calculate or not correlations as a function of pt"};
Configurable<bool> cfCalculateCorrelationsAsFunctionOfEta{"cfCalculateCorrelationsAsFunctionOfEta", false, "calculate or not correlations as a function of eta"};
Configurable<bool> cfCalculateCorrelationsAsFunctionOfOccupancy{"cfCalculateCorrelationsAsFunctionOfOccupancy", false, "calculate or not correlations as a function of occupancy"};
Configurable<bool> cfCalculateCorrelationsAsFunctionOfInteractionRate{"cfCalculateCorrelationsAsFunctionOfInteractionRate", false, "calculate or not correlations as a function of interaction rate"};
Configurable<bool> cfCalculateCorrelationsAsFunctionOfCurrentRunDuration{"cfCalculateCorrelationsAsFunctionOfCurrentRunDuration", false, "calculate or not correlations as a function of current run duration (i.e. vs. seconds since start of run)"};
} cf_mupa;

// *) Test0:
Expand All @@ -153,6 +161,8 @@ struct : ConfigurableGroup {
Configurable<bool> cfCalculateTest0AsFunctionOfPt{"cfCalculateTest0AsFunctionOfPt", false, "calculate or not Test0 as a function of pt"};
Configurable<bool> cfCalculateTest0AsFunctionOfEta{"cfCalculateTest0AsFunctionOfEta", false, "calculate or not Test0 as a function of eta"};
Configurable<bool> cfCalculateTest0AsFunctionOfOccupancy{"cfCalculateTest0AsFunctionOfOccupancy", false, "calculate or not Test0 as a function of occupancy"};
Configurable<bool> cfCalculateTest0AsFunctionOfInteractionRate{"cfCalculateTest0AsFunctionOfInteractionRate", false, "calculate or not Test0 as a function of interaction rate"};
Configurable<bool> cfCalculateTest0AsFunctionOfCurrentRunDuration{"cfCalculateTest0AsFunctionOfCurrentRunDuration", false, "calculate or not Test0 as a function of current run duration (i.e. vs. seconds since start of run)"};
Configurable<string> cfFileWithLabels{"cfFileWithLabels", "/home/abilandz/DatasetsO2/labels.root", "path to external ROOT file which specifies all labels"}; // for AliEn file prepend "/alice/cern.ch/", for CCDB prepend "/alice-ccdb.cern.ch"
Configurable<bool> cfUseDefaultLabels{"cfUseDefaultLabels", false, "use default internally hardwired labels, only for testing purposes"};
} cf_t0;
Expand Down Expand Up @@ -206,11 +216,13 @@ struct : ConfigurableGroup {
Configurable<bool> cfSaveResultsHistograms{"cfSaveResultsHistograms", false, "save or not results histograms"};

// Fixed-length binning (default):
Configurable<vector<float>> cfFixedLength_mult_bins{"cfFixedLength_mult_bins", {2000, 0., 20000.}, "nMultBins, multMin, multMax"};
Configurable<vector<float>> cfFixedLength_cent_bins{"cfFixedLength_cent_bins", {110, 0., 110.}, "nCentBins, centMin, centMax"};
Configurable<vector<float>> cfFixedLength_pt_bins{"cfFixedLength_pt_bins", {1000, 0., 100.}, "nPtBins, ptMin, ptMax"};
Configurable<vector<float>> cfFixedLength_eta_bins{"cfFixedLength_eta_bins", {100, -2., 2.}, "nEtaBins, etaMin, etaMax"};
Configurable<vector<float>> cfFixedLength_occu_bins{"cfFixedLength_occu_bins", {400, 0., 4000.}, "nOccuBins, occuMin, occuMax"};
Configurable<vector<float>> cfFixedLength_mult_bins{"cfFixedLength_mult_bins", {2000, 0., 20000.}, "nMultBins, multMin, multMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_cent_bins{"cfFixedLength_cent_bins", {110, 0., 110.}, "nCentBins, centMin, centMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_pt_bins{"cfFixedLength_pt_bins", {1000, 0., 100.}, "nPtBins, ptMin, ptMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_eta_bins{"cfFixedLength_eta_bins", {100, -2., 2.}, "nEtaBins, etaMin, etaMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_occu_bins{"cfFixedLength_occu_bins", {601, -100., 60000.}, "nOccuBins, occuMin, occuMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_ir_bins{"cfFixedLength_ir_bins", {210000, -10., 200.}, "nirBins, irMin, irMax (only for results histograms)"};
Configurable<vector<float>> cfFixedLength_crd_bins{"cfFixedLength_crd_bins", {86401, -1., 86400.}, "nrdBins, rdMin, rdMax (only for results histograms)"};

// Variable-length binning (per request):
Configurable<bool> cfUseVariableLength_mult_bins{"cfUseVariableLength_mult_bins", false, "use or not variable-length multiplicity bins"};
Expand All @@ -223,6 +235,10 @@ struct : ConfigurableGroup {
Configurable<vector<float>> cfVariableLength_eta_bins{"cfVariableLength_eta_bins", {-0.8, 0.0, 0.3, 0.8}, "variable-length eta bins"};
Configurable<bool> cfUseVariableLength_occu_bins{"cfUseVariableLength_occu_bins", false, "use or not variable-length occupancy bins"};
Configurable<vector<float>> cfVariableLength_occu_bins{"cfVariableLength_occu_bins", {0., 5., 6., 7., 8., 9., 100., 200., 500., 1000., 10000.}, "variable-length occupancy bins"};
Configurable<bool> cfUseVariableLength_ir_bins{"cfUseVariableLength_ir_bins", false, "use or not variable-length interaction rate bins"};
Configurable<vector<float>> cfVariableLength_ir_bins{"cfVariableLength_ir_bins", {0., 5., 10., 50., 100., 200.}, "variable-length ineraction rate bins"};
Configurable<bool> cfUseVariableLength_crd_bins{"cfUseVariableLength_crd_bins", false, "use or not variable-length current run duration bins"};
Configurable<vector<float>> cfVariableLength_crd_bins{"cfVariableLength_crd_bins", {0., 5., 10., 50., 100., 500.}, "variable-length current run duration bins"};

} cf_res;

Expand Down
Loading

0 comments on commit ceff0a9

Please sign in to comment.