Skip to content
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fc80f61
improving the analysis
JosueMtzGar May 9, 2024
25763be
Merge branch 'master' into localtestPWGUD
JosueMtzGar May 9, 2024
4cae5d6
improving the analysis
JosueMtzGar May 9, 2024
7f09d3d
new changes
JosueMtzGar Jun 9, 2024
d854bdd
new changes
JosueMtzGar Jun 9, 2024
b33a3b6
Merge remote-tracking branch 'upstream/master' into localtestPWGUD
JosueMtzGar Jul 11, 2024
4ad5488
Merge branch 'master' into localtestPWGUD
JosueMtzGar Aug 19, 2024
ecaad17
Merge branch 'master' into localtestPWGUD
JosueMtzGar Aug 22, 2024
7234a79
adding angular correlation analysis
JosueMtzGar Sep 1, 2024
2768e38
saving the last changes
JosueMtzGar Oct 8, 2024
63d8c61
Merge branch 'master' into localtestPWGUD
JosueMtzGar Nov 6, 2024
b18cd8e
Merge branch 'master' into localtestPWGUD
JosueMtzGar Nov 6, 2024
03cd5be
adding helper to pair cuts for UD tables
JosueMtzGar Nov 12, 2024
62739d2
new changes
JosueMtzGar Nov 14, 2024
907fc67
new changes, using correlation container. output object empty
JosueMtzGar Dec 9, 2024
3101f1c
Merge branch 'master' into localtestPWGUD
JosueMtzGar Dec 18, 2024
c463936
probe of correlation container tutorial
JosueMtzGar Jan 24, 2025
3e45828
Merge branch 'master' into localtestPWGUD
JosueMtzGar Jan 24, 2025
ddd1083
a little change to test
JosueMtzGar Feb 28, 2025
81251f2
recent changes on the correlation analysis, container still empty
JosueMtzGar Mar 25, 2025
d257ef9
Merge branch 'master' into localtestPWGUD
JosueMtzGar Mar 25, 2025
35e7ea8
saving updates to change to Lumi work
JosueMtzGar Apr 1, 2025
4768865
Merge branch 'master' into localtestPWGUD
JosueMtzGar Apr 2, 2025
48cd940
new changes
JosueMtzGar Apr 10, 2025
ad7514f
Merge branch 'master' into localtestPWGUD
JosueMtzGar Apr 11, 2025
0154bcf
Merge branch 'master' into localtestPWGUD
JosueMtzGar May 16, 2025
1dff562
new changes to do correlations
JosueMtzGar May 23, 2025
7114730
Merge branch 'master' into localtestPWGUD
JosueMtzGar May 23, 2025
5a137f4
formatting issues
JosueMtzGar May 23, 2025
5b6cd2a
formatting issues
JosueMtzGar May 23, 2025
0ae71ee
formatting issues
JosueMtzGar May 23, 2025
aea10e2
resolving issues
JosueMtzGar May 26, 2025
80fff5f
resolving issues
JosueMtzGar May 26, 2025
d816a8b
Merge branch 'master' into localtestPWGUD
JosueMtzGar May 26, 2025
bf33581
resolving o2 linter issues
JosueMtzGar May 29, 2025
53b9404
Merge branch 'master' into localtestPWGUD
JosueMtzGar May 29, 2025
3331e64
resolving o2 linter issues
JosueMtzGar May 29, 2025
385beee
resolving o2 linter issues
JosueMtzGar May 29, 2025
0104e93
improving correlation analysis
JosueMtzGar Jun 2, 2025
74a7be9
improving correlation analysis
JosueMtzGar Jun 2, 2025
d911fec
improving correlation analysis
JosueMtzGar Jun 2, 2025
d2b88de
Merge branch 'master' into localtestPWGUD
JosueMtzGar Jun 2, 2025
12fb16c
improving correlation analysis
JosueMtzGar Jun 3, 2025
c97f501
Merge branch 'master' into localtestPWGUD
JosueMtzGar Jun 3, 2025
38cd449
improving correlation analysis
JosueMtzGar Jun 5, 2025
9f33da0
fixing the run time
JosueMtzGar Jun 10, 2025
f416ddb
fixing the run time
JosueMtzGar Jun 10, 2025
75ab179
fixing the run time
JosueMtzGar Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -11,7 +11,7 @@
///
/// \brief
/// \author Josué Martínez García, josuem@cern.ch
/// \file upcPhotonuclearAnalysisJMG.cxx

Check failure on line 14 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

#include <vector>

