Skip to content
Open
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: 16 additions & 14 deletions PWGEM/PhotonMeson/TableProducer/createPCM.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// \file createPCM.cxx
/// \brief This code produces photon data tables.
/// \author Daiki Sekihata <daiki.sekihata@cern.ch>, Tokyo
/// \note legacy code, please use the photonconversionbuilder tasks.

#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
Expand All @@ -35,6 +36,7 @@
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Concepts.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
Expand Down Expand Up @@ -113,9 +115,9 @@
Configurable<float> max_r_req_its{"max_r_req_its", 16.0, "min Rxy for V0 with ITS hits"};
Configurable<float> min_r_tpconly{"min_r_tpconly", 32.0, "min Rxy for V0 with TPConly tracks"};

int mRunNumber;
float d_bz;
Service<o2::ccdb::BasicCCDBManager> ccdb;
int mRunNumber = 0;
float d_bz = 0;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
o2::base::MatLayerCylSet* lut = nullptr;
o2::vertexing::DCAFitterN<2> fitter;
// Material correction in the DCA fitter
Expand All @@ -142,7 +144,7 @@
ccdb->get<TGeoManager>(geoPath);
}
}
if (useMatCorrType == 2) {

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

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.
LOGF(info, "LUT correction requested, loading LUT");
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(lutPath));
}
Expand All @@ -159,7 +161,7 @@
if (useMatCorrType == 1) {
matCorr = o2::base::Propagator::MatCorrType::USEMatCorrTGeo;
}
if (useMatCorrType == 2) {

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

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.
matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
}
fitter.setMatCorrType(matCorr);
Expand All @@ -172,11 +174,11 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

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

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.
d_bz = d_bz_input;
fitter.setBz(d_bz);
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {

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

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.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -206,14 +208,14 @@
// Set magnetic field value once known
fitter.setBz(d_bz);

if (useMatCorrType == 2) {

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

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.
// setMatLUT only after magfield has been initalized
// (setMatLUT has implicit and problematic init field call if not)
o2::base::Propagator::Instance()->setMatLUT(lut);
}
}

template <typename TTrack>
template <o2::soa::is_iterator TTrack>
bool reconstructV0(TTrack const& ele, TTrack const& pos)
{
bool isITSonly_pos = pos.hasITS() && !pos.hasTPC();
Expand All @@ -236,7 +238,7 @@
if (nCand != 0) {
fitter.propagateTracksToVertex();
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

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

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.
svpos[i] = vtx[i];
}
fitter.getTrack(0).getPxPyPzGlo(pvec0); // positive
Expand All @@ -257,7 +259,7 @@
return false;
}

float xyz[3] = {0.f, 0.f, 0.f};
std::array<float, 3> xyz = {0.f, 0.f, 0.f};
Vtx_recalculation(o2::base::Propagator::Instance(), pos, ele, xyz, matCorr);
float recalculatedVtxR = std::sqrt(std::pow(xyz[0], 2) + std::pow(xyz[1], 2));
// LOGF(info, "recalculated vtx : x = %f , y = %f , z = %f", xyz[0], xyz[1], xyz[2]);
Expand All @@ -275,7 +277,7 @@
return true;
}

template <typename TCollision, typename TTrack>
template <o2::soa::is_iterator TCollision, o2::soa::is_iterator TTrack>
void fillV0Table(TCollision const& collision, TTrack const& ele, TTrack const& pos, const bool filltable)
{
std::array<float, 3> pVtx = {collision.posX(), collision.posY(), collision.posZ()};
Expand All @@ -290,7 +292,7 @@
if (nCand != 0) {
fitter.propagateTracksToVertex();
const auto& vtx = fitter.getPCACandidate();
for (int i = 0; i < 3; i++) {

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

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.
svpos[i] = vtx[i];
}
fitter.getTrack(0).getPxPyPzGlo(pvec0); // positive
Expand Down Expand Up @@ -323,7 +325,7 @@
}

registry.fill(HIST("hV0xy"), svpos[0], svpos[1]); // this should have worst resolution
float xyz_tmp[3] = {0.f, 0.f, 0.f};
std::array<float, 3> xyz_tmp = {0.f, 0.f, 0.f};
Vtx_recalculation(o2::base::Propagator::Instance(), pos, ele, xyz_tmp, matCorr);
registry.fill(HIST("hV0xy_recalculated"), xyz_tmp[0], xyz_tmp[1]); // this should have good resolution

Expand All @@ -343,7 +345,7 @@
}

