Skip to content
Merged
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
21 changes: 10 additions & 11 deletions PWGLF/TableProducer/Strangeness/sigma0builder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@
Service<o2::ccdb::BasicCCDBManager> ccdb;
ctpRateFetcher rateFetcher;

//SliceCache cache;
// SliceCache cache;

Produces<aod::Sigma0Cores> sigma0cores; // save sigma0 candidates for analysis
Produces<aod::SigmaPhotonExtras> sigmaPhotonExtras; // save sigma0 candidates for analysis
Produces<aod::SigmaLambdaExtras> sigmaLambdaExtras; // save sigma0 candidates for analysis
Produces<aod::SigmaMCCores> sigma0mccores;

// For manual sliceBy
//PresliceUnsorted<V0DerivedMCDatas> perCollisionMCDerived = o2::aod::v0data::straCollisionId;
//PresliceUnsorted<V0StandardDerivedDatas> perCollisionSTDDerived = o2::aod::v0data::straCollisionId;
// PresliceUnsorted<V0DerivedMCDatas> perCollisionMCDerived = o2::aod::v0data::straCollisionId;
// PresliceUnsorted<V0StandardDerivedDatas> perCollisionSTDDerived = o2::aod::v0data::straCollisionId;
PresliceUnsorted<soa::Join<aod::StraCollisions, aod::StraCents, aod::StraEvSels, aod::StraCollLabels>> perMcCollision = aod::v0data::straMCCollisionId;

// pack track quality but separte also afterburner
Expand Down Expand Up @@ -546,8 +546,8 @@
auto v0 = fullv0s.rawIteratorAt(selV0Indices[i]);
auto v0MC = v0.template v0MCCore_as<soa::Join<aod::V0MCCores, aod::V0MCCollRefs>>();

float V0MCpT = RecoDecay::pt(array<float, 2>{v0MC.pxMC(), v0MC.pyMC()});

Check failure on line 549 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float V0PA = TMath::ACos(v0.v0cosPA());

Check failure on line 550 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
bool fIsV0CorrectlyAssigned = (v0MC.straMCCollisionId() == v0MCCollision.globalIndex());
bool isPrimary = v0MC.isPhysicalPrimary();

Expand Down Expand Up @@ -782,8 +782,8 @@
auto negTrackGamma2 = gamma2.template negTrackExtra_as<dauTracks>();

// Gamma1 Selection
bool passedTPCGamma1 = (TMath::Abs(posTrackGamma1.tpcNSigmaEl()) < Pi0PhotonMaxTPCNSigmas) ||

Check failure on line 785 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
(TMath::Abs(negTrackGamma1.tpcNSigmaEl()) < Pi0PhotonMaxTPCNSigmas);

Check failure on line 786 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

if (TMath::Abs(gamma1.mGamma()) > Pi0PhotonMaxMass ||
gamma1.qtarm() >= Pi0PhotonMaxQt ||
Expand Down Expand Up @@ -943,7 +943,7 @@
auto arrMom = std::array{pVecPhotons, pVecLambda};
float sigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
float sigmaY = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
float SigmapT = RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()});

Check failure on line 946 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float centrality = doPPAnalysis ? collision.centFT0M() : collision.centFT0C();

// Before any selection
Expand Down Expand Up @@ -1106,7 +1106,7 @@
TVector3 v2(lambda.px(), lambda.py(), lambda.pz());

// Sigma related
float fSigmapT = RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()});

Check failure on line 1109 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float fSigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
float fSigmaRap = RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0);
float fSigmaOPAngle = v1.Angle(v2);
Expand Down Expand Up @@ -1142,9 +1142,9 @@
std::vector<int> bestGammasArray;
std::vector<int> bestLambdasArray;

// brute force grouped index construction
std::vector<std::vector<int>> v0grouped(collisions.size());
// brute force grouped index construction
std::vector<std::vector<int>> v0grouped(collisions.size());

for (const auto& v0 : fullV0s) {
v0grouped[v0.straCollisionId()].push_back(v0.globalIndex());
}
Expand All @@ -1158,7 +1158,7 @@
continue;

float centrality = doPPAnalysis ? coll.centFT0M() : coll.centFT0C();

bool fhasMCColl = false;
if (coll.has_straMCCollision())
fhasMCColl = true;
Expand Down Expand Up @@ -1256,7 +1256,7 @@
std::array<float, 3> pVecLambda{lambda.px(), lambda.py(), lambda.pz()};
auto arrMom = std::array{pVecPhotons, pVecLambda};
float SigmaMass = RecoDecay::m(arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
float SigmapT = RecoDecay::pt(array{gamma.px() + lambda.px(), gamma.py() + lambda.py()});

Check failure on line 1259 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float SigmaY = TMath::Abs(RecoDecay::y(std::array{gamma.px() + lambda.px(), gamma.py() + lambda.py(), gamma.pz() + lambda.pz()}, o2::constants::physics::MassSigma0));

// MC properties
Expand All @@ -1271,9 +1271,9 @@
int LambdaCandPDGCode = lambdaMC.pdgCode();
int LambdaCandPDGCodeMother = lambdaMC.pdgCodeMother();

float SigmaMCpT = RecoDecay::pt(array{gammaMC.pxMC() + lambdaMC.pxMC(), gammaMC.pyMC() + lambdaMC.pyMC()});

Check failure on line 1274 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float PhotonMCpT = RecoDecay::pt(array{gammaMC.pxMC(), gammaMC.pyMC()});

Check failure on line 1275 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float LambdaMCpT = RecoDecay::pt(array{lambdaMC.pxMC(), lambdaMC.pyMC()});

Check failure on line 1276 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

if (fhasMCColl) {
auto lambdaMCCollision = coll.template straMCCollision_as<soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>>();
Expand Down Expand Up @@ -1331,9 +1331,9 @@
std::vector<int> bestGammasArray;
std::vector<int> bestLambdasArray;

// brute force grouped index construction
std::vector<std::vector<int>> v0grouped(collisions.size());
// brute force grouped index construction
std::vector<std::vector<int>> v0grouped(collisions.size());

for (const auto& v0 : fullV0s) {
v0grouped[v0.straCollisionId()].push_back(v0.globalIndex());
}
Expand Down Expand Up @@ -1421,4 +1421,3 @@
{
return WorkflowSpec{adaptAnalysisTask<sigma0builder>(cfgc)};
}

Loading