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
7 changes: 4 additions & 3 deletions PWGEM/Dilepton/Core/SingleTrackQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
#include <unordered_map>
#include <vector>

using namespace o2;

Check failure on line 49 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod;

Check failure on line 50 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 51 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework::expressions;

Check failure on line 52 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::soa;

Check failure on line 53 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod::pwgem::dilepton::utils::emtrackutil;

Check failure on line 54 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent>;
using MyCollision = MyCollisions::iterator;
Expand Down Expand Up @@ -238,8 +238,8 @@
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
const AxisSpec axis_pt{ConfPtlBins, "p_{T,e} (GeV/c)"};
const AxisSpec axis_eta{20, -1.0, +1.0, "#eta_{e}"};
const AxisSpec axis_phi{36, 0.0, 2 * M_PI, "#varphi_{e} (rad.)"};

Check failure on line 241 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
const AxisSpec axis_phiposition{36, 0.0, 2 * M_PI, "#varphi_{e}^{*} (rad.)"};

Check failure on line 242 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
const AxisSpec axis_dca3D{ConfDCA3DBins, "DCA_{e}^{3D} (#sigma)"};
const AxisSpec axis_dcaXY{ConfDCAXYBins, "DCA_{e}^{XY} (#sigma)"};
const AxisSpec axis_dcaZ{ConfDCAZBins, "DCA_{e}^{Z} (#sigma)"};
Expand Down Expand Up @@ -293,13 +293,13 @@
} else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
const AxisSpec axis_pt{ConfPtlBins, "p_{T,#mu} (GeV/c)"};
const AxisSpec axis_eta{50, -6, -1, "#eta_{#mu}"};
const AxisSpec axis_phi{36, 0, 2 * M_PI, "#varphi_{#mu} (rad.)"};

Check failure on line 296 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
const AxisSpec axis_dca{ConfDCAXYBins, "DCA_{#mu}^{XY} (#sigma)"};

// track info
fRegistry.add("Track/positive/hs", "rec. single muon", kTHnSparseD, {axis_pt, axis_eta, axis_phi, axis_dca}, true);
fRegistry.add("Track/positive/hEtaPhi_MatchMCHMID", "#eta vs. #varphi of matched MCHMID", kTH2F, {{180, 0, 2.f * M_PI}, {100, -6, -1}}, false);

Check failure on line 301 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
fRegistry.add("Track/positive/hdEtadPhi", "#Delta#eta vs. #Delta#varphi between MFT-MCH-MID and MCH-MID;#varphi_{sa} - #varphi_{gl} (rad.);#eta_{sa} - #eta_{gl}", kTH2F, {{90, -M_PI / 4, M_PI / 4}, {100, -0.5, +0.5}}, false);
fRegistry.add("Track/positive/hsDelta", "diff. between GL and associated SA;p_{T}^{gl} (GeV/c);(p_{T}^{sa} - p_{T}^{gl})/p_{T}^{gl};#Delta#eta;#Delta#varphi (rad.);", kTHnSparseF, {axis_pt, {100, -0.5, +0.5}, {100, -0.5, +0.5}, {90, -M_PI / 4, M_PI / 4}}, false);
fRegistry.add("Track/positive/hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", kTH1F, {{1000, -5, 5}}, false);
fRegistry.add("Track/positive/hTrackType", "track type", kTH1F, {{6, -0.5f, 5.5}}, false);
fRegistry.add("Track/positive/hDCAxy", "DCA x vs. y;DCA_{x} (cm);DCA_{y} (cm)", kTH2F, {{200, -0.5f, 0.5f}, {200, -0.5f, 0.5f}}, false);
Expand Down Expand Up @@ -636,14 +636,15 @@
}
float dca_xy = fwdDcaXYinSigma(track);

float reldpt = (track.ptMatchedMCHMID() - track.pt()) / track.pt();
float deta = track.etaMatchedMCHMID() - track.eta();
float dphi = track.phiMatchedMCHMID() - track.phi();
o2::math_utils::bringToPMPi(dphi);

