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
80 changes: 51 additions & 29 deletions PWGEM/Dilepton/Tasks/dileptonPolarization.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -60,7 +60,7 @@

struct DileptonPolarization {
// Configurables
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 63 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
// Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
// Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
// Configurable<bool> skipGRPOquery{"skipGRPOquery", true, "skip grpo query"};
Expand All @@ -70,13 +70,15 @@
Configurable<int> cfgOccupancyEstimator{"cfgOccupancyEstimator", 0, "FT0C:0, Track:1"};
Configurable<bool> cfgDoMix{"cfgDoMix", true, "flag for event mixing"};
Configurable<int> ndepth{"ndepth", 10000, "depth for event mixing"};
Configurable<uint64_t> ndiff_bc_mix{"ndiff_bc_mix", 594, "difference in global BC required in mixed events"};

Check failure on line 73 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
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"};

Check failure on line 74 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis ConfCentBins{"ConfCentBins", {VARIABLE_WIDTH, 0.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"};

Check failure on line 75 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
ConfigurableAxis ConfEPBins{"ConfEPBins", {1, -M_PI / 2, +M_PI / 2}, "Mixing bins - event plane angle"};
ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"};
Configurable<int> cfgPolarizationFrame{"cfgPolarizationFrame", 0, "frame of polarization. 0:CS, 1:HX, else:FATAL"};
Configurable<bool> cfgUseAbs{"cfgUseAbs", false, "flag to use absolute value for cos_theta and phi"}; // this is to increase statistics per bin.
Configurable<bool> cfgDoULS{"cfgDoULS", true, "flag to perform ULS pairing"};
Configurable<bool> cfgDoLS{"cfgDoLS", true, "flag to perform LS pairing"};

ConfigurableAxis ConfMllBins{"ConfMllBins", {VARIABLE_WIDTH, 0.00, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.50, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.60, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.70, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.90, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.00, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.75, 2.80, 2.85, 2.90, 2.95, 3.00, 3.05, 3.10, 3.15, 3.20, 3.25, 3.30, 3.35, 3.40, 3.45, 3.50, 3.55, 3.60, 3.65, 3.70, 3.75, 3.80, 3.85, 3.90, 3.95, 4.00, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.00, 8.10, 8.20, 8.30, 8.40, 8.50, 8.60, 8.70, 8.80, 8.90, 9.00, 9.10, 9.20, 9.30, 9.40, 9.50, 9.60, 9.70, 9.80, 9.90, 10.00, 10.10, 10.20, 10.30, 10.40, 10.50, 10.60, 10.70, 10.80, 10.90, 11.00, 11.1, 11.2, 11.3, 11.4, 11.50, 11.6, 11.7, 11.8, 11.9, 12.0}, "mll bins for output histograms"};
ConfigurableAxis ConfPtllBins{"ConfPtllBins", {VARIABLE_WIDTH, 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pTll bins for output histograms"};
Expand Down Expand Up @@ -124,10 +126,10 @@

struct : ConfigurableGroup {
std::string prefix = "accBins";
Configurable<float> cfgDM{"cfgDM", 0.1, "dm for lorentz boost"};
Configurable<float> cfgDPt{"cfgDPt", 0.1, "dpT for lorentz boost"};
Configurable<float> cfgDEta{"cfgDEta", 0.1, "deta for lorentz boost"};
Configurable<float> cfgDPhi{"cfgDPhi", 0.1, "dphi (rad.) for lorentz boost"};
Configurable<float> cfgRelDM{"cfgRelDM", 0.01, "rel. dm for lorentz boost"};
Configurable<float> cfgRelDPx{"cfgRelDPx", 0.01, "rel. dpx for lorentz boost"};
Configurable<float> cfgRelDPy{"cfgRelDPy", 0.01, "rel. dpy for lorentz boost"};
Configurable<float> cfgRelDPz{"cfgRelDPz", 0.01, "rel. dpz for lorentz boost"};
} accBins;

Service<o2::ccdb::BasicCCDBManager> ccdb;
Expand Down Expand Up @@ -374,11 +376,15 @@
const AxisSpec axis_phi{ConfPolarizationPhiBins, Form("#varphi^{%s} (rad.)", frameName.data())};
const AxisSpec axis_quadmom{ConfPolarizationQuadMomBins, Form("#frac{3 cos^{2}(#theta^{%s}) -1}{2}", frameName.data())};
fRegistry.add("Pair/same/uls/hs", "dilepton", kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_y, axis_cos_theta, axis_phi, axis_quadmom}, true);
fRegistry.add("Pair/same/uls/hEta", "#eta_{ll}", kTH1D, {{2000, -10, 10}}, true);

fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
fRegistry.addClone("Pair/same/", "Pair/mix/");
fRegistry.add("Pair/same/uls/hEta", "#eta_{ll}", kTH1D, {{2000, -10, 10}}, true);
fRegistry.add("Pair/mix/uls/hBeta", "#beta for Lorentz boost;#beta^{same};(#beta^{mix} - #beta^{same})/#beta^{same}", kTH2D, {{100, 0, 1}, {400, -0.2, 0.2}}, true);
fRegistry.add("Pair/mix/uls/hBetaX", "#beta_{X} for Lorentz boost;#beta_{x}^{same};(#beta_{x}^{mix} - #beta_{x}^{same})/#beta_{x}^{same}", kTH2D, {{100, 0, 1}, {400, -0.2, 0.2}}, true);
fRegistry.add("Pair/mix/uls/hBetaY", "#beta_{Y} for Lorentz boost;#beta_{y}^{same};(#beta_{y}^{mix} - #beta_{y}^{same})/#beta_{y}^{same}", kTH2D, {{100, 0, 1}, {400, -0.2, 0.2}}, true);
fRegistry.add("Pair/mix/uls/hBetaZ", "#beta_{Z} for Lorentz boost;#beta_{z}^{same};(#beta_{z}^{mix} - #beta_{z}^{same})/#beta_{z}^{same}", kTH2D, {{100, 0, 1}, {400, -0.2, 0.2}}, true);
}

template <int ev_id, typename TCollision, typename TDilepton>
Expand Down Expand Up @@ -475,7 +481,7 @@
auto v_pos = empair1.getPositiveLeg(); // pt, eta, phi, M
auto arrD = std::array<float, 4>{static_cast<float>(v_pos.Px()), static_cast<float>(v_pos.Py()), static_cast<float>(v_pos.Pz()), leptonM1};

auto pairs_from_col2_sliced = std::views::filter(pairs_from_col2, [&](EMPair t) { return std::fabs(t.mass() - empair1.mass()) < accBins.cfgDM && std::fabs(t.pt() - empair1.pt()) < accBins.cfgDPt && std::fabs(t.eta() - empair1.eta()) < accBins.cfgDEta && std::fabs(RecoDecay::constrainAngle(t.phi() - empair1.phi(), -o2::constants::math::PI, 1U)) < accBins.cfgDPhi; });
auto pairs_from_col2_sliced = std::views::filter(pairs_from_col2, [&](EMPair t) { return std::fabs(t.mass() - empair1.mass()) / empair1.mass() < accBins.cfgRelDM && std::fabs((t.px() - empair1.px()) / empair1.px()) < accBins.cfgRelDPx && std::fabs((t.py() - empair1.py()) / empair1.py()) < accBins.cfgRelDPy && std::fabs((t.pz() - empair1.pz()) / empair1.pz()) < accBins.cfgRelDPz; });
for (const auto& empair2 : pairs_from_col2_sliced) {
auto arrM = std::array<float, 4>{static_cast<float>(empair2.px()), static_cast<float>(empair2.py()), static_cast<float>(empair2.pz()), static_cast<float>(empair2.mass())};
// LOGF(info, "[col1, col2] : empair1.mass() = %f, empair1.pt() = %f, empair1.eta() = %f, empair1.phi() = %f, empair2.mass() = %f, empair2.pt() = %f, empair2.eta() = %f, empair2.phi() = %f", empair1.mass(), empair1.pt(), empair1.eta(), empair1.phi(), empair2.mass(), empair2.pt(), empair2.eta(), empair2.phi());
Expand All @@ -493,14 +499,18 @@
phiPol = std::fabs(phiPol);
}
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hs"), empair1.mass(), empair1.pt(), empair1.getPairDCA(), empair1.rapidity(), cos_thetaPol, phiPol, quadmom, weight);
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBeta"), empair1.p() / empair1.e(), (empair2.p() / empair2.e() - empair1.p() / empair1.e()) / (empair1.p() / empair1.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaX"), empair1.px() / empair1.e(), (empair2.px() / empair2.e() - empair1.px() / empair1.e()) / (empair1.px() / empair1.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaY"), empair1.py() / empair1.e(), (empair2.py() / empair2.e() - empair1.py() / empair1.e()) / (empair1.py() / empair1.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaZ"), empair1.pz() / empair1.e(), (empair2.pz() / empair2.e() - empair1.pz() / empair1.e()) / (empair1.pz() / empair1.e()));
}
}

