Skip to content

Commit 9b65c42

Browse files
authored
Merge pull request #32 from alibuild/alibot-cleanup-14880
Please consider the following formatting changes to #14880
2 parents 6fde3b0 + 7409f10 commit 9b65c42

File tree

1 file changed

+44
-57
lines changed

1 file changed

+44
-57
lines changed

PWGLF/Tasks/Resonances/chk892pp.cxx

Lines changed: 44 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct Chk892pp {
191191

192192
/// PID Selections, pion
193193
struct : ConfigurableGroup {
194-
Configurable<bool> cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool
194+
Configurable<bool> cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool
195195
Configurable<float> cfgMaxTPCnSigmaPion{"cfgMaxTPCnSigmaPion", 5.0, "TPC nSigma cut for Pion"}; // TPC
196196
Configurable<float> cfgMaxTOFnSigmaPion{"cfgMaxTOFnSigmaPion", 5.0, "TOF nSigma cut for Pion"}; // TOF
197197
Configurable<float> cfgNsigmaCutCombinedPion{"cfgNsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined
@@ -546,8 +546,8 @@ struct Chk892pp {
546546
if (std::abs(track.dcaXY()) > TrackCuts.cfgMaxbDCArToPVcut)
547547
return false;
548548
}
549-
if (TrackCuts.cfgpTdepDCAzCut) {
550-
// Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution
549+
if (TrackCuts.cfgpTdepDCAzCut) {
550+
// Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution
551551
if (std::abs(track.dcaZ()) > (0.004 + (0.013 / track.pt())))
552552
return false;
553553
} else {
@@ -914,7 +914,6 @@ struct Chk892pp {
914914
return true;
915915
} // matchRecoToTruthKstar
916916

917-
918917
void effKstarProcessGen(MCTrueTrackCandidates const& mcparts)
919918
{
920919
for (const auto& part : mcparts) {
@@ -925,44 +924,37 @@ struct Chk892pp {
925924
if (std::abs(part.y()) > KstarCuts.cfgKstarMaxRap)
926925
continue;
927926

927+
const int pionWanted = (part.pdgCode() > 0) ? +kPiPlus : -kPiPlus;
928+
bool hasRightPion = false;
929+
bool hasK0sToPipi = false;
930+
931+
for (const auto& d1 : part.template daughters_as<MCTrueTrackCandidates>()) {
932+
const int pdg1 = d1.pdgCode();
933+
if (pdg1 == pionWanted) {
934+
hasRightPion = true;
935+
} else if (std::abs(pdg1) == kPDGK0) {
936+
for (const auto& d2 : d1.template daughters_as<MCTrueTrackCandidates>()) {
937+
if (std::abs(d2.pdgCode()) == kPDGK0s) {
938+
bool seenPip = false, seenPim = false;
939+
for (const auto& d3 : d2.template daughters_as<MCTrueTrackCandidates>()) {
940+
if (d3.pdgCode() == +kPiPlus)
941+
seenPip = true;
942+
else if (d3.pdgCode() == -kPiPlus)
943+
seenPim = true;
944+
}
945+
if (seenPip && seenPim) {
946+
hasK0sToPipi = true;
947+
break;
948+
}
949+
}
950+
}
951+
}
952+
if (hasRightPion && hasK0sToPipi)
953+
break;
954+
}
928955

929-
const int pionWanted = (part.pdgCode() > 0) ? +kPiPlus : -kPiPlus;
930-
bool hasRightPion = false;
931-
bool hasK0sToPipi = false;
932-
933-
for (const auto& d1 : part.template daughters_as<MCTrueTrackCandidates>()) {
934-
const int pdg1 = d1.pdgCode();
935-
if (pdg1 == pionWanted)
936-
{
937-
hasRightPion = true;
938-
} else if (std::abs(pdg1) == kPDGK0)
939-
{
940-
for (const auto& d2 : d1.template daughters_as<MCTrueTrackCandidates>())
941-
{
942-
if (std::abs(d2.pdgCode()) == kPDGK0s)
943-
{
944-
bool seenPip = false, seenPim = false;
945-
for (const auto& d3 : d2.template daughters_as<MCTrueTrackCandidates>())
946-
{
947-
if (d3.pdgCode() == +kPiPlus)
948-
seenPip = true;
949-
else if (d3.pdgCode() == -kPiPlus)
950-
seenPim = true;
951-
}
952-
if (seenPip && seenPim)
953-
{
954-
hasK0sToPipi = true;
955-
break;
956-
}
957-
}
958-
}
959-
}
960-
if (hasRightPion && hasK0sToPipi) break;
961-
}
962-
963-
if (!(hasRightPion && hasK0sToPipi))
964-
continue;
965-
956+
if (!(hasRightPion && hasK0sToPipi))
957+
continue;
966958

967959
const auto mcid = part.mcCollisionId();
968960
if (allowedMcIds.count(mcid) == 0)
@@ -973,15 +965,14 @@ struct Chk892pp {
973965
continue;
974966

975967
const float lCentrality = iter->second;
976-
968+
977969
histos.fill(HIST("EffKstar/genKstar"), part.pt(), lCentrality);
978970

979-
if (part.vt() == 0)
980-
{
981-
histos.fill(HIST("EffKstar/genKstar_pri"), part.pt(), lCentrality);
982-
}
971+
if (part.vt() == 0) {
972+
histos.fill(HIST("EffKstar/genKstar_pri"), part.pt(), lCentrality);
973+
}
983974
}
984-
} //effKstarProcessGen
975+
} // effKstarProcessGen
985976

986977
template <typename V0RangeT, typename TrkRangeT>
987978
void effKstarProcessReco(V0RangeT const& v0s, TrkRangeT const& tracks)
@@ -1068,11 +1059,9 @@ struct Chk892pp {
10681059
const float lCentrality = iter->second;
10691060

10701061
histos.fill(HIST("Correction/sigLoss_num"), part.pt(), lCentrality);
1071-
if (part.vt() == 0)
1072-
{
1073-
histos.fill(HIST("Correction/sigLoss_num_pri"), part.pt(), lCentrality);
1074-
}
1075-
1062+
if (part.vt() == 0) {
1063+
histos.fill(HIST("Correction/sigLoss_num_pri"), part.pt(), lCentrality);
1064+
}
10761065
}
10771066
} // fillSigLossNum
10781067

@@ -1097,11 +1086,9 @@ struct Chk892pp {
10971086
const float lCentrality = iter->second;
10981087

10991088
histos.fill(HIST("Correction/sigLoss_den"), part.pt(), lCentrality);
1100-
if (part.vt() == 0)
1101-
{
1102-
histos.fill(HIST("Correction/sigLoss_den_pri"), part.pt(), lCentrality);
1103-
}
1104-
1089+
if (part.vt() == 0) {
1090+
histos.fill(HIST("Correction/sigLoss_den_pri"), part.pt(), lCentrality);
1091+
}
11051092
}
11061093
} // fillSigLossDen
11071094

0 commit comments

Comments
 (0)