Skip to content

Commit 4f62c9e

Browse files
authored
[PWGEM,PWGEM-36] PhotonMeson: photonResoTask bug fixes and full mc pa… (#14896)
1 parent c1995c6 commit 4f62c9e

File tree

7 files changed

+230
-200
lines changed

7 files changed

+230
-200
lines changed

PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ struct Pi0EtaToGammaGammaMC {
634634
photonid1 = o2::aod::pwgem::dilepton::utils::mcutil::FindCommonMotherFrom2Prongs(pos1mc, ele1mc, -11, 11, 22, mcparticles);
635635
photonid2 = o2::aod::pwgem::dilepton::utils::mcutil::FindCommonMotherFrom2Prongs(pos2mc, ele2mc, -11, 11, 22, mcparticles);
636636
} else if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kEMCEMC) {
637-
auto cluster1mcparticle = mcparticles.iteratorAt(g1.emmcparticleId());
638-
auto cluster2mcparticle = mcparticles.iteratorAt(g2.emmcparticleId());
637+
auto cluster1mcparticle = mcparticles.iteratorAt(g1.emmcparticleIds()[0]);
638+
auto cluster2mcparticle = mcparticles.iteratorAt(g2.emmcparticleIds()[0]);
639639

640640
photonid1 = o2::aod::pwgem::photonmeson::utils::mcutil::FindMotherInChain(cluster1mcparticle, mcparticles, std::vector<int>{111, 221});
641641
photonid2 = o2::aod::pwgem::photonmeson::utils::mcutil::FindMotherInChain(cluster2mcparticle, mcparticles, std::vector<int>{111, 221});

PWGEM/PhotonMeson/Core/V0PhotonCut.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -897,23 +897,20 @@ class V0PhotonCut : public TNamed
897897
}
898898

899899
template <o2::soa::is_iterator TMCPhoton>
900-
bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton) const
900+
bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton, float convRadius) const
901901
{
902-
903-
float rGenXY = std::sqrt(std::pow(mcphoton.vx(), 2) + std::pow(mcphoton.vy(), 2));
904-
905902
// eta cut
906-
if (mcphoton.eta() >= mMinV0Eta && mcphoton.eta() <= mMaxV0Eta) {
903+
if (mcphoton.eta() < mMinV0Eta || mcphoton.eta() > mMaxV0Eta) {
907904
return false;
908905
}
909906

910907
// radius cut
911-
if (rGenXY < mMinRxy || mMaxRxy < rGenXY) {
908+
if (convRadius < mMinRxy || mMaxRxy < convRadius) {
912909
return false;
913910
}
914911

915912
// line cut
916-
if (rGenXY < std::abs(mcphoton.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ) {
913+
if (convRadius <= std::abs(mcphoton.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ) {
917914
return false;
918915
}
919916

PWGEM/PhotonMeson/DataModel/gammaTables.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,25 @@ using V0LegMCLabel = V0LegMCLabels::iterator;
9898
// * EMC cluster mc label tables:
9999
// 1. EMCALMCClusters in EMCalClusters.h: Vectors of global mc particle ids and energy fractions of the cluster
100100
// 2. EMCClusterMCLabels: Vector of global mc particle ids
101-
// 3. EMEMCClusterMCLabels: EM MC particle ID of largest contributor to cluster
101+
// 3. EMEMCClusterMCLabels: Vector of EM MC particle ID of largest contributor to cluster
102102
namespace emcclustermclabel
103103
{
104-
DECLARE_SOA_ARRAY_INDEX_COLUMN(EMMCParticle, emmcparticle); //!
104+
DECLARE_SOA_ARRAY_INDEX_COLUMN(McParticle, emmcparticle) //!
105105
} // namespace emcclustermclabel
106106

107107
// NOTE: MC labels. This table has one vector of global mc particle ids for each reconstructed emc cluster (joinable with emccluster table)
108108
DECLARE_SOA_TABLE(EMCClusterMCLabels, "AOD", "EMCClsMCLABEL", //!
109-
emcclustermclabel::EMMCParticleIds);
109+
emcclustermclabel::McParticleIds);
110110
using EMCClusterMCLabel = EMCClusterMCLabels::iterator;
111111

112112
namespace ememcclustermclabel
113113
{
114-
DECLARE_SOA_INDEX_COLUMN(EMMCParticle, emmcparticle); //!
114+
DECLARE_SOA_ARRAY_INDEX_COLUMN(EMMCParticle, emmcparticle); //!
115115
} // namespace ememcclustermclabel
116116

117-
// NOTE: MC labels. This table has one entry for each reconstructed emc cluster (joinable with emccluster table)
117+
// NOTE: MC labels. This table has a vector of entries for each reconstructed emc cluster (joinable with emccluster table)
118118
DECLARE_SOA_TABLE(EMEMCClusterMCLabels, "AOD", "EMEMCClsMCLABEL", //!
119-
ememcclustermclabel::EMMCParticleId);
119+
ememcclustermclabel::EMMCParticleIds);
120120
using EMEMCClusterMCLabel = EMEMCClusterMCLabels::iterator;
121121

122122
namespace v0leg

0 commit comments

Comments
 (0)