for (const auto& empair2 : pairs_from_col2) {
auto v_pos = empair2.getPositiveLeg(); // pt, eta, phi, M
auto arrD = std::array<float, 4>{static_cast<float>(v_pos.Px()), static_cast<float>(v_pos.Py()), static_cast<float>(v_pos.Pz()), leptonM2};

auto pairs_from_col1_sliced = std::views::filter(pairs_from_col1, [&](EMPair t) { return std::fabs(t.mass() - empair2.mass()) < accBins.cfgDM && std::fabs(t.pt() - empair2.pt()) < accBins.cfgDPt && std::fabs(t.eta() - empair2.eta()) < accBins.cfgDEta && std::fabs(RecoDecay::constrainAngle(t.phi() - empair2.phi(), -o2::constants::math::PI, 1U)) < accBins.cfgDPhi; });
auto pairs_from_col1_sliced = std::views::filter(pairs_from_col1, [&](EMPair t) { return std::fabs(t.mass() - empair2.mass()) / empair2.mass() < accBins.cfgRelDM && std::fabs((t.px() - empair2.px()) / empair2.px()) < accBins.cfgRelDPx && std::fabs((t.py() - empair2.py()) / empair2.py()) < accBins.cfgRelDPy && std::fabs((t.pz() - empair2.pz()) / empair2.pz()) < accBins.cfgRelDPz; });
for (const auto& empair1 : pairs_from_col1_sliced) {
auto arrM = std::array<float, 4>{static_cast<float>(empair1.px()), static_cast<float>(empair1.py()), static_cast<float>(empair1.pz()), static_cast<float>(empair2.mass())};
// LOGF(info, "[col2, col1] : empair2.mass() = %f, empair2.pt() = %f, empair2.eta() = %f, empair2.phi() = %f, empair1.mass() = %f, empair1.pt() = %f, empair1.eta() = %f, empair1.phi() = %f", empair2.mass(), empair2.pt(), empair2.eta(), empair2.phi(), empair1.mass(), empair1.pt(), empair1.eta(), empair1.phi());
Expand All @@ -518,6 +528,10 @@
phiPol = std::fabs(phiPol);
}
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hs"), empair2.mass(), empair2.pt(), empair2.getPairDCA(), empair2.rapidity(), cos_thetaPol, phiPol, quadmom, weight);
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBeta"), empair2.p() / empair2.e(), (empair1.p() / empair1.e() - empair2.p() / empair2.e()) / (empair2.p() / empair2.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaX"), empair2.px() / empair2.e(), (empair1.px() / empair1.e() - empair2.px() / empair2.e()) / (empair2.px() / empair2.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaY"), empair2.py() / empair2.e(), (empair1.py() / empair1.e() - empair2.py() / empair2.e()) / (empair2.py() / empair2.e()));
fRegistry.fill(HIST("Pair/mix/") + HIST(pair_sign_types[signType]) + HIST("hBetaZ"), empair2.pz() / empair2.e(), (empair1.pz() / empair1.e() - empair2.pz() / empair2.e()) / (empair2.pz() / empair2.e()));
}
}

