Skip to content
Closed
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
30 changes: 9 additions & 21 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
#include "PWGEM/Dilepton/Utils/PairUtilities.h"
#include "PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h"

using namespace o2;

Check warning on line 62 in PWGEM/Dilepton/Core/Dilepton.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 63 in PWGEM/Dilepton/Core/Dilepton.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 64 in PWGEM/Dilepton/Core/Dilepton.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 65 in PWGEM/Dilepton/Core/Dilepton.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 66 in PWGEM/Dilepton/Core/Dilepton.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;

Check warning on line 67 in PWGEM/Dilepton/Core/Dilepton.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 68 in PWGEM/Dilepton/Core/Dilepton.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::pairutil;

Check warning on line 69 in PWGEM/Dilepton/Core/Dilepton.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, aod::EMEventsQvec>;
using MyCollision = MyCollisions::iterator;
Expand All @@ -84,7 +84,7 @@
using FilteredMyMuons = soa::Filtered<MyMuons>;
using FilteredMyMuon = FilteredMyMuons::iterator;

using MyEMH_electron = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, EMTrackWithCov>;
using MyEMH_electron = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, EMTrack>;
using MyEMH_muon = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, EMFwdTrack>;

template <o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType pairtype, typename TEMH, typename... Types>
Expand Down Expand Up @@ -112,7 +112,7 @@
Configurable<uint64_t> ndiff_bc_mix{"ndiff_bc_mix", 5, "difference in global BC required in mixed events"};
ConfigurableAxis ConfVtxBins{"ConfVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"};
ConfigurableAxis ConfCentBins{"ConfCentBins", {VARIABLE_WIDTH, 0.0f, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.f, 999.f}, "Mixing bins - centrality"};
ConfigurableAxis ConfEPBins{"ConfEPBins", {16, -M_PI / 2, +M_PI / 2}, "Mixing bins - event plane angle"};

Check warning on line 115 in PWGEM/Dilepton/Core/Dilepton.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.
ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"};
Configurable<std::string> cfg_swt_name{"cfg_swt_name", "fHighTrackMult", "desired software trigger name"}; // 1 trigger name per 1 task. fHighTrackMult, fHighFt0Mult
// Configurable<int> cfgNtracksPV08Min{"cfgNtracksPV08Min", -1, "min. multNTracksPV"};
Expand Down Expand Up @@ -537,7 +537,7 @@