std::pair<int8_t, std::set<uint8_t>> its_ib_Requirement = {0, {0, 1, 2}}; // no hit on 3 ITS ib layers.
template <typename TTrack>
template <o2::soa::is_iterator TTrack>
bool isSelected(TTrack const& track)
{
if (track.pt() < minpt || std::abs(track.eta()) > maxeta) {
Expand Down Expand Up @@ -374,7 +376,7 @@
return false;
}

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

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

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.
return false;
}

Expand All @@ -395,7 +397,7 @@
return true;
}

Filter trackFilter = o2::aod::track::x < maxX && nabs(o2::aod::track::y) < maxY && o2::aod::track::pt > minpt&& nabs(o2::aod::track::eta) < maxeta&& dcamin < nabs(o2::aod::track::dcaXY) && nabs(o2::aod::track::dcaXY) < dcamax && ((min_tpcdEdx < o2::aod::track::tpcSignal && o2::aod::track::tpcSignal < max_tpcdEdx) || o2::aod::track::tpcSignal < -10.f);

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

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.
using MyFilteredTracks = soa::Filtered<FullTracksExtIU>;

std::map<std::tuple<int32_t, int32_t, int32_t>, float> pca_map;
Expand All @@ -420,7 +422,7 @@
// registry.fill(HIST("hEventCounter"), 1);

int32_t min_sw = std::max(static_cast<int64_t>(0), collision.globalIndex());
int32_t max_sw = std::min(static_cast<int64_t>(min_sw + nsw), static_cast<int64_t>(collisions.size()));
int32_t max_sw = std::min(static_cast<int64_t>(min_sw + nsw), collisions.size());

// LOGF(info, "orphan_posTracks.size() = %d, orphan_negTracks.size() = %d", orphan_posTracks.size(), orphan_negTracks.size());
negTracks_sw.reserve(max_sw - min_sw);
Expand Down Expand Up @@ -477,7 +479,7 @@
vec_cospa.reserve(max_sw - min_sw);
for (int32_t isw = min_sw; isw < max_sw; isw++) {
auto collision_in_sw = collisions.rawIteratorAt(isw);
if (cospa_map.find(std::make_tuple(pos.globalIndex(), ele.globalIndex(), collision_in_sw.globalIndex())) != cospa_map.end()) {
if (cospa_map.contains(std::make_tuple(pos.globalIndex(), ele.globalIndex(), collision_in_sw.globalIndex()))) {
vec_cospa.emplace_back(cospa_map[std::make_tuple(pos.globalIndex(), ele.globalIndex(), collision_in_sw.globalIndex())]);
} else {
vec_cospa.emplace_back(-999.f);
Expand Down Expand Up @@ -516,7 +518,7 @@
}
} // end of pca_map loop

if (is_closest_v0 && used_pair_map.find(std::make_pair(pos.globalIndex(), ele.globalIndex())) == used_pair_map.end()) {
if (is_closest_v0 && !used_pair_map.contains(std::make_pair(pos.globalIndex(), ele.globalIndex()))) {
// LOGF(info, "store : pos.globalIndex() = %d , ele.globalIndex() = %d , collision.globalIndex() = %d , cospa = %f , pca = %f", std::get<0>(key), std::get<1>(key), std::get<2>(key), value, pca_map[key]);
fillV0Table(collision_most_prob, ele, pos, true);
used_pair_map[std::make_pair(pos.globalIndex(), ele.globalIndex())] = true;
Expand Down Expand Up @@ -563,16 +565,16 @@
if (ele.sign() < 0) {
fillV0Table(collision, ele, pos, true);
} else {
fillV0Table(collision, pos, ele, true);
fillV0Table(collision, pos, ele, true); // NOLINT(readability-suspicious-call-argument) in case the ele is actually positivley charged
}
}
} // end of collision loop
} // end of process
PROCESS_SWITCH(createPCM, processTrkCollAsso, "create V0s with track-to-collision associator", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{
adaptAnalysisTask<createPCM>(cfgc, TaskName{"v0-finder"})};
adaptAnalysisTask<createPCM>(context, TaskName{"v0-finder"})};

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

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name v0-finder produces device name v0-finder which does not match the device name create-p-c-m from the struct name createPCM. (Matching struct name V0Finder)
}
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ struct PhotonConversionBuilder {
}

