Skip to content

Commit

Permalink
[PWGEM-36] Creation of task for Pi0 flow
Browse files Browse the repository at this point in the history
PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx is the new task

PhotonMeson/TableProducer/skimmerGammaCalo.cxx:
	- removed `hasPropagatedTracks` config. This was only needed for really old reconstructions at the beginning of Run 3.
PhotonMeson/Core/EMCPhotonCu:
	- Added new variable `mUseTM`. This variable is true by standard and can be set to false via the setter `SetUseTM`. If it is false the TM will not be checked. Most useful for PbPb, since we don't want to match tracks to cluster there.
  • Loading branch information
mhemmer-cern committed Oct 23, 2024
1 parent e9e32ec commit 4e07b36
Show file tree
Hide file tree
Showing 5 changed files with 495 additions and 21 deletions.
5 changes: 5 additions & 0 deletions PWGEM/PhotonMeson/Core/EMCPhotonCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ void EMCPhotonCut::SetUseExoticCut(bool flag)
mUseExoticCut = flag;
LOG(info) << "EMCal Photon Cut, set usage of exotic cluster cut to: " << mUseExoticCut;
}
void EMCPhotonCut::SetUseTM(bool flag)
{
mUseTM = flag;
LOG(info) << "EM Photon Cluster Cut, using TM cut is set to : " << mUseTM;
}

void EMCPhotonCut::print() const
{
Expand Down
4 changes: 3 additions & 1 deletion PWGEM/PhotonMeson/Core/EMCPhotonCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class EMCPhotonCut : public TNamed
if (!IsSelectedEMCal(EMCPhotonCuts::kTiming, cluster)) {
return false;
}
if (!IsSelectedEMCal(EMCPhotonCuts::kTM, cluster)) {
if (mUseTM && (!IsSelectedEMCal(EMCPhotonCuts::kTM, cluster))) {
return false;
}
if (!IsSelectedEMCal(EMCPhotonCuts::kExotic, cluster)) {
Expand Down Expand Up @@ -121,6 +121,7 @@ class EMCPhotonCut : public TNamed
void SetTrackMatchingPhi(std::function<float(float)> funcTM);
void SetMinEoverP(float min = 0.7f);
void SetUseExoticCut(bool flag = true);
void SetUseTM(bool flag = true);

/// @brief Print the cluster selection
void print() const;
Expand All @@ -135,6 +136,7 @@ class EMCPhotonCut : public TNamed
float mMaxTime{25.f}; ///< maximum cluster timing
float mMinEoverP{1.75f}; ///< minimum cluster energy over track momentum ratio needed for the pair to be considered matched
bool mUseExoticCut{true}; ///< flag to decide if the exotic cluster cut is to be checked or not
bool mUseTM{true}; ///< flag to decide if track matching cut is to be checek or not

std::function<float(float)> mTrackMatchingEta{}; ///< function to get check if a pre matched track and cluster pair is considered an actual match for eta
std::function<float(float)> mTrackMatchingPhi{}; ///< function to get check if a pre matched track and cluster pair is considered an actual match for phi
Expand Down
28 changes: 8 additions & 20 deletions PWGEM/PhotonMeson/TableProducer/skimmerGammaCalo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct skimmerGammaCalo {
Configurable<float> minM02{"minM02", 0.0, "Minimum M02 for M02 cut"};
Configurable<float> maxM02{"maxM02", 1.0, "Maximum M02 for M02 cut"};
Configurable<float> minE{"minE", 0.5, "Minimum energy for energy cut"};
Configurable<bool> hasPropagatedTracks{"hasPropagatedTracks", false, "temporary flag, only set to true when running over data which has the tracks propagated to EMCal/PHOS!"};
Configurable<bool> applyEveSel_at_skimming{"applyEveSel_at_skimming", false, "flag to apply minimal event selection at the skimming level"};
Configurable<bool> inherit_from_emevent_photon{"inherit_from_emevent_photon", false, "flag to inherit task options from emevent-photon"};

Expand Down Expand Up @@ -118,25 +117,14 @@ struct skimmerGammaCalo {
vP.reserve(groupedMTs.size());
vPt.reserve(groupedMTs.size());
for (const auto& emcmatchedtrack : groupedMTs) {
if (hasPropagatedTracks) { // only temporarily while not every data has the tracks propagated to EMCal/PHOS
historeg.fill(HIST("hMTEtaPhi"), emccluster.eta() - emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal(), emccluster.phi() - emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal());
vTrackIds.emplace_back(emcmatchedtrack.trackId());
vEta.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal());
vPhi.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal());
vP.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().p());
vPt.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().pt());
tableTrackEMCReco(emcmatchedtrack.emcalclusterId(), emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal(), emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal(),
emcmatchedtrack.track_as<aod::FullTracks>().p(), emcmatchedtrack.track_as<aod::FullTracks>().pt());
} else {
historeg.fill(HIST("hMTEtaPhi"), emccluster.eta() - emcmatchedtrack.track_as<aod::FullTracks>().eta(), emccluster.phi() - emcmatchedtrack.track_as<aod::FullTracks>().phi());
vTrackIds.emplace_back(emcmatchedtrack.trackId());
vEta.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().eta());
vPhi.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().phi());
vP.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().p());
vPt.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().pt());
tableTrackEMCReco(emcmatchedtrack.emcalclusterId(), emcmatchedtrack.track_as<aod::FullTracks>().eta(), emcmatchedtrack.track_as<aod::FullTracks>().phi(),
emcmatchedtrack.track_as<aod::FullTracks>().p(), emcmatchedtrack.track_as<aod::FullTracks>().pt());
}
historeg.fill(HIST("hMTEtaPhi"), emccluster.eta() - emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal(), emccluster.phi() - emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal());
vTrackIds.emplace_back(emcmatchedtrack.trackId());
vEta.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal());
vPhi.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal());
vP.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().p());
vPt.emplace_back(emcmatchedtrack.track_as<aod::FullTracks>().pt());
tableTrackEMCReco(emcmatchedtrack.emcalclusterId(), emcmatchedtrack.track_as<aod::FullTracks>().trackEtaEmcal(), emcmatchedtrack.track_as<aod::FullTracks>().trackPhiEmcal(),
emcmatchedtrack.track_as<aod::FullTracks>().p(), emcmatchedtrack.track_as<aod::FullTracks>().pt());
}

historeg.fill(HIST("hCaloClusterEOut"), emccluster.energy());
Expand Down
4 changes: 4 additions & 0 deletions PWGEM/PhotonMeson/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ o2physics_add_dpl_workflow(check-mc-v0
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pi0-flow-emc
SOURCES taskPi0FlowEMC.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore
COMPONENT_NAME Analysis)
Loading

0 comments on commit 4e07b36

Please sign in to comment.