Skip to content

Commit ca772c2

Browse files
dsekihatalibuild
andauthored
[PWGEM] remove unnecessary variables in EMTrack (#15797)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 5297bc9 commit ca772c2

File tree

6 files changed

+103
-50
lines changed

6 files changed

+103
-50
lines changed

PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ struct DileptonPolarization {
377377
fRegistry.addClone("Pair/same/uls/", "Pair/same/lsmm/");
378378
fRegistry.addClone("Pair/same/", "Pair/mix/");
379379
fRegistry.add("Pair/same/uls/hEta", "#eta_{ll}", kTH1D, {{2000, -10, 10}}, true);
380-
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);
380+
// 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);
381381
}
382382

383383
template <typename TCollision, typename TDilepton, typename TMixingBin>
@@ -483,7 +483,7 @@ struct DileptonPolarization {
483483
phiPol = std::fabs(phiPol);
484484
}
485485
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);
486-
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()));
486+
// 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()));
487487

488488
} // end of pair2 loop
489489
} // end of pair1 loop

PWGEM/Dilepton/Utils/EMFwdTrack.h

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ namespace o2::aod::pwgem::dilepton::utils
2323
class EMFwdTrack
2424
{
2525
public:
26-
EMFwdTrack(float pt, float eta, float phi, float mass, int8_t charge, float dcaX, float dcaY, float cXX, float cXY, float cYY)
26+
EMFwdTrack(float pt, float eta, float phi, float /*mass*/, int8_t charge, float dcaX, float dcaY, float cXX, float cXY, float cYY)
2727
{
28-
fPt = pt;
28+
fSigned1Pt = static_cast<float>(charge) / pt;
2929
fEta = eta;
3030
fPhi = phi;
31-
fMass = mass;
32-
fCharge = charge;
3331
fDCAx = dcaX;
3432
fDCAy = dcaY;
3533
fCXX = cXX;
@@ -39,31 +37,28 @@ class EMFwdTrack
3937

4038
~EMFwdTrack() {}
4139

42-
float pt() const { return fPt; }
40+
float pt() const { return 1.f / std::fabs(fSigned1Pt); }
4341
float eta() const { return fEta; }
4442
float phi() const { return fPhi; }
45-
float mass() const { return fMass; }
46-
int8_t sign() const { return fCharge; }
43+
int8_t sign() const { return (fSigned1Pt > 0 ? +1 : -1); }
4744
float fwdDcaX() const { return fDCAx; }
4845
float fwdDcaY() const { return fDCAy; }
4946
float fwdDcaXY() const { return std::sqrt(std::pow(fDCAx, 2) + std::pow(fDCAy, 2)); }
50-
float p() const { return fPt * std::cosh(fEta); }
51-
float px() const { return fPt * std::cos(fPhi); }
52-
float py() const { return fPt * std::sin(fPhi); }
53-
float pz() const { return fPt * std::sinh(fEta); }
54-
float e() const { return std::hypot(fPt * std::cosh(fEta), fMass); } // e2 = p2 + m2
55-
float signed1Pt() const { return fCharge * 1.f / fPt; }
47+
float p() const { return 1.f / std::fabs(fSigned1Pt) * std::cosh(fEta); }
48+
float px() const { return 1.f / std::fabs(fSigned1Pt) * std::cos(fPhi); }
49+
float py() const { return 1.f / std::fabs(fSigned1Pt) * std::sin(fPhi); }
50+
float pz() const { return 1.f / std::fabs(fSigned1Pt) * std::sinh(fEta); }
51+
// float e(const float mass) const { return std::hypot(fPt * std::cosh(fEta), mass); } // e2 = p2 + m2
52+
float signed1Pt() const { return fSigned1Pt; }
5653

5754
float cXX() const { return fCXX; }
5855
float cXY() const { return fCXY; }
5956
float cYY() const { return fCYY; }
6057

6158
protected:
62-
float fPt;
59+
float fSigned1Pt;
6360
float fEta;
6461
float fPhi;
65-
float fMass;
66-
int8_t fCharge;
6762
float fDCAx;
6863
float fDCAy;
6964
float fCXX;

PWGEM/Dilepton/Utils/EMTrack.h

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ namespace o2::aod::pwgem::dilepton::utils
2828
class EMTrack
2929
{
3030
public:
31-
EMTrack(float pt, float eta, float phi, float mass, int8_t charge = 0, float dcaXY = 0.f, float dcaZ = 0.f, float CYY = 0, float CZY = 0, float CZZ = 0)
31+
EMTrack(float pt, float eta, float phi, float /*mass*/, int8_t charge = 0, float dcaXY = 0.f, float dcaZ = 0.f, float CYY = 0, float CZY = 0, float CZZ = 0)
3232
{
33-
fPt = pt;
33+
fSigned1Pt = static_cast<float>(charge) / pt;
3434
fEta = eta;
3535
fPhi = phi;
36-
fMass = mass;
37-
fCharge = charge;
3836
fDCAxy = dcaXY;
3937
fDCAz = dcaZ;
4038
fCYY = CYY;
@@ -44,32 +42,28 @@ class EMTrack
4442

4543
~EMTrack() {}
4644

47-
float pt() const { return fPt; }
45+
float pt() const { return 1.f / std::fabs(fSigned1Pt); }
4846
float eta() const { return fEta; }
4947
float phi() const { return fPhi; }
50-
float mass() const { return fMass; }
51-
int8_t sign() const { return fCharge; }
48+
int8_t sign() const { return (fSigned1Pt > 0 ? +1 : -1); }
5249
float dcaXY() const { return fDCAxy; }
5350
float dcaZ() const { return fDCAz; }
5451

5552
float cYY() const { return fCYY; }
5653
float cZY() const { return fCZY; }
5754
float cZZ() const { return fCZZ; }
5855

59-
float rapidity() const { return std::log((std::sqrt(std::pow(fMass, 2) + std::pow(fPt * std::cosh(fEta), 2)) + fPt * std::sinh(fEta)) / std::sqrt(std::pow(fMass, 2) + std::pow(fPt, 2))); }
60-
float p() const { return fPt * std::cosh(fEta); }
61-
float px() const { return fPt * std::cos(fPhi); }
62-
float py() const { return fPt * std::sin(fPhi); }
63-
float pz() const { return fPt * std::sinh(fEta); }
64-
float e() const { return std::hypot(fPt * std::cosh(fEta), fMass); } // e2 = p2 + m2
65-
float signed1Pt() const { return fCharge * 1.f / fPt; }
56+
float p() const { return 1.f / std::fabs(fSigned1Pt) * std::cosh(fEta); }
57+
float px() const { return 1.f / std::fabs(fSigned1Pt) * std::cos(fPhi); }
58+
float py() const { return 1.f / std::fabs(fSigned1Pt) * std::sin(fPhi); }
59+
float pz() const { return 1.f / std::fabs(fSigned1Pt) * std::sinh(fEta); }
60+
// float e() const { return std::hypot(fPt * std::cosh(fEta), fMass); } // e2 = p2 + m2
61+
float signed1Pt() const { return fSigned1Pt; }
6662

6763
protected:
68-
float fPt;
64+
float fSigned1Pt;
6965
float fEta;
7066
float fPhi;
71-
float fMass;
72-
int8_t fCharge;
7367
float fDCAxy;
7468
float fDCAz;
7569
float fCYY;
@@ -158,6 +152,7 @@ class EMPair : public EMTrack
158152
public:
159153
EMPair(float pt, float eta, float phi, float mass, int8_t charge = 0) : EMTrack(pt, eta, phi, mass, charge, 0, 0, 0, 0, 0)
160154
{
155+
fMass = mass;
161156
fPairDCA = 999.f;
162157
fVPos = ROOT::Math::PtEtaPhiMVector(0, 0, 0, 0);
163158
fVNeg = ROOT::Math::PtEtaPhiMVector(0, 0, 0, 0);
@@ -167,6 +162,8 @@ class EMPair : public EMTrack
167162
}
168163

169164
~EMPair() {}
165+
float mass() const { return fMass; }
166+
float rapidity() const { return std::log((std::sqrt(std::pow(fMass, 2) + std::pow(1.f / std::fabs(fSigned1Pt) * std::cosh(fEta), 2)) + 1.f / std::fabs(fSigned1Pt) * std::sinh(fEta)) / std::sqrt(std::pow(fMass, 2) + std::pow(1.f / std::fabs(fSigned1Pt), 2))); }
170167

171168
void setPairDCA(float dca) { fPairDCA = dca; }
172169
float getPairDCA() const { return fPairDCA; }
@@ -232,6 +229,7 @@ class EMPair : public EMTrack
232229
float phi_cp() const { return std::atan2(fVy, fVx); }
233230

234231
protected:
232+
float fMass;
235233
float fPairDCA;
236234
ROOT::Math::PtEtaPhiMVector fVPos;
237235
ROOT::Math::PtEtaPhiMVector fVNeg;

PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
#include "PWGEM/PhotonMeson/Core/V0PhotonCut.h"
2525
#include "PWGEM/PhotonMeson/DataModel/EventTables.h"
2626
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
27+
#include "PWGEM/PhotonMeson/Utils/EMPhoton.h"
2728
#include "PWGEM/PhotonMeson/Utils/EventHistograms.h"
2829
#include "PWGEM/PhotonMeson/Utils/NMHistograms.h"
2930
#include "PWGEM/PhotonMeson/Utils/PairUtilities.h"
3031
// Dilepton headers
31-
#include "PWGEM/Dilepton/Utils/EMTrack.h"
3232
#include "PWGEM/Dilepton/Utils/EventMixingHandler.h"
3333

3434
#include "Common/CCDB/TriggerAliases.h"
@@ -249,8 +249,8 @@ struct Pi0EtaToGammaGamma {
249249
o2::framework::Partition<o2::soa::Filtered<o2::soa::Join<o2::aod::EMPrimaryElectronsFromDalitz, o2::aod::EMPrimaryElectronDaEMEventIds, o2::aod::EMPrimaryElectronsPrefilterBitDerived>>> positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track;
250250
o2::framework::Partition<o2::soa::Filtered<o2::soa::Join<o2::aod::EMPrimaryElectronsFromDalitz, o2::aod::EMPrimaryElectronDaEMEventIds, o2::aod::EMPrimaryElectronsPrefilterBitDerived>>> electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track;
251251

252-
o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::dilepton::utils::EMTrack>* emh1 = nullptr;
253-
o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::dilepton::utils::EMTrack>* emh2 = nullptr;
252+
o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::photonmeson::utils::EMPhoton>* emh1 = nullptr;
253+
o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::photonmeson::utils::EMPhoton>* emh2 = nullptr;
254254
//---------------------------------------------------------------------------
255255

256256
std::vector<int> used_photonIds_per_col; // <ndf, trackId>
@@ -383,8 +383,8 @@ struct Pi0EtaToGammaGamma {
383383
occ_bin_edges = std::vector<float>(ConfOccupancyBins.value.begin(), ConfOccupancyBins.value.end());
384384
occ_bin_edges.erase(occ_bin_edges.begin());
385385

386-
emh1 = new o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::dilepton::utils::EMTrack>(ndepth);
387-
emh2 = new o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::dilepton::utils::EMTrack>(ndepth);
386+
emh1 = new o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::photonmeson::utils::EMPhoton>(ndepth);
387+
emh2 = new o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::photonmeson::utils::EMPhoton>(ndepth);
388388

389389
o2::aod::pwgem::photonmeson::utils::eventhistogram::addEventHistograms(&fRegistry);
390390
if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMDalitzEE) {
@@ -843,11 +843,11 @@ struct Pi0EtaToGammaGamma {
843843

844844
std::pair<int, int> tuple_tmp_id2 = std::make_pair(pos2.trackId(), ele2.trackId());
845845
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) {
846-
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g1.pt(), g1.eta(), g1.phi(), 0));
846+
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g1.pt(), g1.eta(), g1.phi(), 0));
847847
used_photonIds_per_col.emplace_back(g1.globalIndex());
848848
}
849849
if (std::find(used_dileptonIds_per_col.begin(), used_dileptonIds_per_col.end(), tuple_tmp_id2) == used_dileptonIds_per_col.end()) {
850-
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(v_ee.Pt(), v_ee.Eta(), v_ee.Phi(), v_ee.M()));
850+
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(v_ee.Pt(), v_ee.Eta(), v_ee.Phi(), v_ee.M()));
851851
used_dileptonIds_per_col.emplace_back(tuple_tmp_id2);
852852
}
853853
ndiphoton++;
@@ -922,11 +922,11 @@ struct Pi0EtaToGammaGamma {
922922
fRegistry.fill(HIST("Pair/same/hs"), v12.M(), v12.Pt(), wpair);
923923

924924
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) {
925-
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g1.pt(), g1.eta(), g1.phi(), 0));
925+
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g1.pt(), g1.eta(), g1.phi(), 0));
926926
used_photonIds_per_col.emplace_back(g1.globalIndex());
927927
}
928928
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g2.globalIndex()) == used_photonIds_per_col.end()) {
929-
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g2.pt(), g2.eta(), g2.phi(), 0));
929+
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g2.pt(), g2.eta(), g2.phi(), 0));
930930
used_photonIds_per_col.emplace_back(g2.globalIndex());
931931
}
932932
ndiphoton++;

