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
2 changes: 1 addition & 1 deletion PWGEM/PhotonMeson/TableProducer/createPCM.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
d_bz = d_bz_input;
fitter.setBz(d_bz);
o2::parameters::GRPMagField grpmag;
if (fabs(d_bz) > 1e-5) {

Check failure on line 162 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -242,7 +242,7 @@

float xyz[3] = {0.f, 0.f, 0.f};
Vtx_recalculation(o2::base::Propagator::Instance(), pos, ele, xyz, matCorr);
float recalculatedVtxR = std::sqrt(pow(xyz[0], 2) + pow(xyz[1], 2));

Check failure on line 245 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
// LOGF(info, "recalculated vtx : x = %f , y = %f , z = %f", xyz[0], xyz[1], xyz[2]);
if (recalculatedVtxR > std::min(pos.x(), ele.x()) + margin_r && (pos.x() > 1.f && ele.x() > 1.f)) {
return false;
Expand Down Expand Up @@ -329,10 +329,10 @@
template <typename TTrack>
bool isSelected(TTrack const& track)
{
if (track.pt() < minpt || abs(track.eta()) > maxeta) {

Check failure on line 332 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
if (abs(track.dcaXY()) < dcamin || dcamax < abs(track.dcaXY())) {

Check failure on line 335 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
if (!track.hasITS() && !track.hasTPC()) {
Expand All @@ -357,7 +357,7 @@
return false;
}

if (abs(track.z() / track.x() - track.tgl()) > 0.5) {

Check failure on line 360 in PWGEM/PhotonMeson/TableProducer/createPCM.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}

Expand Down Expand Up @@ -419,9 +419,9 @@
}
// LOGF(info, "min_sw = %d , max_sw = %d , collision.globalIndex() = %d , n posTracks_sw = %d , n negTracks_sw = %d", min_sw, max_sw, collision.globalIndex(), npos, nneg);

for (auto& negTracks_coll : negTracks_sw) {

Check failure on line 422 in PWGEM/PhotonMeson/TableProducer/createPCM.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.
for (auto& posTracks_coll : posTracks_sw) {

Check failure on line 423 in PWGEM/PhotonMeson/TableProducer/createPCM.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.
for (auto& [ele, pos] : combinations(CombinationsFullIndexPolicy(negTracks_coll, posTracks_coll))) {

Check failure on line 424 in PWGEM/PhotonMeson/TableProducer/createPCM.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.
if (!isSelected(ele) || !isSelected(pos)) {
continue;
}
Expand Down Expand Up @@ -522,7 +522,7 @@
Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
void processTrkCollAsso(aod::TrackAssoc const& trackIndices, FullTracksExtIU const&, aod::Collisions const& collisions, aod::BCsWithTimestamps const&)
{
for (auto& collision : collisions) {

Check failure on line 525 in PWGEM/PhotonMeson/TableProducer/createPCM.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("hEventCounter"), 1);

auto bc = collision.bc_as<aod::BCsWithTimestamps>();
Expand All @@ -530,7 +530,7 @@
auto trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, collision.globalIndex());

// LOGF(info,"%d tracks in collision %d", trackIdsThisCollision.size(), collision.globalIndex());
for (auto& [eleId, posId] : combinations(CombinationsStrictlyUpperIndexPolicy(trackIdsThisCollision, trackIdsThisCollision))) {

Check failure on line 533 in PWGEM/PhotonMeson/TableProducer/createPCM.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.
auto ele = eleId.track_as<FullTracksExtIU>();
auto pos = posId.track_as<FullTracksExtIU>();
// LOGF(info,"eleId = %d , posId = %d", ele.globalIndex(), pos.globalIndex());
Expand Down Expand Up @@ -564,5 +564,5 @@
{
return WorkflowSpec{
adaptAnalysisTask<createPCM>(cfgc, TaskName{"v0-finder"})};
// adaptAnalysisTask<v0Initializer>(cfgc, TaskName{"v0-initializer"})};
// adaptAnalysisTask<v0Initializer>(cfgc, TaskName{"v0-initializer"})};
}
36 changes: 18 additions & 18 deletions PWGLF/DataModel/LFStrangenessTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,18 +661,18 @@ DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //! V0 py
DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! V0 pz
[](float pzPos, float pzNeg) -> float { return pzPos + pzNeg; });
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //! Transverse momentum in GeV/c
[](float pxPos, float pyPos, float pxNeg, float pyNeg) -> float {
return RecoDecay::sqrtSumOfSquares(pxPos+pxNeg, pyPos+pyNeg);
[](float pxPos, float pyPos, float pxNeg, float pyNeg) -> float {
return RecoDecay::sqrtSumOfSquares(pxPos + pxNeg, pyPos + pyNeg);
});
DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Total momentum in GeV/c
[](float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg) -> float {
return RecoDecay::sqrtSumOfSquares(pxPos+pxNeg, pyPos+pyNeg, pzPos+pzNeg);
[](float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg) -> float {
return RecoDecay::sqrtSumOfSquares(pxPos + pxNeg, pyPos + pyNeg, pzPos + pzNeg);
});
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, //! Phi in the range [0, 2pi)
[](float pxPos, float pyPos, float pxNeg, float pyNeg) -> float { return RecoDecay::phi(pxPos+pxNeg, pyPos+pyNeg); });
[](float pxPos, float pyPos, float pxNeg, float pyNeg) -> float { return RecoDecay::phi(pxPos + pxNeg, pyPos + pyNeg); });
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, //! Pseudorapidity, conditionally defined to avoid FPEs
[](float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg) -> float {
return RecoDecay::eta(std::array{pxPos+pxNeg, pyPos+pyNeg, pzPos+pzNeg});
[](float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg) -> float {
return RecoDecay::eta(std::array{pxPos + pxNeg, pyPos + pyNeg, pzPos + pzNeg});
});
// Account for rigidity in case of hypertriton
DECLARE_SOA_DYNAMIC_COLUMN(PtHypertriton, ptHypertriton, //! V0 pT
Expand All @@ -687,7 +687,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(V0Radius, v0radius, //! V0 decay radius (2D, centered
// Distance Over To Mom
DECLARE_SOA_DYNAMIC_COLUMN(DistOverTotMom, distovertotmom, //! PV to V0decay distance over total momentum
[](float X, float Y, float Z, float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg, float pvX, float pvY, float pvZ) {
float P = RecoDecay::sqrtSumOfSquares(pxPos+pxNeg, pyPos+pyNeg, pzPos+pzNeg);
float P = RecoDecay::sqrtSumOfSquares(pxPos + pxNeg, pyPos + pyNeg, pzPos + pzNeg);
return std::sqrt(std::pow(X - pvX, 2) + std::pow(Y - pvY, 2) + std::pow(Z - pvZ, 2)) / (P + 1E-10);
});

Expand Down Expand Up @@ -766,12 +766,12 @@ DECLARE_SOA_DYNAMIC_COLUMN(M, m, //! mass under a certain hypothesis (0:K0, 1:L,
});

DECLARE_SOA_DYNAMIC_COLUMN(YK0Short, yK0Short, //! V0 y with K0short hypothesis
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
return RecoDecay::y(std::array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}, o2::constants::physics::MassKaonNeutral);
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
return RecoDecay::y(std::array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}, o2::constants::physics::MassKaonNeutral);
});
DECLARE_SOA_DYNAMIC_COLUMN(YLambda, yLambda, //! V0 y with lambda or antilambda hypothesis
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
return RecoDecay::y(std::array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}, o2::constants::physics::MassLambda);
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float {
return RecoDecay::y(std::array{pxpos + pxneg, pypos + pyneg, pzpos + pzneg}, o2::constants::physics::MassLambda);
});
DECLARE_SOA_DYNAMIC_COLUMN(YHypertriton, yHypertriton, //! V0 y with hypertriton hypothesis
[](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) -> float { return RecoDecay::y(std::array{2.0f * pxpos + pxneg, 2.0f * pypos + pyneg, 2.0f * pzpos + pzneg}, o2::constants::physics::MassHyperTriton); });
Expand Down Expand Up @@ -887,7 +887,7 @@ DECLARE_SOA_TABLE_STAGED(V0CoresBase, "V0CORE", //! core information about decay

// extended table with expression columns that can be used as arguments of dynamic columns
// DECLARE_SOA_EXTENDED_TABLE_USER(V0Cores, V0CoresBase, "V0COREEXT", //!
// v0data::Px, v0data::Py, v0data::Pz, v0data::Pt, v0data::P, v0data::Phi, v0data::Eta); // the table name has here to be the one with EXT which is not nice and under study
// v0data::Px, v0data::Py, v0data::Pz, v0data::Pt, v0data::P, v0data::Phi, v0data::Eta); // the table name has here to be the one with EXT which is not nice and under study

// // extended table with expression columns that can be used as arguments of dynamic columns
// DECLARE_SOA_EXTENDED_TABLE_USER(StoredV0Cores, StoredV0CoresBase, "V0COREEXT", //!
Expand Down Expand Up @@ -1305,18 +1305,18 @@ DECLARE_SOA_DYNAMIC_COLUMN(CascRadius, cascradius, //!
// CosPAs
DECLARE_SOA_DYNAMIC_COLUMN(V0CosPA, v0cosPA, //!
[](float Xlambda, float Ylambda, float Zlambda, float pxPos, float pyPos, float pzPos, float pxNeg, float pyNeg, float pzNeg, float pvX, float pvY, float pvZ) -> float {
return RecoDecay::cpa(std::array{pvX, pvY, pvZ}, std::array{Xlambda, Ylambda, Zlambda}, std::array{pxPos + pxNeg, pyPos + pyNeg, pzPos + pzNeg});
return RecoDecay::cpa(std::array{pvX, pvY, pvZ}, std::array{Xlambda, Ylambda, Zlambda}, std::array{pxPos + pxNeg, pyPos + pyNeg, pzPos + pzNeg});
});
// DECLARE_SOA_DYNAMIC_COLUMN(CascCosPA, casccosPA, //!
// [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) -> float { return RecoDecay::cpa(std::array{pvX, pvY, pvZ}, std::array{X, Y, Z}, std::array{Px, Py, Pz}); });
DECLARE_SOA_DYNAMIC_COLUMN(CascCosPA, casccosPA, //!
[](float X, float Y, float Z, float PxBach, float PxPos, float PxNeg, float PyBach, float PyPos, float PyNeg, float PzBach, float PzPos, float PzNeg, float pvX, float pvY, float pvZ) -> float { return RecoDecay::cpa(std::array{pvX, pvY, pvZ}, std::array{X, Y, Z}, std::array{PxBach + PxPos + PxNeg, PyBach + PyPos + PyNeg, PzBach + PzPos + PzNeg}); });
DECLARE_SOA_DYNAMIC_COLUMN(DCAV0ToPV, dcav0topv, //!
[](float X, float Y, float Z, float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg, float pvX, float pvY, float pvZ) -> float {
float px = pxpos + pxneg;
float py = pypos + pyneg;
float pz = pzpos + pzneg;
return std::sqrt((std::pow((pvY - Y) * pz - (pvZ - Z) * py, 2) + std::pow((pvX - X) * pz - (pvZ - Z) * px, 2) + std::pow((pvX - X) * py - (pvY - Y) * px, 2)) / (px * px + py * py + pz * pz));
float px = pxpos + pxneg;
float py = pypos + pyneg;
float pz = pzpos + pzneg;
return std::sqrt((std::pow((pvY - Y) * pz - (pvZ - Z) * py, 2) + std::pow((pvX - X) * pz - (pvZ - Z) * px, 2) + std::pow((pvX - X) * py - (pvY - Y) * px, 2)) / (px * px + py * py + pz * pz));
});

// Calculated on the fly with mass assumption + dynamic tables
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/cascadefinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -442,5 +442,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
adaptAnalysisTask<cascadeprefilter>(cfgc, TaskName{"lf-cascadeprefilter"}),
adaptAnalysisTask<cascadefinder>(cfgc, TaskName{"lf-cascadefinder"}),
adaptAnalysisTask<cascadefinderQA>(cfgc, TaskName{"lf-cascadefinderQA"})};
// adaptAnalysisTask<cascadeinitializer>(cfgc, TaskName{"lf-cascadeinitializer"})};
// adaptAnalysisTask<cascadeinitializer>(cfgc, TaskName{"lf-cascadeinitializer"})};
}
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/lambdakzerobuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1821,5 +1821,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
adaptAnalysisTask<lambdakzeroBuilder>(cfgc),
adaptAnalysisTask<lambdakzeroPreselector>(cfgc),
adaptAnalysisTask<lambdakzeroV0DataLinkBuilder>(cfgc)};
// adaptAnalysisTask<lambdakzeroInitializer>(cfgc)};
// adaptAnalysisTask<lambdakzeroInitializer>(cfgc)};
}
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -441,5 +441,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
adaptAnalysisTask<lambdakzeroprefilter>(cfgc, TaskName{"lf-lambdakzeroprefilter"}),
adaptAnalysisTask<lambdakzerofinder>(cfgc, TaskName{"lf-lambdakzerofinder"}),
adaptAnalysisTask<lambdakzerofinderQa>(cfgc, TaskName{"lf-lambdakzerofinderQA"})};
// adaptAnalysisTask<lambdakzeroinitializer>(cfgc, TaskName{"lf-lambdakzeroinitializer"})};
// adaptAnalysisTask<lambdakzeroinitializer>(cfgc, TaskName{"lf-lambdakzeroinitializer"})};
}
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2508,5 +2508,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<StrangenessBuilder>(cfgc)};
// adaptAnalysisTask<strangenessbuilderInitializer>(cfgc)};
// adaptAnalysisTask<strangenessbuilderInitializer>(cfgc)};
}
Loading