Expand Down Expand Up @@ -47,9 +47,9 @@
DECLARE_SOA_COLUMN(PtSideA, ptSideA, std::vector<float>);
DECLARE_SOA_COLUMN(RapSideA, rapSideA, std::vector<float>);
DECLARE_SOA_COLUMN(PhiSideA, phiSideA, std::vector<float>);
DECLARE_SOA_COLUMN(TPCSignalSideA, tpcSignalSideA, std::vector<float>);

Check failure on line 50 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TOFSignalSideA, tofSignalSideA, std::vector<float>);

Check failure on line 51 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCNSigmaPiSideA, tpcNSigmaPiSideA, std::vector<float>);

Check failure on line 52 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TOFNSigmaPiSideA, tofNSigmaPiSideA, std::vector<float>);
DECLARE_SOA_COLUMN(TPCNSigmaKaSideA, tpcNSigmaKaSideA, std::vector<float>);
DECLARE_SOA_COLUMN(TOFNSigmaKaSideA, tofNSigmaKaSideA, std::vector<float>);
Expand Down Expand Up @@ -100,7 +100,8 @@
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

// Declare configurables on events/collisions
Configurable<int> nEvenstMixed{"nEvenstMixed", 3, {"Events to be Mixed"}};
Configurable<int> nEventsMixed{"nEventsMixed", 3, {"Events to be Mixed"}};
Configurable<int> factorEventsMixed{"factorEventsMixed", 100, {"factorEventsMixed to events mixed"}};
Configurable<float> myZVtxCut{"myZVtxCut", 10., {"My collision cut"}};
Configurable<float> myTimeZNACut{"myTimeZNACut", 2., {"My collision cut"}};
Configurable<float> myTimeZNCCut{"myTimeZNCCut", 2., {"My collision cut"}};
Expand Down Expand Up @@ -170,7 +171,7 @@
const AxisSpec axisPt{402, -0.05, 20.05};
const AxisSpec axisP{402, -10.05, 10.05};
const AxisSpec axisTPCSignal{802, -0.05, 400.05};
const AxisSpec axisPhi{64, -2 * PI, 2 * PI};

Check failure on line 174 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.
const AxisSpec axisEta{50, -1.2, 1.2};
const AxisSpec axisNch{201, -0.5, 200.5};
const AxisSpec axisZNEnergy{1002, -0.5, 500.5};
Expand All @@ -181,7 +182,7 @@
const AxisSpec axisTPCNClsCrossedRowsMin{100, -0.05, 2.05};

histos.add("yields", "multiplicity vs pT vs eta", {HistType::kTH3F, {{100, 0, 100, "multiplicity"}, {40, 0, 20, "p_{T}"}, {100, -2, 2, "#eta"}}});
histos.add("etaphi", "multiplicity vs eta vs phi", {HistType::kTH3F, {{100, 0, 100, "multiplicity"}, {100, -2, 2, "#eta"}, {200, 0, 2 * PI, "#varphi"}}});

Check failure on line 185 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

const int maxMixBin = axisMultiplicity->size() * axisVertex->size();
histos.add("eventcount", "bin", {HistType::kTH1F, {{maxMixBin + 2, -2.5, -0.5 + maxMixBin, "bin"}}});
Expand Down Expand Up @@ -275,23 +276,18 @@
mixedGapSideC.setObject(new CorrelationContainer("mixedEventGapSideC", "mixedEventGapSideC", corrAxis, effAxis, {}));
}

std::vector<double> vtxBinsEdges{VARIABLE_WIDTH, -10.0f, -5.0f, 0.0f, 5.0f, 10.0f};
std::vector<double> vtxBinsEdges{VARIABLE_WIDTH, -10.0f, -7.0f, -5.0f, -2.5f, 0.0f, 2.5f, 5.0f, 7.0f, 10.0f};
std::vector<double> gapSideBinsEdges{VARIABLE_WIDTH, -0.5, 0.5, 1.5};

SliceCache cache;
int countGapA = 0;
int countGapC = 0;

// Binning only on PosZ without multiplicity
// using BinningType = ColumnBinningPolicy<aod::collision::PosZ>;
using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::udcollision::GapSide>;
BinningType bindingOnVtx{{vtxBinsEdges, {gapSideBinsEdges}}, true};
SameKindPair<FullSGUDCollision, FullUDTracks, BinningType> pairs{bindingOnVtx, nEvenstMixed, -1, &cache};

// ColumnBinningPolicy<aod::collision::PosZ, aod::udcollision::TotalFT0AmplitudeC> bindingOnVtx{{vtxBinsEdges, multBinsEdges}, true};

