@@ -486,10 +486,7 @@ struct TaskPi0FlowEMC {
486486 // / \param cent is the centrality of the collision
487487 // / \param sp is the scalar product
488488 template <const int histType>
489- void fillThn (float & mass,
490- float & pt,
491- float & cent,
492- float & sp)
489+ void fillThn (const float mass, const float pt, const float cent, const float sp)
493490 {
494491 static constexpr std::string_view FlowHistTypes[3 ] = {" hSparsePi0Flow" , " hSparseBkgRotFlow" , " hSparseBkgMixFlow" };
495492 static constexpr std::string_view HistTypes[3 ] = {" hSparsePi0" , " hSparseBkgRot" , " hSparseBkgMix" };
@@ -523,7 +520,8 @@ struct TaskPi0FlowEMC {
523520
524521 // / Get all used Q vector
525522 // / \param collision is the collision with the Q vector information
526- std::vector<float > getAllQvec (CollsWithQvecs::iterator const & collision)
523+ template <typename TCollision>
524+ std::vector<float > getAllQvec (TCollision const & collision)
527525 {
528526 // Retrieve the Q vectors using the helper function for each detector
529527 auto [xQVecMain, yQVecMain] = getQvec (collision, qvecDetector);
@@ -535,7 +533,8 @@ struct TaskPi0FlowEMC {
535533
536534 // / Get the Q vector
537535 // / \param collision is the collision with the Q vector information
538- std::pair<float , float > getQvec (CollsWithQvecs::iterator const & collision, int detector)
536+ template <typename TCollision>
537+ std::pair<float , float > getQvec (TCollision const & collision, int detector)
539538 {
540539 float xQVec = -999 .f ;
541540 float yQVec = -999 .f ;
@@ -706,8 +705,8 @@ struct TaskPi0FlowEMC {
706705 }
707706
708707 // / \brief Calculate background using rotation background method
709- template <typename TPhotons>
710- void rotationBackground (const ROOT::Math::PtEtaPhiMVector& meson, ROOT::Math::PtEtaPhiMVector photon1, ROOT::Math::PtEtaPhiMVector photon2, TPhotons const & photons_coll, unsigned int ig1, unsigned int ig2, CollsWithQvecs::iterator const & collision)
708+ template <typename TPhotons, typename TCollision >
709+ void rotationBackground (const ROOT::Math::PtEtaPhiMVector& meson, ROOT::Math::PtEtaPhiMVector photon1, ROOT::Math::PtEtaPhiMVector photon2, TPhotons const & photons_coll, unsigned int ig1, unsigned int ig2, TCollision const & collision)
711710 {
712711 // if less than 3 clusters are present skip event since we need at least 3 clusters
713712 if (photons_coll.size () < NMinPhotonRotBkg) {
@@ -894,8 +893,8 @@ struct TaskPi0FlowEMC {
894893 // / Compute the scalar product
895894 // / \param collision is the collision with the Q vector information and event plane
896895 // / \param meson are the selected candidates
897- template <const int histType>
898- void runFlowAnalysis (CollsWithQvecs::iterator const & collision, ROOT::Math::PtEtaPhiMVector const & meson)
896+ template <const int histType, typename TCollision >
897+ void runFlowAnalysis (TCollision const & collision, ROOT::Math::PtEtaPhiMVector const & meson)
899898 {
900899 auto [xQVec, yQVec] = getQvec (collision, qvecDetector);
901900 float cent = getCentrality (collision);
0 commit comments