Skip to content

Commit 9c87621

Browse files
committed
Added new hists for pileup
1 parent e32f51e commit 9c87621

File tree

1 file changed

+43
-10
lines changed

1 file changed

+43
-10
lines changed

PWGCF/EbyEFluctuations/Tasks/radialFlowDecorr.cxx

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ struct RadialFlowDecorr {
191191
Configurable<int> cfgNchPbMax{"cfgNchPbMax", 4000, "Max Nch range for PbPb collisions"};
192192
Configurable<int> cfgNchOMax{"cfgNchOMax", 600, "Max Nch range for OO collisions"};
193193

194-
Configurable<int> cfgSys{"cfgSys", 2, "Efficiency to be used for which system? 1-->PbPb, 2-->OO, 3-->pPb, 4-->pp"};
195-
Configurable<bool> cfgFlat{"cfgFlat", false, "Whether to use flattening weights or not"};
196-
Configurable<bool> cfgEff{"cfgEff", false, "Whether to use Efficiency weights or not"};
194+
Configurable<int> cfgSys{"cfgSys", 1, "Efficiency to be used for which system? 1-->PbPb, 2-->OO, 3-->pPb, 4-->pp"};
195+
Configurable<bool> cfgFlat{"cfgFlat", false, "Whether to use flattening weights"};
196+
Configurable<bool> cfgEff{"cfgEff", false, "Whether to use Efficiency weights"};
197+
Configurable<bool> cfgZDC{"cfgZDC", false, "Whether to use ZDC for pileup histograms"};
197198

198199
Configurable<std::string> cfgCCDBurl{"cfgCCDBurl", "https://alice-ccdb.cern.ch", "ccdb url"};
199200
Configurable<std::string> cfgCCDBUserPath{"cfgCCDBUserPath", "/Users/s/somadutt", "Base CCDB path"};
@@ -544,6 +545,7 @@ struct RadialFlowDecorr {
544545
using AodTracksSel = soa::Filtered<UnfilteredTracks>;
545546
using TCs = soa::Join<UnfilteredTracks, aod::McTrackLabels>;
546547
using FilteredTCs = soa::Filtered<TCs>;
548+
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
547549

548550
using MyRun3MCCollisions = soa::Join<
549551
aod::Collisions, aod::EvSels, aod::Mults, aod::MultsExtra,
@@ -724,6 +726,12 @@ struct RadialFlowDecorr {
724726
histos.add("hEtaPhiRecoEffWtd", "hEtaPhiRecoEffWtd", kTHnSparseF, {{vzAxis}, {chgAxis}, {pTAxis}, {(KNEta - 1), KEtaAxisMin, KEtaAxisMax}, {KNbinsPhiFine, KPhiMin, TwoPI}});
725727
histos.add("hEtaPhiRecoWtd_PID", "hEtaPhiRecoWtd_PID", kTHnSparseF, {{vzAxis}, {chgAxis}, {pTAxis}, {(KNEta - 1), KEtaAxisMin, KEtaAxisMax}, {KNbinsPhiFine, KPhiMin, TwoPI}});
726728
histos.add("hEtaPhiRecoEffWtd_PID", "hEtaPhiRecoEffWtd_PID", kTHnSparseF, {{vzAxis}, {chgAxis}, {pTAxis}, {(KNEta - 1), KEtaAxisMin, KEtaAxisMax}, {KNbinsPhiFine, KPhiMin, TwoPI}});
729+
730+
histos.add("hnTrkPVZDC", ";ZDC_{A+C};N_{PV}", kTH2F, {{nChAxis2}, {200, 0, 3000}});
731+
histos.add("hNchZDC", ";ZDC_{A+C};N_{trk}", kTH2F, {{nChAxis2}, {200, 0, 30000}});
732+
733+
histos.add("hCentnTrk", ";Centrality (%);N_{trk}", kTH2F, {{centAxis1Per}, {nChAxis2}});
734+
histos.add("hCentnTrkPV", ";Centrality (%),N_{trk, PV}", kTH2F, {{centAxis1Per}, {nChAxis2}});
727735
}
728736

729737
void declareDataMeanHists()
@@ -1818,29 +1826,29 @@ struct RadialFlowDecorr {
18181826
std::tie(meanRecoEffCorEt[ieta][ipt], c2RecoEffCorEt[ieta][ipt]) = calculateMeanAndC2FromSums<KIntM, KIntK>(sumPmwkRecoEffCorEt[ieta][ipt], sumWkRecoEffCorEt[ieta][ipt], mmetRecoEffCor);
18191827

18201828
//"Truth"
1821-
if (isfinite(meanTru[ieta][ipt])) {
1829+
if (std::isfinite(meanTru[ieta][ipt])) {
18221830
histos.fill(HIST("MCGen/Prof_Cent_MeanpT_etabin_ptbin"), cent, ieta, ipt, meanTru[ieta][ipt]);
18231831
histos.fill(HIST("MCGen/Prof_Mult_MeanpT_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanTru[ieta][ipt]);
18241832
}
1825-
if (isfinite(meanTruEt[ieta][ipt])) {
1833+
if (std::isfinite(meanTruEt[ieta][ipt])) {
18261834
histos.fill(HIST("MCGen/Prof_Cent_MeanEt_etabin_ptbin"), cent, ieta, ipt, meanTruEt[ieta][ipt]);
18271835
histos.fill(HIST("MCGen/Prof_Mult_MeanEt_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanTruEt[ieta][ipt]);
18281836
}
18291837
// "MCReco"
1830-
if (isfinite(meanReco[ieta][ipt])) {
1838+
if (std::isfinite(meanReco[ieta][ipt])) {
18311839
histos.fill(HIST("MCReco/Prof_Cent_MeanpT_etabin_ptbin"), cent, ieta, ipt, meanReco[ieta][ipt]);
18321840
histos.fill(HIST("MCReco/Prof_Mult_MeanpT_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanReco[ieta][ipt]);
18331841
}
1834-
if (isfinite(meanRecoEt[ieta][ipt])) {
1842+
if (std::isfinite(meanRecoEt[ieta][ipt])) {
18351843
histos.fill(HIST("MCReco/Prof_Cent_MeanEt_etabin_ptbin"), cent, ieta, ipt, meanRecoEt[ieta][ipt]);
18361844
histos.fill(HIST("MCReco/Prof_Mult_MeanEt_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanRecoEt[ieta][ipt]);
18371845
}
18381846
// "MCRecoEffCor"
1839-
if (isfinite(meanRecoEffCor[ieta][ipt])) {
1847+
if (std::isfinite(meanRecoEffCor[ieta][ipt])) {
18401848
histos.fill(HIST("MCRecoEffCorr/Prof_Cent_MeanpT_etabin_ptbin"), cent, ieta, ipt, meanRecoEffCor[ieta][ipt]);
18411849
histos.fill(HIST("MCRecoEffCorr/Prof_Mult_MeanpT_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanRecoEffCor[ieta][ipt]);
18421850
}
1843-
if (isfinite(meanRecoEffCorEt[ieta][ipt])) {
1851+
if (std::isfinite(meanRecoEffCorEt[ieta][ipt])) {
18441852
histos.fill(HIST("MCRecoEffCorr/Prof_Cent_MeanEt_etabin_ptbin"), cent, ieta, ipt, meanRecoEffCorEt[ieta][ipt]);
18451853
histos.fill(HIST("MCRecoEffCorr/Prof_Mult_MeanEt_etabin_ptbin"), col.multNTracksPV(), ieta, ipt, meanRecoEffCorEt[ieta][ipt]);
18461854
}
@@ -2080,13 +2088,22 @@ struct RadialFlowDecorr {
20802088
}
20812089
PROCESS_SWITCH(RadialFlowDecorr, processMCFluc, "process MC to calculate pt/Et fluc", cfgRunMCFluc);
20822090

2083-
void processGetDataFlat(AodCollisionsSel::iterator const& coll, aod::BCsWithTimestamps const&, AodTracksSel const& tracks)
2091+
void processGetDataFlat(AodCollisionsSel::iterator const& coll, BCsRun3 const& /*bcs*/, aod::Zdcs const& /*zdcsData*/, AodTracksSel const& tracks)
20842092
{
2093+
histos.fill(HIST("hVtxZ"), coll.posZ());
20852094
if (!isEventSelected(coll))
20862095
return;
20872096
float cent = getCentrality(coll);
20882097
if (cent > KCentMax)
20892098
return;
2099+
2100+
histos.fill(HIST("hZvtx_after_sel"), coll.posZ());
2101+
histos.fill(HIST("hCentrality"), cent);
2102+
2103+
histos.fill(HIST("Hist2D_globalTracks_PVTracks"), coll.multNTracksPV(), tracks.size());
2104+
histos.fill(HIST("Hist2D_cent_nch"), tracks.size(), cent);
2105+
2106+
int ntrk = 0;
20902107
for (const auto& track : tracks) {
20912108
if (!isTrackSelected(track))
20922109
continue;
@@ -2104,6 +2121,9 @@ struct RadialFlowDecorr {
21042121
histos.fill(HIST("hEtaPhiReco"), coll.posZ(), track.sign(), pt, eta, phi);
21052122
histos.fill(HIST("hEtaPhiRecoEffWtd"), coll.posZ(), track.sign(), pt, eta, phi, wIncl);
21062123

2124+
if (eta > etaLw[0] && eta < etaUp[0])
2125+
ntrk++;
2126+
21072127
const bool isPion = selectionPion(track);
21082128
const bool isKaon = selectionKaon(track);
21092129
const bool isProton = selectionProton(track);
@@ -2117,6 +2137,19 @@ struct RadialFlowDecorr {
21172137
histos.fill(HIST("hEtaPhiRecoEffWtd_PID"), coll.posZ(), track.sign(), pt, eta, phi, wPid);
21182138
}
21192139
}
2140+
2141+
histos.fill(HIST("hCentnTrk"), cent, ntrk);
2142+
histos.fill(HIST("hCentnTrkPV"), cent, coll.multNTracksPV());
2143+
if (cfgZDC) {
2144+
const auto& foundBC = coll.foundBC_as<BCsRun3>();
2145+
if (!foundBC.has_zdc()) {
2146+
return;
2147+
}
2148+
auto zdc = foundBC.zdc();
2149+
auto zdcAmp = zdc.energyCommonZNA() + zdc.energyCommonZNC();
2150+
histos.fill(HIST("hnTrkPVZDC"), coll.multNTracksPV(), zdcAmp);
2151+
histos.fill(HIST("hNchZDC"), ntrk, zdcAmp);
2152+
}
21202153
}
21212154
PROCESS_SWITCH(RadialFlowDecorr, processGetDataFlat, "process data to calculate Flattening maps", cfgRunGetDataFlat);
21222155

0 commit comments

Comments
 (0)