PWGEM/PhotonMeson/Core/TaggingPi0.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include "PWGEM/PhotonMeson/Core/V0PhotonCut.h"
2323
#include "PWGEM/PhotonMeson/DataModel/EventTables.h"
2424
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
25+
#include "PWGEM/PhotonMeson/Utils/EMPhoton.h"
2526
#include "PWGEM/PhotonMeson/Utils/EventHistograms.h"
2627
#include "PWGEM/PhotonMeson/Utils/PairUtilities.h"
2728
//
28-
#include "PWGEM/Dilepton/Utils/EMTrack.h"
2929
#include "PWGEM/Dilepton/Utils/EventMixingHandler.h"
3030

3131
#include "Common/DataModel/Centrality.h"
@@ -104,7 +104,7 @@ struct TaggingPi0 {
104104
o2::framework::ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {o2::framework::VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"};
105105
o2::framework::ConfigurableAxis ConfPtBins{"ConfPtBins", {100, 0, 10}, "pT bins for output histograms"};
106106

107-
using MyEMH = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::dilepton::utils::EMTrack>;
107+
using MyEMH = o2::aod::pwgem::dilepton::utils::EventMixingHandler<std::tuple<int, int, int, int>, std::pair<int, int>, o2::aod::pwgem::photonmeson::utils::EMPhoton>;
108108

109109
EMPhotonEventCut fEMEventCut;
110110
struct : o2::framework::ConfigurableGroup {
@@ -565,11 +565,11 @@ struct TaggingPi0 {
565565

566566
std::pair<int, int> tuple_tmp_id2 = std::make_pair(pos2.trackId(), ele2.trackId());
567567
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) {
568-
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g1.pt(), g1.eta(), g1.phi(), 0));
568+
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g1.pt(), g1.eta(), g1.phi(), 0));
569569
used_photonIds_per_col.emplace_back(g1.globalIndex());
570570
}
571571
if (std::find(used_dileptonIds_per_col.begin(), used_dileptonIds_per_col.end(), tuple_tmp_id2) == used_dileptonIds_per_col.end()) {
572-
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(v_ee.Pt(), v_ee.Eta(), v_ee.Phi(), v_ee.M()));
572+
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(v_ee.Pt(), v_ee.Eta(), v_ee.Phi(), v_ee.M()));
573573
used_dileptonIds_per_col.emplace_back(tuple_tmp_id2);
574574
}
575575
ndiphoton++;
@@ -590,11 +590,11 @@ struct TaggingPi0 {
590590
fRegistry.fill(HIST("Pair/same/hMvsPt"), v12.M(), v1.Pt(), weight);
591591

592592
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) {
593-
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g1.pt(), g1.eta(), g1.phi(), 0));
593+
emh1->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g1.pt(), g1.eta(), g1.phi(), 0));
594594
used_photonIds_per_col.emplace_back(g1.globalIndex());
595595
}
596596
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g2.globalIndex()) == used_photonIds_per_col.end()) {
597-
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::dilepton::utils::EMTrack(g2.pt(), g2.eta(), g2.phi(), 0));
597+
emh2->AddTrackToEventPool(key_df_collision, o2::aod::pwgem::photonmeson::utils::EMPhoton(g2.pt(), g2.eta(), g2.phi(), 0));
598598
used_photonIds_per_col.emplace_back(g2.globalIndex());
599599
}
600600
ndiphoton++;

