Skip to content

Commit 2aa6faf

Browse files
committed
add function comments
1 parent 43246e1 commit 2aa6faf

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

PWGHF/D2H/Tasks/taskDplus.cxx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,15 @@ struct HfTaskDplus {
250250
/// \param candidate is a particle candidate
251251
/// \param ptbhad transverse momentum of beauty mother for nonprompt candidates
252252
/// \param flagBHad transverse momentum of beauty mother for nonprompt candidates
253-
/// \param occupancy collision occupancy
254253
/// \param centrality collision centrality
254+
/// \param occupancy collision occupancy
255255
template <bool isMc, bool isMatched, typename T1>
256256
void fillSparseML(const T1& candidate,
257257
float& ptbhad,
258258
int& flagBHad,
259259
float& centrality,
260260
float& occupancy)
261261
{
262-
LOG(info) << "info " << centrality << " " << occupancy << " " << ptbhad;
263262
std::vector<float> outputMl = {-999., -999., -999.};
264263
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
265264
outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)];
@@ -399,16 +398,15 @@ struct HfTaskDplus {
399398
/// \param particle is a particle with MC information
400399
/// \param ptGenB transverse momentum of beauty mother for nonprompt candidates
401400
/// \param flagGenB transverse momentum of beauty mother for nonprompt candidates
402-
/// \param occupancy collision occupancy
403401
/// \param centrality collision centrality
402+
/// \param occupancy collision occupancy
404403
template <typename T1>
405404
void fillSparseMCGen(const T1& particle,
406405
float& ptGenB,
407406
int& flagGenB,
408407
float& centrality,
409408
float& occupancy)
410409
{
411-
LOG(info) << "Filling sparse MC gen: " << " " << centrality << " " << occupancy;
412410
auto yGen = RecoDecay::y(particle.pVector(), o2::constants::physics::MassDPlus);
413411
if (particle.originMcGen() == RecoDecay::OriginType::Prompt) {
414412
if (storeCentrality && storeOccupancy) {
@@ -436,7 +434,7 @@ struct HfTaskDplus {
436434
// Run analysis for the reconstructed Dplus candidates from data
437435
/// \param candidates are reconstructed candidates
438436
template <bool fillMl, typename T1>
439-
void runDataAnalysis(const T1& /*candidates*/, CollisionsCent const&)
437+
void runDataAnalysis(const T1& /*candidates*/, CollisionsCent const& /*colls*/)
440438
{
441439
float cent{-1.f};
442440
float occ{-1.f};
@@ -472,9 +470,10 @@ struct HfTaskDplus {
472470
}
473471

474472
// Run analysis for the reconstructed Dplus candidates with MC matching
475-
/// \param candidates are reconstructed candidates
473+
/// \param recoCandidates are reconstructed candidates
474+
/// \param recoColls are reconstructed collisions
476475
template <bool fillMl, typename T1>
477-
void runMCRecoAnalysis(const T1& /*recoCandidates*/, McRecoCollisionsCent const&)
476+
void runMCRecoAnalysis(const T1& /*recoCandidates*/, McRecoCollisionsCent const& /*recoColls*/)
478477
{
479478
float cent{-1};
480479
float occ{-1};
@@ -539,9 +538,10 @@ struct HfTaskDplus {
539538
}
540539
}
541540

542-
// Run analysis for the reconstructed Dplus candidates with MC matching
543-
/// \param candidates are reconstructed candidates
544-
/// \param mcParticles are particles with MC information
541+
// Run analysis for the generated Dplus candidates
542+
/// \param mcGenCollisions are the generated MC collisions
543+
/// \param mcRecoCollisions are the reconstructed MC collisions
544+
/// \param mcGenParticles are the generated MC particle candidates
545545
template <bool fillMl, typename Cand>
546546
void runMCGenAnalysis(aod::McCollisions const& mcGenCollisions,
547547
McRecoCollisionsCent const& mcRecoCollisions,
@@ -585,6 +585,7 @@ struct HfTaskDplus {
585585

586586
/// Get the occupancy
587587
/// \param collision is the collision with the occupancy information
588+
/// \return collision occupancy
588589
template <typename Coll>
589590
float getOccupancy(Coll const& collision)
590591
{
@@ -605,8 +606,8 @@ struct HfTaskDplus {
605606
}
606607

607608
/// \brief Function to get MC collision occupancy
608-
/// \param collSlice collection of reconstructed collisions
609-
/// \return collision occupancy
609+
/// \param collSlice collection of reconstructed collisions associated to a generated one
610+
/// \return generated MC collision occupancy
610611
template <typename CCs>
611612
int getMcGenCollOccupancy(CCs const& collSlice)
612613
{
@@ -626,6 +627,7 @@ struct HfTaskDplus {
626627

627628
/// Get the centrality
628629
/// \param collision is the collision with the centrality information
630+
/// \return collision centrality
629631
template <typename Coll>
630632
float getCentrality(Coll const& collision)
631633
{
@@ -645,8 +647,9 @@ struct HfTaskDplus {
645647
return cent;
646648
}
647649

648-
/// Get the centrality
649-
/// \param collision is the collision with the centrality information
650+
/// \brief Function to get MC collision centrality
651+
/// \param collSlice collection of reconstructed collisions associated to a generated one
652+
/// \return generated MC collision centrality
650653
template <typename CCs>
651654
float getMcGenCollCentrality(CCs const& collSlice) {
652655
float centrality{-1};
@@ -663,6 +666,7 @@ struct HfTaskDplus {
663666

664667
/// Convert the B hadron mother PDG for non prompt candidates to a flag
665668
/// \param pdg of the b hadron mother
669+
/// \return integer map to specific mothers' PDG codes
666670
int getBHadMotherFlag(const int& flagBHad)
667671
{
668672
if (abs(flagBHad) == o2::constants::physics::kBPlus) {

0 commit comments

Comments
 (0)