Skip to content

Commit 59f1799

Browse files
rename isDataPbPb as doComparisonMcpFoldedWithFluct, fix hist name
1 parent 39cc315 commit 59f1799

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

Jets/JetSpectrum_DrawingMacro.C

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ void JetSpectrum_DrawingMacro() {
105105
// Draw_ResponseMatrices_DetectorAndFluctuationsCombined(1, iRadius, optionsAnalysis);
106106

107107
// // Draw_Pt_spectrum_unfolded_FluctResponseOnly(iDataset, iRadius, optionsAnalysis); // NOT FIXED YET - result meaningless
108-
// Draw_Pt_spectrum_raw(iDataset, iRadius, optionsAnalysis);
109-
// Draw_Pt_spectrum_raw(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
110-
// Draw_Pt_spectrum_mcp(iDataset, iRadius, optionsAnalysis);
111-
// Draw_Pt_spectrum_mcp(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
112-
// Draw_Pt_spectrum_mcdMatched(iDataset, iRadius, optionsAnalysis);
113-
// Draw_Pt_spectrum_mcdMatched(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
108+
Draw_Pt_spectrum_raw(iDataset, iRadius, optionsAnalysis);
109+
Draw_Pt_spectrum_raw(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
110+
Draw_Pt_spectrum_mcp(iDataset, iRadius, optionsAnalysis);
111+
Draw_Pt_spectrum_mcp(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
112+
Draw_Pt_spectrum_mcdMatched(iDataset, iRadius, optionsAnalysis);
113+
Draw_Pt_spectrum_mcdMatched(iDataset, iRadius, optionsAnalysis+(std::string)"noEventNormNorBinWidthScaling");
114114

115115
Draw_Pt_efficiency_jets(iRadius, optionsAnalysis);
116116
Draw_kinematicEfficiency(iRadius, optionsAnalysis);
@@ -645,7 +645,7 @@ void Draw_Pt_spectrum_unfolded_singleDataset(int iDataset, int iRadius, int unfo
645645
TH1D* H1D_jetPt_ratio_mcpFoldedUnfoldedMcp;
646646

647647
// RUN 2 settings
648-
if (isDataPbPb && comparePbPbWithRun2) {
648+
if (comparePbPbWithRun2) {
649649
H1D_jetPt_run2_HannaBossiLauraFile = (TH1D*)((TH1D*)file_O2Analysis_run2ComparisonFileHannaBossiLaura->Get("Bayesian_Unfoldediter15"))->Clone("H1D_jetPt_run2_HannaBossiLauraFile");
650650
int NcollRun2 = 4619963; // central (see Laura discussion mattermost)
651651
H1D_jetPt_run2_HannaBossiLauraFile->Scale(1./NcollRun2);
@@ -731,12 +731,12 @@ void Draw_Pt_spectrum_unfolded_singleDataset(int iDataset, int iRadius, int unfo
731731

732732
cout << "comparison with mcp truth" << endl;
733733
H1D_jetPt_unfolded_mcpComp[0] = (TH1D*)H1D_jetPt_unfolded->Clone("H1D_jetPt_unfolded_mcpComp"+partialUniqueSpecifier);
734-
H1D_jetPt_unfolded_mcpComp[1] = (TH1D*)H1D_jetPt_mcp->Clone("H1D_jetPt_unfolded_mcpComp"+partialUniqueSpecifier);
734+
H1D_jetPt_unfolded_mcpComp[1] = (TH1D*)H1D_jetPt_mcp->Clone("H1D_jetPt_mcp_mcpComp"+partialUniqueSpecifier);
735735
H1D_jetPt_ratio_mcp = (TH1D*)H1D_jetPt_mcp->Clone("H1D_jetPt_ratio_mcp"+partialUniqueSpecifier);
736736
divideSuccessMcp = H1D_jetPt_ratio_mcp->Divide(H1D_jetPt_unfolded);
737737

738738
cout << "comparison with run2" << endl;
739-
if (isDataPbPb && comparePbPbWithRun2) {
739+
if (comparePbPbWithRun2) {
740740
// comparison with run2 results rebinned using a fit (errors look way underestimated; tsallis function not great aboe 100+ GeV; where should one eval the function inside a bin? probably not just the center)
741741
H1D_jetPt_unfolded_run2Comp_fitRebin[0] = (TH1D*)H1D_jetPt_unfolded->Clone("H1D_jetPt_unfolded_run2Comp_fitRebin"+partialUniqueSpecifier);
742742
double fitPtRange[2] = {ptBinsJetsGen_run2[iRadius][0], ptBinsJetsGen_run2[iRadius][nBinPtJetsGen_run2[iRadius]]};
@@ -794,7 +794,7 @@ void Draw_Pt_spectrum_unfolded_singleDataset(int iDataset, int iRadius, int unfo
794794

795795

796796

797-
if (isDataPbPb) {
797+
if (doComparisonMcpFoldedWithFluct) {
798798
cout << "comparison mcp folded with fluctuations vs mcp" << endl;
799799
Get_Pt_spectrum_mcpFoldedWithFluctuations(H1D_jetPt_mcpFolded, iDataset, iRadius, options);
800800
H1D_jetPt_unfolded_mcpFoldedComp[0] = (TH1D*)H1D_jetPt_mcpFolded->Clone("H1D_jetPt_mcpFoldedComp_mcpFolded"+partialUniqueSpecifier);
@@ -894,7 +894,7 @@ void Draw_Pt_spectrum_unfolded_singleDataset(int iDataset, int iRadius, int unfo
894894

895895

896896
// comparison with Run 2
897-
if (isDataPbPb && comparePbPbWithRun2) {
897+
if (comparePbPbWithRun2) {
898898
TString unfoldedRun2CompLegend_fitRebin[3] = {"unfolded Run3", "unfolded Run2 ML rebinned", "unfolded Run2 ML initial"};
899899
TString* pdfName_run2Comp_fitRebin = new TString(pdfTitleBase+"_run2Comp_fitRebin");
900900
Draw_TH1_Histograms(H1D_jetPt_unfolded_run2Comp_fitRebin, unfoldedRun2CompLegend_fitRebin, 3, textContext, pdfName_run2Comp_fitRebin, texPtX, yAxisLabel, texCollisionDataInfo, drawnWindowUnfoldedMeasurement, legendPlacementAuto, contextPlacementAuto, "logy,fitSingle", TF1_jetPt_run2_MLPaperFile_fit);
@@ -920,7 +920,7 @@ void Draw_Pt_spectrum_unfolded_singleDataset(int iDataset, int iRadius, int unfo
920920
}
921921
}
922922

923-
if (isDataPbPb) {
923+
if (doComparisonMcpFoldedWithFluct) {
924924
// comparison mcp folded with fluctuations vs mcp
925925
TString unfoldedMcpFoldedCheckLegend[2] = {"mcp-folded", "mcp"};
926926
TString* pdfName_McpFoldedCheck = new TString(pdfTitleBase+"_McpFoldedVsMcp");
@@ -1142,7 +1142,7 @@ void Draw_Pt_spectrum_unfolded_datasetComparison(int iRadius, int unfoldParamete
11421142

11431143
// RUN 2 settings
11441144
TH1D* H1D_jetPt_run2_MLPaperFile = new TH1D("H1D_jetPt_run2_MLPaperFile", "H1D_jetPt_run2_MLPaperFile", nBinPtJetsGen_run2[iRadius], ptBinsJetsGen_run2[iRadius]);
1145-
if (isDataPbPb && comparePbPbWithRun2) {
1145+
if (comparePbPbWithRun2) {
11461146
TGraph* Graph_jetPt_run2_MLPaperFile;
11471147
double Ncoll;
11481148
if (centralityRange[0] == 00 && centralityRange[1] == 10) {
@@ -1229,7 +1229,7 @@ void Draw_Pt_spectrum_unfolded_datasetComparison(int iRadius, int unfoldParamete
12291229
divideSuccessMeasuredRefolded[iDataset] = H1D_jetPt_ratio_measuredRefolded[iDataset]->Divide(H1D_jetPt_measured[iDataset]);
12301230

12311231
cout << "comparison with run2" << endl;
1232-
if (isDataPbPb && comparePbPbWithRun2) {
1232+
if (comparePbPbWithRun2) {
12331233
// // comparison with run2 results rebinned using a fit (errors look way underestimated; tsallis function not great aboe 100+ GeV; where should one eval the function inside a bin? probably not just the center)
12341234
// H1D_jetPt_unfolded_run2Comp_fitRebin[0][iDataset] = (TH1D*)H1D_jetPt_unfolded[iDataset]->Clone("H1D_jetPt_unfolded_run2Comp_fitRebin"+partialUniqueSpecifier);
12351235
// double fitPtRange[2] = {ptBinsJetsGen_run2[iRadius][0], ptBinsJetsGen_run2[iRadius][nBinPtJetsGen_run2[iRadius]]};
@@ -1258,7 +1258,7 @@ void Draw_Pt_spectrum_unfolded_datasetComparison(int iRadius, int unfoldParamete
12581258
divideSuccessRun2[iDataset] = H1D_jetPt_ratio_run2[iDataset]->Divide(H1D_jetPt_unfolded_run2Comp[iDataset]);
12591259
}
12601260

1261-
// if (isDataPbPb) {
1261+
// if (doComparisonMcpFoldedWithFluct) {
12621262
// cout << "comparison mcp folded with fluctuations vs mcp" << endl;
12631263
// Get_Pt_spectrum_mcpFoldedWithFluctuations(H1D_jetPt_mcpFolded, iDataset, iRadius, options);
12641264
// H1D_jetPt_unfolded_mcpFoldedComp[0] = (TH1D*)H1D_jetPt_mcpFolded->Clone("H1D_jetPt_mcpFoldedComp_mcpFolded"+partialUniqueSpecifier);
@@ -1374,7 +1374,7 @@ void Draw_Pt_spectrum_unfolded_datasetComparison(int iRadius, int unfoldParamete
13741374
Draw_TH1_Histograms(H1D_jetPt_ratio_run2, DatasetsNames, nDatasets, textContext, pdfName_ratio_run2, texPtX, texRatioRun2Unfolded, texCollisionDataInfo, drawnWindowUnfoldedMeasurement, legendPlacementAuto, contextPlacementAuto, "zoomToOneLarge, ratioLine");
13751375
}
13761376

1377-
// if (isDataPbPb) {
1377+
// if (doComparisonMcpFoldedWithFluct) {
13781378
// // comparison mcp folded with fluctuations vs mcp
13791379
// TString unfoldedMcpFoldedCheckLegend[2] = {"mcp-folded", "mcp"};
13801380
// TString* pdfName_McpFoldedCheck = new TString(pdfTitleBase+"_McpFoldedVsMcp");

Jets/JetSpectrum_settings_template.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const bool matrixTransformationOrder = 0; // use 0
4747
char unfoldingMethod[] = "Svd"; // unfolding method options: Bayes, Svd
4848
char optionsAnalysis[100] = "";
4949

50-
const bool isDataPbPb = false; // if false -> pp
50+
const bool doComparisonMcpFoldedWithFluct = false; // if true, uses file_O2Analysis_ppSimDetectorEffect_unfoldingControl mcp distribution, folds it with the background fluctuation matrix, unfolds it with the merged det x bkg response matrix, and compares it to the mcp distribution in file_O2Analysis_ppSimDetectorEffect_unfoldingControl
51+
// 13/11/2025: check this comparison; for some reason it's not a ratio of 1 when running on pp even though the bkg fluctuation matrix is identity
5152
const bool doBkgSubtractionInData = false;
5253
const bool doBkgSubtractionInMC = false;
5354
const bool useFactorisedMatrix = false; // use factorised response matrix for unfolding, or not; if not, the fluctuations response it replaced by the identity matrix
@@ -77,7 +78,7 @@ const bool doManualErrorPropagForKineEff = false; // false is likely better, but
7778
const bool useFineBinningTest = false;
7879
bool controlMC = false; // use file_O2Analysis_ppSimDetectorEffect_unfoldingControl MC file as input to unfolding (with h_jet_pt_rhoareasubtracted distrib on file), rather than real data, and as comparison to gen (with h_jet_pt_part distrib on file); weighted control MC, and control for PbPb are not yet implemented
7980
const bool drawIntermediateResponseMatrices = false;
80-
bool comparePbPbWithRun2 = false; // if isDataPbPb == true, then do the comparison with file_O2Analysis_run2ComparisonFileHannaBossiLauraFile (Nevents for this is hardcoded to what Laura told me: see mattermost discussion)
81+
bool comparePbPbWithRun2 = false; // if doComparisonMcpFoldedWithFluct == true, then do the comparison with file_O2Analysis_run2ComparisonFileHannaBossiLauraFile (Nevents for this is hardcoded to what Laura told me: see mattermost discussion)
8182

8283
bool smoothenEfficiency = false;
8384
bool smoothenMCP = false;

0 commit comments

Comments
 (0)