// SameKindPair<soa::Join<aod::UDCollisions, aod::UDCollisionsSels, aod::SGCollisions, aod::UDZdcsReduced>,
// FullUDTracks,
// ColumnBinningPolicy<aod::collision::PosZ, aod::udcollision::TotalFT0AmplitudeC>>
// pair{bindingOnVtx, 5, -1, &cache};
BinningType bindingOnVtx{{vtxBinsEdges, gapSideBinsEdges}, true};
SameKindPair<FullSGUDCollision, FullUDTracks, BinningType> pairs{bindingOnVtx, nEventsMixed, -1, &cache};

template <typename CSG>
bool isCollisionCutSG(CSG const& collision, int SideGap)
Expand Down Expand Up @@ -412,11 +408,11 @@
continue;
}
float deltaPhi = phi(track1.px(), track1.py()) - phi(track2.px(), track2.py());
if (deltaPhi > 1.5f * PI) {

Check failure on line 411 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
deltaPhi -= TwoPI;

Check failure on line 412 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
if (deltaPhi < -PIHalf) {
deltaPhi += TwoPI;

Check failure on line 415 in PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
target->getPairHist()->Fill(CorrelationContainer::kCFStepReconstructed, eta(track1.px(), track1.py(), track1.pz()) - eta(track2.px(), track2.py(), track2.pz()), track2.pt(), track1.pt(), multiplicity, deltaPhi, posZ, 1.0);
}
Expand Down Expand Up @@ -584,7 +580,8 @@
if (fillCollisionUD(sameGapSideC, multiplicity) == false) {
return;
}
// LOGF(debug, "Filling sameGapSideC events");
histos.fill(HIST("eventcount"), -1);
// LOGF(info, "Filling sameGapSideC events");
fillCorrelationsUD(sameGapSideC, reconstructedTracks, reconstructedTracks, multiplicity, reconstructedCollision.posZ());
break;
default:
Expand All @@ -601,39 +598,57 @@
// int sgSide = reconstructedCollision.gapSide();
// int sgSide = 0;

int maxCountGapA = 0;
int maxCountGapC = 0;

if (auto histEventCount = histos.get<TH1>(HIST("eventcount"))) {
int binA = histEventCount->GetXaxis()->FindBin(-2); // Gap A
int binC = histEventCount->GetXaxis()->FindBin(-1); // Gap C

maxCountGapA = histEventCount->GetBinContent(binA) * factorEventsMixed;
maxCountGapC = histEventCount->GetBinContent(binC) * factorEventsMixed;
}

for (const auto& [collision1, tracks1, collision2, tracks2] : pairs) {
if (collision1.size() == 0 || collision2.size() == 0) {
// LOGF(debug, "One or both collisions are empty.");
// LOGF(info, "One or both collisions are empty.");
continue;
}

if (countGapA >= maxCountGapA && countGapC >= maxCountGapC) {
break;
}
float multiplicity = 0;
if (collision1.gapSide() == 0 && collision2.gapSide() == 0) { // gap on side A
if (isCollisionCutSG(collision1, 0) == false && isCollisionCutSG(collision2, 0) == false) {
continue;
}
// LOGF(debug, "In the pairs loop, gap side A");
// std::cout << "Counts for Gap A: " << countGapA << " Maximum Count for Gap A " << maxCountGapA << std::endl;
++countGapA;
// LOGF(info, "In the pairs loop, gap side A");
multiplicity = tracks1.size();
if (fillCollisionUD(mixedGapSideA, multiplicity) == false) {
return;
}
// histos.fill(HIST("eventcount"), bindingOnVtx.getBin({collision1.posZ()}));
histos.fill(HIST("eventcount"), bindingOnVtx.getBin({collision1.posZ(), collision1.gapSide()}));
fillCorrelationsUD(mixedGapSideA, tracks1, tracks2, multiplicity, collision1.posZ());
// LOGF(debug, "Filling mixedGapSideA events, Gap for side A");
// LOGF(info, "Filling mixedGapSideA events, Gap for side A");
}

if (collision1.gapSide() == 1 && collision2.gapSide() == 1) { // gap on side C
if (isCollisionCutSG(collision1, 1) == false && isCollisionCutSG(collision2, 1) == false) {
continue;
}
// LOGF(debug, "In the pairs loop, gap side C");
// std::cout << "Counts for Gap C: " << countGapC << " Maximum Count for Gap C" << maxCountGapC << std::endl;
++countGapC;
// LOGF(info, "In the pairs loop, gap side C");
multiplicity = tracks1.size();
if (fillCollisionUD(mixedGapSideC, multiplicity) == false) {
return;
}
fillCorrelationsUD(mixedGapSideC, tracks1, tracks2, multiplicity, collision1.posZ());
// LOGF(debug, "Filling mixedGapSideC events, Gap for side C");
// LOGF(info, "Filling mixedGapSideC events, Gap for side C");
} else {
continue;
}
Expand Down
Loading