Skip to content

Commit 0ada83f

Browse files
authored
Merge pull request #1 from alibuild/alibot-cleanup-16670
Please consider the following formatting changes to #16670
2 parents 9e4002d + 88b10c8 commit 0ada83f

1 file changed

Lines changed: 79 additions & 93 deletions

File tree

PWGCF/EbyEFluctuations/Tasks/stronglyIntensiveCorr.cxx

Lines changed: 79 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
/// \brief Forward-backward multiplicity correlations for inclusive charged particles.
1414
/// \author Iwona Sputowska
1515

16-
1716
#include "Common/CCDB/EventSelectionParams.h"
1817
#include "Common/DataModel/Centrality.h"
1918
#include "Common/DataModel/EventSelection.h"
@@ -27,8 +26,9 @@
2726
#include <Framework/HistogramRegistry.h>
2827
#include <Framework/HistogramSpec.h>
2928
#include <Framework/InitContext.h>
30-
#include <Framework/runDataProcessing.h>
3129
#include <Framework/O2DatabasePDGPlugin.h>
30+
#include <Framework/runDataProcessing.h>
31+
3232
#include <TMath.h>
3333

3434
#include <algorithm>
@@ -232,8 +232,6 @@ struct StronglyIntensiveCorr {
232232
histos.add("trackQA/before/dcaZvsPt", "before;DCA_{z};#it{p}_{T}", kTH2D, {dcaZAxis, ptFullAxis});
233233
histos.add("trackQA/after/dcaZvsPt", "after;DCA_{z};#it{p}_{T}", kTH2D, {dcaZAxis, ptFullAxis});
234234

235-
236-
237235
// Chosen centrality binning, default 0-10 ... 70-80.
238236

239237
histos.add("SIcentClass/pNF_cent_etaGap", "<nF>;centrality class (%);#Delta#eta", kTProfile2D, {centClassAxis, etaGapAxis});
@@ -276,29 +274,23 @@ struct StronglyIntensiveCorr {
276274
histos.add("SubsampleSI3D/SumB20_sub_etaGapPtPhi", "sum nB(nB-1);subsample;#Delta#eta;#it{p}_{T};#varphi", kTHnSparseD, {subsampleAxis, etaGapAxis, ptAxis, phiAxis});
277275
histos.add("SubsampleSI3D/SumF11_sub_etaGapPtPhi", "sum nF nB;subsample;#Delta#eta;#it{p}_{T};#varphi", kTHnSparseD, {subsampleAxis, etaGapAxis, ptAxis, phiAxis});
278276

277+
histos.add("Reco/SI3D/pNF_etaGapPtPhi", "<nF> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
278+
histos.add("Reco/SI3D/pNB_etaGapPtPhi", "<nB> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
279+
histos.add("Reco/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
280+
histos.add("Reco/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
281+
histos.add("Reco/SI3D/pNFNB_etaGapPtPhi", "<nF nB> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
279282

283+
histos.add("Prim/SI3D/pNF_etaGapPtPhi", "<nF> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
284+
histos.add("Prim/SI3D/pNB_etaGapPtPhi", "<nB> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
285+
histos.add("Prim/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
286+
histos.add("Prim/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
287+
histos.add("Prim/SI3D/pNFNB_etaGapPtPhi", "<nF nB> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
280288

281-
282-
283-
284-
285-
histos.add("Reco/SI3D/pNF_etaGapPtPhi", "<nF> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
286-
histos.add("Reco/SI3D/pNB_etaGapPtPhi", "<nB> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
287-
histos.add("Reco/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
288-
histos.add("Reco/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
289-
histos.add("Reco/SI3D/pNFNB_etaGapPtPhi", "<nF nB> reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
290-
291-
histos.add("Prim/SI3D/pNF_etaGapPtPhi", "<nF> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
292-
histos.add("Prim/SI3D/pNB_etaGapPtPhi", "<nB> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
293-
histos.add("Prim/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
294-
histos.add("Prim/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
295-
histos.add("Prim/SI3D/pNFNB_etaGapPtPhi", "<nF nB> primary reco;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
296-
297-
histos.add("Gen/SI3D/pNF_etaGapPtPhi", "<nF> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
298-
histos.add("Gen/SI3D/pNB_etaGapPtPhi", "<nB> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
299-
histos.add("Gen/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
300-
histos.add("Gen/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
301-
histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
289+
histos.add("Gen/SI3D/pNF_etaGapPtPhi", "<nF> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
290+
histos.add("Gen/SI3D/pNB_etaGapPtPhi", "<nB> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
291+
histos.add("Gen/SI3D/pNF2_etaGapPtPhi", "<nF^{2}> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
292+
histos.add("Gen/SI3D/pNB2_etaGapPtPhi", "<nB^{2}> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
293+
histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T};#varphi", kTProfile3D, {etaGapAxis, ptAxis, phiAxis});
302294

303295
// Sample-separated MC subsample sums for SI3D.
304296
// Axes: subsample x eta gap x pT x phi. EventCount is the denominator.
@@ -322,9 +314,6 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
322314
histos.add("SubsampleGenSI3D/SumNF2_sub_etaGapPtPhi", "sum nF^{2} generated;subsample;#Delta#eta;#it{p}_{T};#varphi", kTHnSparseD, {subsampleAxis, etaGapAxis, ptAxis, phiAxis});
323315
histos.add("SubsampleGenSI3D/SumNB2_sub_etaGapPtPhi", "sum nB^{2} generated;subsample;#Delta#eta;#it{p}_{T};#varphi", kTHnSparseD, {subsampleAxis, etaGapAxis, ptAxis, phiAxis});
324316
histos.add("SubsampleGenSI3D/SumNFNB_sub_etaGapPtPhi", "sum nF nB generated;subsample;#Delta#eta;#it{p}_{T};#varphi", kTHnSparseD, {subsampleAxis, etaGapAxis, ptAxis, phiAxis});
325-
326-
327-
328317
}
329318

330319
// ------------------------------------------------------------------
@@ -413,17 +402,17 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
413402
return iphi;
414403
}
415404

416-
bool isChargedMCParticle(int pdgCode) const
417-
{
418-
auto* particle = pdg->GetParticle(pdgCode);
419-
if (!particle) {
420-
return false;
421-
}
422-
423-
constexpr double MinAbsCharge = 0.0;
424-
return std::abs(particle->Charge()) > MinAbsCharge;
405+
bool isChargedMCParticle(int pdgCode) const
406+
{
407+
auto* particle = pdg->GetParticle(pdgCode);
408+
if (!particle) {
409+
return false;
425410
}
426411

412+
constexpr double MinAbsCharge = 0.0;
413+
return std::abs(particle->Charge()) > MinAbsCharge;
414+
}
415+
427416
template <typename C>
428417
bool selCollision(C const& coll, float& cent)
429418
{
@@ -459,7 +448,7 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
459448

460449
cent = getCentrality(coll);
461450
if (!std::isfinite(cent) || cent < MinCentrality || cent >= MaxCentrality) {
462-
return false;
451+
return false;
463452
}
464453
if (cent < cfgCentMin.value || cent >= cfgCentMax.value) {
465454
return false;
@@ -664,7 +653,6 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
664653
}
665654
}
666655

667-
668656
void fillCentClassEtaGapMoments(int centClass,
669657
std::array<double, nEtaGaps> const& nF,
670658
std::array<double, nEtaGaps> const& nB)
@@ -703,7 +691,6 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
703691
}
704692
}
705693

706-
707694
void fillSubsampleCentWindowEtaGapMoments(int isub,
708695
int centWindowClass,
709696
std::array<double, nEtaGaps> const& nF,
@@ -727,7 +714,6 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
727714
}
728715
}
729716

730-
731717
void fillDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
732718
EtaPtPhiArray const& nB)
733719
{
@@ -753,75 +739,75 @@ histos.add("Gen/SI3D/pNFNB_etaGapPtPhi", "<nF nB> generated;#Delta#eta;#it{p}_{T
753739
}
754740
}
755741

756-
void fillRecoDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
757-
EtaPtPhiArray const& nB)
758-
{
759-
for (int igap = 0; igap < nEtaGaps; ++igap) {
760-
const double gap = 2.0 * etaMin[igap];
761-
for (int ipt = 0; ipt < nPtBins; ++ipt) {
762-
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
763-
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
764-
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
765-
const double nf = nF[igap][ipt][iphi];
766-
const double nb = nB[igap][ipt][iphi];
767-
768-
histos.fill(HIST("Reco/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
769-
histos.fill(HIST("Reco/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
770-
histos.fill(HIST("Reco/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
771-
histos.fill(HIST("Reco/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
772-
histos.fill(HIST("Reco/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
742+
void fillRecoDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
743+
EtaPtPhiArray const& nB)
744+
{
745+
for (int igap = 0; igap < nEtaGaps; ++igap) {
746+
const double gap = 2.0 * etaMin[igap];
747+
for (int ipt = 0; ipt < nPtBins; ++ipt) {
748+
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
749+
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
750+
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
751+
const double nf = nF[igap][ipt][iphi];
752+
const double nb = nB[igap][ipt][iphi];
753+
754+
histos.fill(HIST("Reco/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
755+
histos.fill(HIST("Reco/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
756+
histos.fill(HIST("Reco/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
757+
histos.fill(HIST("Reco/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
758+
histos.fill(HIST("Reco/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
759+
}
773760
}
774761
}
775762
}
776-
}
777-
void fillPrimDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
778-
EtaPtPhiArray const& nB)
779-
{
780-
for (int igap = 0; igap < nEtaGaps; ++igap) {
781-
const double gap = 2.0 * etaMin[igap];
763+
void fillPrimDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
764+
EtaPtPhiArray const& nB)
765+
{
766+
for (int igap = 0; igap < nEtaGaps; ++igap) {
767+
const double gap = 2.0 * etaMin[igap];
782768

783-
for (int ipt = 0; ipt < nPtBins; ++ipt) {
784-
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
769+
for (int ipt = 0; ipt < nPtBins; ++ipt) {
770+
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
785771

786-
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
787-
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
772+
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
773+
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
788774

789-
const double nf = nF[igap][ipt][iphi];
790-
const double nb = nB[igap][ipt][iphi];
775+
const double nf = nF[igap][ipt][iphi];
776+
const double nb = nB[igap][ipt][iphi];
791777

792-
histos.fill(HIST("Prim/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
793-
histos.fill(HIST("Prim/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
794-
histos.fill(HIST("Prim/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
795-
histos.fill(HIST("Prim/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
796-
histos.fill(HIST("Prim/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
778+
histos.fill(HIST("Prim/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
779+
histos.fill(HIST("Prim/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
780+
histos.fill(HIST("Prim/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
781+
histos.fill(HIST("Prim/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
782+
histos.fill(HIST("Prim/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
783+
}
797784
}
798785
}
799786
}
800-
}
801-
void fillGenDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
802-
EtaPtPhiArray const& nB)
803-
{
804-
for (int igap = 0; igap < nEtaGaps; ++igap) {
805-
const double gap = 2.0 * etaMin[igap];
787+
void fillGenDifferentialEtaPtPhiMoments(EtaPtPhiArray const& nF,
788+
EtaPtPhiArray const& nB)
789+
{
790+
for (int igap = 0; igap < nEtaGaps; ++igap) {
791+
const double gap = 2.0 * etaMin[igap];
806792

807-
for (int ipt = 0; ipt < nPtBins; ++ipt) {
808-
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
793+
for (int ipt = 0; ipt < nPtBins; ++ipt) {
794+
const double ptCenter = 0.5 * (ptEdges[ipt] + ptEdges[ipt + 1]);
809795

810-
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
811-
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
796+
for (int iphi = 0; iphi < nPhiBins; ++iphi) {
797+
const double phiCenter = (iphi + 0.5) * TwoPi / nPhiBins;
812798

813-
const double nf = nF[igap][ipt][iphi];
814-
const double nb = nB[igap][ipt][iphi];
799+
const double nf = nF[igap][ipt][iphi];
800+
const double nb = nB[igap][ipt][iphi];
815801

816-
histos.fill(HIST("Gen/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
817-
histos.fill(HIST("Gen/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
818-
histos.fill(HIST("Gen/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
819-
histos.fill(HIST("Gen/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
820-
histos.fill(HIST("Gen/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
802+
histos.fill(HIST("Gen/SI3D/pNF_etaGapPtPhi"), gap, ptCenter, phiCenter, nf);
803+
histos.fill(HIST("Gen/SI3D/pNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nb);
804+
histos.fill(HIST("Gen/SI3D/pNF2_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nf);
805+
histos.fill(HIST("Gen/SI3D/pNB2_etaGapPtPhi"), gap, ptCenter, phiCenter, nb * nb);
806+
histos.fill(HIST("Gen/SI3D/pNFNB_etaGapPtPhi"), gap, ptCenter, phiCenter, nf * nb);
807+
}
821808
}
822809
}
823810
}
824-
}
825811

826812
void fillRecoSubsampleDifferentialEtaPtPhiMoments(int isub,
827813
EtaPtPhiArray const& nF,

0 commit comments

Comments
 (0)