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
18 changes: 9 additions & 9 deletions Common/Core/RecoDecay.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ class RecoDecay
{
array<double, 3> momTotal{0., 0., 0.}; // candidate momentum vector
double energyTot{0.}; // candidate energy
for (auto iProng = 0; iProng < N; ++iProng) {
for (auto iMom = 0; iMom < 3; ++iMom) {
for (std::size_t iProng = 0; iProng < N; ++iProng) {
for (std::size_t iMom = 0; iMom < 3; ++iMom) {
momTotal[iMom] += arrMom[iProng][iMom];
} // loop over momentum components
energyTot += E(arrMom[iProng], arrMass[iProng]);
Expand Down Expand Up @@ -505,7 +505,7 @@ class RecoDecay
{
auto decLenXY = distanceXY(posPV, posSV);
double maxNormDeltaIP{0.};
for (auto iProng = 0; iProng < N; ++iProng) {
for (std::size_t iProng = 0; iProng < N; ++iProng) {
auto prongNormDeltaIP = normImpParMeasMinusExpProng(decLenXY, errDecLenXY, momMother, arrImpPar[iProng],
arrErrImpPar[iProng], arrMom[iProng]);
if (std::abs(prongNormDeltaIP) > std::abs(maxNormDeltaIP)) {
Expand Down Expand Up @@ -723,7 +723,7 @@ class RecoDecay
*sign = sgn;
}
// Loop over decay candidate prongs
for (auto iProng = 0; iProng < N; ++iProng) {
for (std::size_t iProng = 0; iProng < N; ++iProng) {
auto particleI = arrDaughters[iProng].mcParticle(); // ith daughter particle
arrDaughtersIndex[iProng] = particleI.globalIndex();
// Get the list of daughter indices from the mother of the first prong.
Expand All @@ -746,7 +746,7 @@ class RecoDecay
return -1;
}
// Check that the number of direct daughters is not larger than the number of expected final daughters.
if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > N) {
if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > int(N)) {
//Printf("MC Rec: Rejected: too many direct daughters: %d (expected %ld final)", indexDaughterLast - indexDaughterFirst + 1, N);
return -1;
}
Expand All @@ -766,7 +766,7 @@ class RecoDecay
// Check that the daughter is in the list of final daughters.
// (Check that the daughter is not a stepdaughter, i.e. particle pointing to the mother while not being its daughter.)
bool isDaughterFound = false; // Is the index of this prong among the remaining expected indices of daughters?
for (auto iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) {
for (std::size_t iD = 0; iD < arrAllDaughtersIndex.size(); ++iD) {
if (arrDaughtersIndex[iProng] == arrAllDaughtersIndex[iD]) {
arrAllDaughtersIndex[iD] = -1; // Remove this index from the array of expected daughters. (Rejects twin daughters, i.e. particle considered twice as a daughter.)
isDaughterFound = true;
Expand All @@ -781,7 +781,7 @@ class RecoDecay
auto PDGParticleI = particleI.pdgCode(); // PDG code of the ith daughter
//Printf("MC Rec: Daughter %d PDG: %d", iProng, PDGParticleI);
bool isPDGFound = false; // Is the PDG code of this daughter among the remaining expected PDG codes?
for (auto iProngCp = 0; iProngCp < N; ++iProngCp) {
for (std::size_t iProngCp = 0; iProngCp < N; ++iProngCp) {
if (PDGParticleI == sgn * arrPDGDaughters[iProngCp]) {
arrPDGDaughters[iProngCp] = 0; // Remove this PDG code from the array of expected ones.
isPDGFound = true;
Expand Down Expand Up @@ -866,7 +866,7 @@ class RecoDecay
return false;
}
// Check that the number of direct daughters is not larger than the number of expected final daughters.
if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > N) {
if (indexDaughterFirst > -1 && indexDaughterLast > -1 && indexDaughterLast - indexDaughterFirst + 1 > int(N)) {
//Printf("MC Gen: Rejected: too many direct daughters: %d (expected %ld final)", indexDaughterLast - indexDaughterFirst + 1, N);
return false;
}
Expand All @@ -888,7 +888,7 @@ class RecoDecay
auto PDGCandidateDaughterI = candidateDaughterI.pdgCode(); // PDG code of the ith daughter
//Printf("MC Gen: Daughter %d PDG: %d", indexDaughterI, PDGCandidateDaughterI);
bool isPDGFound = false; // Is the PDG code of this daughter among the remaining expected PDG codes?
for (auto iProngCp = 0; iProngCp < N; ++iProngCp) {
for (std::size_t iProngCp = 0; iProngCp < N; ++iProngCp) {
if (PDGCandidateDaughterI == sgn * arrPDGDaughters[iProngCp]) {
arrPDGDaughters[iProngCp] = 0; // Remove this PDG code from the array of expected ones.
isPDGFound = true;
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/HFCandidateCreator2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct HFCandidateCreator2Prong {
}
const auto& secondaryVertex = df.getPCACandidate();
auto chi2PCA = df.getChi2AtPCACandidate();
auto covMatrixPCA = df.calcPCACovMatrix().Array();
auto covMatrixPCA = df.calcPCACovMatrixFlat();
hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
auto trackParVar0 = df.getTrack(0);
auto trackParVar1 = df.getTrack(1);
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/HFCandidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct HFCandidateCreator3Prong {
}
const auto& secondaryVertex = df.getPCACandidate();
auto chi2PCA = df.getChi2AtPCACandidate();
auto covMatrixPCA = df.calcPCACovMatrix().Array();
auto covMatrixPCA = df.calcPCACovMatrixFlat();
hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
trackParVar0 = df.getTrack(0);
trackParVar1 = df.getTrack(1);
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/HFCandidateCreatorBPlus.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct HfCandidateCreatorBplus {
auto trackD0 = o2::dataformats::V0(vertexD0, momentumD0, pCovMatrixD0, prong0TrackParCov, prong1TrackParCov, {0, 0}, {0, 0});

//loop over tracks for pi selection
auto count = 0;
//auto count = 0;
for (auto& track : tracks) {
//if(count % 100 == 0){
//LOGF(info, "Col: %d (cand); %d (track)", candidate.collisionId(), track.collisionId());
Expand Down Expand Up @@ -168,7 +168,7 @@ struct HfCandidateCreatorBplus {
bfitter.getTrack(1).getPxPyPzGlo(pVecBach); //momentum of pi+ at the B+ vertex
const auto& BSecVertex = bfitter.getPCACandidate();
auto chi2PCA = bfitter.getChi2AtPCACandidate();
auto covMatrixPCA = bfitter.calcPCACovMatrix().Array();
auto covMatrixPCA = bfitter.calcPCACovMatrixFlat();
hCovSVXX->Fill(covMatrixPCA[0]); //FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.

pVecBCand = RecoDecay::PVec(pVecD0, pVecBach);
Expand Down
8 changes: 3 additions & 5 deletions PWGHF/TableProducer/HFCandidateCreatorCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ using MyBigTracks = aod::BigTracks;

/// Reconstruction of heavy-flavour cascade decay candidates
struct HFCandidateCreatorCascade {

Produces<aod::HfCandCascBase> rowCandidateBase;

Configurable<double> bZ{"bZ", 5., "magnetic field"};
Expand Down Expand Up @@ -138,7 +137,7 @@ struct HFCandidateCreatorCascade {

const auto& secondaryVertex = df.getPCACandidate();
auto chi2PCA = df.getChi2AtPCACandidate();
auto covMatrixPCA = df.calcPCACovMatrix().Array();
auto covMatrixPCA = df.calcPCACovMatrixFlat();
hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.
// do I have to call "df.propagateTracksToVertex();"?
auto trackParVarV0 = df.getTrack(0);
Expand Down Expand Up @@ -240,11 +239,10 @@ struct HFCandidateCreatorCascadeMC {
LOG(debug) << "\n";
LOG(debug) << "Checking MC for candidate!";
LOG(debug) << "Looking for K0s";
#ifdef MY_DEBUG
auto indexV0DaughPos = trackV0DaughPos.mcParticleId();
auto indexV0DaughNeg = trackV0DaughNeg.mcParticleId();
auto indexBach = bach.mcParticleId();

#ifdef MY_DEBUG
bool isLc = isLcK0SpFunc(indexBach, indexV0DaughPos, indexV0DaughNeg, indexProton, indexK0Spos, indexK0Sneg);
bool isK0SfromLc = isK0SfromLcFunc(indexV0DaughPos, indexV0DaughNeg, indexK0Spos, indexK0Sneg);
#endif
Expand Down Expand Up @@ -275,7 +273,7 @@ struct HFCandidateCreatorCascadeMC {
// checking that the final daughters (decay depth = 3) are p, pi+, pi-
RecoDecay::getDaughters(particlesMC, particle, &arrDaughLcIndex, arrDaughLcPDGRef, 3); // best would be to check the K0S daughters
if (arrDaughLcIndex.size() == 3) {
for (auto iProng = 0; iProng < arrDaughLcIndex.size(); ++iProng) {
for (std::size_t iProng = 0; iProng < arrDaughLcIndex.size(); ++iProng) {
auto daughI = particlesMC.iteratorAt(arrDaughLcIndex[iProng]);
arrDaughLcPDG[iProng] = daughI.pdgCode();
}
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/HFCandidateCreatorChic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct HFCandidateCreatorChic {
trackJpsi.propagateToDCA(primaryVertex, magneticField, &impactParameter0);

// get uncertainty of the decay length
double phi, theta;
//double phi, theta;
// getPointDirection(array{collision.posX(), collision.posY(), collision.posZ()}, ChicsecondaryVertex, phi, theta);
//auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
//auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));
Expand Down Expand Up @@ -211,7 +211,7 @@ struct HFCandidateCreatorChicMC {
aod::ECALs const& ecals)
{
int indexRec = -1;
int8_t sign = 0;
//int8_t sign = 0;
int8_t flag = 0;
int8_t origin = 0;
int8_t channel = 0;
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/HFCandidateCreatorLb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct HFCandidateCreatorLb {
int index0Lc = track0.globalIndex();
int index1Lc = track1.globalIndex();
int index2Lc = track2.globalIndex();
int charge = track0.sign() + track1.sign() + track2.sign();
//int charge = track0.sign() + track1.sign() + track2.sign();

for (auto& trackPion : tracks) {
if (trackPion.pt() < ptPionMin) {
Expand All @@ -159,7 +159,7 @@ struct HFCandidateCreatorLb {
// calculate relevant properties
const auto& secondaryVertexLb = df2.getPCACandidate();
auto chi2PCA = df2.getChi2AtPCACandidate();
auto covMatrixPCA = df2.calcPCACovMatrix().Array();
auto covMatrixPCA = df2.calcPCACovMatrixFlat();

df2.propagateTracksToVertex();
df2.getTrack(0).getPxPyPzGlo(pvecLc);
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/HFCandidateCreatorX.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct HFCandidateCreatorX {
// calculate relevant properties
const auto& XsecondaryVertex = df3.getPCACandidate();
auto chi2PCA = df3.getChi2AtPCACandidate();
auto covMatrixPCA = df3.calcPCACovMatrix().Array();
auto covMatrixPCA = df3.calcPCACovMatrixFlat();
hCovSVXX->Fill(covMatrixPCA[0]); // FIXME: Calculation of errorDecayLength(XY) gives wrong values without this line.

df3.propagateTracksToVertex(); // propagate the pions and Jpsi to the X vertex
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/HFCandidateCreatorXicc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ struct HfCandidateCreatorXicc {
// calculate relevant properties
const auto& secondaryVertexXicc = df2.getPCACandidate();
auto chi2PCA = df2.getChi2AtPCACandidate();
auto covMatrixPCA = df2.calcPCACovMatrix().Array();
auto covMatrixPCA = df2.calcPCACovMatrixFlat();

df2.propagateTracksToVertex();
df2.getTrack(0).getPxPyPzGlo(pvecxic);
Expand Down
12 changes: 6 additions & 6 deletions PWGHF/TableProducer/HFD0CandidateSelectorALICE3Forward.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ struct HFD0CandidateSelectorALICE3Forward {
auto trackPos = candidate.index0_as<Trks>();
auto trackNeg = candidate.index1_as<Trks>();

auto momentumPosTrack = trackPos.p();
auto momentumNegTrack = trackNeg.p();
//auto momentumPosTrack = trackPos.p();
//auto momentumNegTrack = trackNeg.p();

bool topolD0 = selectionTopolConjugate(candidate, trackPos, trackNeg);
bool topolD0bar = selectionTopolConjugate(candidate, trackNeg, trackPos);
Expand All @@ -226,9 +226,9 @@ struct HFD0CandidateSelectorALICE3Forward {
continue;
}

float nsigmaTOFNegKaon = -5000.0;
//float nsigmaTOFNegKaon = -5000.0;
float nsigmaRICHNegKaon = -5000.0;
float nsigmaTOFPosPion = -5000.0;
//float nsigmaTOFPosPion = -5000.0;
float nsigmaRICHPosPion = -5000.0;

if (trackPos.has_frich()) {
Expand All @@ -239,8 +239,8 @@ struct HFD0CandidateSelectorALICE3Forward {
nsigmaRICHNegKaon = trackNeg.frich().frichNsigmaKa();
}

bool selectPionTOFplusRICH = false;
bool selectKaonTOFplusRICH = false;
//bool selectPionTOFplusRICH = false;
//bool selectKaonTOFplusRICH = false;

if (topolD0) {
statusD0NoPID = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ struct HFD0CandidateSelectorparametrizedPID {
auto trackPos = candidate.index0_as<Trks>();
auto trackNeg = candidate.index1_as<Trks>();

auto momentumPosTrack = trackPos.p();
auto momentumNegTrack = trackNeg.p();
//auto momentumPosTrack = trackPos.p();
//auto momentumNegTrack = trackNeg.p();
auto ptPosTrack = trackPos.pt();
auto ptNegTrack = trackNeg.pt();
auto etaPosTrack = std::abs(trackPos.eta());
Expand Down
8 changes: 4 additions & 4 deletions PWGHF/TableProducer/HFLcK0sPCandidateSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ struct HFLcK0sPCandidateSelector {
} else {
statusTOF = -1; //no PID info
}

if (statusTPC == 2 || statusTOF == 2) {
return 1; //what if we have 2 && 0 ?
} else if (statusTPC == 1 && statusTOF == 1) {
Expand All @@ -327,9 +327,9 @@ struct HFLcK0sPCandidateSelector {
void process(aod::HfCandCascade const& candidates, MyBigTracks const& tracks)
{
int statusLc = 0; // final selection flag : 0-rejected 1-accepted
bool topolLc = 0;
//bool topolLc = 0;
int pidProton = -1;
int pidLc = -1;
//int pidLc = -1;

for (auto& candidate : candidates) { //looping over cascade candidates

Expand All @@ -352,7 +352,7 @@ struct HFLcK0sPCandidateSelector {
}
*/

topolLc = true;
//topolLc = true;
pidProton = -1;

// daughter track validity selection
Expand Down
Loading