Skip to content

Commit e47ed03

Browse files
nzardoshNima Zardoshti
andauthored
PWGHF : Simplifying pz and P dynamic coloum expression for self contained D0 tables (#4409)
Co-authored-by: Nima Zardoshti <nzardosh@alicecerno2.cern.ch>
1 parent 17eb245 commit e47ed03

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

PWGHF/DataModel/DerivedTables.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ auto py(TPt pt, TPhi phi)
9090
return pt * std::sin(phi);
9191
}
9292

93-
template <typename TPt, typename TPhi, typename TM>
94-
auto pz(TPt pt, TPhi eta, TM m)
93+
template <typename TPt, typename TPhi>
94+
auto pz(TPt pt, TPhi eta)
9595
{
96-
return std::sqrt(pt * pt + m * m) * std::sinh(y(pt, eta, m));
96+
return pt * std::sinh(eta);
9797
}
9898

9999
} // namespace functions
@@ -104,9 +104,9 @@ DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //! D0 px
104104
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! D0 py
105105
[](float pt, float phi) -> float { return functions::py(pt, phi); });
106106
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! D0 px
107-
[](float pt, float eta) -> float { return functions::pz(pt, eta, o2::constants::physics::MassD0); });
107+
[](float pt, float eta) -> float { return functions::pz(pt, eta); });
108108
DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! D0 momentum
109-
[](float pt, float eta, float phi) -> float { return RecoDecay::p(functions::px(pt, phi), functions::py(pt, phi), functions::pz(pt, eta, o2::constants::physics::MassD0)); });
109+
[](float pt, float eta) -> float { return pt * std::cosh(eta); });
110110
} // namespace hf_cand_base
111111

112112
// Candidate properties used for selection
@@ -196,7 +196,7 @@ DECLARE_SOA_TABLE(HfD0Bases, "AOD", "HFD0BASE", //! Table with basic candidate p
196196
hf_cand_base::Px<hf_cand_base::Pt, hf_cand_base::Phi>,
197197
hf_cand_base::Py<hf_cand_base::Pt, hf_cand_base::Phi>,
198198
hf_cand_base::Pz<hf_cand_base::Pt, hf_cand_base::Eta>,
199-
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta, hf_cand_base::Phi>);
199+
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta>);
200200

201201
DECLARE_SOA_TABLE(StoredHfD0Bases, "AOD1", "HFD0BASE", //! Table with basic candidate properties used in the analyses (stored version)
202202
o2::soa::Index<>,
@@ -209,7 +209,7 @@ DECLARE_SOA_TABLE(StoredHfD0Bases, "AOD1", "HFD0BASE", //! Table with basic cand
209209
hf_cand_base::Px<hf_cand_base::Pt, hf_cand_base::Phi>,
210210
hf_cand_base::Py<hf_cand_base::Pt, hf_cand_base::Phi>,
211211
hf_cand_base::Pz<hf_cand_base::Pt, hf_cand_base::Eta>,
212-
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta, hf_cand_base::Phi>,
212+
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta>,
213213
soa::Marker<1>);
214214

215215
// candidates for removal:
@@ -362,7 +362,7 @@ DECLARE_SOA_TABLE(HfD0PBases, "AOD", "HFD0PBASE", //! Table with MC particle inf
362362
hf_cand_base::Px<hf_cand_base::Pt, hf_cand_base::Phi>,
363363
hf_cand_base::Py<hf_cand_base::Pt, hf_cand_base::Phi>,
364364
hf_cand_base::Pz<hf_cand_base::Pt, hf_cand_base::Eta>,
365-
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta, hf_cand_base::Phi>);
365+
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta>);
366366

367367
DECLARE_SOA_TABLE(StoredHfD0PBases, "AOD1", "HFD0PBASE", //! Table with MC particle info (stored version)
368368
o2::soa::Index<>,
@@ -375,7 +375,7 @@ DECLARE_SOA_TABLE(StoredHfD0PBases, "AOD1", "HFD0PBASE", //! Table with MC parti
375375
hf_cand_base::Px<hf_cand_base::Pt, hf_cand_base::Phi>,
376376
hf_cand_base::Py<hf_cand_base::Pt, hf_cand_base::Phi>,
377377
hf_cand_base::Pz<hf_cand_base::Pt, hf_cand_base::Eta>,
378-
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta, hf_cand_base::Phi>,
378+
hf_cand_base::P<hf_cand_base::Pt, hf_cand_base::Eta>,
379379
soa::Marker<1>);
380380

381381
DECLARE_SOA_TABLE(HfD0PIds, "AOD", "HFD0PID", //! Table with global indices for MC particles

0 commit comments

Comments
 (0)