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
30 changes: 8 additions & 22 deletions PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@
Configurable<float> max_frac_shared_clusters_tpc{"max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"};
Configurable<float> dcanegtopv{"dcanegtopv", 0.1, "DCA Neg To PV"};
Configurable<float> dcapostopv{"dcapostopv", 0.1, "DCA Pos To PV"};
Configurable<float> min_pt_leg_at_sv{"min_pt_leg_at_sv", 0.0, "min pT for v0 legs at SV"}; // this is obsolete.
Configurable<float> max_mean_its_cluster_size{"max_mean_its_cluster_size", 16.f, "max. <ITS cluster size> x cos(lambda) for ITSonly tracks"}; // this is to suppress random combination for V0s with ITSonly tracks. default 3 + 1 for skimming.
Configurable<float> maxX{"maxX", 83.1, "max X for track IU"};
Configurable<float> min_pt_trackiu{"min_pt_trackiu", 0.05, "min pT for trackiu"}; // this comes from online processing. pT of track seed is above 50 MeV/c in B = 0.5 T, 20 MeV/c in B = 0.2 T.

Expand All @@ -115,6 +113,7 @@
Configurable<float> max_dcav0dau_itsibss{"max_dcav0dau_itsibss", 1.0, "max distance btween 2 legs to V0s with ITS hits on ITSib SS"};
Configurable<float> max_dcav0dau_tpc_inner_fc{"max_dcav0dau_tpc_inner_fc", 1.5, "max distance btween 2 legs to V0s with ITS hits on TPC inner FC"};
Configurable<float> min_v0radius{"min_v0radius", 1.0, "min v0 radius"};
Configurable<float> max_v0radius{"max_v0radius", 90.0, "max v0 radius"};
Configurable<float> margin_r_its{"margin_r_its", 3.0, "margin for r cut in cm"};
Configurable<float> margin_r_tpc{"margin_r_tpc", 7.0, "margin for r cut in cm"};
Configurable<float> margin_r_itstpc_tpc{"margin_r_itstpc_tpc", 7.0, "margin for r cut in cm"};
Expand Down Expand Up @@ -149,7 +148,7 @@
{"V0/hConversionPointXY", "conversion point in XY;X (cm);Y (cm)", {HistType::kTH2F, {{400, -100.0f, 100.0f}, {400, -100.f, 100.f}}}},
{"V0/hConversionPointRZ", "conversion point in RZ;Z (cm);R_{xy} (cm)", {HistType::kTH2F, {{200, -100.0f, 100.0f}, {200, 0.f, 100.f}}}},
{"V0/hPt", "pT of V0 at PV;p_{T,#gamma} (GeV/c)", {HistType::kTH1F, {{1000, 0.0f, 10.0f}}}},
{"V0/hEtaPhi", "#eta vs. #varphi of V0 at PV;#varphi (rad.);#eta", {HistType::kTH2F, {{72, 0.0f, 2 * M_PI}, {200, -1, +1}}}},

Check warning on line 151 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

Check warning on line 151 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Consider using multiples/fractions of PI defined in o2::constants::math.
{"V0/hCosPA", "cosine of pointing angle;cosine of pointing angle", {HistType::kTH1F, {{100, 0.99f, 1.f}}}},
{"V0/hCosPA_Rxy", "cosine of pointing angle;r_{xy} (cm);cosine of pointing angle", {HistType::kTH2F, {{200, 0, 100}, {100, 0.99f, 1.f}}}},
{"V0/hCosPAXY_Rxy", "cosine of pointing angle;r_{xy} (cm);cosine of pointing angle", {HistType::kTH2F, {{200, 0, 100}, {100, 0.99f, 1.f}}}},
Expand All @@ -166,7 +165,7 @@
{"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}}}},
{"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}}}},

Check warning on line 168 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

Check warning on line 168 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pi-multiple-fraction]

Consider using multiples/fractions of PI defined in o2::constants::math.
{"V0Leg/hDCAxyz", "DCA xy vs. z to PV;DCA_{xy} (cm);DCA_{z} (cm)", {HistType::kTH2F, {{200, -50.f, 50.f}, {200, -50.f, +50.f}}}},
{"V0Leg/hdEdx_Pin", "TPC dE/dx vs. p_{in};p_{in} (GeV/c);TPC dE/dx", {HistType::kTH2F, {{1000, 0.f, 10.f}, {200, 0.f, 200.f}}}},
{"V0Leg/hTPCNsigmaEl", "TPC dE/dx vs. p_{in};p_{in} (GeV/c);n #sigma_{e}^{TPC}", {HistType::kTH2F, {{1000, 0.f, 10.f}, {100, -5.f, +5.f}}}},
Expand Down Expand Up @@ -320,21 +319,6 @@
return false;
}
}