if (track.sign() > 0) {
fRegistry.fill(HIST("Track/positive/hs"), track.pt(), track.eta(), track.phi(), dca_xy, weight);
fRegistry.fill(HIST("Track/positive/hEtaPhi_MatchMCHMID"), track.phiMatchedMCHMID(), track.etaMatchedMCHMID(), weight);
fRegistry.fill(HIST("Track/positive/hdEtadPhi"), dphi, deta, weight);
fRegistry.fill(HIST("Track/positive/hsDelta"), track.pt(), reldpt, deta, dphi, weight);
fRegistry.fill(HIST("Track/positive/hQoverPt"), track.sign() / track.pt());
fRegistry.fill(HIST("Track/positive/hTrackType"), track.trackType());
fRegistry.fill(HIST("Track/positive/hDCAxy"), track.fwdDcaX(), track.fwdDcaY());
Expand All @@ -661,7 +662,7 @@
} else {
fRegistry.fill(HIST("Track/negative/hs"), track.pt(), track.eta(), track.phi(), dca_xy, weight);
fRegistry.fill(HIST("Track/negative/hEtaPhi_MatchMCHMID"), track.phiMatchedMCHMID(), track.etaMatchedMCHMID(), weight);
fRegistry.fill(HIST("Track/negative/hdEtadPhi"), dphi, deta, weight);
fRegistry.fill(HIST("Track/negative/hsDelta"), track.pt(), reldpt, deta, dphi, weight);
fRegistry.fill(HIST("Track/negative/hQoverPt"), track.sign() / track.pt());
fRegistry.fill(HIST("Track/negative/hTrackType"), track.trackType());
fRegistry.fill(HIST("Track/negative/hDCAxy"), track.fwdDcaX(), track.fwdDcaY());
Expand Down
8 changes: 7 additions & 1 deletion PWGEM/Dilepton/TableProducer/skimmerPrimaryElectronQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ struct skimmerPrimaryElectronQC {
Configurable<float> max_frac_shared_clusters_tpc{"max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"};
Configurable<float> maxchi2tpc{"maxchi2tpc", 5.0, "max. chi2/NclsTPC"};
Configurable<float> maxchi2its{"maxchi2its", 36.0, "max. chi2/NclsITS"};
Configurable<float> minchi2its{"minchi2its", -1e+10, "min. chi2/NclsITS"};
Configurable<float> minpt{"minpt", 0.05, "min pt for ITS-TPC track"};
Configurable<float> maxeta{"maxeta", 0.9, "eta acceptance"};
Configurable<float> dca_xy_max{"dca_xy_max", 1.0, "max DCAxy in cm"};
Configurable<float> dca_z_max{"dca_z_max", 1.0, "max DCAz in cm"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to include ITSsa tracks"};
Configurable<float> minTPCNsigmaEl{"minTPCNsigmaEl", -3.5, "min. TPC n sigma for electron inclusion"};
Configurable<float> maxTPCNsigmaEl{"maxTPCNsigmaEl", +3.5, "max. TPC n sigma for electron inclusion"};
} trackcut;
Expand Down Expand Up @@ -293,7 +295,7 @@ struct skimmerPrimaryElectronQC {
return false;
}

if (trackcut.maxchi2its < track.itsChi2NCl()) { // accept ITS afterburner (itsChi2NCl = -999)
if (track.itsChi2NCl() < trackcut.minchi2its || trackcut.maxchi2its < track.itsChi2NCl()) { // accept ITS afterburner (itsChi2NCl = -999)
return false;
}
if (track.itsNCls() < trackcut.min_ncluster_its) {
Expand All @@ -303,6 +305,10 @@ struct skimmerPrimaryElectronQC {
return false;
}

if (!trackcut.includeITSsa && (!track.hasITS() || !track.hasTPC())) {
return false;
}

if (track.hasTPC()) {
if (track.tpcChi2NCl() < 0.f || trackcut.maxchi2tpc < track.tpcChi2NCl()) {
return false;
Expand Down
6 changes: 4 additions & 2 deletions PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,11 @@ struct skimmerPrimaryMuon {

if (refitGlobalMuon) {
eta = mfttrack.eta();
phi = mfttrack.phi();
o2::math_utils::bringTo02Pi(phi);
// phi = mfttrack.phi();
// o2::math_utils::bringTo02Pi(phi);
pt = propmuonAtPV_Matched.getP() * std::sin(2.f * std::atan(std::exp(-eta)));
phi = propmuonAtDCA.getPhi();
o2::math_utils::bringTo02Pi(phi);

// x = mfttrack.x();
// y = mfttrack.y();
Expand Down
6 changes: 4 additions & 2 deletions PWGEM/Dilepton/Tasks/createResolutionMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,11 @@ struct CreateResolutionMap {
}
if (muoncuts.refitGlobalMuon) {
eta = mfttrack.eta();
phi = mfttrack.phi();
o2::math_utils::bringTo02Pi(phi);
// phi = mfttrack.phi();
// o2::math_utils::bringTo02Pi(phi);
pt = propmuonAtPV_Matched.getP() * std::sin(2.f * std::atan(std::exp(-eta)));
phi = propmuonAtDCA.getPhi();
o2::math_utils::bringTo02Pi(phi);
}

float dpt = (ptMatchedMCHMID - pt) / pt;
Expand Down
Loading