Skip to content

Commit

Permalink
Merge pull request #41 from alibuild/alibot-cleanup-8215
Browse files Browse the repository at this point in the history
Please consider the following formatting changes to AliceO2Group#8215
  • Loading branch information
mapalhares authored Oct 29, 2024
2 parents ec3e938 + ade10f8 commit 553ce58
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ float alphaAP(std::array<float, 3> const& momB, std::array<float, 3> const& momC
{
std::array<float, 3> momA = {momB[0] + momC[0], momB[1] + momC[1], momB[2] + momC[2]};
float momTot = std::sqrt(momA[0] * momA[0] + momA[1] * momA[1] + momA[2] * momA[2]);
float lQlPos = (momB[0] * momA[0] + momB[1] * momA[1] + momB[2] * momA[2]) / momTot;
float lQlPos = (momB[0] * momA[0] + momB[1] * momA[1] + momB[2] * momA[2]) / momTot;
float lQlNeg = (momC[0] * momA[0] + momC[1] * momA[1] + momC[2] * momA[2]) / momTot;
return (lQlPos - lQlNeg) / (lQlPos + lQlNeg);
}
Expand Down Expand Up @@ -256,7 +256,6 @@ struct lnnRecoTask {
hLnnCandLoss = qaRegistry.add<TH1>("hLnnCandLoss", ";CandLoss; ", HistType::kTH1D, {{7, -0.5, 6.5}});
h3HLoss = qaRegistry.add<TH1>("h3HLoss", ";3HLoss; ", HistType::kTH1D, {{5, -0.5, 4.5}});


hEvents->GetXaxis()->SetBinLabel(1, "All");
hEvents->GetXaxis()->SetBinLabel(2, "sel8");

Expand Down Expand Up @@ -378,7 +377,6 @@ struct lnnRecoTask {

if (!is3H && !isAnti3H) // discard if both tracks are not 3H candidates
continue;


// if alphaAP is > 0 the candidate is 3H, if < 0 it is anti-3H
std::array<float, 3> momPos = std::array{posTrack.px(), posTrack.py(), posTrack.pz()};
Expand All @@ -391,26 +389,26 @@ struct lnnRecoTask {
if (lnnCand.isMatter && !is3H) {
hLnnCandLoss->Fill(1.);
}
if (!lnnCand.isMatter && !isAnti3H){
if (!lnnCand.isMatter && !isAnti3H) {
hLnnCandLoss->Fill(2.);
}
continue;
}

auto& h3track = lnnCand.isMatter? posTrack : negTrack;
auto& h3track = lnnCand.isMatter ? posTrack : negTrack;
auto& h3Rigidity = lnnCand.isMatter ? posRigidity : negRigidity;
h3HLoss->Fill(0.);

if (h3Rigidity < TPCRigidityMin3H ||
h3track.tpcNClsFound() < nTPCClusMin3H ||
h3track.tpcChi2NCl() < Chi2nClusTPCMin ||
h3track.tpcChi2NCl() > Chi2nClusTPCMax ||
h3track.tpcChi2NCl() > Chi2nClusTPCMax ||
h3track.itsChi2NCl() > Chi2nClusITS) {
h3HLoss->Fill(1.);
h3HLoss->Fill(1.);
continue;
}
lnnCand.tpcChi3H = lnnCand.isMatter ? h3track.tpcChi2NCl() : negTrack.tpcChi2NCl();

lnnCand.tpcChi3H = lnnCand.isMatter ? h3track.tpcChi2NCl() : negTrack.tpcChi2NCl();
lnnCand.nSigma3H = lnnCand.isMatter ? nSigmaTPCpos : nSigmaTPCneg;
lnnCand.nTPCClusters3H = lnnCand.isMatter ? h3track.tpcNClsFound() : negTrack.tpcNClsFound();
lnnCand.tpcSignal3H = lnnCand.isMatter ? h3track.tpcSignal() : negTrack.tpcSignal();
Expand Down

0 comments on commit 553ce58

Please sign in to comment.