if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kQC)) {
fRegistry.add("Pair/same/uls/hs", "dilepton", kTHnSparseD, {axis_mass, axis_pt, axis_dca}, true);
fRegistry.add("Pair/same/uls/hDeltaEtaDeltaPhi", "#Delta#eta-#Delta#varphi between 2 tracks;#Delta#varphi (rad.);#Delta#eta;", kTH2D, {{180, -M_PI, M_PI}, {400, -2, +2}}, true);

Check warning on line 540 in PWGEM/Dilepton/Core/Dilepton.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.
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
fRegistry.add("Pair/same/uls/hMvsPhiV", "m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{90, 0, M_PI}, {100, 0.0f, 1.0f}}, true); // phiv is only for dielectron
fRegistry.add("Pair/same/uls/hMvsOpAng", "m_{ee} vs. angle between 2 tracks;#omega (rad.);m_{ee} (GeV/c^{2})", kTH2D, {{90, 0, M_PI}, {100, 0.0f, 1.0f}}, true);
Expand Down Expand Up @@ -1038,27 +1038,19 @@
used_trackIds.emplace_back(pair_tmp_id1);
if (cfgDoMix) {
if (t1.sign() > 0) {
emh_pos->AddTrackToEventPool(key_df_collision, EMTrackWithCov(ndf, t1.globalIndex(), collision.globalIndex(), t1.trackId(), t1.pt(), t1.eta(), t1.phi(), leptonM1, t1.sign(), t1.dcaXY(), t1.dcaZ(), possibleIds1,
t1.x(), t1.y(), t1.z(), t1.alpha(), t1.snp(), t1.tgl(), t1.cYY(), t1.cZY(), t1.cZZ(),
t1.cSnpY(), t1.cSnpZ(), t1.cSnpSnp(), t1.cTglY(), t1.cTglZ(), t1.cTglSnp(), t1.cTglTgl(), t1.c1PtY(), t1.c1PtZ(), t1.c1PtSnp(), t1.c1PtTgl(), t1.c1Pt21Pt2()));
emh_pos->AddTrackToEventPool(key_df_collision, EMTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.trackId(), t1.pt(), t1.eta(), t1.phi(), leptonM1, t1.sign(), t1.dcaXY(), t1.dcaZ(), t1.cYY(), t1.cZY(), t1.cZZ(), possibleIds1));
} else {
emh_neg->AddTrackToEventPool(key_df_collision, EMTrackWithCov(ndf, t1.globalIndex(), collision.globalIndex(), t1.trackId(), t1.pt(), t1.eta(), t1.phi(), leptonM1, t1.sign(), t1.dcaXY(), t1.dcaZ(), possibleIds1,
t1.x(), t1.y(), t1.z(), t1.alpha(), t1.snp(), t1.tgl(), t1.cYY(), t1.cZY(), t1.cZZ(),
t1.cSnpY(), t1.cSnpZ(), t1.cSnpSnp(), t1.cTglY(), t1.cTglZ(), t1.cTglSnp(), t1.cTglTgl(), t1.c1PtY(), t1.c1PtZ(), t1.c1PtSnp(), t1.c1PtTgl(), t1.c1Pt21Pt2()));
emh_neg->AddTrackToEventPool(key_df_collision, EMTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.trackId(), t1.pt(), t1.eta(), t1.phi(), leptonM1, t1.sign(), t1.dcaXY(), t1.dcaZ(), t1.cYY(), t1.cZY(), t1.cZZ(), possibleIds1));
}
}
}
if (std::find(used_trackIds.begin(), used_trackIds.end(), pair_tmp_id2) == used_trackIds.end()) {
used_trackIds.emplace_back(pair_tmp_id2);
if (cfgDoMix) {
if (t2.sign() > 0) {
emh_pos->AddTrackToEventPool(key_df_collision, EMTrackWithCov(ndf, t2.globalIndex(), collision.globalIndex(), t2.trackId(), t2.pt(), t2.eta(), t2.phi(), leptonM2, t2.sign(), t2.dcaXY(), t2.dcaZ(), possibleIds2,
t2.x(), t2.y(), t2.z(), t2.alpha(), t2.snp(), t2.tgl(), t2.cYY(), t2.cZY(), t2.cZZ(),
t2.cSnpY(), t2.cSnpZ(), t2.cSnpSnp(), t2.cTglY(), t2.cTglZ(), t2.cTglSnp(), t2.cTglTgl(), t2.c1PtY(), t2.c1PtZ(), t2.c1PtSnp(), t2.c1PtTgl(), t2.c1Pt21Pt2()));
emh_pos->AddTrackToEventPool(key_df_collision, EMTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.trackId(), t2.pt(), t2.eta(), t2.phi(), leptonM2, t2.sign(), t2.dcaXY(), t2.dcaZ(), t2.cYY(), t2.cZY(), t2.cZZ(), possibleIds2));
} else {
emh_neg->AddTrackToEventPool(key_df_collision, EMTrackWithCov(ndf, t2.globalIndex(), collision.globalIndex(), t2.trackId(), t2.pt(), t2.eta(), t2.phi(), leptonM2, t2.sign(), t2.dcaXY(), t2.dcaZ(), possibleIds2,
t2.x(), t2.y(), t2.z(), t2.alpha(), t2.snp(), t2.tgl(), t2.cYY(), t2.cZY(), t2.cZZ(),
t2.cSnpY(), t2.cSnpZ(), t2.cSnpSnp(), t2.cTglY(), t2.cTglZ(), t2.cTglSnp(), t2.cTglTgl(), t2.c1PtY(), t2.c1PtZ(), t2.c1PtSnp(), t2.c1PtTgl(), t2.c1Pt21Pt2()));
emh_neg->AddTrackToEventPool(key_df_collision, EMTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.trackId(), t2.pt(), t2.eta(), t2.phi(), leptonM2, t2.sign(), t2.dcaXY(), t2.dcaZ(), t2.cYY(), t2.cZY(), t2.cZZ(), possibleIds2));
}
}
}
Expand All @@ -1070,23 +1062,19 @@
used_trackIds.emplace_back(pair_tmp_id1);
if (cfgDoMix) {
if (t1.sign() > 0) {
emh_pos->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.fwdtrackId(), t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassMuon, t1.sign(), t1.fwdDcaX(), t1.fwdDcaY(), possibleIds1,
t1.cXXatDCA(), t1.cXYatDCA(), t1.cYYatDCA()));
emh_pos->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.fwdtrackId(), t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassMuon, t1.sign(), t1.fwdDcaX(), t1.fwdDcaY(), t1.cXXatDCA(), t1.cXYatDCA(), t1.cYYatDCA(), possibleIds1));
} else {
emh_neg->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.fwdtrackId(), t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassMuon, t1.sign(), t1.fwdDcaX(), t1.fwdDcaY(), possibleIds1,
t1.cXXatDCA(), t1.cXYatDCA(), t1.cYYatDCA()));
emh_neg->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t1.globalIndex(), collision.globalIndex(), t1.fwdtrackId(), t1.pt(), t1.eta(), t1.phi(), o2::constants::physics::MassMuon, t1.sign(), t1.fwdDcaX(), t1.fwdDcaY(), t1.cXXatDCA(), t1.cXYatDCA(), t1.cYYatDCA(), possibleIds1));
}
}
}
if (std::find(used_trackIds.begin(), used_trackIds.end(), pair_tmp_id2) == used_trackIds.end()) {
used_trackIds.emplace_back(pair_tmp_id2);
if (cfgDoMix) {
if (t2.sign() > 0) {
emh_pos->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.fwdtrackId(), t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassMuon, t2.sign(), t2.fwdDcaX(), t2.fwdDcaY(), possibleIds2,
t2.cXXatDCA(), t2.cXYatDCA(), t2.cYYatDCA()));
emh_pos->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.fwdtrackId(), t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassMuon, t2.sign(), t2.fwdDcaX(), t2.fwdDcaY(), t2.cXXatDCA(), t2.cXYatDCA(), t2.cYYatDCA(), possibleIds2));
} else {
emh_neg->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.fwdtrackId(), t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassMuon, t2.sign(), t2.fwdDcaX(), t2.fwdDcaY(), possibleIds2,
t2.cXXatDCA(), t2.cXYatDCA(), t2.cYYatDCA()));
emh_neg->AddTrackToEventPool(key_df_collision, EMFwdTrack(ndf, t2.globalIndex(), collision.globalIndex(), t2.fwdtrackId(), t2.pt(), t2.eta(), t2.phi(), o2::constants::physics::MassMuon, t2.sign(), t2.fwdDcaX(), t2.fwdDcaY(), t2.cXXatDCA(), t2.cXYatDCA(), t2.cYYatDCA(), possibleIds2));
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions PWGEM/Dilepton/Utils/EMFwdTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace o2::aod::pwgem::dilepton::utils
class EMFwdTrack
{
public:
EMFwdTrack(int dfId, int globalId, int collisionId, int trackId, float pt, float eta, float phi, float mass, int8_t charge, float dcaX, float dcaY, std::vector<int> amb_muon_self_ids, float cXX, float cXY, float cYY)
EMFwdTrack(int dfId, int globalId, int collisionId, int trackId, float pt, float eta, float phi, float mass, int8_t charge, float dcaX, float dcaY, float cXX, float cXY, float cYY, std::vector<int> amb_muon_self_ids)
{
fDFId = dfId;
fGlobalId = globalId;
Expand Down Expand Up @@ -90,12 +90,12 @@ class EMFwdTrack
int8_t fCharge;
float fDCAx;
float fDCAy;
float fPairDCAXYinSigmaOTF;
bool fIsAmbiguous;
std::vector<int> fAmbMuonSelfIds;
float fCXX;
float fCXY;
float fCYY;
float fPairDCAXYinSigmaOTF;
bool fIsAmbiguous;
std::vector<int> fAmbMuonSelfIds;
};

} // namespace o2::aod::pwgem::dilepton::utils
Expand Down
96 changes: 11 additions & 85 deletions PWGEM/Dilepton/Utils/EMTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace o2::aod::pwgem::dilepton::utils
class EMTrack
{
public:
EMTrack(int dfId, int globalId, int collisionId, int trackId, float pt, float eta, float phi, float mass, int8_t charge = 0, float dcaXY = 0.f, float dcaZ = 0.f, std::vector<int> amb_ele_self_ids = {})
EMTrack(int dfId, int globalId, int collisionId, int trackId, float pt, float eta, float phi, float mass, int8_t charge = 0, float dcaXY = 0.f, float dcaZ = 0.f, float cYY = 0.f, float cZY = 0.f, float cZZ = 0.f, std::vector<int> amb_ele_self_ids = {})
{
fDFId = dfId;
fGlobalId = globalId;
Expand All @@ -36,6 +36,10 @@ class EMTrack
fCharge = charge;
fDCAxy = dcaXY;
fDCAz = dcaZ;
fCYY = cYY;
fCZY = cZY;
fCZZ = cZZ;

fPairDCA3DinSigmaOTF = 0;

fAmbEleSelfIds = amb_ele_self_ids;
Expand Down Expand Up @@ -78,6 +82,9 @@ class EMTrack
int8_t sign() const { return fCharge; }
float dcaXY() const { return fDCAxy; }
float dcaZ() const { return fDCAz; }
float cYY() const { return fCYY; }
float cZY() const { return fCZY; }
float cZZ() const { return fCZZ; }
float p() const { return fPt * std::cosh(fEta); }
float px() const { return fPt * std::cos(fPhi); }
float py() const { return fPt * std::sin(fPhi); }
Expand Down Expand Up @@ -142,6 +149,9 @@ class EMTrack
int8_t fCharge;
float fDCAxy;
float fDCAz;
float fCYY;
float fCZY;
float fCZZ;
float fPairDCA3DinSigmaOTF;
bool fIsAmbiguous;
std::vector<int> fAmbEleSelfIds;
Expand All @@ -159,89 +169,5 @@ class EMTrack
float fVz;
};

class EMTrackWithCov : public EMTrack
{
public:
EMTrackWithCov(int dfId, int globalId, int collisionId, int trackId, float pt, float eta, float phi, float mass, int8_t charge = 0, float dcaXY = 0.f, float dcaZ = 0.f, std::vector<int> amb_ele_self_ids = {},
float X = 0.f, float Y = 0.f, float Z = 0.f, float Alpha = 0.f, float Snp = 0.f, float Tgl = 0.f,
float CYY = 0.f, float CZY = 0.f, float CZZ = 0.f,
float CSnpY = 0.f, float CSnpZ = 0.f, float CSnpSnp = 0.f,
float CTglY = 0.f, float CTglZ = 0.f, float CTglSnp = 0.f, float CTglTgl = 0.f,
float C1PtY = 0.f, float C1PtZ = 0.f, float C1PtSnp = 0.f, float C1PtTgl = 0.f, float C1Pt21Pt2 = 0.f) : EMTrack(dfId, globalId, collisionId, trackId, pt, eta, phi, mass, charge, dcaXY, dcaZ, amb_ele_self_ids)
{
fX = X;
fY = Y;
fZ = Z;
fAlpha = Alpha;
fSnp = Snp;
fTgl = Tgl;
fCYY = CYY;
fCZY = CZY;
fCZZ = CZZ;
fCSnpY = CSnpY;
fCSnpZ = CSnpZ;
fCSnpSnp = CSnpSnp;
fCTglY = CTglY;
fCTglZ = CTglZ;
fCTglSnp = CTglSnp;
fCTglTgl = CTglTgl;
fC1PtY = C1PtY;
fC1PtZ = C1PtZ;
fC1PtSnp = C1PtSnp;
fC1PtTgl = C1PtTgl;
fC1Pt21Pt2 = C1Pt21Pt2;
}

float x() const { return fX; }
float y() const { return fY; }
float z() const { return fZ; }
float alpha() const { return fAlpha; }
float snp() const { return fSnp; }
float tgl() const { return fTgl; }

float cYY() const { return fCYY; }
float cZY() const { return fCZY; }
float cZZ() const { return fCZZ; }
float cSnpY() const { return fCSnpY; }
float cSnpZ() const { return fCSnpZ; }
float cSnpSnp() const { return fCSnpSnp; }
float cTglY() const { return fCTglY; }
float cTglZ() const { return fCTglZ; }
float cTglSnp() const { return fCTglSnp; }
float cTglTgl() const { return fCTglTgl; }
float c1PtY() const { return fC1PtY; }
float c1PtZ() const { return fC1PtZ; }
float c1PtSnp() const { return fC1PtSnp; }
float c1PtTgl() const { return fC1PtTgl; }
float c1Pt21Pt2() const { return fC1Pt21Pt2; }

void setCYY(float cYY) { fCYY = cYY; }
void setCZY(float cZY) { fCZY = cZY; }
void setCZZ(float cZZ) { fCZZ = cZZ; }

protected:
float fX;
float fY;
float fZ;
float fAlpha;
float fSnp;
float fTgl;
float fCYY;
float fCZY;
float fCZZ;
float fCSnpY;
float fCSnpZ;
float fCSnpSnp;
float fCTglY;
float fCTglZ;
float fCTglSnp;
float fCTglTgl;
float fC1PtY;
float fC1PtZ;
float fC1PtSnp;
float fC1PtTgl;
float fC1Pt21Pt2;
};

} // namespace o2::aod::pwgem::dilepton::utils
#endif // PWGEM_DILEPTON_UTILS_EMTRACK_H_
Loading