Skip to content

Commit fab23b0

Browse files
committed
[PWGCF] Add configurable FB eta-window width and clean warnings
1 parent 418d9b0 commit fab23b0

1 file changed

Lines changed: 18 additions & 27 deletions

File tree

PWGCF/EbyEFluctuations/Tasks/stronglyIntensiveCorr.cxx

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "Common/DataModel/Multiplicity.h"
2020
#include "Common/DataModel/TrackSelectionTables.h"
2121

22-
#include <CommonConstants/MathConstants.h>
2322
#include <Framework/AnalysisDataModel.h>
2423
#include <Framework/AnalysisTask.h>
2524
#include <Framework/Configurable.h>
@@ -28,13 +27,11 @@
2827
#include <Framework/InitContext.h>
2928
#include <Framework/O2DatabasePDGPlugin.h>
3029
#include <Framework/runDataProcessing.h>
31-
32-
#include <TMath.h>
30+
#include <Framework/OutputObjHeader.h>
3331

3432
#include <algorithm>
3533
#include <array>
3634
#include <cmath>
37-
#include <cstdint>
3835
#include <vector>
3936

4037
using namespace o2;
@@ -47,6 +44,7 @@ struct StronglyIntensiveCorr {
4744
// ------------------------------------------------------------------
4845

4946
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
47+
Configurable<float> cfgEtaWidth{"cfgEtaWidth", 0.2f, "FB window width"};
5048
Configurable<float> cfgCutEta{"cfgCutEta", 0.8f, "absolute eta cut"};
5149
Configurable<float> cfgCutPtLower{"cfgCutPtLower", 0.2f, "Lower pT cut"};
5250
Configurable<float> cfgCutPtUpper{"cfgCutPtUpper", 5.0f, "Upper pT cut"};
@@ -86,23 +84,16 @@ struct StronglyIntensiveCorr {
8684
static constexpr int nCentClasses = 8;
8785
static constexpr double TwoPi = 6.28318530717958647692;
8886

89-
// F = (etaMin[i], etaMax[i]), B = (-etaMax[i], -etaMin[i])
90-
// Gap = 2*etaMin[i]. Last two bins are adjacent narrow windows around midrapidity.
91-
std::array<double, nEtaGaps> etaMin = {0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.0, -0.1};
92-
std::array<double, nEtaGaps> etaMax = {0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1};
87+
std::array<double, nEtaGaps> etaCenter = {0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.0};
9388

9489
std::array<double, nPtBins + 1> ptEdges = {0.2, 0.5, 0.8, 1.0, 1.5, 2.0, 5.0};
9590
std::array<double, nCentClasses + 1> centEdges = {0., 10., 20., 30., 40., 50., 60., 70., 80.};
9691

9792
using EtaPtPhiArray = std::array<std::array<std::array<double, nPhiBins>, nPtBins>, nEtaGaps>;
9893

9994
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
100-
Service<o2::framework::O2DatabasePDG> pdg;
101-
// ------------------------------------------------------------------
102-
// Filters and table types
103-
// Keep Swati-like joined tables. PID tables are kept for workflow compatibility,
104-
// but the inclusive charged FB analysis does not use PID decisions.
105-
// ------------------------------------------------------------------
95+
Service<o2::framework::O2DatabasePDG> pdg{};
96+
10697
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
10798

10899
// Intentionally loose track filter: manual cuts are done in selTrack(), so QA before/after sees tracks.
@@ -600,8 +591,8 @@ struct StronglyIntensiveCorr {
600591
const bool fillPtPhi = (ipt >= 0 && iphi >= 0);
601592

602593
for (int i = 0; i < nEtaGaps; ++i) {
603-
const double etaLow = etaMin[i];
604-
const double etaHigh = etaMax[i];
594+
const double etaLow = etaCenter[i] - cfgEtaWidth.value / 2.0;
595+
const double etaHigh = etaCenter[i] + cfgEtaWidth.value / 2.0;
605596

606597
if (eta > etaLow && eta < etaHigh) {
607598
nF[i] += 1.0;
@@ -655,7 +646,7 @@ struct StronglyIntensiveCorr {
655646

656647
const double centCenter = getCentClassCenter(centClass);
657648
for (int i = 0; i < nEtaGaps; ++i) {
658-
const double gap = 2.0 * etaMin[i];
649+
const double gap = 2.0 * (etaCenter[i] - cfgEtaWidth.value / 2.0);
659650
histos.fill(HIST("SIcentClass/pNF_cent_etaGap"), centCenter, gap, nF[i]);
660651
histos.fill(HIST("SIcentClass/pNB_cent_etaGap"), centCenter, gap, nB[i]);
661652
histos.fill(HIST("SIcentClass/pNF2_cent_etaGap"), centCenter, gap, nF[i] * nF[i]);
@@ -674,7 +665,7 @@ struct StronglyIntensiveCorr {
674665

675666
const double centCenter = getCentClassCenter(centWindowClass);
676667
for (int i = 0; i < nEtaGaps; ++i) {
677-
const double gap = 2.0 * etaMin[i];
668+
const double gap = 2.0 * (etaCenter[i] - cfgEtaWidth.value / 2.0);
678669
histos.fill(HIST("SIcentWindow/pNF_cent_etaGap"), centCenter, gap, nF[i]);
679670
histos.fill(HIST("SIcentWindow/pNB_cent_etaGap"), centCenter, gap, nB[i]);
680671
histos.fill(HIST("SIcentWindow/pNF2_cent_etaGap"), centCenter, gap, nF[i] * nF[i]);
@@ -697,7 +688,7 @@ struct StronglyIntensiveCorr {
697688

698689
const double centCenter = getCentClassCenter(centWindowClass);
699690
for (int i = 0; i < nEtaGaps; ++i) {
700-
const double gap = 2.0 * etaMin[i];
691+
const double gap = 2.0 * (etaCenter[i] - cfgEtaWidth.value / 2.0);
701692
histos.fill(HIST("SubsampleCentWindow/pNF_sub_cent_etaGap"), isub, centCenter, gap, nF[i]);
702693
histos.fill(HIST("SubsampleCentWindow/pNB_sub_cent_etaGap"), isub, centCenter, gap, nB[i]);
703694
histos.fill(HIST("SubsampleCentWindow/pNF2_sub_cent_etaGap"), isub, centCenter, gap, nF[i] * nF[i]);
@@ -710,7 +701,7 @@ struct StronglyIntensiveCorr {
710701
EtaPtPhiArray const& nB)
711702
{
712703
for (int igap = 0; igap < nEtaGaps; ++igap) {
713-
const double gap = 2.0 * etaMin[igap];
704+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
714705
for (int ipt = 0; ipt < nPtBins; ++ipt) {
715706
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
716707
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
@@ -735,7 +726,7 @@ struct StronglyIntensiveCorr {
735726
EtaPtPhiArray const& nB)
736727
{
737728
for (int igap = 0; igap < nEtaGaps; ++igap) {
738-
const double gap = 2.0 * etaMin[igap];
729+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
739730
for (int ipt = 0; ipt < nPtBins; ++ipt) {
740731
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
741732
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
@@ -756,7 +747,7 @@ struct StronglyIntensiveCorr {
756747
EtaPtPhiArray const& nB)
757748
{
758749
for (int igap = 0; igap < nEtaGaps; ++igap) {
759-
const double gap = 2.0 * etaMin[igap];
750+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
760751

761752
for (int ipt = 0; ipt < nPtBins; ++ipt) {
762753
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
@@ -780,7 +771,7 @@ struct StronglyIntensiveCorr {
780771
EtaPtPhiArray const& nB)
781772
{
782773
for (int igap = 0; igap < nEtaGaps; ++igap) {
783-
const double gap = 2.0 * etaMin[igap];
774+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
784775

785776
for (int ipt = 0; ipt < nPtBins; ++ipt) {
786777
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
@@ -810,7 +801,7 @@ struct StronglyIntensiveCorr {
810801
}
811802

812803
for (int igap = 0; igap < nEtaGaps; ++igap) {
813-
const double gap = 2.0 * etaMin[igap];
804+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
814805
for (int ipt = 0; ipt < nPtBins; ++ipt) {
815806
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
816807
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
@@ -838,7 +829,7 @@ struct StronglyIntensiveCorr {
838829
}
839830

840831
for (int igap = 0; igap < nEtaGaps; ++igap) {
841-
const double gap = 2.0 * etaMin[igap];
832+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
842833
for (int ipt = 0; ipt < nPtBins; ++ipt) {
843834
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
844835
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
@@ -866,7 +857,7 @@ struct StronglyIntensiveCorr {
866857
}
867858

868859
for (int igap = 0; igap < nEtaGaps; ++igap) {
869-
const double gap = 2.0 * etaMin[igap];
860+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
870861
for (int ipt = 0; ipt < nPtBins; ++ipt) {
871862
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
872863
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
@@ -894,7 +885,7 @@ struct StronglyIntensiveCorr {
894885
}
895886

896887
for (int igap = 0; igap < nEtaGaps; ++igap) {
897-
const double gap = 2.0 * etaMin[igap];
888+
const double gap = 2.0 * (etaCenter[igap] - cfgEtaWidth.value / 2.0);
898889
for (int ipt = 0; ipt < nPtBins; ++ipt) {
899890
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
900891
for (int iphi = 0; iphi < nPhiBins; ++iphi) {

0 commit comments

Comments
 (0)