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 #4355 #221

Closed
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
9 changes: 8 additions & 1 deletion PWGCF/EbyEFluctuations/Tasks/MeanptFluctuations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "TList.h"
#include "TProfile.h"
#include "TProfile2D.h"
#include "TH2D.h"
#include "TH1D.h"
#include "TRandom3.h"
#include "TMath.h"

Expand Down Expand Up @@ -150,6 +152,7 @@ struct MeanptFluctuations_analysis {
Configurable<int> cfgNSubsample{"cfgNSubsample", 10, "Number of subsamples"};
ConfigurableAxis centAxis{"centAxis", {90, 0, 90}, ""};
ConfigurableAxis multAxis{"multAxis", {5000, 0.5, 5000.5}, ""};
ConfigurableAxis meanpTAxis{"meanpTAxis", {500, 0, 5.0}, ""};

expressions::Filter Nch_filter = aod::ptQn::n_ch > 3.0f;
using FilteredMultPtQn = soa::Filtered<aod::MultPtQn>;
Expand All @@ -173,6 +176,8 @@ struct MeanptFluctuations_analysis {
registry.add("Prof_var_t1", "", {HistType::kTProfile2D, {centAxis, multAxis}});
registry.add("Prof_skew_t1", "", {HistType::kTProfile2D, {centAxis, multAxis}});
registry.add("Prof_kurt_t1", "", {HistType::kTProfile2D, {centAxis, multAxis}});
registry.add("Hist2D_Nch_centrality", "", {HistType::kTH2D, {centAxis, multAxis}});
registry.add("Hist2D_meanpt_centrality", "", {HistType::kTH2D, {centAxis, meanpTAxis}});

// initial array
Subsample.resize(cfgNSubsample);
Expand Down Expand Up @@ -203,11 +208,13 @@ struct MeanptFluctuations_analysis {
skewness_term1 = (TMath::Power(event_ptqn.q1(), 3.0f) - 3.0f * event_ptqn.q2() * event_ptqn.q1() + 2.0f * event_ptqn.q3()) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f));
kurtosis_term1 = (TMath::Power(event_ptqn.q1(), 4.0f) - (6.0f * event_ptqn.q4()) + (8.0f * event_ptqn.q1() * event_ptqn.q3()) - (6.0f * TMath::Power(event_ptqn.q1(), 2.0f) * event_ptqn.q2()) + (3.0f * TMath::Power(event_ptqn.q2(), 2.0f))) / (event_ptqn.n_ch() * (event_ptqn.n_ch() - 1.0f) * (event_ptqn.n_ch() - 2.0f) * (event_ptqn.n_ch() - 3.0f));

// filling profiles for central values
// filling profiles and histograms for central values
registry.get<TProfile2D>(HIST("Prof_mean_t1"))->Fill(event_ptqn.centrality(), event_ptqn.n_ch(), mean_term1);
registry.get<TProfile2D>(HIST("Prof_var_t1"))->Fill(event_ptqn.centrality(), event_ptqn.n_ch(), variance_term1);
registry.get<TProfile2D>(HIST("Prof_skew_t1"))->Fill(event_ptqn.centrality(), event_ptqn.n_ch(), skewness_term1);
registry.get<TProfile2D>(HIST("Prof_kurt_t1"))->Fill(event_ptqn.centrality(), event_ptqn.n_ch(), kurtosis_term1);
registry.fill(HIST("Hist2D_Nch_centrality"), event_ptqn.centrality(), event_ptqn.n_ch());
registry.fill(HIST("Hist2D_meanpt_centrality"), event_ptqn.centrality(), mean_term1);

// selecting subsample and filling profiles
float l_Random = fRndm->Rndm();
Expand Down
14 changes: 11 additions & 3 deletions PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct NetProtonCumulants_Table_QA {
// Variable bin width axis
std::vector<double> ptBinning = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.8, 3.2, 3.6, 4.};
AxisSpec ptAxis = {ptBinning, "#it{p}_{T} (GeV/#it{c})"};
std::vector<double> centBining = {0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90};
std::vector<double> centBining = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90};
AxisSpec centAxis = {centBining, "centrality (%)"};
AxisSpec netProtonAxis = {2001, -1000.5, 1000.5, "net-proton number"};

