Skip to content

Commit 165c267

Browse files
hernasabSabrina Hernandez
andauthored
[PWGCF] Updated neutron skin process in FlowZDCtask.cxx (AliceO2Group#8293)
Co-authored-by: Sabrina Hernandez <[email protected]>
1 parent 9ed3b32 commit 165c267

File tree

1 file changed

+85
-11
lines changed

1 file changed

+85
-11
lines changed

PWGCF/Flow/Tasks/FlowZDCtask.cxx

Lines changed: 85 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ using namespace o2;
3636
using namespace o2::framework;
3737
using namespace o2::framework::expressions;
3838
using namespace o2::aod::mult;
39-
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>;
39+
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>;
4040
using aodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>>;
4141
using aodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>>;
4242
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
@@ -76,7 +76,6 @@ struct FlowZDCtask {
7676
ConfigurableAxis axisEta{"axisEta", {40, -1., 1.}, "eta axis for histograms"};
7777
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.2, 0.25, 0.30, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.20, 2.40, 2.60, 2.80, 3.00}, "pt axis for histograms"};
7878
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90}, "centrality axis for histograms"};
79-
8079
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
8180
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls);
8281

@@ -102,6 +101,13 @@ struct FlowZDCtask {
102101
OutputObj<TProfile> ZDC_ZEM_Energy{TProfile("ZDC_ZEM_Energy", "ZDC vs ZEM Energy", 10, 0, 1000)};
103102
OutputObj<TProfile> pCosPsiDifferences{TProfile("pCosPsiDifferences", "Differences in cos(psi) vs Centrality;Centrality;Mean cos(psi) Difference", 200, 0, 100, -1, 1)};
104103
OutputObj<TProfile> pSinPsiDifferences{TProfile("pSinPsiDifferences", "Differences in sin(psi) vs Centrality;Centrality;Mean sin(psi) Difference", 200, 0, 100, -1, 1)};
104+
OutputObj<TProfile> pZNvsFT0MAmp{TProfile("pZNvsFT0MAmp", "ZN Energy vs FT0M Amplitude", 100, 0, 50000, 0, 500)};
105+
OutputObj<TProfile> pZPvsFT0MAmp{TProfile("pZPvsFT0MAmp", "ZP Energy vs FT0M Amplitude", 100, 0, 50000, 0, 500)};
106+
107+
OutputObj<TProfile> pZNvsFT0Ccent{TProfile("pZNvsFT0Ccent", "ZN Energy vs FT0C Centrality", 100, 0, 100, 0, 50000)};
108+
OutputObj<TProfile> pZPvsFT0Ccent{TProfile("pZPvsFT0Ccent", "ZP Energy vs FT0C Centrality", 100, 0, 100, 0, 50000)};
109+
OutputObj<TProfile> pZNratiovscent{TProfile("pZNratiovscent", "Ratio ZNC/ZNA vs FT0C Centrality", 100, 0, 100, 0, 5)};
110+
OutputObj<TProfile> pZPratiovscent{TProfile("pZPratiovscent", "Ratio ZPC/ZPA vs FT0C Centrality", 100, 0, 100, 0, 5)};
105111

106112
double sumCosPsiDiff = 0.0; // Sum of cos(psiZNC) - cos(psiZNA)
107113
int countEvents = 0; // Count of processed events
@@ -120,11 +126,11 @@ struct FlowZDCtask {
120126
const AxisSpec axisQZNA{100, -1, 1, "Q"};
121127
const AxisSpec axisREQ{100, -1, 1, "real Q"};
122128
const AxisSpec axisIMQ{100, -1, 1, "imag Q"};
123-
const AxisSpec axisEnergy{100, 0, 50, "energy"};
129+
const AxisSpec axisEnergy{100, 0, 50000., "energy"};
124130

125131
AxisSpec axisVtxcounts{2, -0.5f, 1.5f, "Vtx info (0=no, 1=yes)"};
126132
AxisSpec axisZvert{120, -30.f, 30.f, "Vtx z (cm)"};
127-
AxisSpec axisCent{8, 0.f, 100.f, "centrality"};
133+
AxisSpec axisCent{8, 0.f, 105.f, "centrality"};
128134
AxisSpec axisMult{1000, -0.5f, 1500.5f, "multiplicity"};
129135
AxisSpec axisMultTPC{1000, -0.5f, 1999.5f, "TPCmultiplicity"};
130136
AxisSpec axisCentBins{{0, 5., 10., 20., 30., 40., 50., 60., 70., 80.}, "centrality percentile"};
@@ -152,6 +158,7 @@ struct FlowZDCtask {
152158

153159
histos.add("EnergyZNA", "ZNA Sector Energy", kTH1F, {axisEnergy});
154160
histos.add("EnergyZNC", "ZNC Sector Energy", kTH1F, {axisEnergy});
161+
histos.add("hCentFT0C", "FT0C Centrality Distribution", kTH1F, {{100, 0, 105}});
155162
// for q vector recentering
156163
histos.add("revsimag", "revsimag", kTH2F, {axisREQ, axisIMQ});
157164

@@ -179,6 +186,19 @@ struct FlowZDCtask {
179186
histos.add("hSinDifferences", "Differences in sin(psi);sin(psiZNC) - sin(psiZNA);Entries", {HistType::kTH1F, {{100, -2, 2}}});
180187
histos.add("CosPsiDifferencesAvg", "Differences in cos(psi);cos(psiZNC) - cos(psiZNA);Entries", {HistType::kTH2F, {{axisCent}, {100, -2, 2}}});
181188
histos.add("ZDC_energy_vs_ZEM", "ZDCvsZEM; ZEM; ZNA+ZNC+ZPA+ZPC", {HistType::kTH2F, {{{nBinsAmp, -0.5, MaxZEM}, {nBinsAmp, -0.5, 2. * MaxZN}}}});
189+
// common energies information for ZDC
190+
histos.add("ZNCenergy", "ZN energy side c", kTH1F, {axisEnergy});
191+
histos.add("ZNAenergy", "ZN energy side a", kTH1F, {axisEnergy});
192+
histos.add("ZPCenergy", "ZP energy side c", kTH1F, {axisEnergy});
193+
histos.add("ZPAenergy", "ZP energy side a", kTH1F, {axisEnergy});
194+
histos.add("ZNenergy", "common zn (a + c sides) energy", kTH1F, {axisEnergy});
195+
histos.add("ZPenergy", "common zp energy (a + c sides)", kTH1F, {axisEnergy});
196+
histos.add("hFT0CAmp", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 10000000}});
197+
histos.add("hFT0AAmp", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 10000000}});
198+
histos.add("hFT0MAmp", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 10000000}});
199+
histos.add("hMultT0A", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 250000}});
200+
histos.add("hMultT0C", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 250000}});
201+
histos.add("hMultT0M", ";Amplitude;counts", kTH1F, {{nBinsAmp, 0, 250000}});
182202
}
183203
}
184204

