Skip to content

Commit

Permalink
PWGCF: Updating centrality bins and fix pid selection (AliceO2Group#4344
Browse files Browse the repository at this point in the history
)

* Updating centrality bins and fix pid selection

* remove parantheses

* Adding Nch and Meanpt distribution to MeanptCode

* Please consider the following formatting changes

---------

Co-authored-by: ALICE Action Bot <[email protected]>
  • Loading branch information
SwatiSaha-1997 and alibuild authored Jan 17, 2024
1 parent 76d6527 commit 0026f18
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
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

0 comments on commit 0026f18

Please sign in to comment.