Skip to content

Commit 8247a87

Browse files
authored
Merge pull request #25 from alibuild/alibot-cleanup-11425
Please consider the following formatting changes to AliceO2Group#11425
2 parents 341503a + be45292 commit 8247a87

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

PWGLF/Tasks/Nuspex/angularCorrelationsInJets.cxx

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ struct AngularCorrelationsInJets {
597597
{
598598
for (const auto& pair : tempBuffer) { // loop over angles we collected during same-event correlations
599599
if (static_cast<int>(buffer.size()) == trackBufferSize) {
600-
buffer.insert(buffer.begin(), pair); // insert angles at the beginning
601-
buffer.resize(trackBufferSize); // trim at the end, down to buffer size
600+
buffer.insert(buffer.begin(), pair); // insert angles at the beginning
601+
buffer.resize(trackBufferSize); // trim at the end, down to buffer size
602602
} else if (static_cast<int>(buffer.size()) < trackBufferSize) { // buffer not full yet
603603
buffer.emplace_back(pair);
604604
}
@@ -726,7 +726,7 @@ struct AngularCorrelationsInJets {
726726
}
727727
} // for (int j = i + 1; j < static_cast<int>(particleVector.size()); j++)
728728
fillMixedEventDeltas(particleVector.at(i), buffer, particleType, jetAxis); // do ME distribution of current track vs all tracks in buffer
729-
tempBuffer.emplace_back(std::make_pair(phiToAxis, etaToAxis)); // use pair to maintain phi-eta correlation
729+
tempBuffer.emplace_back(std::make_pair(phiToAxis, etaToAxis)); // use pair to maintain phi-eta correlation
730730
} // for (int i = 0; i < static_cast<int>(particleVector.size()); i++)
731731
}
732732

