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
10 changes: 10 additions & 0 deletions PWGEM/PhotonMeson/DataModel/gammaTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include "PWGEM/Dilepton/DataModel/dileptonTables.h"

#include "Common/Core/RecoDecay.h"
Expand Down Expand Up @@ -128,10 +128,10 @@
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) -> float { return RecoDecay::sqrtSumOfSquares(px, py); });
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float px, float py, float pz) -> float { return RecoDecay::eta(std::array{px, py, pz}); });
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](float px, float py) -> float { return RecoDecay::phi(px, py); });
DECLARE_SOA_DYNAMIC_COLUMN(Tgl, tgl, [](float px, float py, float pz) -> float { return std::tan(M_PI_2 - 2 * std::atan(std::exp(-RecoDecay::eta(std::array{px, py, pz})))); });

Check failure on line 131 in PWGEM/PhotonMeson/DataModel/gammaTables.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.
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITS, meanClusterSizeITS, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 134 in PWGEM/PhotonMeson/DataModel/gammaTables.h

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.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -146,7 +146,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSib, meanClusterSizeITSib, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 3; layer++) {

Check failure on line 149 in PWGEM/PhotonMeson/DataModel/gammaTables.h

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.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -161,7 +161,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 164 in PWGEM/PhotonMeson/DataModel/gammaTables.h

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.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand Down Expand Up @@ -411,6 +411,16 @@
// iterators
using EMPrimaryElectronFromDalitz = EMPrimaryElectronsFromDalitz::iterator;

namespace v0photonsphiv
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
DECLARE_SOA_COLUMN(PhiV, phiv, float); //!
} // namespace v0photonsphiv
DECLARE_SOA_TABLE(V0PhotonsPhiV, "AOD", "V0PHOTONPHIV", //!
o2::soa::Index<>, v0photonsphiv::PhiV);
// iterators
using V0PhotonsPhiV = V0PhotonsPhiV;

namespace dalitzee
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
Expand Down Expand Up @@ -566,7 +576,7 @@
DECLARE_SOA_COLUMN(DeltaEta, deltaEta, std::vector<float>); //! eta values of the matched tracks
DECLARE_SOA_COLUMN(TrackP, trackp, std::vector<float>); //! momentum values of the matched tracks
DECLARE_SOA_COLUMN(TrackPt, trackpt, std::vector<float>); //! pt values of the matched tracks
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float e, float eta, float m = 0) -> float { return sqrt(e * e - m * m) / cosh(eta); }); //! cluster pt, mass to be given as argument when getter is called!

Check failure on line 579 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
} // namespace emccluster
DECLARE_SOA_TABLE(SkimEMCClusters, "AOD", "SKIMEMCCLUSTER", //! table of skimmed EMCal clusters
o2::soa::Index<>, skimmedcluster::CollisionId, emccluster::Definition, skimmedcluster::E, skimmedcluster::Eta, skimmedcluster::Phi,
Expand All @@ -591,10 +601,10 @@
// DECLARE_SOA_COLUMN(TrackPhi, trackphi, float); //! phi of the matched track
// DECLARE_SOA_COLUMN(TrackP, trackp, float); //! momentum of the matched track
// DECLARE_SOA_COLUMN(TrackPt, trackpt, float); //! pt of the matched track
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, [](float e, float x, float y, float z, float m = 0) -> float { return x / RecoDecay::sqrtSumOfSquares(x, y, z) * sqrt(e * e - m * m); });

Check failure on line 604 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, [](float e, float x, float y, float z, float m = 0) -> float { return y / RecoDecay::sqrtSumOfSquares(x, y, z) * sqrt(e * e - m * m); });

Check failure on line 605 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, [](float e, float x, float y, float z, float m = 0) -> float { return z / RecoDecay::sqrtSumOfSquares(x, y, z) * sqrt(e * e - m * m); });

Check failure on line 606 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float e, float x, float y, float z, float m = 0) -> float { return RecoDecay::sqrtSumOfSquares(x, y) / RecoDecay::sqrtSumOfSquares(x, y, z) * sqrt(e * e - m * m); });

Check failure on line 607 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float x, float y, float z) -> float { return RecoDecay::eta(std::array{x, y, z}); });
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](float x, float y) -> float { return RecoDecay::phi(x, y); });
} // namespace phoscluster
Expand Down
7 changes: 7 additions & 0 deletions PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//
// \author Daiki Sekihata <daiki.sekihata@cern.ch>, Tokyo

