Skip to content
Open
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
50 changes: 25 additions & 25 deletions PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct V0ptHadPiKaProt {
// ITS response
o2::aod::ITSResponse itsResponse;
// Connect to ccdb
Service<ccdb::BasicCCDBManager> ccdb;
Service<ccdb::BasicCCDBManager> ccdb{};

Configurable<int64_t> ccdbNoLaterThan{"ccdbNoLaterThan", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
Configurable<std::string> ccdbUrl{"ccdbUrl", "https://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -243,34 +243,34 @@ struct V0ptHadPiKaProt {
Preslice<MyMCTracks> perCollision = aod::track::collisionId;
Preslice<aod::McParticles> perMcCollision = aod::mcparticle::mcCollisionId;

std::array<float, 6> tofNsigmaCut;
std::array<float, 6> itsNsigmaCut;
std::array<float, 6> tpcNsigmaCut;
std::array<float, 6> tofNsigmaCut{};
std::array<float, 6> itsNsigmaCut{};
std::array<float, 6> tpcNsigmaCut{};

// Equivalent of the AliRoot task UserCreateOutputObjects
void init(o2::framework::InitContext&)
{
// Get nSigma values of TPC, TOF, ITS for various particles from the matrix "nSigmas"
tpcNsigmaCut[kPionUpCut] = nSigmas->getData()[kTPC][kPionUpCut];
tpcNsigmaCut[kKaonUpCut] = nSigmas->getData()[kTPC][kKaonUpCut];
tpcNsigmaCut[kProtonUpCut] = nSigmas->getData()[kTPC][kProtonUpCut];
tpcNsigmaCut[kPionLowCut] = nSigmas->getData()[kTPC][kPionLowCut];
tpcNsigmaCut[kKaonLowCut] = nSigmas->getData()[kTPC][kKaonLowCut];
tpcNsigmaCut[kProtonLowCut] = nSigmas->getData()[kTPC][kProtonLowCut];

tofNsigmaCut[kPionUpCut] = nSigmas->getData()[kTOF][kPionUpCut];
tofNsigmaCut[kKaonUpCut] = nSigmas->getData()[kTOF][kKaonUpCut];
tofNsigmaCut[kProtonUpCut] = nSigmas->getData()[kTOF][kProtonUpCut];
tofNsigmaCut[kPionLowCut] = nSigmas->getData()[kTOF][kPionLowCut];
tofNsigmaCut[kKaonLowCut] = nSigmas->getData()[kTOF][kKaonLowCut];
tofNsigmaCut[kProtonLowCut] = nSigmas->getData()[kTOF][kProtonLowCut];

itsNsigmaCut[kPionUpCut] = nSigmas->getData()[kITS][kPionUpCut];
itsNsigmaCut[kKaonUpCut] = nSigmas->getData()[kITS][kKaonUpCut];
itsNsigmaCut[kProtonUpCut] = nSigmas->getData()[kITS][kProtonUpCut];
itsNsigmaCut[kPionLowCut] = nSigmas->getData()[kITS][kPionLowCut];
itsNsigmaCut[kKaonLowCut] = nSigmas->getData()[kITS][kKaonLowCut];
itsNsigmaCut[kProtonLowCut] = nSigmas->getData()[kITS][kProtonLowCut];
tpcNsigmaCut[kPionUpCut] = nSigmas.value[kTPC][kPionUpCut];
tpcNsigmaCut[kKaonUpCut] = nSigmas.value[kTPC][kKaonUpCut];
tpcNsigmaCut[kProtonUpCut] = nSigmas.value[kTPC][kProtonUpCut];
tpcNsigmaCut[kPionLowCut] = nSigmas.value[kTPC][kPionLowCut];
tpcNsigmaCut[kKaonLowCut] = nSigmas.value[kTPC][kKaonLowCut];
tpcNsigmaCut[kProtonLowCut] = nSigmas.value[kTPC][kProtonLowCut];

tofNsigmaCut[kPionUpCut] = nSigmas.value[kTOF][kPionUpCut];
tofNsigmaCut[kKaonUpCut] = nSigmas.value[kTOF][kKaonUpCut];
tofNsigmaCut[kProtonUpCut] = nSigmas.value[kTOF][kProtonUpCut];
tofNsigmaCut[kPionLowCut] = nSigmas.value[kTOF][kPionLowCut];
tofNsigmaCut[kKaonLowCut] = nSigmas.value[kTOF][kKaonLowCut];
tofNsigmaCut[kProtonLowCut] = nSigmas.value[kTOF][kProtonLowCut];

itsNsigmaCut[kPionUpCut] = nSigmas.value[kITS][kPionUpCut];
itsNsigmaCut[kKaonUpCut] = nSigmas.value[kITS][kKaonUpCut];
itsNsigmaCut[kProtonUpCut] = nSigmas.value[kITS][kProtonUpCut];
itsNsigmaCut[kPionLowCut] = nSigmas.value[kITS][kPionLowCut];
itsNsigmaCut[kKaonLowCut] = nSigmas.value[kITS][kKaonLowCut];
itsNsigmaCut[kProtonLowCut] = nSigmas.value[kITS][kProtonLowCut];

// Loading phi weight histograms from CCDB
if (cfgLoadPhiWeights) {
Expand Down Expand Up @@ -1237,7 +1237,7 @@ struct V0ptHadPiKaProt {
if (std::abs(mcCollision.posZ()) < cfgCutVertex) {
histos.fill(HIST("MCGenerated/hMC"), 1.5);
}
auto cent = 0;
auto cent = 0.f;

int nchInel = 0;
for (const auto& mcParticle : mcParticles) {
Expand Down
36 changes: 18 additions & 18 deletions PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ struct FlowGfwLightIons {
Configurable<GFWCorrConfigs> cfgCorrConfig{"cfgCorrConfig", {{"refP {2} refN {-2}", "refP {3} refN {-3}", "refP {4} refN {-4}", "refFull {2 -2}", "refFull {2 2 -2 -2}"}, {"ChGap22", "ChGap32", "ChGap42", "ChFull22", "ChFull24"}, {0, 0, 0, 0, 0}, {15, 1, 1, 0, 0}}, "Configurations for each correlation to calculate"};

// Connect to ccdb
Service<ccdb::BasicCCDBManager> ccdb;
Service<ccdb::BasicCCDBManager> ccdb{};

struct Config {
TH1D* mEfficiency = nullptr;
GFWWeights* mAcceptance;
GFWWeights* mAcceptance{};
bool correctionsLoaded = false;
} cfg;

Expand Down Expand Up @@ -260,26 +260,25 @@ struct FlowGfwLightIons {
std::vector<GFW::CorrConfig> corrconfigs;

TRandom3* fRndm = new TRandom3(0);
TAxis* fSecondAxis;
TAxis* fSecondAxis{};
int lastRun = -1;
std::vector<int>::iterator firstRunOfCurrentFill;
std::vector<int> runNumbers;

// Density dependent eff correction
std::vector<TF1*> funcEff;
TH1D* hFindPtBin;
TF1* funcV2;
TF1* funcV3;
TF1* funcV4;
TH1D* hFindPtBin{};
TF1* funcV2{};
TF1* funcV3{};
TF1* funcV4{};
struct DensityCorr {
double psi2Est;
double psi3Est;
double psi4Est;
double v2;
double v3;
double v4;
int density;
DensityCorr() : psi2Est(0.), psi3Est(0.), psi4Est(0.), v2(0.), v3(0.), v4(0.), density(0) {}
double psi2Est{0.};
double psi3Est{0.};
double psi4Est{0.};
double v2{0.};
double v3{0.};
double v4{0.};
int density{0};
};

// region indices for consistency flag
Expand Down Expand Up @@ -353,9 +352,10 @@ struct FlowGfwLightIons {
firstRunOfCurrentFill = o2::analysis::gfw::firstRunsOfFill.begin();

for (int i = 0; i < 4; ++i) { // o2-linter: disable=magic-number (maximum of 4 subevents)
if (cfgPtPtGaps->getData()[i][0] < -1. || cfgPtPtGaps->getData()[i][1] < -1.)
if (cfgPtPtGaps.value[i][0] < -1. || cfgPtPtGaps.value[i][1] < -1.) {
continue;
o2::analysis::gfw::etagapsPtPt.push_back(std::make_pair(cfgPtPtGaps->getData()[i][0], cfgPtPtGaps->getData()[i][1]));
}
o2::analysis::gfw::etagapsPtPt.push_back(std::make_pair(cfgPtPtGaps.value[i][0], cfgPtPtGaps.value[i][1]));
}

for (const auto& [etamin, etamax] : o2::analysis::gfw::etagapsPtPt) {
Expand All @@ -369,7 +369,7 @@ struct FlowGfwLightIons {
std::string sCentralityEstimator = centNamesMap[cfgCentEstimator] + " centrality (%)";
AxisSpec centAxis = {o2::analysis::gfw::centbinning, sCentralityEstimator.c_str()};
std::vector<double> nchbinning;
int nchskip = (o2::analysis::gfw::nchup - o2::analysis::gfw::nchlow) / o2::analysis::gfw::nchbins;
int nchskip = static_cast<int>((o2::analysis::gfw::nchup - o2::analysis::gfw::nchlow) / o2::analysis::gfw::nchbins);
for (int i = 0; i <= o2::analysis::gfw::nchbins; ++i) {
nchbinning.push_back(nchskip * i + o2::analysis::gfw::nchlow + 0.5);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,10 @@ struct ThreeParticleCorrelations {
double dPhiStarMean = 0;

// Start of the TPC radius loop
for (double r = rMin; r <= rMax; r += 0.01) {
const double step = 0.01;
const int nSteps = static_cast<int>(std::round((rMax - rMin) / step));
for (int i = 0; i <= nSteps; ++i) {
const double r = rMin + i * step;
dPhiStar = RecoDecay::constrainAngle(dPhi + std::asin(phaseProton * r) - std::asin(phaseTrack * r), -constants::math::PIHalf);

if (r == rMin) { // TPC inner radius
Expand Down
10 changes: 8 additions & 2 deletions PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,10 @@ struct DiHadronCor {
bool bIsBelow = false;

if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) {
for (double rad(cfgRadiusLow); rad < cfgRadiusHigh; rad += 0.01) {
const double stepR = 0.01;
const int nSteps = static_cast<int>(std::round((cfgRadiusHigh - cfgRadiusLow) / stepR));
for (int i = 0; i < nSteps; ++i) {
const double rad = cfgRadiusLow + i * stepR;
double dPhiStar = getDPhiStar(track1, track2, rad, magneticField);
if (std::abs(dPhiStar) < kLimit) {
bIsBelow = true;
Expand Down Expand Up @@ -691,7 +694,10 @@ struct DiHadronCor {
bool bIsBelow = false;

if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) {
for (double rad(cfgRadiusLow); rad < cfgRadiusHigh; rad += 0.01) {
const double stepR = 0.01;
const int nSteps = static_cast<int>(std::round((cfgRadiusHigh - cfgRadiusLow) / stepR));
for (int i = 0; i < nSteps; ++i) {
const double rad = cfgRadiusLow + i * stepR;
double dPhiStar = getDPhiStar(track1, track2, rad, magneticField);
if (std::abs(dPhiStar) < kLimit) {
bIsBelow = true;
Expand Down
10 changes: 8 additions & 2 deletions PWGCF/TwoParticleCorrelations/Tasks/etaDihadron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,10 @@ struct EtaDihadron {
bool bIsBelow = false;

if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) {
for (double rad(cfgRadiusLow); rad < cfgRadiusHigh; rad += 0.01) {
const double stepR = 0.01;
const int nSteps = static_cast<int>(std::round((cfgRadiusHigh - cfgRadiusLow) / stepR));
for (int i = 0; i < nSteps; ++i) {
const double rad = cfgRadiusLow + i * stepR;
double dPhiStar = getDPhiStar(track1, track2, rad, magneticField);
if (std::abs(dPhiStar) < kLimit) {
bIsBelow = true;
Expand Down Expand Up @@ -675,7 +678,10 @@ struct EtaDihadron {
bool bIsBelow = false;

if (std::abs(dPhiStarLow) < kLimit || std::abs(dPhiStarHigh) < kLimit || dPhiStarLow * dPhiStarHigh < 0) {
for (double rad(cfgRadiusLow); rad < cfgRadiusHigh; rad += 0.01) {
const double stepR = 0.01;
const int nSteps = static_cast<int>(std::round((cfgRadiusHigh - cfgRadiusLow) / stepR));
for (int i = 0; i < nSteps; ++i) {
const double rad = cfgRadiusLow + i * stepR;
double dPhiStar = getDPhiStar(track1, track2, rad, magneticField);
if (std::abs(dPhiStar) < kLimit) {
bIsBelow = true;
Expand Down
38 changes: 19 additions & 19 deletions PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -363,26 +363,26 @@ struct LongRangeDihadronCor {
LOGF(info, "Starting init");

// filling tpc nSigmas array
tpcNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas->getData()[kTPC][kPionUp];
tpcNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas->getData()[kTPC][kKaonUp];
tpcNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas->getData()[kTPC][kProtonUp];
tpcNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas->getData()[kTPC][kPionLow];
tpcNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas->getData()[kTPC][kKaonLow];
tpcNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas->getData()[kTPC][kProtonLow];
tpcNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas.value[kTPC][kPionUp];
tpcNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas.value[kTPC][kKaonUp];
tpcNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas.value[kTPC][kProtonUp];
tpcNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas.value[kTPC][kPionLow];
tpcNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas.value[kTPC][kKaonLow];
tpcNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas.value[kTPC][kProtonLow];
// filling tof nSigmas array
tofNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas->getData()[kTOF][kPionUp];
tofNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas->getData()[kTOF][kKaonUp];
tofNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas->getData()[kTOF][kProtonUp];
tofNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas->getData()[kTOF][kPionLow];
tofNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas->getData()[kTOF][kKaonLow];
tofNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas->getData()[kTOF][kProtonLow];
tofNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas.value[kTOF][kPionUp];
tofNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas.value[kTOF][kKaonUp];
tofNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas.value[kTOF][kProtonUp];
tofNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas.value[kTOF][kPionLow];
tofNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas.value[kTOF][kKaonLow];
tofNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas.value[kTOF][kProtonLow];
// filling its nSigmas array
itsNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas->getData()[kITS][kPionUp];
itsNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas->getData()[kITS][kKaonUp];
itsNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas->getData()[kITS][kProtonUp];
itsNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas->getData()[kITS][kPionLow];
itsNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas->getData()[kITS][kKaonLow];
itsNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas->getData()[kITS][kProtonLow];
itsNsigmaCut[kPionUp] = cfgPIDConfig.nSigmas.value[kITS][kPionUp];
itsNsigmaCut[kKaonUp] = cfgPIDConfig.nSigmas.value[kITS][kKaonUp];
itsNsigmaCut[kProtonUp] = cfgPIDConfig.nSigmas.value[kITS][kProtonUp];
itsNsigmaCut[kPionLow] = cfgPIDConfig.nSigmas.value[kITS][kPionLow];
itsNsigmaCut[kKaonLow] = cfgPIDConfig.nSigmas.value[kITS][kKaonLow];
itsNsigmaCut[kProtonLow] = cfgPIDConfig.nSigmas.value[kITS][kProtonLow];

// Event Counter
if ((doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSemiMcSameTpcFt0c || doprocessSemiMcSameTpcFt0a) && cfgGeneral.cfgUseAdditionalEventCut) {
Expand Down Expand Up @@ -895,7 +895,7 @@ struct LongRangeDihadronCor {
getChannel(ft0, iCh, chanelid, ampl, corType, MixedEvent + 1);
auto phi = getPhiFT0(chanelid, corType);
auto eta = getEtaFT0(chanelid, corType);
for (float ihit = 0; ihit < ampl; ihit++) {
for (int ihit = 0; ihit < ampl; ihit++) {
cfgCumulantConfig.fGFW->Fill(eta, 1, phi, 1., 1);
}
}
Expand Down
Loading