Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions PWGEM/PhotonMeson/Core/V0PhotonCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,30 @@ class V0PhotonCut : public TNamed
mEmMlResponse->init();
}

template <o2::soa::is_iterator TMCPhoton>
bool IsConversionPointInAcceptance(TMCPhoton const& mcphoton) const
{

float rGenXY = std::sqrt(std::pow(mcphoton.vx(), 2) + std::pow(mcphoton.vy(), 2));

// eta cut
if (mcphoton.eta() >= mMinV0Eta && mcphoton.eta() <= mMaxV0Eta) {
return false;
}

// radius cut
if (rGenXY < mMinRxy || mMaxRxy < rGenXY) {
return false;
}

// line cut
if (rGenXY < std::abs(mcphoton.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ) {
return false;
}

return true;
}

// Setters
void SetV0PtRange(float minPt = 0.f, float maxPt = 1e10f);
void SetV0EtaRange(float minEta = -1e10f, float maxEta = 1e10f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ struct AssociateMCInfoPhoton {
}
auto mcCollisionFromEMC = collisionFromEMC.mcCollision();

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

// if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack
Expand Down
5 changes: 5 additions & 0 deletions PWGEM/PhotonMeson/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,8 @@ o2physics_add_dpl_workflow(test-task-emc
SOURCES testTaskEmc.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::EMCALBase O2::EMCALCalib O2Physics::PWGEMPhotonMesonCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(photon-reso-task
SOURCES photonResoTask.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::EMCALBase O2::EMCALCalib O2Physics::PWGEMPhotonMesonCore
COMPONENT_NAME Analysis)
Loading
Loading