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
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/Core/SingleTrackQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
#include "PWGEM/Dilepton/Utils/PairUtilities.h"
#include "PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h"

using namespace o2;

Check warning on line 46 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 warning on line 47 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 warning on line 48 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 warning 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::soa;

Check warning 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::aod::pwgem::dilepton::utils::emtrackutil;

Check warning 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 MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent>;
using MyCollision = MyCollisions::iterator;
Expand Down Expand Up @@ -212,7 +212,7 @@
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 warning on line 215 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check warning on line 215 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.
std::string dca_axis_title = "DCA_{e}^{3D} (#sigma)";
if (cfgDCAType == 1) {
dca_axis_title = "DCA_{e}^{XY} (#sigma)";
Expand Down Expand Up @@ -266,8 +266,8 @@
fRegistry.addClone("Track/positive/", "Track/negative/");
} 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{40, -5, -1, "#eta_{#mu}"};
const AxisSpec axis_phi{90, 0, 2 * M_PI, "#varphi_{#mu} (rad.)"};
const AxisSpec axis_eta{100, -6, -1, "#eta_{#mu}"};
const AxisSpec axis_phi{180, 0, 2 * M_PI, "#varphi_{#mu} (rad.)"};

Check warning on line 270 in PWGEM/Dilepton/Core/SingleTrackQC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Use multiples/fractions of PI defined in o2::constants::math.

Check warning on line 270 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{ConfDCABins, "DCA_{#mu}^{XY} (#sigma)"};

// track info
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/Core/SingleTrackQCMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ struct SingleTrackQCMC {
}
} 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{25, -4.5, -2.0, "#eta_{#mu}"};
const AxisSpec axis_phi{36, 0.0, 2 * M_PI, "#varphi_{#mu} (rad.)"};
const AxisSpec axis_eta{100, -6, -1, "#eta_{#mu}"};
const AxisSpec axis_phi{180, 0.0, 2 * M_PI, "#varphi_{#mu} (rad.)"};
const AxisSpec axis_dca{ConfDCABins, "DCA_{#mu}^{XY} (#sigma)"};
const AxisSpec axis_charge_gen{3, -1.5, +1.5, "true charge"};

Expand Down
17 changes: 11 additions & 6 deletions PWGEM/Dilepton/Utils/EMTrackUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,18 @@ float fwdDcaXYinSigma(T const& track)
float cXY = track.cXYatDCA();
float dcaX = track.fwdDcaX(); // in cm
float dcaY = track.fwdDcaY(); // in cm
float dcaXY = std::sqrt(dcaX * dcaX + dcaY * dcaY);
float dFdx = 2.f * dcaX / dcaXY;
float dFdy = 2.f * dcaY / dcaXY;
float sigma_dcaXY = std::sqrt(cXX * dFdx * dFdx + cYY * dFdy * dFdy + 2.f * cXY * dFdx * dFdy);
return dcaXY / sigma_dcaXY;

float det = cXX * cYY - cXY * cXY; // determinant
if (det < 0) {
return 999.f;
} else {
return std::sqrt(std::fabs((dcaX * dcaX * cYY + dcaY * dcaY * cXX - 2. * dcaX * dcaY * cXY) / det / 2.)); // dca xy in sigma
}
// float det = cXX * cYY - cXY * cXY; // determinant
// if (det < 0) {
// return 999.f;
// } else {
// return std::sqrt(std::fabs((dcaX * dcaX * cYY + dcaY * dcaY * cXX - 2. * dcaX * dcaY * cXY) / det / 2.)); // dca xy in sigma
// }
}
//_______________________________________________________________________
template <typename T>
Expand Down
Loading