Skip to content

Commit 1ace137

Browse files
authored
[PWGEM] PhotonMeson: Add new task to monitor photon resolution (#14877)
1 parent 6319319 commit 1ace137

File tree

5 files changed

+634
-0
lines changed

5 files changed

+634
-0
lines changed

PWGEM/PhotonMeson/Core/V0PhotonCut.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,30 @@ class V0PhotonCut : public TNamed
896896
mEmMlResponse->init();
897897
}
898898

899+
template <o2::soa::is_iterator TMCPhoton>
900+
bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton) const
901+
{
902+
903+
float rGenXY = std::sqrt(std::pow(mcphoton.vx(), 2) + std::pow(mcphoton.vy(), 2));
904+
905+
// eta cut
906+
if (mcphoton.eta() >= mMinV0Eta && mcphoton.eta() <= mMaxV0Eta) {
907+
return false;
908+
}
909+
910+
// radius cut
911+
if (rGenXY < mMinRxy || mMaxRxy < rGenXY) {
912+
return false;
913+
}
914+
915+
// line cut
916+
if (rGenXY < std::abs(mcphoton.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ) {
917+
return false;
918+
}
919+
920+
return true;
921+
}
922+
899923
// Setters
900924
void SetV0PtRange(float minPt = 0.f, float maxPt = 1e10f);
901925
void SetV0EtaRange(float minEta = -1e10f, float maxEta = 1e10f);

PWGEM/PhotonMeson/TableProducer/associateMCinfoPhoton.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ struct AssociateMCInfoPhoton {
356356
}
357357
auto mcCollisionFromEMC = collisionFromEMC.mcCollision();
358358

359+
// TODO: check that this does not cause issues, since we have sometimes clusters that are only noise!
359360
auto mcphoton = mcParticles.iteratorAt(emccluster.emmcparticleIds()[0]);
360361

361362
// if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack

PWGEM/PhotonMeson/Tasks/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,8 @@ o2physics_add_dpl_workflow(test-task-emc
196196
SOURCES testTaskEmc.cxx
197197
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::EMCALBase O2::EMCALCalib O2Physics::PWGEMPhotonMesonCore
198198
COMPONENT_NAME Analysis)
199+
200+
o2physics_add_dpl_workflow(photon-reso-task
201+
SOURCES photonResoTask.cxx
202+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::EMCALBase O2::EMCALCalib O2Physics::PWGEMPhotonMesonCore
203+
COMPONENT_NAME Analysis)

0 commit comments

Comments
 (0)