Expand Down Expand Up @@ -130,8 +130,16 @@ struct NetProtonCumulants_Table_QA {
const float combNSigmaPr = std::sqrt(pow(track.tpcNSigmaPr(), 2.0) + pow(track.tofNSigmaPr(), 2.0));
const float combNSigmaPi = std::sqrt(pow(track.tpcNSigmaPi(), 2.0) + pow(track.tofNSigmaPi(), 2.0));
const float combNSigmaKa = std::sqrt(pow(track.tpcNSigmaKa(), 2.0) + pow(track.tofNSigmaKa(), 2.0));
if (!(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa)) {
if (track.tpcNSigmaPr() < cfgnSigmaCut) {

int flag2 = 0;
if (combNSigmaPr < 3.0)
flag2 += 1;
if (combNSigmaPi < 3.0)
flag2 += 1;
if (combNSigmaKa < 3.0)
flag2 += 1;
if (!(flag2 > 1) && !(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa)) {
if (combNSigmaPr < cfgnSigmaCut) {
flag = 1;
}
}
Expand Down
16 changes: 8 additions & 8 deletions PWGLF/TableProducer/lambdakzerobuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ struct lambdakzeroPreselector {
// crossed rows conditionals
bool posRowsOK = lPosTrack.tpcNClsCrossedRows() >= dTPCNCrossedRows;
bool negRowsOK = lNegTrack.tpcNClsCrossedRows() >= dTPCNCrossedRows;

// check track explicitly for absence of TPC
bool posITSonly = !lPosTrack.hasTPC();
bool negITSonly = !lNegTrack.hasTPC();
Expand All @@ -1010,20 +1010,20 @@ struct lambdakzeroPreselector {
if (((bitcheck(maskElement, bitdEdxGamma) || bitcheck(maskElement, bitdEdxK0Short)) || passdEdx) && (posRowsOK && negRowsOK))
bitset(maskElement, bitTrackQuality);
// With baryons in decay
if ((bitcheck(maskElement, bitdEdxLambda) || passdEdx) &&
(posRowsOK && (negRowsOK || dPreselectOnlyBaryons)) &&
if ((bitcheck(maskElement, bitdEdxLambda) || passdEdx) &&
(posRowsOK && (negRowsOK || dPreselectOnlyBaryons)) &&
(!forceITSOnlyMesons || negITSonly))
bitset(maskElement, bitTrackQuality);
if ((bitcheck(maskElement, bitdEdxAntiLambda) || passdEdx) &&
(negRowsOK && (posRowsOK || dPreselectOnlyBaryons)) &&
if ((bitcheck(maskElement, bitdEdxAntiLambda) || passdEdx) &&
(negRowsOK && (posRowsOK || dPreselectOnlyBaryons)) &&
(!forceITSOnlyMesons || posITSonly))
bitset(maskElement, bitTrackQuality);
if ((bitcheck(maskElement, bitdEdxHypertriton) || passdEdx) &&
(posRowsOK && (negRowsOK || dPreselectOnlyBaryons)) &&
(posRowsOK && (negRowsOK || dPreselectOnlyBaryons)) &&
(!forceITSOnlyMesons || negITSonly))
bitset(maskElement, bitTrackQuality);
if ((bitcheck(maskElement, bitdEdxAntiHypertriton) || passdEdx) &&
(negRowsOK && (posRowsOK || dPreselectOnlyBaryons)) &&
if ((bitcheck(maskElement, bitdEdxAntiHypertriton) || passdEdx) &&
(negRowsOK && (posRowsOK || dPreselectOnlyBaryons)) &&
(!forceITSOnlyMesons || posITSonly))
bitset(maskElement, bitTrackQuality);
}
Expand Down
Loading