Skip to content
Closed
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
55 changes: 36 additions & 19 deletions PWGMM/UE/Tasks/dedxAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@
using namespace constants::physics;

using PIDTracks = soa::Join<
aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTOFbeta,
aod::pidTOFmass, aod::TrackSelection, aod::TrackSelectionExtension,
aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTPCFullDe,
aod::pidTPCFullTr, aod::pidTPCFullHe, aod::pidTOFFullPi, aod::pidTOFFullKa,
aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe, aod::pidTOFFullEl>;
aod::Tracks, aod::TracksExtra, aod::TrackSelectionExtension,
aod::pidTOFFullPi, aod::pidTOFFullPr, aod::pidTOFFullEl>;

using SelectedCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>;

Expand Down Expand Up @@ -85,11 +82,18 @@
Configurable<float> maxDCAxy{"maxDCAxy", 0.1f, "maxDCAxy"};
Configurable<float> maxDCAz{"maxDCAz", 0.1f, "maxDCAz"};
Configurable<bool> eventSelection{"eventSelection", true, "event selection"};
Configurable<bool> calibrationMode{"calibrationMode", false, "calibration mode"};
Configurable<bool> calibrationMode{"calibrationMode", true, "calibration mode"};
// Histograms names
static constexpr std::string_view kDedxvsMomentum[4] = {"dEdx_vs_Momentum_all", "dEdx_vs_Momentum_Pi_v0", "dEdx_vs_Momentum_Pr_v0", "dEdx_vs_Momentum_El_v0"};
static constexpr std::string_view kDedxvsMomentumPos[4] = {"dEdx_vs_Momentum_all_Pos", "dEdx_vs_Momentum_Pi_v0_Pos", "dEdx_vs_Momentum_Pr_v0_Pos", "dEdx_vs_Momentum_El_v0_Pos"};
static constexpr std::string_view kDedxvsMomentumNeg[4] = {"dEdx_vs_Momentum_all_Neg", "dEdx_vs_Momentum_Pi_v0_Neg", "dEdx_vs_Momentum_Pr_v0_Neg", "dEdx_vs_Momentum_El_v0_Neg"};
static constexpr double EtaCut[9] = {-0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8};
static constexpr double Correction[8] = {56.0452, 56.632, 57.2627, 57.8265, 57.8403, 57.5441, 57.2386, 56.7532};
static constexpr double Correction[8] = {54.5281, 54.6548, 54.6513, 54.6781, 54.6167, 54.7384, 55.0047, 54.9592};
<<<<<<< HEAD
ConfigurableAxis binP{"binP", {0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0}, ""};
AxisSpec pAxis = {binP, "#it{p}/Z (GeV/c)"};
Copy link
Member

@aalkin aalkin Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AxisSpec should be defined inside init(), otherwise it will always have the default values.

=======
ConfigurableAxis binP{"binP", {VARIABLE_WIDTH, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0}, ""};
>>>>>>> c200e0ce0 (AxisSpec was moved inside init())

void init(InitContext const&)
{
Expand All @@ -103,6 +107,8 @@
{{100, 0.0, 6.4, "#phi"}, {100, 0.0, 600.0, "dE/dx MIP (a. u.)"}});

} else {
AxisSpec pAxis = {binP, "#it{p}/Z (GeV/c)"};

Check failure on line 111 in PWGMM/UE/Tasks/dedxAnalysis.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
registryDeDx.add(
"hdEdxMIP_vs_eta_calibrated", "dE/dx", HistType::kTH2F,
{{8, -0.8, 0.8, "#eta"}, {10, 30.0, 70.0, "dE/dx MIP (a. u.)"}});
Expand All @@ -112,8 +118,15 @@

// De/Dx for ch and v0 particles
for (int i = 0; i < 4; ++i) {
<<<<<<< HEAD
registryDeDx.add(kDedxvsMomentum[i].data(), "dE/dx", HistType::kTH3F,
{{100, -20, 20, "#it{p}/Z (GeV/c)"}, {100, 0.0, 600.0, "dE/dx (a. u.)"}, {8, -0.8, 0.8, "#eta"}});
{{pAxis}, {100, 0.0, 600.0, "dE/dx (a. u.)"}, {8, -0.8, 0.8, "#eta"}});
=======
registryDeDx.add(kDedxvsMomentumPos[i].data(), "dE/dx", HistType::kTH3F,
{{pAxis}, {100, 0.0, 600.0, "dE/dx (a. u.)"}, {8, -0.8, 0.8, "#eta"}});
registryDeDx.add(kDedxvsMomentumNeg[i].data(), "dE/dx", HistType::kTH3F,
{{pAxis}, {100, 0.0, 600.0, "dE/dx (a. u.)"}, {8, -0.8, 0.8, "#eta"}});
>>>>>>> c200e0ce0 (AxisSpec was moved inside init())
}
}
// Event Counter
Expand Down Expand Up @@ -306,7 +319,7 @@
float signedP = trk.sign() * trk.tpcInnerParam();

