Skip to content

Commit 7234f62

Browse files
committed
Fix Mega Linter
1 parent 2c3fe41 commit 7234f62

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

PWGEM/PhotonMeson/Tasks/photonhbt.cxx

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <array>
5050
#include <cmath>
5151
#include <cstdint>
52+
#include <deque>
5253
#include <map>
5354
#include <random>
5455
#include <string>
@@ -1572,23 +1573,30 @@ struct Photonhbt {
15721573
obs.deta, obs.dphi, obs.kt);
15731574
auto addToPool = [&](auto const& g) {
15741575
if (usedPhotonIdsPerCol.insert(g.globalIndex()).second) {
1575-
EMPair gtmp(g.pt(),g.eta(),g.phi(),0.f); gtmp.setConversionPointXYZ(g.vx(),g.vy(),g.vz());
1576-
emh1->AddTrackToEventPool(keyDFCollision,gtmp);
1577-
} };
1576+
EMPair gtmp(g.pt(), g.eta(), g.phi(), 0.f);
1577+
gtmp.setConversionPointXYZ(g.vx(), g.vy(), g.vz());
1578+
emh1->AddTrackToEventPool(keyDFCollision, gtmp);
1579+
}
1580+
};
15781581
addToPool(g1);
15791582
addToPool(g2);
15801583
}
1581-
if (qaflags.doSinglePhotonQa)
1582-
for (const auto& g : photons1Coll)
1584+
if (qaflags.doSinglePhotonQa) {
1585+
for (const auto& g : photons1Coll) {
15831586
if (cut1.template IsSelected<decltype(g), TSubInfos1>(g)) {
15841587
const int gid = g.globalIndex();
1585-
if (idsAfterDR.count(gid))
1588+
if (idsAfterDR.count(gid)) {
15861589
fillSinglePhotonQAStep<1>(g);
1587-
if (idsAfterRZ.count(gid))
1590+
}
1591+
if (idsAfterRZ.count(gid)) {
15881592
fillSinglePhotonQAStep<2>(g);
1589-
if (idsAfterEllipse.count(gid))
1593+
}
1594+
if (idsAfterEllipse.count(gid)) {
15901595
fillSinglePhotonQAStep<3>(g);
1596+
}
15911597
}
1598+
}
1599+
}
15921600
usedPhotonIdsPerCol.clear();
15931601
if (!mixing.cfgDoMix || ndiphoton == 0)
15941602
continue;
@@ -1788,23 +1796,30 @@ struct Photonhbt {
17881796

17891797
auto addToPool = [&](auto const& g) {
17901798
if (usedPhotonIdsPerCol.insert(g.globalIndex()).second) {
1791-
EMPair gtmp(g.pt(),g.eta(),g.phi(),0.f); gtmp.setConversionPointXYZ(g.vx(),g.vy(),g.vz());
1792-
emh1->AddTrackToEventPool(keyDFCollision,gtmp);
1793-
} };
1799+
EMPair gtmp(g.pt(), g.eta(), g.phi(), 0.f);
1800+
gtmp.setConversionPointXYZ(g.vx(), g.vy(), g.vz());
1801+
emh1->AddTrackToEventPool(keyDFCollision, gtmp);
1802+
}
1803+
};
17941804
addToPool(g1);
17951805
addToPool(g2);
17961806
}
1797-
if (qaflags.doSinglePhotonQa)
1798-
for (const auto& g : photonsColl)
1807+
if (qaflags.doSinglePhotonQa) {
1808+
for (const auto& g : photonsColl) {
17991809
if (cut.template IsSelected<decltype(g), TLegs>(g)) {
18001810
const int gid = g.globalIndex();
1801-
if (idsAfterDR.count(gid))
1811+
if (idsAfterDR.count(gid)) {
18021812
fillSinglePhotonQAStep<1>(g);
1803-
if (idsAfterRZ.count(gid))
1813+
}
1814+
if (idsAfterRZ.count(gid)) {
18041815
fillSinglePhotonQAStep<2>(g);
1805-
if (idsAfterEllipse.count(gid))
1816+
}
1817+
if (idsAfterEllipse.count(gid)) {
18061818
fillSinglePhotonQAStep<3>(g);
1819+
}
18071820
}
1821+
}
1822+
}
18081823
usedPhotonIdsPerCol.clear();
18091824
if (!mixing.cfgDoMix || ndiphoton == 0)
18101825
continue;
@@ -1966,17 +1981,20 @@ struct Photonhbt {
19661981
int posId = -1, negId = -1;
19671982
float rTrue = -1.f;
19681983
for (const auto& dId : g.daughtersIds()) {
1969-
if (dId < 0)
1984+
if (dId < 0) {
19701985
continue;
1986+
}
19711987
const auto d = emmcParticles.iteratorAt(dId);
19721988
if (d.pdgCode() == kElectron) {
19731989
posId = dId;
19741990
rTrue = std::sqrt(d.vx() * d.vx() + d.vy() * d.vy());
1975-
} else if (d.pdgCode() == kPositron)
1991+
} else if (d.pdgCode() == kPositron) {
19761992
negId = dId;
1993+
}
19771994
}
1978-
if (posId < 0 || negId < 0)
1995+
if (posId < 0 || negId < 0) {
19791996
continue;
1997+
}
19801998

19811999
const auto mcPosE = emmcParticles.iteratorAt(posId);
19822000
const auto mcNegE = emmcParticles.iteratorAt(negId);

0 commit comments

Comments
 (0)