diff --git a/PWGEM/PhotonMeson/TableProducer/bcWiseClusterSkimmer.cxx b/PWGEM/PhotonMeson/TableProducer/bcWiseClusterSkimmer.cxx index 2c511794b58..72eb21b1ad4 100644 --- a/PWGEM/PhotonMeson/TableProducer/bcWiseClusterSkimmer.cxx +++ b/PWGEM/PhotonMeson/TableProducer/bcWiseClusterSkimmer.cxx @@ -145,7 +145,7 @@ struct bcWiseClusterSkimmer { } /// \brief Process EMCAL clusters (either ambigous or unique) - template + template void processClusters(Clusters const& clusters, const int bcID) { for (const auto& cluster : clusters) { @@ -161,7 +161,7 @@ struct bcWiseClusterSkimmer { } } - template + template void processClusterMCInfo(Clusters const& clusters, const int bcID, aod::McParticles const& mcParticles) { for (const auto& cluster : clusters) { @@ -298,8 +298,8 @@ struct bcWiseClusterSkimmer { collisionTable(bcTable.lastIndex(), convertForStorage(collision.posZ(), kZVtx)); } - template - bool isGammaGammaDecay(TMCParticle mcParticle, TMCParticles mcParticles) + template + bool isGammaGammaDecay(TMCParticle const& mcParticle, TMCParticles const& mcParticles) { auto daughtersIds = mcParticle.daughtersIds(); if (daughtersIds.size() != 2) @@ -311,8 +311,8 @@ struct bcWiseClusterSkimmer { return true; } - template - bool isAccepted(TMCParticle mcParticle, TMCParticles mcParticles) + template + bool isAccepted(TMCParticle const& mcParticle, TMCParticles const& mcParticles) { auto daughtersIds = mcParticle.daughtersIds(); if (daughtersIds.size() != 2) diff --git a/PWGEM/PhotonMeson/Utils/EventHistograms.h b/PWGEM/PhotonMeson/Utils/EventHistograms.h index 5a00d9b6da9..5f2b6d91e6f 100644 --- a/PWGEM/PhotonMeson/Utils/EventHistograms.h +++ b/PWGEM/PhotonMeson/Utils/EventHistograms.h @@ -79,7 +79,7 @@ inline void addEventHistograms(o2::framework::HistogramRegistry* fRegistry) fRegistry->addClone("Event/before/", "Event/after/"); } -template +template void fillEventInfo(o2::framework::HistogramRegistry* fRegistry, TCollision const& collision, float weight = 1.) { const float maxZ = 10.f; diff --git a/PWGEM/PhotonMeson/Utils/HNMUtilities.h b/PWGEM/PhotonMeson/Utils/HNMUtilities.h index 9a3c7494c07..2df0680a76c 100644 --- a/PWGEM/PhotonMeson/Utils/HNMUtilities.h +++ b/PWGEM/PhotonMeson/Utils/HNMUtilities.h @@ -139,7 +139,7 @@ inline int getSMNumber(float eta, float phi) } /// \brief Store photons from EMC clusters and V0s in a vector and possibly add a eta and phi offset for alignment of EMCal clusters -template +template void storeGammasInVector(C clusters, V v0s, std::vector& vPhotons, std::array EMCEtaShift, std::array EMCPhiShift) { vPhotons.clear(); diff --git a/PWGEM/PhotonMeson/Utils/MCUtilities.h b/PWGEM/PhotonMeson/Utils/MCUtilities.h index 8164d846c02..01acca7cad3 100644 --- a/PWGEM/PhotonMeson/Utils/MCUtilities.h +++ b/PWGEM/PhotonMeson/Utils/MCUtilities.h @@ -16,6 +16,8 @@ #ifndef PWGEM_PHOTONMESON_UTILS_MCUTILITIES_H_ #define PWGEM_PHOTONMESON_UTILS_MCUTILITIES_H_ +#include + #include #include @@ -26,7 +28,7 @@ //_______________________________________________________________________ namespace o2::aod::pwgem::photonmeson::utils::mcutil { -template +template bool IsPhysicalPrimary(TTrack const& mctrack) { // This is to check mctrack is ALICE physical primary. @@ -37,7 +39,7 @@ bool IsPhysicalPrimary(TTrack const& mctrack) } } //_______________________________________________________________________ -template +template int IsFromWD(TCollision const&, T const& mctrack, TMCs const& mcTracks) { // is this particle from weak decay? @@ -69,7 +71,7 @@ int IsFromWD(TCollision const&, T const& mctrack, TMCs const& mcTracks) return -1; } //_______________________________________________________________________ -template +template int IsXFromY(T const& mctrack, TMCs const& mcTracks, const int pdgX, const int pdgY) { // is photon from pi0? returns index of mother photon @@ -91,7 +93,7 @@ int IsXFromY(T const& mctrack, TMCs const& mcTracks, const int pdgX, const int p //_______________________________________________________________________ // Go up the decay chain of a mcparticle looking for a mother with the given pdg codes, if found return this mothers daughter // E.g. Find the gamma that was created in a pi0 or eta decay -template +template int FindMotherInChain(T const& mcparticle, TMCs const& mcparticles, TTargetPDGs const& motherpdgs, const int Depth = 50) // o2-linter: disable=pdg/explicit-code (false positive) { if (!mcparticle.has_mothers() || Depth < 1) { @@ -107,7 +109,7 @@ int FindMotherInChain(T const& mcparticle, TMCs const& mcparticles, TTargetPDGs } } //_______________________________________________________________________ -template +template int IsEleFromPC(T const& mctrack, TMCs const& mcTracks) { // is election from photon conversion? returns index of mother photon @@ -130,7 +132,7 @@ int IsEleFromPC(T const& mctrack, TMCs const& mcTracks) return -1; } //_______________________________________________________________________ -template +template bool IsInAcceptanceNonDerived(TMCParticle const& mcparticle, TMCParticles const& mcparticles, TTargetPDGs target_pdgs, const float ymin, const float ymax, const float phimin, const float phimax) { // contents in vector of daughter ID is different. @@ -181,7 +183,7 @@ bool IsInAcceptanceNonDerived(TMCParticle const& mcparticle, TMCParticles const& return true; } //_______________________________________________________________________ -template +template bool IsInAcceptance(TMCParticle const& mcparticle, TMCParticles const& mcparticles, TTargetPDGs target_pdgs, const float ymin, const float ymax, const float phimin, const float phimax) { if (mcparticle.y() < ymin || ymax < mcparticle.y()) { @@ -229,7 +231,7 @@ bool IsInAcceptance(TMCParticle const& mcparticle, TMCParticles const& mcparticl return true; } //_______________________________________________________________________ -template +template bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton, const float max_r_gen, const float max_eta_gen, const float margin_z_mc, TMCParticles const& mcparticles) { if (std::abs(mcphoton.pdgCode()) != kGamma) { @@ -264,8 +266,8 @@ bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton, const float max_r_ return true; } //_______________________________________________________________________ -template -bool isGammaGammaDecay(TMCParticle mcParticle, TMCParticles mcParticles) +template +bool isGammaGammaDecay(TMCParticle const& mcParticle, TMCParticles const& mcParticles) { auto daughtersIds = mcParticle.daughtersIds(); if (daughtersIds.size() != 2) { // o2-linter: disable=magic-number (2 is not that magic in this context) diff --git a/PWGEM/PhotonMeson/Utils/NMHistograms.h b/PWGEM/PhotonMeson/Utils/NMHistograms.h index b04b8a67878..7911957bb03 100644 --- a/PWGEM/PhotonMeson/Utils/NMHistograms.h +++ b/PWGEM/PhotonMeson/Utils/NMHistograms.h @@ -76,7 +76,7 @@ inline void addNMHistograms(o2::framework::HistogramRegistry* fRegistry, bool is } } -template +template void fillTruePairInfo(o2::framework::HistogramRegistry* fRegistry, TDiphoton const& v12, TMCParitlce const& mcparticle, TMCParticles const& mcparticles, TMCCollisions const&, const TF1* f1fd_k0s_to_pi0 = nullptr, float eventWeight = 1.f) { int pdg = std::abs(mcparticle.pdgCode()); diff --git a/PWGEM/PhotonMeson/Utils/PairUtilities.h b/PWGEM/PhotonMeson/Utils/PairUtilities.h index 416d8d2e3b3..8110239c0ce 100644 --- a/PWGEM/PhotonMeson/Utils/PairUtilities.h +++ b/PWGEM/PhotonMeson/Utils/PairUtilities.h @@ -15,9 +15,10 @@ #ifndef PWGEM_PHOTONMESON_UTILS_PAIRUTILITIES_H_ #define PWGEM_PHOTONMESON_UTILS_PAIRUTILITIES_H_ -#include "Common/Core/RecoDecay.h" +#include #include +#include #include @@ -47,7 +48,7 @@ enum PairType { kNpair, }; -template +template bool IsSelectedPair(TG1 const& g1, TG2 const& g2, TCut1 const& cut1, TCut2 const& cut2) { bool is_g1_selected = false; @@ -57,7 +58,7 @@ bool IsSelectedPair(TG1 const& g1, TG2 const& g2, TCut1 const& cut1, TCut2 const return (is_g1_selected && is_g2_selected); } -template +template bool DoesV0LegMatchWithCluster(TV0Leg const& v0leg, TCluster const& cluster, const float max_deta, const float max_dphi, const float max_Ep_width) { float deta = v0leg.eta() - cluster.eta(); diff --git a/PWGEM/PhotonMeson/Utils/TrackSelection.h b/PWGEM/PhotonMeson/Utils/TrackSelection.h index 81803c9cee7..941a7ea2bc0 100644 --- a/PWGEM/PhotonMeson/Utils/TrackSelection.h +++ b/PWGEM/PhotonMeson/Utils/TrackSelection.h @@ -16,6 +16,8 @@ #ifndef PWGEM_PHOTONMESON_UTILS_TRACKSELECTION_H_ #define PWGEM_PHOTONMESON_UTILS_TRACKSELECTION_H_ +#include + #include #include @@ -30,7 +32,7 @@ namespace o2::pwgem::photonmeson * @param track track * @return true if has both */ -template +template inline bool isITSTPCTrack(TTrack const& track) { return track.hasITS() && track.hasTPC(); @@ -43,7 +45,7 @@ inline bool isITSTPCTrack(TTrack const& track) * @param track track * @return true if has both */ -template +template inline bool isTPCTRDTrack(TTrack const& track) { return !track.hasITS() && track.hasTPC() && track.hasTRD() && !track.hasTOF(); @@ -56,7 +58,7 @@ inline bool isTPCTRDTrack(TTrack const& track) * @param track track * @return true if has all */ -template +template inline bool isITSTPCTRDTrack(TTrack const& track) { return track.hasITS() && track.hasTPC() && track.hasTRD() && !track.hasTOF(); @@ -68,7 +70,7 @@ inline bool isITSTPCTRDTrack(TTrack const& track) * @param track track * @return true if has both */ -template +template inline bool isTPCTOFTrack(TTrack const& track) { return !track.hasITS() && track.hasTPC() && !track.hasTRD() && track.hasTOF(); @@ -80,7 +82,7 @@ inline bool isTPCTOFTrack(TTrack const& track) * @param track track * @return true if has all */ -template +template inline bool isTPCTRDTOFTrack(TTrack const& track) { return !track.hasITS() && track.hasTPC() && track.hasTRD() && track.hasTOF(); @@ -92,7 +94,7 @@ inline bool isTPCTRDTOFTrack(TTrack const& track) * @param track track * @return true if has all */ -template +template inline bool isITSTPCTRDTOFTrack(TTrack const& track) { return track.hasITS() && track.hasTPC() && track.hasTRD() && track.hasTOF(); @@ -105,7 +107,7 @@ inline bool isITSTPCTRDTOFTrack(TTrack const& track) * @param track track * @return true if tracks is TPC-only */ -template +template inline bool isTPConlyTrack(TTrack const& track) { return !track.hasITS() && track.hasTPC() && !track.hasTRD() && !track.hasTOF(); @@ -118,7 +120,7 @@ inline bool isTPConlyTrack(TTrack const& track) * @param track track * @return true if tracks is ITS-only */ -template +template inline bool isITSonlyTrack(TTrack const& track) { return track.hasITS() && !track.hasTPC() && !track.hasTRD() && !track.hasTOF(); @@ -132,7 +134,7 @@ inline bool isITSonlyTrack(TTrack const& track) * @param track1 track from daughter 1 * @return true if V0 pairs are ITSTPC-tracks */ -template +template inline bool isITSTPC_ITSTPC(TTrack const& track0, TTrack const& track1) { return isITSTPCTrack(track0) && isITSTPCTrack(track1); @@ -146,7 +148,7 @@ inline bool isITSTPC_ITSTPC(TTrack const& track0, TTrack const& track1) * @param track1 track from daughter 1 * @return true if one is TPC-only and the other ITSTPC */ -template +template inline bool isITSTPC_TPConly(TTrack const& track0, TTrack const& track1) { return (isITSTPCTrack(track0) && isTPConlyTrack(track1)) || (isITSTPCTrack(track1) && isTPConlyTrack(track0)); @@ -160,7 +162,7 @@ inline bool isITSTPC_TPConly(TTrack const& track0, TTrack const& track1) * @param track1 track from daughter 1 * @return true if one is ITS-only and the other ITSTPC */ -template +template inline bool isITSTPC_ITSonly(TTrack const& track0, TTrack const& track1) { return (isITSTPCTrack(track0) && isITSonlyTrack(track1)) || (isITSTPCTrack(track1) && isITSonlyTrack(track0)); @@ -174,7 +176,7 @@ inline bool isITSTPC_ITSonly(TTrack const& track0, TTrack const& track1) * @param track1 track from daughter 1 * @return true if both are TPC-only tracks */ -template +template inline bool isTPConly_TPConly(TTrack const& track0, TTrack const& track1) { return isTPConlyTrack(track0) && isTPConlyTrack(track1); @@ -188,7 +190,7 @@ inline bool isTPConly_TPConly(TTrack const& track0, TTrack const& track1) * @param track1 track from daughter 1 * @return true if both are ITS-only tracks */ -template +template inline bool isITSonly_ITSonly(TTrack const& track0, TTrack const& track1) { return isITSonlyTrack(track0) && isITSonlyTrack(track1); @@ -202,7 +204,7 @@ inline bool isITSonly_ITSonly(TTrack const& track0, TTrack const& track1) * @param track1 track from daughter 1 * @return true if either one is ITS-only while the other one is TPC-only */ -template +template inline bool isTPConly_ITSonly(TTrack const& track0, TTrack const& track1) { return (isTPConlyTrack(track0) && isITSonlyTrack(track1)) || (isTPConlyTrack(track1) && isITSonlyTrack(track0)); @@ -215,7 +217,7 @@ inline bool isTPConly_ITSonly(TTrack const& track0, TTrack const& track1) * @param mc2 MCParticle 1 * @return true if the mother particle is the expected type and the same for both */ -template +template inline bool checkMCParticles(T const& mc1, T const& mc2) { if (std::abs(mc1.pdgCode()) != kElectron || std::abs(mc2.pdgCode()) != kElectron) {