PWGEM/PhotonMeson/Utils/EMPhoton.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \class to store minimal photon info
13+
/// \author daiki.sekihata@cern.ch
14+
15+
#ifndef PWGEM_PHOTONMESON_UTILS_EMPHOTON_H_
16+
#define PWGEM_PHOTONMESON_UTILS_EMPHOTON_H_
17+
18+
#include <Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h)
19+
#include <Math/Vector4Dfwd.h>
20+
21+
#include <cmath>
22+
#include <cstdint>
23+
24+
#include <math.h>
25+
26+
namespace o2::aod::pwgem::photonmeson::utils
27+
{
28+
class EMPhoton
29+
{
30+
public:
31+
EMPhoton(float pt, float eta, float phi, float mass)
32+
{
33+
fPt = pt;
34+
fEta = eta;
35+
fPhi = phi;
36+
fMass = mass;
37+
}
38+
39+
~EMPhoton() {}
40+
41+
float pt() const { return fPt; }
42+
float eta() const { return fEta; }
43+
float phi() const { return fPhi; }
44+
45+
float p() const { return fPt * std::cosh(fEta); }
46+
float px() const { return fPt * std::cos(fPhi); }
47+
float py() const { return fPt * std::sin(fPhi); }
48+
float pz() const { return fPt * std::sinh(fEta); }
49+
float mass() const { return fMass; }
50+
float rapidity() const { return std::log((std::sqrt(std::pow(fMass, 2) + std::pow(fPt * std::cosh(fEta), 2)) + fPt * std::sinh(fEta)) / std::sqrt(std::pow(fMass, 2) + std::pow(fPt, 2))); }
51+
52+
protected:
53+
float fPt;
54+
float fEta;
55+
float fPhi;
56+
float fMass;
57+
};
58+
59+
} // namespace o2::aod::pwgem::photonmeson::utils
60+
#endif // PWGEM_PHOTONMESON_UTILS_EMPHOTON_H_

0 commit comments

Comments
 (0)