Expand Down Expand Up @@ -573,21 +587,21 @@
int zbin = lower_bound(zvtx_bin_edges.begin(), zvtx_bin_edges.end(), collision.posZ()) - zvtx_bin_edges.begin() - 1;
if (zbin < 0) {
zbin = 0;
} else if (static_cast<int>(zvtx_bin_edges.size()) - 2 < zbin) {

Check failure on line 590 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
zbin = static_cast<int>(zvtx_bin_edges.size()) - 2;
}

int centbin = lower_bound(cent_bin_edges.begin(), cent_bin_edges.end(), centrality) - cent_bin_edges.begin() - 1;
if (centbin < 0) {
centbin = 0;
} else if (static_cast<int>(cent_bin_edges.size()) - 2 < centbin) {

Check failure on line 597 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
centbin = static_cast<int>(cent_bin_edges.size()) - 2;
}

int epbin = lower_bound(ep_bin_edges.begin(), ep_bin_edges.end(), ep2) - ep_bin_edges.begin() - 1;
if (epbin < 0) {
epbin = 0;
} else if (static_cast<int>(ep_bin_edges.size()) - 2 < epbin) {

Check failure on line 604 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
epbin = static_cast<int>(ep_bin_edges.size()) - 2;
}

Expand All @@ -602,7 +616,7 @@