#include "PWGEM/Dilepton/Utils/PairUtilities.h"
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
#include "PWGEM/PhotonMeson/Utils/TrackSelection.h"
Expand Down Expand Up @@ -73,6 +74,7 @@ struct PhotonConversionBuilder {
Produces<aod::V0Legs> v0legs;
Produces<aod::V0LegsXYZ> v0legsXYZ;
Produces<aod::V0LegsDeDxMC> v0legsDeDxMC;
Produces<aod::V0PhotonsPhiV> v0photonsphiv;
// Produces<aod::V0PhotonsKFCov> v0photonskfcov;
// Produces<aod::EMEventsNgPCM> events_ngpcm;

Expand Down Expand Up @@ -166,6 +168,7 @@ struct PhotonConversionBuilder {
{"V0/hRxy_minX_ITSTPC_TPC", "min trackiu X vs. R_{xy};trackiu X (cm);min trackiu X - R_{xy} (cm)", {HistType::kTH2F, {{100, 0.0f, 100.f}, {100, -50.0, 50.0f}}}},
{"V0/hRxy_minX_TPC_TPC", "min trackiu X vs. R_{xy};trackiu X (cm);min trackiu X - R_{xy} (cm)", {HistType::kTH2F, {{100, 0.0f, 100.f}, {100, -50.0, 50.0f}}}},
{"V0/hPCA_diffX", "PCA vs. trackiu X - R_{xy};distance btween 2 legs (cm);min trackiu X - R_{xy} (cm)", {HistType::kTH2F, {{500, 0.0f, 5.f}, {100, -50.0, 50.0f}}}},
{"V0/hPhiV", "#phi_{V}; #phi_{V} (rad.)", {HistType::kTH1F, {{500, 0.0f, 2 * M_PI}}}},
{"V0Leg/hPt", "pT of leg at SV;p_{T,e} (GeV/c)", {HistType::kTH1F, {{1000, 0.0f, 10.0f}}}},
{"V0Leg/hEtaPhi", "#eta vs. #varphi of leg at SV;#varphi (rad.);#eta", {HistType::kTH2F, {{72, 0.0f, 2 * M_PI}, {200, -1, +1}}}},
{"V0Leg/hRelDeltaPt", "pT resolution;p_{T} (GeV/c);#Deltap_{T}/p_{T}", {HistType::kTH2F, {{1000, 0.f, 10.f}, {100, 0, 1}}}},
Expand Down Expand Up @@ -631,6 +634,8 @@ struct PhotonConversionBuilder {
pca_map[std::make_tuple(v0.globalIndex(), collision.globalIndex(), pos.globalIndex(), ele.globalIndex())] = pca_kf;
cospa_map[std::make_tuple(v0.globalIndex(), collision.globalIndex(), pos.globalIndex(), ele.globalIndex())] = cospa_kf;

float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair(pos.px(), pos.py(), pos.pz(), ele.px(), ele.py(), ele.pz(), pos.sign(), ele.sign(), d_bz);

if (filltable) {
registry.fill(HIST("V0/hAP"), alpha, qt);
registry.fill(HIST("V0/hConversionPointXY"), gammaKF_DecayVtx.GetX(), gammaKF_DecayVtx.GetY());
Expand All @@ -644,6 +649,7 @@ struct PhotonConversionBuilder {
registry.fill(HIST("V0/hPCA_Rxy"), rxy, pca_kf);
registry.fill(HIST("V0/hDCAxyz"), dca_xy_v0_to_pv, dca_z_v0_to_pv);
registry.fill(HIST("V0/hPCA_diffX"), pca_kf, std::min(pTrack.getX(), nTrack.getX()) - rxy); // trackiu.x() - rxy should be positive
registry.fill(HIST("V0/hPhiV"), phiv);

float cospaXY_kf = cospaXY_KF(gammaKF_DecayVtx, KFPV);
float cospaRZ_kf = cospaRZ_KF(gammaKF_DecayVtx, KFPV);
Expand Down Expand Up @@ -680,6 +686,7 @@ struct PhotonConversionBuilder {
v0_sv.M(), dca_xy_v0_to_pv, dca_z_v0_to_pv,
cospa_kf, cospaXY_kf, cospaRZ_kf,
pca_kf, alpha, qt, chi2kf);
v0photonsphiv(phiv);

// v0photonskfcov(gammaKF_PV.GetCovariance(9), gammaKF_PV.GetCovariance(14), gammaKF_PV.GetCovariance(20), gammaKF_PV.GetCovariance(13), gammaKF_PV.GetCovariance(19), gammaKF_PV.GetCovariance(18));

Expand Down
Loading