Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 32 additions & 22 deletions PWGCF/Flow/Tasks/FlowZDCtask.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGCF/Flow/Tasks/FlowZDCtask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/file-cpp]

Use lowerCamelCase or UpperCamelCase for names of C++ files. See the O2 naming conventions for details.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -41,9 +41,9 @@
using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace o2::aod::mult;
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::Mults>;
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels>;
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>>;
using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>>;
using AodTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
using AodZDCs = soa::Join<aod::ZDCMults, aod::Zdcs>;

Expand All @@ -56,20 +56,23 @@
O2_DEFINE_CONFIGURABLE(cfgCutPtPOIMin, float, 0.2f, "Minimal pT for poi tracks")
O2_DEFINE_CONFIGURABLE(cfgCutPtPOIMax, float, 10.0f, "Maximal pT for poi tracks")
O2_DEFINE_CONFIGURABLE(cfgCutPtMin, float, 0.2f, "Minimal pT for ref tracks")
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 3.0f, "Maximal pT for ref tracks")
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.9f, "Eta range for tracks") // changed from .8 bc zdc is at eta 8.78
O2_DEFINE_CONFIGURABLE(cfgCutPtMax, float, 10.0f, "Maximal pT for ref tracks")
O2_DEFINE_CONFIGURABLE(cfgCutEta, float, 0.8f, "Eta range for tracks")
O2_DEFINE_CONFIGURABLE(cfgCutChi2prTPCcls, float, 2.5, "Chi2 per TPC clusters")
O2_DEFINE_CONFIGURABLE(cfgUseNch, bool, false, "Use Nch for flow observables")
O2_DEFINE_CONFIGURABLE(cfgNbootstrap, int, 10, "Number of subsamples")
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2, "DCA Z cut")
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 0.2f, "DCA XY cut")

Configurable<int> nBinsPt{"nBinsPt", 100, "N bins in pT histo"};
Configurable<int> nBinsPt{"nBinsPt", 500, "N bins in pT histo"};
Configurable<int> eventSelection{"eventSelection", 1, "event selection"};
Configurable<float> maxZp{"maxZp", 3099.5, "Max ZP signal"};
Configurable<float> vtxCut{"vtxCut", 10.0, "Z vertex cut"};
Configurable<float> etaCut{"etaCut", 0.8, "Eta cut"};
Configurable<float> etaGap{"etaGap", 0.5, "Eta gap"};
Configurable<float> minPt{"minPt", 0.2, "Minimum pt"};
Configurable<float> maxPt{"maxPt", 20.0, "Maximum pt"};
Configurable<float> minTpcNcrossedRows{"minTpcNcrossedRows", 20, "minTpcNcrossedRows"};
Configurable<float> maxZem{"maxZem", 3099.5, "Max ZEM signal"};
// for ZDC info and analysis
Configurable<int> nBinsADC{"nBinsADC", 1000, "nbinsADC"};
Expand All @@ -95,7 +98,7 @@
ConfigurableAxis axisFT0MAmp{"axisFT0MAmp", {10000, 0, 10000}, "axisFT0MAmp"};

Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
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);
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) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
Partition<AodTracks> tracksIUWithTPC = (aod::track::tpcNClsFindable > (uint8_t)0);

std::complex<double> qTPC; // init q TPC
Expand Down Expand Up @@ -179,8 +182,8 @@
"ZP Energy vs FT0C Centrality;Centrality [%];ZP Energy",
kTH2F,
{AxisSpec{100, 0, 100, "Centrality [%]"}, AxisSpec{100, 0, 500, "ZP Energy"}});
// for q vector recentering
histos.add("revsimag", "revsimag", kTH2F, {axisREQ, axisIMQ});
histos.add("revsimag", "revsimag", kTH2F, {axisREQ, axisIMQ}); // for q vector recentering
histos.add("hYield", "Nch vs pT", kTH2F, {axisMultiplicity, axisPt});

if (doprocessZdcCollAssoc) { // Check if the process function for ZDCCollAssoc is enabled
histos.add("ZNAcoll", "ZNAcoll; ZNA amplitude; Entries", {HistType::kTH1F, {{nBinsAmp, -0.5, maxZn}}});
Expand Down Expand Up @@ -234,38 +237,45 @@
const auto& tracksGrouped = tracksIUWithTPC->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
const int multTPC = tracksGrouped.size();
const auto cent = collision.centFT0C();
int nTot = tracks.size();

// this is the q vector for the TPC data. it is a complex function
double qTpcReal = 0.0; // Initialize qTPC_real
double qTpcIm = 0.0; // init qTPC_imaginary

int multTrk = tracks.size(); // Tracks are already filtered with GlobalTrack || GlobalTrackSDD

if (cent < 0.0 && cent > 70)
return;
std::complex<double> qTPC(0, 0); // Starting with a q-vector of zero

int nTot{0}; // Tracks are already filtered with GlobalTrack || GlobalTrackSDD
for (const auto& track : tracks) {
if (track.tpcNClsCrossedRows() < minTpcNcrossedRows)
continue;
if (fabs(track.dcaXY()) > cfgCutDCAxy)

Check warning on line 252 in PWGCF/Flow/Tasks/FlowZDCtask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
double phi = track.phi();

nTot++;
histos.fill(HIST("etaHistogram"), track.eta());
histos.fill(HIST("phiHistogram"), track.phi());
histos.fill(HIST("ptHistogram"), track.pt());

qTPC += std::complex<double>(std::cos(2.0 * phi), std::sin(2.0 * phi));

histos.fill(HIST("multvsCent"), cent, nTot);

} // end track loop

} // end track loop 1
int pT{0};
for (const auto& track : tracks) {
if (track.tpcNClsCrossedRows() < minTpcNcrossedRows)
continue;
if (fabs(track.dcaXY()) > cfgCutDCAxy)

Check warning on line 265 in PWGCF/Flow/Tasks/FlowZDCtask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
pT = track.pt();
pT++;
} // end track loop 2
histos.fill(HIST("multvsCent"), cent, nTot);
histos.fill(HIST("hYield"), nTot, pT);
histos.fill(HIST("multHistogram"), nTot);
qTpcReal = qTPC.real() / nTot; // normalize these vectors by the total number of particles
qTpcIm = qTPC.imag() / nTot;

histos.fill(HIST("REqHistogram"), qTpcReal);
histos.fill(HIST("IMqHistogram"), qTpcIm);

histos.fill(HIST("multHistogram"), multTrk);
histos.fill(HIST("TPCmultiplicity"), multTPC);

histos.fill(HIST("revsimag"), qTpcReal, qTpcIm);
Expand All @@ -290,14 +300,14 @@
if (collision.has_foundFT0()) {
auto ft0 = collision.foundFT0();
for (const auto& amplitude : ft0.amplitudeA()) {
histos.fill(HIST("hFT0AAmp"), amplitude);
ft0aAmp += amplitude;
}
for (const auto& amplitude : ft0.amplitudeC()) {
histos.fill(HIST("hFT0CAmp"), amplitude);
ft0cAmp += amplitude;
}
}
histos.fill(HIST("hFT0AAmp"), ft0aAmp);
histos.fill(HIST("hFT0CAmp"), ft0cAmp);
double ft0mAmp = ft0aAmp + ft0cAmp;
histos.fill(HIST("hFT0MAmp"), ft0mAmp);
if (foundBC.has_zdc()) {
Expand Down
Loading