// MIP for pions
if (trk.tpcInnerParam() >= 0.25 && trk.tpcInnerParam() <= 0.35) {
if (trk.tpcInnerParam() >= 0.35 && trk.tpcInnerParam() <= 0.45) {
if (calibrationMode) {
registryDeDx.fill(HIST("hdEdxMIP_vs_eta"), trk.eta(), trk.tpcSignal());
registryDeDx.fill(HIST("hdEdxMIP_vs_phi"), trk.phi(), trk.tpcSignal());
Expand All @@ -323,7 +336,11 @@
if (!calibrationMode) {
for (int i = 0; i < 8; ++i) {
if (trk.eta() > EtaCut[i] && trk.eta() < EtaCut[i + 1]) {
registryDeDx.fill(HIST(kDedxvsMomentum[0]), signedP, trk.tpcSignal() * 50 / Correction[i], trk.eta());
if (signedP > 0) {
registryDeDx.fill(HIST(kDedxvsMomentumPos[0]), signedP, trk.tpcSignal() * 50 / Correction[i], trk.eta());
}else{
registryDeDx.fill(HIST(kDedxvsMomentumNeg[0]), std::abs(signedP), trk.tpcSignal() * 50 / Correction[i], trk.eta());
}
}
}
}
Expand Down Expand Up @@ -378,11 +395,11 @@
for (int i = 0; i < 8; ++i) {
if (negTrack.eta() > EtaCut[i] && negTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[1]), signedPneg, negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumNeg[1]), std::abs(signedPneg), negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
}
if (posTrack.eta() > EtaCut[i] && posTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[1]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumPos[1]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
}
}
}
Expand All @@ -402,11 +419,11 @@
for (int i = 0; i < 8; ++i) {
if (negTrack.eta() > EtaCut[i] && negTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[1]), signedPneg, negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumNeg[1]), std::abs(signedPneg), negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
}
if (posTrack.eta() > EtaCut[i] && posTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[2]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumPos[2]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
}
}
}
Expand All @@ -426,11 +443,11 @@
for (int i = 0; i < 8; ++i) {
if (negTrack.eta() > EtaCut[i] && negTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[2]), signedPneg, negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumNeg[2]), std::abs(signedPneg), negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
}
if (posTrack.eta() > EtaCut[i] && posTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[1]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumPos[1]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
}
}
}
Expand All @@ -450,11 +467,11 @@
for (int i = 0; i < 8; ++i) {
if (negTrack.eta() > EtaCut[i] && negTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[3]), signedPneg, negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumNeg[3]), std::abs(signedPneg), negTrack.tpcSignal() * 50 / Correction[i], negTrack.eta());
}
if (posTrack.eta() > EtaCut[i] && posTrack.eta() < EtaCut[i + 1]) {

registryDeDx.fill(HIST(kDedxvsMomentum[3]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
registryDeDx.fill(HIST(kDedxvsMomentumPos[3]), signedPpos, posTrack.tpcSignal() * 50 / Correction[i], posTrack.eta());
}
}
}
Expand Down
Loading