Skip to content

Commit d075ad7

Browse files
committed
changed getSpecies and moved it before process functions
1 parent 0239829 commit d075ad7

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,24 @@ struct HfTaskFlow {
692692
registry.fill(HIST("Data/TpcMft/HfHadron/SameEvent/3Prong/hSelectionStatus"), candidate.isSelLcToPiKP(), pt);
693693
}
694694

695+
// =========================
696+
// Helper functions
697+
// =========================
698+
699+
HfProngSpecies getSpecies(int pdgCode)
700+
{
701+
switch (std::abs(pdgCode)) {
702+
case PDG_t::kPiPlus: // positive or negative pion
703+
return HfProngSpecies::Pion;
704+
case PDG_t::kKPlus: // positive or negative kaon
705+
return HfProngSpecies::Kaon;
706+
case PDG_t::kProton: // proton or proton bar
707+
return HfProngSpecies::Proton;
708+
default: // NOTE. The efficiency histogram is hardcoded to contain 4 species. Anything special will have the last slot.
709+
return HfProngSpecies::NHfProngSpecies;
710+
}
711+
}
712+
695713
// =========================
696714
// Cuts with functions
697715
// =========================
@@ -1513,20 +1531,6 @@ struct HfTaskFlow {
15131531
// ===================================================================================================================================================================================================================================================================
15141532
// ===================================================================================================================================================================================================================================================================
15151533

1516-
int getSpecies(int pdgCode)
1517-
{
1518-
switch (std::abs(pdgCode)) {
1519-
case PDG_t::kPiPlus: // positive or negative pion
1520-
return Pion;
1521-
case PDG_t::kKPlus: // positive or negative kaon
1522-
return Kaon;
1523-
case PDG_t::kProton: // proton or proton bar
1524-
return Proton;
1525-
default: // NOTE. The efficiency histogram is hardcoded to contain 4 species. Anything special will have the last slot.
1526-
return NHfProngSpecies;
1527-
}
1528-
}
1529-
15301534
// NOTE SmallGroups includes soa::Filtered always -> in the smallGroups there is the equivalent of FilteredCollisionsWSelMultMcLabels
15311535
void processMcEfficiencyMft(FilteredMcCollisions::iterator const& mcCollision,
15321536
McParticles const& mcParticles,

0 commit comments

Comments
 (0)