@@ -228,18 +248,47 @@ struct FlowZDCtask {
228248
void processZdcCollAssoc(
229249
ColEvSels const& cols,
230250
BCsRun3 const& /*bcs*/,
231-
aod::Zdcs const& /*zdcs*/)
251+
aod::Zdcs const& /*zdcs*/,
252+
aod::FT0s const& ft0s)
232253
{
233254
double sumCosPsiDiff = 0.0; // initialize Sum of cosPsiDiff for averaging
234255
double sumSinPsiDiff = 0.0; // initialize Sum of cosPsiDiff for averaging
235256
int countEvents = 0; // initialize Counter for the number of events processed
257+
double FT0AAmp = 0;
258+
double FT0CAmp = 0;
259+
// init values for ft0 multiplicity
260+
float multFT0A = 0.f;
261+
float multFT0C = 0.f;
262+
float multFT0M = 0.f;
263+
236264
// collision-based event selection
237265
for (auto& collision : cols) {
238266
const auto& foundBC = collision.foundBC_as<BCsRun3>();
267+
multFT0A = collision.multFT0A();
268+
multFT0C = collision.multFT0C();
269+
multFT0M = multFT0A + multFT0C;
270+
271+
histos.fill(HIST("hMultT0A"), multFT0A);
272+
histos.fill(HIST("hMultT0C"), multFT0C);
273+
histos.fill(HIST("hMultT0M"), multFT0M);
274+
if (collision.has_foundFT0()) {
275+
auto ft0 = collision.foundFT0();
276+
for (auto amplitude : ft0.amplitudeA()) {
277+
FT0AAmp += amplitude;
278+
histos.fill(HIST("hFT0AAmp"), FT0AAmp);
279+
}
280+
for (auto amplitude : ft0.amplitudeC()) {
281+
FT0CAmp += amplitude;
282+
histos.fill(HIST("hFT0CAmp"), FT0CAmp);
283+
}
284+
}
285+
double FT0MAmp = FT0AAmp + FT0CAmp;
286+
histos.fill(HIST("hFT0MAmp"), FT0MAmp);
239287
if (foundBC.has_zdc()) {
240288
const auto& zdcread = foundBC.zdc();
241289
const auto cent = collision.centFT0C();
242290

291+
// ZDC data and histogram filling
243292
histos.get<TH1>(HIST("ZNAcoll"))->Fill(zdcread.amplitudeZNA());
244293
histos.get<TH1>(HIST("ZNCcoll"))->Fill(zdcread.amplitudeZNC());
245294
histos.get<TH2>(HIST("ZNvsZEMcoll"))->Fill(zdcread.amplitudeZEM1() + zdcread.amplitudeZEM2(), zdcread.amplitudeZNA() + zdcread.amplitudeZNC());
@@ -254,23 +303,47 @@ struct FlowZDCtask {
254303
float sumZPA = (zdcread.energySectorZPA())[0] + (zdcread.energySectorZPA())[1] + (zdcread.energySectorZPA())[2] + (zdcread.energySectorZPA())[3];
255304
float sumZDC = sumZPA + sumZPC + sumZNA + sumZNC;
256305
float sumZEM = zdcread.amplitudeZEM1() + zdcread.amplitudeZEM2();
306+
307+
// common energies
308+
float common_sumZNC = (zdcread.energyCommonZNC());
309+
float common_sumZNA = (zdcread.energyCommonZNA());
310+
float common_sumZPC = (zdcread.energyCommonZPC());
311+
float common_sumZPA = (zdcread.energyCommonZPA());
312+
float sumZN = (sumZNC) + (sumZNA);
313+
float sumZP = (sumZPC) + (sumZPA);
314+
315+
histos.fill(HIST("ZNenergy"), sumZN);
316+
histos.fill(HIST("ZPenergy"), sumZP);
317+
histos.fill(HIST("ZNCenergy"), common_sumZNC);
318+
histos.fill(HIST("ZNAenergy"), common_sumZNA);
319+
histos.fill(HIST("ZPAenergy"), common_sumZPA);
320+
histos.fill(HIST("ZPCenergy"), common_sumZPC);
321+
322+
float ratioZN = sumZNC / sumZNA;
323+
float ratioZP = sumZPC / sumZPA;
324+
pZNratiovscent->Fill(cent, ratioZN);
325+
pZPratiovscent->Fill(cent, ratioZP);
326+
pZNvsFT0Ccent->Fill(cent, sumZN);
327+
pZPvsFT0Ccent->Fill(cent, sumZP);
328+
pZPvsFT0MAmp->Fill(sumZP, FT0MAmp);
329+
pZNvsFT0MAmp->Fill(sumZN, FT0MAmp);
330+
257331
histos.get<TH2>(HIST("ZDC_energy_vs_ZEM"))->Fill(sumZEM, sumZDC);
258332

333+
// Spectator plane angle calculations and histograms
259334
const auto Ntot_ZNA = zdcread.amplitudeZNA();
260335
const auto Ntot_ZNC = zdcread.amplitudeZNC();
261-
double qZNA_real = 0.0; // Initialize qZNA_real
262-
double qZNA_im = 0.0; // Initialize
263-
double qZNC_real = 0.0; // Initialize qZNC_real
264-
double qZNC_im = 0.0; // Initialize
336+
double qZNA_real = 0.0;
337+
double qZNA_im = 0.0;
338+
double qZNC_real = 0.0;
339+
double qZNC_im = 0.0;
265340
const double phiRadians[4] = {45 * TMath::Pi() / 180, 135 * TMath::Pi() / 180, 225 * TMath::Pi() / 180, 315 * TMath::Pi() / 180};
266341
TComplex qZNA(0, 0), qZNC(0, 0);
267342

268343
for (int sector = 0; sector < 4; ++sector) {
269-
// energy for current sector for ZNA and ZNC
270344
float energyZNA = zdcread.energySectorZNA()[sector];
271345
float energyZNC = zdcread.energySectorZNC()[sector];
272346

273-
// Calculate q-vector from current sector and add it to the total q-vector
274347
qZNA += TComplex(TMath::Cos(2 * phiRadians[sector]) * energyZNA / sumZNA, TMath::Sin(2 * phiRadians[sector]) * energyZNA / sumZNA);
275348
qZNC += TComplex(TMath::Cos(2 * phiRadians[sector]) * energyZNC / sumZNC, TMath::Sin(2 * phiRadians[sector]) * energyZNC / sumZNC);
276349
}
@@ -313,6 +386,7 @@ struct FlowZDCtask {
313386
}
314387
}
315388
}
389+
316390
PROCESS_SWITCH(FlowZDCtask, processZdcCollAssoc, "Processing ZDC w. collision association", true);
317391
PROCESS_SWITCH(FlowZDCtask, processQVector, "Process before recentering", true);
318392

0 commit comments

Comments
 (0)