if (isITSonlyTrack(track)) {
uint32_t itsClusterSizes = track.itsClusterSizes();
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
}
total_cluster_size += cluster_size_per_layer;
}
if (static_cast<float>(total_cluster_size) / static_cast<float>(nl) * std::cos(std::atan(track.tgl())) > max_mean_its_cluster_size) {
return false;
}
}
}

return true;
Expand Down Expand Up @@ -376,7 +360,7 @@
}

template <typename TTrack, typename TShiftedTrack, typename TKFParticle>
void fillTrackTable(TTrack const& track, TShiftedTrack const& shiftedtrack, TKFParticle const& kfp, float dcaXY, float dcaZ)
void fillTrackTable(TTrack const& track, TShiftedTrack const& shiftedtrack, TKFParticle const& kfp, const float dcaXY, const float dcaZ)
{
v0legs(track.collisionId(), track.globalIndex(), track.sign(),
kfp.GetPx(), kfp.GetPy(), kfp.GetPz(), dcaXY, dcaZ,
Expand Down Expand Up @@ -422,6 +406,11 @@

// LOGF(info, "v0.collisionId() = %d , v0.posTrackId() = %d , v0.negTrackId() = %d", v0.collisionId(), v0.posTrackId(), v0.negTrackId());

// if(isTPConlyTrack(ele)){
// // LOGF(info, "TPConly: ele.globalIndex() = %d, ele.x() = %f, ele.y() = %f, ele.z() = %f, ele.tgl() = %f, ele.alpha() = %f, ele.snp() = %f, ele.signed1Pt() = %f", ele.globalIndex(), ele.x(), ele.y(), ele.z(), ele.tgl(), ele.alpha(), ele.snp(), ele.signed1Pt());
// // LOGF(info, "TPConly: ele.globalIndex() = %d, ele.cYY() = %f, ele.cZY() = %f, ele.cZZ() = %f, ele.cSnpY() = %f, ele.cSnpZ() = %f, ele.cSnpSnp() = %f, ele.cTglY() = %f, ele.cTglZ() = %f, ele.cTglSnp() = %f, ele.cTglTgl() = %f, ele.c1PtY() = %f, ele.c1PtZ() = %f, ele.c1PtSnp() = %f, ele.c1PtTgl() = %f, ele.c1Pt21Pt2() = %f", ele.globalIndex(), ele.cYY(), ele.cZY(), ele.cZZ(), ele.cSnpY(), ele.cSnpZ(), ele.cSnpSnp(), ele.cTglY(), ele.cTglZ(), ele.cTglSnp(), ele.cTglTgl(), ele.c1PtY(), ele.c1PtZ(), ele.c1PtSnp(), ele.c1PtTgl(), ele.c1Pt21Pt2());
// }

// Calculate DCA with respect to the collision associated to the v0, not individual tracks
gpu::gpustd::array<float, 2> dcaInfo;

Expand Down Expand Up @@ -498,7 +487,7 @@
if (rxy < std::fabs(gammaKF_DecayVtx.GetZ()) * std::tan(2 * std::atan(std::exp(-max_eta_v0))) - margin_z) {
return; // RZ line cut
}
if (rxy < min_v0radius) {
if (rxy < min_v0radius || max_v0radius < rxy) {
return;
}

Expand Down Expand Up @@ -549,7 +538,7 @@
gammaKF_PV.SetProductionVertex(KFPV);
float v0pt = RecoDecay::sqrtSumOfSquares(gammaKF_PV.GetPx(), gammaKF_PV.GetPy());
float v0eta = RecoDecay::eta(std::array{gammaKF_PV.GetPx(), gammaKF_PV.GetPy(), gammaKF_PV.GetPz()});
float v0phi = RecoDecay::phi(gammaKF_PV.GetPx(), gammaKF_PV.GetPy()) > 0.f ? RecoDecay::phi(gammaKF_PV.GetPx(), gammaKF_PV.GetPy()) : RecoDecay::phi(gammaKF_PV.GetPx(), gammaKF_PV.GetPy()) + TMath::TwoPi();

Check warning on line 541 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

Check warning on line 541 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Consider using RecoDecay::constrainAngle to restrict angle to a given range.

// KFParticle gammaKF_DecayVtx2 = gammaKF;
// gammaKF_DecayVtx2.SetProductionVertex(KFPV);
Expand Down Expand Up @@ -596,9 +585,6 @@

float pos_pt = RecoDecay::sqrtSumOfSquares(kfp_pos_DecayVtx.GetPx(), kfp_pos_DecayVtx.GetPy());
float ele_pt = RecoDecay::sqrtSumOfSquares(kfp_ele_DecayVtx.GetPx(), kfp_ele_DecayVtx.GetPy());
if (pos_pt < min_pt_leg_at_sv || ele_pt < min_pt_leg_at_sv) {
return;
}

if (isITSonlyTrack(pos) && pos_pt > maxpt_itsonly) {
return;
Expand Down Expand Up @@ -650,14 +636,14 @@

float chi2kf = gammaKF_DecayVtx.GetChi2() / gammaKF_DecayVtx.GetNDF();

for (auto& leg : {kfp_pos_DecayVtx, kfp_ele_DecayVtx}) {

Check warning on line 639 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
float legpt = RecoDecay::sqrtSumOfSquares(leg.GetPx(), leg.GetPy());
float legeta = RecoDecay::eta(std::array{leg.GetPx(), leg.GetPy(), leg.GetPz()});
float legphi = RecoDecay::phi(leg.GetPx(), leg.GetPy()) > 0.f ? RecoDecay::phi(leg.GetPx(), leg.GetPy()) : RecoDecay::phi(leg.GetPx(), leg.GetPy()) + TMath::TwoPi();

Check warning on line 642 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Consider using the PI constant (and its multiples and fractions) defined in o2::constants::math.

Check warning on line 642 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Consider using RecoDecay::constrainAngle to restrict angle to a given range.
registry.fill(HIST("V0Leg/hPt"), legpt);
registry.fill(HIST("V0Leg/hEtaPhi"), legphi, legeta);
} // end of leg loop
for (auto& leg : {pos, ele}) {

Check warning on line 646 in PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
registry.fill(HIST("V0Leg/hdEdx_Pin"), leg.tpcInnerParam(), leg.tpcSignal());
registry.fill(HIST("V0Leg/hTPCNsigmaEl"), leg.tpcInnerParam(), leg.tpcNSigmaEl());
} // end of leg loop
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/PhotonMeson/Tasks/pcmQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct PCMQC {

// v0 info
fRegistry.add("V0/hPt", "pT;p_{T,#gamma} (GeV/c)", kTH1F, {{2000, 0.0f, 20}}, false);
fRegistry.add("V0/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {40, -1.0f, 1.0f}}, false);
fRegistry.add("V0/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("V0/hRadius", "V0Radius; radius in Z (cm);radius in XY (cm)", kTH2F, {{200, -100, 100}, {200, 0.0f, 100.0f}}, false);
fRegistry.add("V0/hCosPA", "V0CosPA;cosine pointing angle", kTH1F, {{100, 0.99f, 1.0f}}, false);
fRegistry.add("V0/hCosPA_Rxy", "cos PA vs. R_{xy};R_{xy} (cm);cosine pointing angle", kTH2F, {{200, 0.f, 100.f}, {100, 0.99f, 1.0f}}, false);
Expand All @@ -160,7 +160,7 @@ struct PCMQC {
// v0leg info
fRegistry.add("V0Leg/hPt", "pT;p_{T,e} (GeV/c)", kTH1F, {{1000, 0.0f, 10}}, false);
fRegistry.add("V0Leg/hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", kTH1F, {{1000, -50, 50}}, false);
fRegistry.add("V0Leg/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {40, -1.0f, 1.0f}}, false);
fRegistry.add("V0Leg/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("V0Leg/hDCAxyz", "DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)", kTH2F, {{200, -50.0f, 50.0f}, {200, -50.0f, 50.0f}}, false);
fRegistry.add("V0Leg/hNclsTPC", "number of TPC clusters", kTH1F, {{161, -0.5, 160.5}}, false);
fRegistry.add("V0Leg/hNcrTPC", "number of TPC crossed rows", kTH1F, {{161, -0.5, 160.5}}, false);
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct PCMQCMC {

// v0 info
fRegistry.add("V0/primary/hPt", "pT;p_{T,#gamma} (GeV/c)", kTH1F, {{2000, 0.0f, 20}}, false);
fRegistry.add("V0/primary/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {40, -1.0f, 1.0f}}, false);
fRegistry.add("V0/primary/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("V0/primary/hRadius", "V0Radius; radius in Z (cm);radius in XY (cm)", kTH2F, {{200, -100, 100}, {200, 0.0f, 100.0f}}, false);
fRegistry.add("V0/primary/hCosPA", "V0CosPA;cosine pointing angle", kTH1F, {{100, 0.99f, 1.0f}}, false);
fRegistry.add("V0/primary/hCosPA_Rxy", "cos PA vs. R_{xy};R_{xy} (cm);cosine pointing angle", kTH2F, {{200, 0.f, 100.f}, {100, 0.99f, 1.0f}}, false);
Expand Down Expand Up @@ -212,7 +212,7 @@ struct PCMQCMC {
// v0leg info
fRegistry.add("V0Leg/primary/hPt", "pT;p_{T,e} (GeV/c)", kTH1F, {{1000, 0.0f, 10}}, false);
fRegistry.add("V0Leg/primary/hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", kTH1F, {{1000, -50, 50}}, false);
fRegistry.add("V0Leg/primary/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {40, -3.0f, 1.0f}}, false);
fRegistry.add("V0Leg/primary/hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", kTH2F, {{90, 0, 2 * M_PI}, {200, -1.0f, 1.0f}}, false);
fRegistry.add("V0Leg/primary/hDCAxyz", "DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)", kTH2F, {{200, -50.0f, 50.0f}, {200, -50.0f, 50.0f}}, false);
fRegistry.add("V0Leg/primary/hNclsTPC", "number of TPC clusters", kTH1F, {{161, -0.5, 160.5}}, false);
fRegistry.add("V0Leg/primary/hNcrTPC", "number of TPC crossed rows", kTH1F, {{161, -0.5, 160.5}}, false);
Expand Down
28 changes: 14 additions & 14 deletions PWGEM/PhotonMeson/Utils/PCMUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//_______________________________________________________________________
inline bool checkAP(const float alpha, const float qt, const float alpha_max = 0.95, const float qt_max = 0.05)
{
float ellipse = pow(alpha / alpha_max, 2) + pow(qt / qt_max, 2);
float ellipse = std::pow(alpha / alpha_max, 2) + std::pow(qt / qt_max, 2);
if (ellipse < 1.0) {
return true;
} else {
Expand Down Expand Up @@ -111,8 +111,8 @@ float getPtResolution(TV0 const& v0)
float px = v0.px();
float py = v0.py();
float pt = v0.pt();
float px_err = std::sqrt(fabs(v0.sigmaPx2()));
float py_err = std::sqrt(fabs(v0.sigmaPy2()));
float px_err = std::sqrt(std::fabs(v0.sigmaPx2()));
float py_err = std::sqrt(std::fabs(v0.sigmaPy2()));
float pxy_err = v0.sigmaPxPy();
return std::sqrt(std::pow(px / pt * px_err, 2) + std::pow(py / pt * py_err, 2) + 2.f * px / pt * py / pt * pxy_err);
}
Expand All @@ -123,8 +123,8 @@ float getPhiResolution(TV0 const& v0)
float px = v0.px();
float py = v0.py();
float pt = v0.pt();
float px_err = std::sqrt(fabs(v0.sigmaPx2()));
float py_err = std::sqrt(fabs(v0.sigmaPy2()));
float px_err = std::sqrt(std::fabs(v0.sigmaPx2()));
float py_err = std::sqrt(std::fabs(v0.sigmaPy2()));
float pxy_err = v0.sigmaPxPy();
return std::sqrt(std::pow(px / pt / pt * py_err, 2) + std::pow(py / pt / pt * px_err, 2) - 2.f * px / pt / pt * py / pt / pt * pxy_err);
}
Expand All @@ -137,9 +137,9 @@ float getThetaResolution(TV0 const& v0)
float pz = v0.pz();
float pt = v0.pt();
float p = v0.p();
float px_err = std::sqrt(fabs(v0.sigmaPx2()));
float py_err = std::sqrt(fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(fabs(v0.sigmaPz2()));
float px_err = std::sqrt(std::fabs(v0.sigmaPx2()));
float py_err = std::sqrt(std::fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(std::fabs(v0.sigmaPz2()));
float pxy_err = v0.sigmaPxPy();
float pyz_err = v0.sigmaPyPz();
float pzx_err = v0.sigmaPzPx();
Expand All @@ -154,9 +154,9 @@ float getEtaResolution(TV0 const& v0)
float pz = v0.pz();
float pt = v0.pt();
float p = v0.p();
float px_err = std::sqrt(fabs(v0.sigmaPx2()));
float py_err = std::sqrt(fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(fabs(v0.sigmaPz2()));
float px_err = std::sqrt(std::fabs(v0.sigmaPx2()));
float py_err = std::sqrt(std::fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(std::fabs(v0.sigmaPz2()));
float pxy_err = v0.sigmaPxPy();
float pyz_err = v0.sigmaPyPz();
float pzx_err = v0.sigmaPzPx();
Expand All @@ -170,9 +170,9 @@ float getPResolution(TV0 const& v0)
float py = v0.py();
float pz = v0.pz();
float p = v0.p();
float px_err = std::sqrt(fabs(v0.sigmaPx2()));
float py_err = std::sqrt(fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(fabs(v0.sigmaPz2()));
float px_err = std::sqrt(std::fabs(v0.sigmaPx2()));
float py_err = std::sqrt(std::fabs(v0.sigmaPy2()));
float pz_err = std::sqrt(std::fabs(v0.sigmaPz2()));
float pxy_err = v0.sigmaPxPy();
float pyz_err = v0.sigmaPyPz();
float pzx_err = v0.sigmaPzPx();
Expand Down
Loading