std::array<float, 3> xyz = {0.f, 0.f, 0.f};
Vtx_recalculationParCov(o2::base::Propagator::Instance(), pTrack, nTrack, xyz.data(), matCorr);
Vtx_recalculationParCov(o2::base::Propagator::Instance(), pTrack, nTrack, xyz, matCorr);
float rxy_tmp = RecoDecay::sqrtSumOfSquares(xyz[0], xyz[1]);
if (rxy_tmp > maxX + margin_r_tpc) {
return;
Expand Down
36 changes: 19 additions & 17 deletions PWGEM/PhotonMeson/TableProducer/skimmerGammaConversion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Concepts.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
Expand All @@ -58,6 +59,7 @@
#include <KFPVertex.h>
#include <KFParticle.h>

#include <array>
#include <cmath>
#include <cstddef>
#include <map>
Expand Down Expand Up @@ -104,7 +106,7 @@ struct skimmerGammaConversion {
};

// declare this here in order to be able to access it from a lambda
std::shared_ptr<TH1> fMotherSizesHisto{};
std::shared_ptr<TH1> fMotherSizesHisto;

enum eV0Confirmation {
kV0In,
Expand All @@ -131,7 +133,7 @@ struct skimmerGammaConversion {
Produces<aod::V0DaughterMcParticles> fFuncTableMCTrackInformation;
Produces<aod::MCParticleIndex> fIndexTableMCTrackIndex;

Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};

int runNumber = -1;
o2::base::MatLayerCylSet* lut = nullptr;
Expand Down Expand Up @@ -166,7 +168,7 @@ struct skimmerGammaConversion {
}

auto run3grp_timestamp = bc.timestamp();
o2::parameters::GRPObject* grpo = ccdb->getForTimeStamp<o2::parameters::GRPObject>(ccdbPath, run3grp_timestamp);
auto* grpo = ccdb->getForTimeStamp<o2::parameters::GRPObject>(ccdbPath, run3grp_timestamp);
o2::parameters::GRPMagField* grpmag = nullptr;

if (grpo) {
Expand All @@ -189,7 +191,7 @@ struct skimmerGammaConversion {
KFParticle::SetField(magneticField);
}

template <typename TTRACK, typename TKFP>
template <o2::soa::is_iterator TTRACK, typename TKFP>
void fillTrackTable(TTRACK const& theTrack, TKFP const& kfp)
{
v0legs(theTrack.collisionId(),
Expand All @@ -201,8 +203,8 @@ struct skimmerGammaConversion {
theTrack.itsClusterSizes(), theTrack.itsChi2NCl(), theTrack.detectorMap());
}

template <typename TTRACK>
void fillfFuncTableMCTrackInformation(TTRACK theTrack, bool sameMother)
template <o2::soa::is_iterator TTRACK>
void fillfFuncTableMCTrackInformation(TTRACK const& theTrack, bool sameMother)
{
fFuncTableMCTrackInformation(
theTrack.mcParticle().pdgCode(),
Expand All @@ -212,7 +214,7 @@ struct skimmerGammaConversion {
sameMother);
}

template <typename TTrack>
template <o2::soa::is_iterator TTrack>
bool checkV0leg(TTrack const& track)
{
if (track.pt() < minpt || abs(track.eta()) > maxeta) {
Expand All @@ -236,24 +238,24 @@ struct skimmerGammaConversion {
return true;
}

template <typename TTrack, typename TCollision, typename TV0>
template <o2::soa::is_table TTrack, o2::soa::is_iterator TCollision, o2::soa::is_iterator TV0>
void fillV0KF(TCollision const& collision, TV0 const& v0)
{
auto pos = v0.template posTrack_as<TTrack>(); // positive daughter
auto ele = v0.template negTrack_as<TTrack>(); // negative daughter

float xyz[3] = {0.f, 0.f, 0.f};
std::array<float, 3> xyz = {0.f, 0.f, 0.f};
Vtx_recalculation(o2::base::Propagator::Instance(), pos, ele, xyz);

KFPTrack kfp_track_pos = createKFPTrackFromTrack(pos);
KFPTrack kfp_track_ele = createKFPTrackFromTrack(ele);
KFParticle kfp_pos(kfp_track_pos, -11);
KFParticle kfp_ele(kfp_track_ele, 11);
const KFParticle* GammaDaughters[2] = {&kfp_pos, &kfp_ele};
std::array<const KFParticle*, 2> GammaDaughters = {&kfp_pos, &kfp_ele};

KFParticle gammaKF;
gammaKF.SetConstructMethod(2);
gammaKF.Construct(GammaDaughters, 2);
gammaKF.Construct(GammaDaughters.data(), 2);
if (kfMassConstrain > -0.1) {
gammaKF.SetNonlinearMassConstraint(kfMassConstrain);
}
Expand All @@ -265,7 +267,7 @@ struct skimmerGammaConversion {

// Transport the gamma to the recalculated decay vertex
KFParticle gammaKF_DecayVtx = gammaKF; // with respect to (0,0,0)
gammaKF_DecayVtx.TransportToPoint(xyz);
gammaKF_DecayVtx.TransportToPoint(xyz.data());

//// Apply a topological constraint of the gamma to the PV. Parameters will be given at the primary vertex.
// KFParticle gammaKF_PV = gammaKF_DecayVtx;
Expand All @@ -278,8 +280,8 @@ struct skimmerGammaConversion {

KFParticle kfp_pos_DecayVtx = kfp_pos;
KFParticle kfp_ele_DecayVtx = kfp_ele;
kfp_pos_DecayVtx.TransportToPoint(xyz);
kfp_ele_DecayVtx.TransportToPoint(xyz);
kfp_pos_DecayVtx.TransportToPoint(xyz.data());
kfp_ele_DecayVtx.TransportToPoint(xyz.data());

// KFParticle kfp_pos_PV = kfp_pos_DecayVtx;
// KFParticle kfp_ele_PV = kfp_ele_DecayVtx;
Expand Down Expand Up @@ -407,7 +409,7 @@ struct skimmerGammaConversion {
}
PROCESS_SWITCH(skimmerGammaConversion, processMc, "process reconstructed and mc info ", false);

template <typename TV0, typename TTRACK>
template <o2::soa::is_iterator TV0, o2::soa::is_iterator TTRACK>
eV0Confirmation isTrueV0(TV0 const& /*theV0*/,
TTRACK const& theTrackPos,
TTRACK const& theTrackNeg)
Expand Down Expand Up @@ -516,7 +518,7 @@ struct skimmerGammaConversion {
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{adaptAnalysisTask<skimmerGammaConversion>(cfgc, TaskName{"skimmer-gamma-conversion"})};
return WorkflowSpec{adaptAnalysisTask<skimmerGammaConversion>(context, TaskName{"skimmer-gamma-conversion"})};
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ struct skimmerGammaConversionTruthOnlyMc {
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{adaptAnalysisTask<skimmerGammaConversionTruthOnlyMc>(cfgc, TaskName{"skimmer-gamma-conversion-truthonlymc"})};
return WorkflowSpec{adaptAnalysisTask<skimmerGammaConversionTruthOnlyMc>(context, TaskName{"skimmer-gamma-conversion-truthonlymc"})};
}
7 changes: 3 additions & 4 deletions PWGEM/PhotonMeson/Tasks/CheckMCV0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,14 @@ struct CheckMCV0 {
Configurable<std::string> mLUTPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"};
Configurable<std::string> mVtxPath{"mVtxPath", "GLO/Calib/MeanVertex", "Path of the mean vertex file"};
Configurable<std::string> mCCDBUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Service<o2::ccdb::BasicCCDBManager> mCCDB;
Service<o2::ccdb::BasicCCDBManager> mCCDB{};
int mRunNumber{-1};
o2::base::MatLayerCylSet* mLUT{nullptr};
o2::parameters::GRPMagField* mGRPMagField{nullptr};

// params
std::array<float, 6> mcPosXYZEtaTglPtProp{};
std::array<float, 6> mcEleXYZEtaTglPtProp{};
std::array<float, 6> mcMotherXYZEtaTglPtProp{};

// Track Types
static constexpr std::array<std::string_view, 6> v0Types{"ITSTPC_ITSTPC/", "TPConly_TPConly/", "ITSonly_ITSonly/", "ITSTPC_TPConly/", "ITSTPC_ITSonly/", "TPConly_ITSonly/"};
Expand Down Expand Up @@ -515,7 +514,7 @@ struct CheckMCV0 {
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{adaptAnalysisTask<CheckMCV0>(cfgc, TaskName{"check-mc-v0"})};
return WorkflowSpec{adaptAnalysisTask<CheckMCV0>(context, TaskName{"check-mc-v0"})};
}
27 changes: 15 additions & 12 deletions PWGEM/PhotonMeson/Tasks/compconvbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <THnSparse.h>
#include <TPDGCode.h>

#include <array>
#include <cstdlib>
#include <optional>
#include <ranges>
Expand Down Expand Up @@ -83,11 +84,11 @@ struct Compconvbuilder {
EMOnly = 2,
LFOnly = 3,
Common = 4,
NConversionBuilder
NConversionBuilder = 5
};

static constexpr std::string_view kConversionBuilder[NConversionBuilder] = {"EMBuilder/", "LFBuilder/", "EMOnly/", "LFOnly/", "Common/"};
static constexpr std::string_view kEventTypes[2] = {"before/", "after/"};
static constexpr std::array<std::string_view, NConversionBuilder> kConversionBuilder = {"EMBuilder/", "LFBuilder/", "EMOnly/", "LFOnly/", "Common/"};
static constexpr std::array<std::string_view, 2> kEventTypes = {"before/", "after/"};

EMPhotonEventCut fEMEventCut;
struct : ConfigurableGroup {
Expand Down Expand Up @@ -765,9 +766,7 @@ struct Compconvbuilder {

registry.fill(HIST("truePhotons/Sparse_Converted"), d1.vx(), mc.y(), d1.vz(), r, mc.phi(), mc.eta(), mc.pt());

int id1 = mc2trk.count(d1.globalIndex()) ? mc2trk[d1.globalIndex()] : -1;
int id2 = mc2trk.count(d2.globalIndex()) ? mc2trk[d2.globalIndex()] : -1;
if (id1 < 0 || id2 < 0) {
if (!mc2trk.contains(d1.globalIndex()) || !mc2trk.contains(d2.globalIndex())) {
continue;
}
}
Expand Down Expand Up @@ -795,8 +794,9 @@ struct Compconvbuilder {
}

for (const auto& collision : collisions) {
if (!fEMEventCut.IsSelected(collision))
if (!fEMEventCut.IsSelected(collision)) {
continue;
}

fillEventInfo<1, EMBuilder>(collision);

Expand All @@ -818,22 +818,25 @@ struct Compconvbuilder {
.emmcparticle_as<aod::EMMCParticles>();
int pid = FindCommonMotherFrom2Prongs(posmc, negmc,
kPositron, kElectron, kGamma, mcparticles);
if (pid >= 0)
if (pid >= 0) {
table[pid].emIt = it;
}
}

for (LFIt it = lfSlice.begin(); it != lfSlice.end(); ++it) {
int posTrackIndex = it.posTrackId();
auto negTrackIndex = it.negTrackId();

if (!trackToMcLabel.count(posTrackIndex) || !trackToMcLabel.count(negTrackIndex))
if (!trackToMcLabel.contains(posTrackIndex) || !trackToMcLabel.contains(negTrackIndex)) {
continue;
}
auto posmc = mcparticles.iteratorAt(trackToMcLabel[posTrackIndex]);
auto negmc = mcparticles.iteratorAt(trackToMcLabel[negTrackIndex]);
int pid = FindCommonMotherFrom2Prongs(posmc, negmc,
kPositron, kElectron, kGamma, mcparticles);
if (pid >= 0)
if (pid >= 0) {
table[pid].lfIt = it;
}
}

for (auto const& [pid, entry] : table) {
Expand Down Expand Up @@ -872,7 +875,7 @@ struct Compconvbuilder {
PROCESS_SWITCH(Compconvbuilder, processConvV0s, "Process generated converted V0s", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfg)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{adaptAnalysisTask<Compconvbuilder>(cfg)};
return WorkflowSpec{adaptAnalysisTask<Compconvbuilder>(context)};
}
Loading
Loading