@@ -1052,7 +1052,7 @@ struct AngularCorrelationsInJets {
10521052
std::vector<typename U::iterator> particlesForCF; // particles for full event angular correlations
10531053
jetInput.clear();
10541054
particles.clear();
1055-
int index = 0; // index attached to input PseudoJets
1055+
int index = 0; // index attached to input PseudoJets
10561056
int jetCounter = 0; // how many actual jets in the event
10571057

10581058
for (const auto& track : tracks) {
@@ -1129,32 +1129,35 @@ struct AngularCorrelationsInJets {
11291129
// untested so far, and the method may need to be rethought, this is the best I could think of
11301130
// useBkgEstimateForUE == true tries to somewhat imitate a seeded anti-kt algorithm centred around the perp cone axis
11311131
// useBkgEstimateForUE == false simply collects all tracks geometrically, with a hard cut at R
1132-
for (const auto& track : tracks) { // try for first cone
1132+
for (const auto& track : tracks) { // try for first cone
11331133
double uePt = rhoPerp * constants::math::PI * jetR * jetR; // pt = rho_bkg * area
11341134
double trackPt = track.pt();
11351135
if (isProton(track)) {
11361136
double geometricDelta = (std::pow(track.phi() - ueAxis1.Phi(), 2) + std::pow(track.eta() - ueAxis1.Eta(), 2)) / (jetR * jetR);
1137-
double dij = useBkgEstimateForUE ? std::min(1/(trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
1137+
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
11381138
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
11391139
if (dij < diB) {
11401140
protonsUE.emplace_back(track);
1141-
if (outputQC) registryQC.fill(HIST("whichUECone"), 1); // see if track ends up in cone 1 or 2
1141+
if (outputQC)
1142+
registryQC.fill(HIST("whichUECone"), 1); // see if track ends up in cone 1 or 2
11421143
}
11431144
} else if (isAntiproton(track)) {
11441145
double geometricDelta = (std::pow(track.phi() - ueAxis1.Phi(), 2) + std::pow(track.eta() - ueAxis1.Eta(), 2)) / (jetR * jetR);
11451146
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
11461147
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
11471148
if (dij < diB) {
11481149
antiprotonsUE.emplace_back(track);
1149-
if (outputQC) registryQC.fill(HIST("whichUECone"), 1);
1150+
if (outputQC)
1151+
registryQC.fill(HIST("whichUECone"), 1);
11501152
}
11511153
} else if (isPion(track)) {
11521154
double geometricDelta = (std::pow(track.phi() - ueAxis1.Phi(), 2) + std::pow(track.eta() - ueAxis1.Eta(), 2)) / (jetR * jetR);
11531155
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
11541156
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
11551157
if (dij < diB) {
11561158
track.sign() > 0 ? piPlusUE.emplace_back(track) : piMinusUE.emplace_back(track);
1157-
if (outputQC) registryQC.fill(HIST("whichUECone"), 1);
1159+
if (outputQC)
1160+
registryQC.fill(HIST("whichUECone"), 1);
11581161
}
11591162
}
11601163
} // for (const auto& track : tracks)
@@ -1166,7 +1169,7 @@ struct AngularCorrelationsInJets {
11661169

11671170
doCorrelations(protonsUE, fBufferProtonsUE, fTempBufferProtonUE, 5, ueAxis1);
11681171
setTrackBuffer(fTempBufferProtonUE, fBufferProtonsUE);
1169-
1172+
11701173
doCorrelations(antiprotonsUE, fBufferAntiprotonsUE, fTempBufferAntiprotonUE, 6, ueAxis1);
11711174
setTrackBuffer(fTempBufferProtonUE, fBufferAntiprotonsUE);
11721175

@@ -1185,39 +1188,42 @@ struct AngularCorrelationsInJets {
11851188
fBufferPiPlusUE.clear();
11861189
fBufferPiMinusUE.clear();
11871190

1188-
for (const auto& track : tracks) { // try for second cone
1191+
for (const auto& track : tracks) { // try for second cone
11891192
double uePt = rhoPerp * constants::math::PI * jetR * jetR; // pt = rho_bkg * area
11901193
double trackPt = track.pt();
11911194
if (isProton(track)) {
11921195
double geometricDelta = (std::pow(track.phi() - ueAxis2.Phi(), 2) + std::pow(track.eta() - ueAxis2.Eta(), 2)) / (jetR * jetR);
1193-
double dij = useBkgEstimateForUE ? std::min(1/(trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
1196+
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
11941197
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
11951198
if (dij < diB) {
11961199
protonsUE.emplace_back(track);
1197-
if (outputQC) registryQC.fill(HIST("whichUECone"), 2); // see if track ends up in cone 1 or 2
1200+
if (outputQC)
1201+
registryQC.fill(HIST("whichUECone"), 2); // see if track ends up in cone 1 or 2
11981202
}
11991203
} else if (isAntiproton(track)) {
12001204
double geometricDelta = (std::pow(track.phi() - ueAxis2.Phi(), 2) + std::pow(track.eta() - ueAxis2.Eta(), 2)) / (jetR * jetR);
12011205
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
12021206
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
12031207
if (dij < diB) {
12041208
antiprotonsUE.emplace_back(track);
1205-
if (outputQC) registryQC.fill(HIST("whichUECone"), 2);
1209+
if (outputQC)
1210+
registryQC.fill(HIST("whichUECone"), 2);
12061211
}
12071212
} else if (isPion(track)) {
12081213
double geometricDelta = (std::pow(track.phi() - ueAxis2.Phi(), 2) + std::pow(track.eta() - ueAxis2.Eta(), 2)) / (jetR * jetR);
12091214
double dij = useBkgEstimateForUE ? std::min(1 / (trackPt * trackPt), 1 / (uePt * uePt)) * geometricDelta : geometricDelta;
12101215
double diB = useBkgEstimateForUE ? 1 / (uePt * uePt) : 1;
12111216
if (dij < diB) {
12121217
track.sign() > 0 ? piPlusUE.emplace_back(track) : piMinusUE.emplace_back(track);
1213-
if (outputQC) registryQC.fill(HIST("whichUECone"), 2);
1218+
if (outputQC)
1219+
registryQC.fill(HIST("whichUECone"), 2);
12141220
}
12151221
}
12161222
} // for (const auto& track : tracks)
12171223

12181224
doCorrelations(protonsUE, fBufferProtonsUE, fTempBufferProtonUE, 5, ueAxis2);
12191225
setTrackBuffer(fTempBufferProtonUE, fBufferProtonsUE);
1220-
1226+
12211227
doCorrelations(antiprotonsUE, fBufferAntiprotonsUE, fTempBufferAntiprotonUE, 6, ueAxis2);
12221228
setTrackBuffer(fTempBufferProtonUE, fBufferAntiprotonsUE);
12231229

@@ -1228,9 +1234,6 @@ struct AngularCorrelationsInJets {
12281234
setTrackBuffer(fTempBufferProtonUE, fBufferPiMinusUE);
12291235
}
12301236

1231-
1232-
1233-
12341237
// this may need to be reworked, it hasn't really been tested yet
12351238
// so far it does almost the same as fillHistograms without correlations but including MCgen tracks
12361239
template <typename U>

0 commit comments

Comments
 (0)