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

[PWGCF] Please consider the following formatting changes to #8465 #13

Merged
merged 1 commit into from
Nov 15, 2024
Merged
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
72 changes: 36 additions & 36 deletions PWGCF/MultiparticleCorrelations/Tasks/ThreeParticleCorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace o2::framework::expressions;

struct ThreePartCorr {
Service<o2::ccdb::BasicCCDBManager> CCDB;

// Histogram registry
HistogramRegistry MECorrRegistry{"MECorrRegistry", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
HistogramRegistry SECorrRegistry{"SECorrRegistry", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
Expand Down Expand Up @@ -86,7 +86,7 @@ struct ThreePartCorr {
// Efficiency histograms
TH1D** hEffPions = new TH1D*[2];
TH1D** hEffKaons = new TH1D*[2];
TH1D** hEffProtons = new TH1D*[2];
TH1D** hEffProtons = new TH1D*[2];

// Correlation variables
Int_t T_Sign;
Expand All @@ -99,7 +99,7 @@ struct ThreePartCorr {

void init(InitContext const&)
{

const AxisSpec CentralityAxis{ConfCentBins};
const AxisSpec ZvtxAxis{ConfZvtxBins};
const AxisSpec PhiAxis{36, (-1. / 2) * M_PI, (3. / 2) * M_PI};
Expand Down Expand Up @@ -164,7 +164,7 @@ struct ThreePartCorr {
hEffKaons[0] = static_cast<TH1D*>(EfficiencyList->FindObject("hEfficiencyKaonP"));
hEffKaons[1] = static_cast<TH1D*>(EfficiencyList->FindObject("hEfficiencyKaonN"));
hEffProtons[0] = static_cast<TH1D*>(EfficiencyList->FindObject("hEfficiencyProtonP"));
hEffProtons[1] = static_cast<TH1D*>(EfficiencyList->FindObject("hEfficiencyProtonN"));
hEffProtons[1] = static_cast<TH1D*>(EfficiencyList->FindObject("hEfficiencyProtonN"));
}

//================================================================================================================================================================================================================
Expand Down Expand Up @@ -224,19 +224,19 @@ struct ThreePartCorr {

if (CandMass >= massLambda - 4 * DGaussSigma && CandMass <= massLambda + 4 * DGaussSigma) {
if (A_PID[0] == 0.0) { // Pions
SECorrRegistry.fill(HIST("hSameLambdaPion_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffPions, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaPion_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffPions, associate.sign(), associate.pt()));
} else if (A_PID[0] == 1.0) { // Kaons
SECorrRegistry.fill(HIST("hSameLambdaKaon_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffKaons, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaKaon_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffKaons, associate.sign(), associate.pt()));
} else if (A_PID[0] == 2.0) { // Protons
SECorrRegistry.fill(HIST("hSameLambdaProton_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffProtons, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaProton_SGNL"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffProtons, associate.sign(), associate.pt()));
}
} else if (CandMass >= massLambda - 8 * DGaussSigma && CandMass <= massLambda + 8 * DGaussSigma) {
if (A_PID[0] == 0.0) { // Pions
SECorrRegistry.fill(HIST("hSameLambdaPion_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffPions, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaPion_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffPions, associate.sign(), associate.pt()));
} else if (A_PID[0] == 1.0) { // Kaons
SECorrRegistry.fill(HIST("hSameLambdaKaon_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffKaons, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaKaon_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffKaons, associate.sign(), associate.pt()));
} else if (A_PID[0] == 2.0) { // Protons
SECorrRegistry.fill(HIST("hSameLambdaProton_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffProtons, associate.sign(), associate.pt()));
SECorrRegistry.fill(HIST("hSameLambdaProton_SB"), DeltaPhi, DeltaEta, collision.centFT0C(), collision.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffProtons, associate.sign(), associate.pt()));
}
}
}
Expand Down Expand Up @@ -269,19 +269,19 @@ struct ThreePartCorr {

if (CandMass >= massLambda - 4 * DGaussSigma && CandMass <= massLambda + 4 * DGaussSigma) {
if (A_PID[0] == 0.0) { // Pions
MECorrRegistry.fill(HIST("hMixLambdaPion_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffPions, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaPion_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffPions, associate.sign(), associate.pt()));
} else if (A_PID[0] == 1.0) { // Kaons
MECorrRegistry.fill(HIST("hMixLambdaKaon_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffKaons, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaKaon_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffKaons, associate.sign(), associate.pt()));
} else if (A_PID[0] == 2.0) { // Protons
MECorrRegistry.fill(HIST("hMixLambdaProton_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffProtons, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaProton_SGNL"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffProtons, associate.sign(), associate.pt()));
}
} else if (CandMass >= massLambda - 8 * DGaussSigma && CandMass <= massLambda + 8 * DGaussSigma) {
if (A_PID[0] == 0.0) { // Pions
MECorrRegistry.fill(HIST("hMixLambdaPion_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffPions, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaPion_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffPions, associate.sign(), associate.pt()));
} else if (A_PID[0] == 1.0) { // Kaons
MECorrRegistry.fill(HIST("hMixLambdaKaon_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffKaons, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaKaon_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffKaons, associate.sign(), associate.pt()));
} else if (A_PID[0] == 2.0) { // Protons
MECorrRegistry.fill(HIST("hMixLambdaProton_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1./TrackEff(hEffProtons, associate.sign(), associate.pt()));
MECorrRegistry.fill(HIST("hMixLambdaProton_SB"), DeltaPhi, DeltaEta, coll_1.centFT0C(), coll_1.posZ(), T_Sign, associate.sign(), 1. / TrackEff(hEffProtons, associate.sign(), associate.pt()));
}
}
}
Expand Down Expand Up @@ -396,7 +396,7 @@ struct ThreePartCorr {

return 0;
}

template <class TrackCand>
Double_t* TrackPID(const TrackCand& Track)
{
Expand Down Expand Up @@ -479,25 +479,25 @@ struct ThreePartCorr {
std::array<float, 3> DMomArray;
std::array<float, 3> AMomArray = Track.pVector();
if (TrackPID(Track)[0] == 0.0) {
MassArray = {o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged};
if (V0Sign(V0) == 1 && Track.sign() == -1) { // Lambda - Pi_min
const auto& dTrack = V0.template posTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
} else if (V0Sign(V0) == -1 && Track.sign() == 1) { // Antilambda - Pi_plus
const auto& dTrack = V0.template negTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
}
} else if (TrackPID(Track)[0] == 2.0) {
MassArray = {o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton};
if (V0Sign(V0) == 1 && Track.sign() == 1) { // Lambda - Proton
const auto& dTrack = V0.template negTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
} else if(V0Sign(V0) == -1 && Track.sign() == -1) { // Antilambda - Antiproton
const auto& dTrack = V0.template posTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
}
MassArray = {o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged};

if (V0Sign(V0) == 1 && Track.sign() == -1) { // Lambda - Pi_min
const auto& dTrack = V0.template posTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
} else if (V0Sign(V0) == -1 && Track.sign() == 1) { // Antilambda - Pi_plus
const auto& dTrack = V0.template negTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
}
} else if (TrackPID(Track)[0] == 2.0) {
MassArray = {o2::constants::physics::MassPionCharged, o2::constants::physics::MassProton};

if (V0Sign(V0) == 1 && Track.sign() == 1) { // Lambda - Proton
const auto& dTrack = V0.template negTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
} else if (V0Sign(V0) == -1 && Track.sign() == -1) { // Antilambda - Antiproton
const auto& dTrack = V0.template posTrack_as<MyFilteredTracks>();
DMomArray = dTrack.pVector();
}
}

Double_t M = RecoDecay::m(std::array{DMomArray, AMomArray}, MassArray);
Expand Down
Loading