Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MegaLinter] Apply linters automatic fixes to #4499 #229

Closed
wants to merge 4 commits into from
Closed
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 PWGJE/TableProducer/jettrackderived.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct jetspectraDerivedMaker {

// Custom track cuts for the cut variation study
TrackSelection customTrackCuts;
Configurable<int> itsPattern{"itsPattern", 1, "0 = Run3ITSibAny, 1 = Run3ITSallAny, 2 = Run3ITSall7Layers, 3 = Run3ITSibTwo"};
Configurable<int> itsPattern{"itsPattern", 2, "0 = Run3ITSibAny, 1 = Run3ITSibTwo, 2 = Run3ITSallAny, 3 = Run3ITSall7Layers"};
Configurable<bool> requireITS{"requireITS", true, "Additional cut on the ITS requirement"};
Configurable<bool> requireTPC{"requireTPC", true, "Additional cut on the TPC requirement"};
Configurable<bool> requireGoldenChi2{"requireGoldenChi2", true, "Additional cut on the GoldenChi2"};
Expand Down
4 changes: 2 additions & 2 deletions PWGJE/Tasks/trackJetqa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct TrackJetQa {

// Custom track cuts for the cut variation study
TrackSelection customTrackCuts;
Configurable<int> itsPattern{"itsPattern", 1, "0 = Run3ITSibAny, 1 = Run3ITSallAny, 2 = Run3ITSall7Layers, 3 = Run3ITSibTwo"};
Configurable<int> itsPattern{"itsPattern", 2, "0 = Run3ITSibAny, 1 = Run3ITSibTwo, 2 = Run3ITSallAny, 3 = Run3ITSall7Layers"};
Configurable<bool> requireITS{"requireITS", true, "Additional cut on the ITS requirement"};
Configurable<bool> requireTPC{"requireTPC", true, "Additional cut on the TPC requirement"};
Configurable<bool> requireGoldenChi2{"requireGoldenChi2", true, "Additional cut on the GoldenChi2"};
Expand Down Expand Up @@ -159,7 +159,7 @@ struct TrackJetQa {

histos.add("Centrality/FT0M", "CentFT0M", HistType::kTH1D, {axisPercentileFT0M});
histos.add("Centrality/FT0A", "CentFT0A", HistType::kTH1D, {axisPercentileFT0A});
histos.add("Centrality/FT0C", "CentFT0C", HistType::kTH1D, {axisPercentileFT0M});
histos.add("Centrality/FT0C", "CentFT0C", HistType::kTH1D, {axisPercentileFT0C});
histos.add("Mult/NTracksPV", "MultNTracksPV", HistType::kTH1D, {axisMultiplicityPV});
histos.add("Mult/FT0M", "MultFT0M", HistType::kTH1D, {axisMultiplicityFT0M});
histos.add("Mult/FT0A", "MultFT0A", HistType::kTH1D, {axisMultiplicityFT0A});
Expand Down
22 changes: 11 additions & 11 deletions PWGLF/TableProducer/lambdakzerobuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ struct lambdakzeroBuilder {
Configurable<float> massWindowSafetyMargin{"massWindowSafetyMargin", 0.001, "Extra mass window safety margin"};

// apply lifetime cuts to K0Short and Lambda candidates
// unit of measurement: centimeters
// lifetime of Lambda ~7.9cm but keep in mind feeddown from cascades
// unit of measurement: centimeters
// lifetime of Lambda ~7.9cm but keep in mind feeddown from cascades
// lifetime of K0Short ~2.5cm, no feeddown and plenty to cut
static constexpr float defaultLifetimeCuts[1][2] = {{1e+6, 1e+6}};
Configurable<LabeledArray<float>> lifetimecut{"lifetimecut", {defaultLifetimeCuts[0], 2, {"lifetimecutLambda", "lifetimecutK0S"}}, "lifetimecut"};
Expand Down Expand Up @@ -738,10 +738,10 @@ struct lambdakzeroBuilder {
return false; // reject - daughters have too large eta to be reliable for MC corrections
}

// calculate proper lifetime
// m*L/p for each hypothesis
float lML2P_K0Short = o2::constants::physics::MassKaonNeutral*lLengthTraveled/lPtotal;
float lML2P_Lambda = o2::constants::physics::MassLambda*lLengthTraveled/lPtotal;
// calculate proper lifetime
// m*L/p for each hypothesis
float lML2P_K0Short = o2::constants::physics::MassKaonNeutral * lLengthTraveled / lPtotal;
float lML2P_Lambda = o2::constants::physics::MassLambda * lLengthTraveled / lPtotal;

// Passes momentum window check
statisticsRegistry.v0stats[kWithinMomentumRange]++;
Expand All @@ -762,10 +762,10 @@ struct lambdakzeroBuilder {
bool desiredMassAntiLambda = false;

if (massWindownumberOfSigmas > 1e+3) {
desiredMassK0Short = true; // safety fallback
desiredMassLambda = true; // safety fallback
desiredMassK0Short = true; // safety fallback
desiredMassLambda = true; // safety fallback
desiredMassAntiLambda = true; // safety fallback
}else{
} else {
desiredMassK0Short = TMath::Abs(v0candidate.k0ShortMass - o2::constants::physics::MassKaonNeutral) < massWindownumberOfSigmas * getMassSigmaK0Short(lPt) + massWindowSafetyMargin;
desiredMassLambda = TMath::Abs(v0candidate.lambdaMass - o2::constants::physics::MassLambda) < massWindownumberOfSigmas * getMassSigmaLambda(lPt) + massWindowSafetyMargin;
desiredMassAntiLambda = TMath::Abs(v0candidate.antiLambdaMass - o2::constants::physics::MassLambda) < massWindownumberOfSigmas * getMassSigmaLambda(lPt) + massWindowSafetyMargin;
Expand All @@ -778,8 +778,8 @@ struct lambdakzeroBuilder {
bool dEdxAntiLambda = V0.isdEdxAntiLambda() || !massWindowWithTPCPID;

// check proper lifetime if asked for
bool passML2P_K0Short = lML2P_K0Short < lifetimecut->get("lifetimecutK0S") || lifetimecut->get("lifetimecutK0S") > 1000;
bool passML2P_Lambda = lML2P_Lambda < lifetimecut->get("lifetimecutLambda") || lifetimecut->get("lifetimecutLambda") > 1000;
bool passML2P_K0Short = lML2P_K0Short < lifetimecut->get("lifetimecutK0S") || lifetimecut->get("lifetimecutK0S") > 1000;
bool passML2P_Lambda = lML2P_Lambda < lifetimecut->get("lifetimecutLambda") || lifetimecut->get("lifetimecutLambda") > 1000;

if (passML2P_K0Short && dEdxK0Short && desiredMassK0Short)
keepCandidate = true;
Expand Down
47 changes: 30 additions & 17 deletions PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1367,9 +1367,17 @@ struct LFNucleiBATask {
histos.add("spectraGen/deuteron/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/deuteron/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/deuteron/histSecTransportPtD", "generated particles", HistType::kTH1F, {ptAxis});
histos.add("tracks/deuteron/histAntiDPtShiftRec", "histAntiDPtShiftRec", HistType::kTH1F, {ptAxis});
histos.add("tracks/deuteron/histAntiDPtRec", "histAntiDPtRec", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/histPtShiftCorrection", "histPtShiftCorrection", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
histos.add("tracks/deuteron/histAntiDeuteronPtShiftRec", "histAntiDeuteronPtShiftRec", HistType::kTH1F, {ptAxis});
histos.add("tracks/deuteron/histAntiDeuteronPtRec", "histAntiDeuteronPtRec", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/deuteron/histAntiDeuteronPtShiftCorrection", "histAntiDeuteronPtShiftCorrection", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
histos.add("spectraGen/deuteron/histAntiDeuteronPtShift", "PtReco-PtGen vs PtReco", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
histos.add("spectraGen/deuteron/histAntiDeuteronPtShiftVsEta", "PtReco-PtGen vs #eta", HistType::kTH2F, {{200, -2.f, 2.f}, {400, -4.f, 4.f}});

histos.add("tracks/deuteron/histDeuteronPtShiftRec", "histDeuteronPtShiftRec", HistType::kTH1F, {ptAxis});
histos.add("tracks/deuteron/histDeuteronPtRec", "histDeuteronPtRec", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/deuteron/histDeuteronPtShiftCorrection", "histDeuteronPtShiftCorrection", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
histos.add("spectraGen/deuteron/histDeuteronPtShift", "PtReco-PtGen vs PtReco", HistType::kTH2F, {{800, 0.f, 8.f}, {400, -4.f, 4.f}});
histos.add("spectraGen/deuteron/histDeuteronPtShiftVsEta", "PtReco-PtGen vs #eta", HistType::kTH2F, {{200, -2.f, 2.f}, {400, -4.f, 4.f}});

histos.add("spectraGen/deuteron/histGenPtantiD", "generated particles", HistType::kTH1F, {ptAxis});
histos.add("spectraGen/deuteron/histGenPtantiDPrim", "generated particles", HistType::kTH1F, {ptAxis});
Expand Down Expand Up @@ -1706,12 +1714,15 @@ struct LFNucleiBATask {

// PID
int pdgCode = 0;
// gen Pt
float genPt = 0;
if constexpr (IsFilteredData) {
isPhysPrim = track.isPhysicalPrimary();
isProdByGen = track.producedByGenerator();
isWeakDecay = track.getProcess() == 4;
pdgCode = track.pdgCode();
// if(pdgCode == -PDGDeuteron) LOG(info)<<"antiDeuteron PDGcode ===="<<pdgCode;
genPt = TMath::Sqrt(TMath::Power(track.px(), 2) + TMath::Power(track.py(), 2));

} else {
if (!track.has_mcParticle()) {
continue;
Expand Down Expand Up @@ -1775,9 +1786,14 @@ struct LFNucleiBATask {
if (isPhysPrim) {
histos.fill(HIST("tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTruePrim"), DPt, track.dcaXY());
histos.fill(HIST("tracks/deuteron/dca/before/hDCAzVsPtDeuteronTruePrim"), DPt, track.dcaZ());
}
if (!isPhysPrim && isProdByGen) {
//
if constexpr (IsFilteredData) {
histos.fill(HIST("spectraGen/deuteron/histDeuteronPtShift"), track.pt(), track.pt() - genPt);
histos.fill(HIST("spectraGen/deuteron/histDeuteronPtShiftVsEta"), track.eta(), track.pt() - genPt);
// histos.fill(HIST("spectraGen/histPShift"), track.p(), track.p() - track.mcParticle().p());
histos.fill(HIST("tracks/deuteron/histDeuteronPtShiftRec"), DPt);
histos.fill(HIST("tracks/deuteron/histDeuteronPtRec"), track.pt());
histos.fill(HIST("spectraGen/deuteron/histDeuteronPtShiftCorrection"), DPt, DPt - genPt);
}
}
if (!isPhysPrim && !isProdByGen) {
histos.fill(HIST("tracks/deuteron/dca/before/hDCAxyVsPtDeuteronTrueTransport"), DPt, track.dcaXY());
Expand All @@ -1796,18 +1812,15 @@ struct LFNucleiBATask {
if (isPhysPrim) {
histos.fill(HIST("tracks/deuteron/dca/before/hDCAxyVsPtantiDeuteronTruePrim"), antiDPt, track.dcaXY());
histos.fill(HIST("tracks/deuteron/dca/before/hDCAzVsPtantiDeuteronTruePrim"), antiDPt, track.dcaZ());
if constexpr (!IsFilteredData) {
histos.fill(HIST("spectraGen/histPtShift"), track.pt(), track.pt() - track.mcParticle().pt());
histos.fill(HIST("spectraGen/histPtShiftVsEta"), track.eta(), track.pt() - track.mcParticle().pt());
histos.fill(HIST("spectraGen/histPShift"), track.p(), track.p() - track.mcParticle().p());
histos.fill(HIST("tracks/deuteron/histAntiDPtShiftRec"), antiDPt);
histos.fill(HIST("tracks/deuteron/histAntiDPtRec"), track.pt());
histos.fill(HIST("spectraGen/histPtShiftCorrection"), antiDPt, antiDPt - track.mcParticle().pt());
if constexpr (IsFilteredData) {
histos.fill(HIST("spectraGen/deuteron/histAntiDeuteronPtShift"), track.pt(), track.pt() - genPt);
histos.fill(HIST("spectraGen/deuteron/histAntiDeuteronPtShiftVsEta"), track.eta(), track.pt() - genPt);
// histos.fill(HIST("spectraGen/histPShift"), track.p(), track.p() - track.mcParticle().p());
histos.fill(HIST("tracks/deuteron/histAntiDeuteronPtShiftRec"), antiDPt);
histos.fill(HIST("tracks/deuteron/histAntiDeuteronPtRec"), track.pt());
histos.fill(HIST("spectraGen/deuteron/histAntiDeuteronPtShiftCorrection"), antiDPt, antiDPt - genPt);
}
}
if (!isPhysPrim && isProdByGen) {
//
}
if (!isPhysPrim && !isProdByGen) {
histos.fill(HIST("tracks/deuteron/dca/before/hDCAxyVsPtantiDeuteronTrueTransport"), antiDPt, track.dcaXY());
histos.fill(HIST("tracks/deuteron/dca/before/hDCAzVsPtantiDeuteronTrueTransport"), antiDPt, track.dcaZ());
Expand Down
Loading