if (occbin < 0) {
occbin = 0;
} else if (static_cast<int>(occ_bin_edges.size()) - 2 < occbin) {

Check failure on line 619 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
occbin = static_cast<int>(occ_bin_edges.size()) - 2;
}

Expand All @@ -612,31 +626,34 @@
// LOGF(info, "collision.globalIndex() = %d, dileptons_uls_per_coll.size() = %d, dileptons_lspp_per_coll.size() = %d, dileptons_lsmm_per_coll.size() = %d", collision.globalIndex(), dileptons_uls_per_coll.size(), dileptons_lspp_per_coll.size(), dileptons_lsmm_per_coll.size());

int nuls = 0, nlspp = 0, nlsmm = 0;
for (const auto& dilepton : dileptons_uls_per_coll) { // ULS
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nuls++;
if (cfgDoULS) {
for (const auto& dilepton : dileptons_uls_per_coll) { // ULS
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nuls++;
}
}
}
for (const auto& dilepton : dileptons_lspp_per_coll) { // LS++
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nlspp++;

if (cfgDoLS) {
for (const auto& dilepton : dileptons_lspp_per_coll) { // LS++
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nlspp++;
}
}
}
for (const auto& dilepton : dileptons_lsmm_per_coll) { // LS--
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nlsmm++;
for (const auto& dilepton : dileptons_lsmm_per_coll) { // LS--
bool is_pair_ok = fillPairInfo<0>(collision, dilepton);
if (is_pair_ok) {
nlsmm++;
}
}
}

if (!cfgDoMix || !(nuls > 0 || nlspp > 0 || nlsmm > 0)) {
continue;
}

// LOGF(info, "collision.globalIndex() = %d, collision.posZ() = %f, centrality = %f, ep2 = %f, collision.ft0cOccupancyInTimeRange() = %f, zbin = %d, centbin = %d, epbin = %d, occbin = %d", collision.globalIndex(), collision.posZ(), centrality, ep2, collision.ft0cOccupancyInTimeRange(), zbin, centbin, epbin, occbin);

auto key_bin = std::make_tuple(zbin, centbin, epbin, occbin);
auto key_df_collision = std::make_pair(ndf, collision.globalIndex()); // this gives the current event.

Expand All @@ -657,13 +674,18 @@
auto collisionIds_in_mixing_pool = emh_pair_uls->GetCollisionIdsFromEventPool(key_bin);
LOGF(info, "iz = %d, icent = %d, iep = %d, iocc = %d, collisionIds_in_mixing_pool.size() = %d", iz, icent, iep, iocc, collisionIds_in_mixing_pool.size());

fillMixedPairInfo<0>(collisionIds_in_mixing_pool, emh_pair_uls);
fillMixedPairInfo<1>(collisionIds_in_mixing_pool, emh_pair_lspp);
fillMixedPairInfo<2>(collisionIds_in_mixing_pool, emh_pair_lsmm);
}
}
}
}
if (cfgDoULS) {
fillMixedPairInfo<0>(collisionIds_in_mixing_pool, emh_pair_uls);
}
if (cfgDoLS) {
fillMixedPairInfo<1>(collisionIds_in_mixing_pool, emh_pair_lspp);
fillMixedPairInfo<2>(collisionIds_in_mixing_pool, emh_pair_lsmm);
}

} // end of iocc loop
} // end of iep loop
} // end of icent loop
} // end of iz loop

delete emh_pair_uls;
emh_pair_uls = 0x0;
Expand All @@ -685,5 +707,5 @@
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<DileptonPolarization>(cfgc, TaskName{"dilepton-polarization"})};

Check failure on line 710 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name dilepton-polarization and the struct name DileptonPolarization produce the same device name dilepton-polarization. TaskName is redundant.
}
1 change: 1 addition & 0 deletions PWGEM/Dilepton/Utils/EMTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class EMTrack
float px() const { return fPt * std::cos(fPhi); }
float py() const { return fPt * std::sin(fPhi); }
float pz() const { return fPt * std::sinh(fEta); }
float e() const { return std::sqrt(std::pow(fPt * std::cosh(fEta), 2) + std::pow(fMass, 2)); } // e2 = p2 + m2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just use std::hypot or RecoDecay::e. Btw, all these calculations are available as RecoDecay methods.

float signed1Pt() const { return fCharge * 1.f / fPt; }

protected:
Expand Down
Loading