diff --git a/PWGJE/Tasks/ChJetTriggerQATask.cxx b/PWGJE/Tasks/ChJetTriggerQATask.cxx index 04b11aa5fe0..8a7d95e7907 100644 --- a/PWGJE/Tasks/ChJetTriggerQATask.cxx +++ b/PWGJE/Tasks/ChJetTriggerQATask.cxx @@ -44,6 +44,11 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; +using filteredColl = soa::Filtered>::iterator; +using filteredJTracks = soa::Filtered>; +using filteredJets = soa::Filtered>; +using joinedTracks = soa::Join; + // What this task should do // Event by event fill // 1) pT spectrum of tracks in TPC volume @@ -57,15 +62,10 @@ using namespace o2::framework::expressions; struct ChJetTriggerQATask { Configurable evSel{"evSel", "sel8", "choose event selection"}; - Configurable cfgVertexCut{"cfgVertexCut", 10.0, - "Accepted z-vertex range"}; - Configurable cfgTPCVolume{"cfgTPCVolume", 0.9, - "Full eta range"}; // eta range of TPC - Configurable cfgJetR{"cfgJetR", 0.4, - "jet resolution parameter"}; // jet cone radius - Configurable cfgJetPtMin{ - "cfgJetPtMin", 0.15, - "minimum jet pT constituent cut"}; // minimum jet constituent pT + Configurable cfgVertexCut{"cfgVertexCut", 10.0, "Accepted z-vertex range"}; + Configurable cfgTPCVolume{"cfgTPCVolume", 0.9, "Full eta range"}; // eta range of TPC + Configurable cfgJetR{"cfgJetR", 0.4, "jet resolution parameter"}; // jet cone radius + Configurable cfgJetPtMin{"cfgJetPtMin", 0.15, "minimum jet pT constituent cut"}; // minimum jet constituent pT Configurable cfgTrackPhiMinCut{"cfgTrackPhiMinCut", -999, "track min phi cut"}; Configurable cfgTrackPhiMaxCut{"cfgTrackPhiMaxCut", 999, "track max phi cut"}; @@ -75,18 +75,21 @@ struct ChJetTriggerQATask { Configurable bHighPtTrigger{"bHighPtTrigger", false, "charged jet high pT trigger selection"}; Configurable bTrackLowPtTrigger{"bTrackLowPtTrigger", false, "track low pT trigger selection"}; Configurable bTrackHighPtTrigger{"bTrackHighPtTrigger", false, "track high pT trigger selection"}; - Configurable bAddSupplementHistosToOutput{"bAddAdditionalHistosToOutput", false, "add supplementary histos to the output"}; Configurable phiAngleRestriction{"phiAngleRestriction", 0.3, "angle to restrict track phi for plotting tpc momentum"}; + ConfigurableAxis dcaXY_Binning{"dcaXY_Binning", {100, -5., 5.}, ""}; + ConfigurableAxis dcaZ_Binning{"dcaZ_Binning", {100, -5., 5.}, ""}; + float fiducialVolume; // 0.9 - jetR HistogramRegistry spectra; int eventSelection = -1; int trackSelection = -1; - void init(o2::framework::InitContext&) + + void init(InitContext&) { fiducialVolume = static_cast(cfgTPCVolume) - static_cast(cfgJetR); eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast(evSel)); @@ -113,6 +116,11 @@ struct ChJetTriggerQATask { spectra.add("globalP_tpcglobalPDiff_phirestrict", "difference of global and TPC inner momentum vs global momentum with selection applied restricted phi", {HistType::kTH2F, {{100, 0., +100.}, {200, -100., +100.}}}); spectra.add("global1overP_tpcglobalPDiff_phirestrict", "difference of 1/p global and TPC inner momentum vs global momentum with selection applied restricted phi", {HistType::kTH2F, {{100, 0., +100.}, {500, -8., +8.}}}); + spectra.add("DCAx_track_Phi_pT", "track DCAx vs phi & pT of global tracks w. nITSClusters #ge 4", kTH3F, {dcaXY_Binning, {60, 0., TMath::TwoPi()}, {100, 0., 100.}}); + spectra.add("DCAy_track_Phi_pT", "track DCAy vs phi & pT of global tracks w. nITSClusters #ge 4", kTH3F, {dcaXY_Binning, {60, 0., TMath::TwoPi()}, {100, 0., 100.}}); + spectra.add("DCAz_track_Phi_pT", "track DCAz vs phi & pT of global tracks w. nITSClusters #ge 4", kTH3F, {dcaZ_Binning, {60, 0., TMath::TwoPi()}, {100, 0., 100.}}); + spectra.add("nITSClusters_TrackPt", "Number of ITS hits vs phi & pT of global tracks", kTH3F, {{7, 1., 8.}, {60, 0., TMath::TwoPi()}, {100, 0., 100.}}); + // Supplementary plots if (bAddSupplementHistosToOutput) { spectra.add("ptJetChInclFullVol", "inclusive charged jet pT in full volume", {HistType::kTH1F, {{200, 0., +200.}}}); @@ -137,14 +145,9 @@ struct ChJetTriggerQATask { Filter trackFilter = (nabs(aod::jtrack::eta) < static_cast(cfgTPCVolume)) && (aod::jtrack::phi > static_cast(cfgTrackPhiMinCut)) && (aod::jtrack::phi < static_cast(cfgTrackPhiMaxCut)) && (aod::jtrack::pt > static_cast(cfgJetPtMin)); // declare filters on jets - Filter jetRadiusSelection = (o2::aod::jet::r == nround(cfgJetR.node() * 100.0f)); + Filter jetRadiusSelection = (aod::jet::r == nround(cfgJetR.node() * 100.0f)); - using filteredJets = o2::soa::Filtered; - - void - process(soa::Filtered>::iterator const& collision, - soa::Filtered> const& tracks, o2::soa::Filtered> const& jets, soa::Join const&) + void process(filteredColl const& collision, filteredJTracks const& tracks, filteredJets const& jets, joinedTracks const&) { if (!collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { @@ -179,55 +182,64 @@ struct ChJetTriggerQATask { spectra.fill(HIST("vertexZ"), collision.posZ()); // Inclusive Track Cross TPC Rows - for (auto& trk : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV + for (auto const& track : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV + + auto const& originalTrack = track.track_as(); - auto const& originalTrack = trk.track_as>(); - spectra.fill(HIST("globalP_tpcglobalPDiff_withoutcuts"), trk.p(), trk.p() - originalTrack.tpcInnerParam()); + spectra.fill(HIST("globalP_tpcglobalPDiff_withoutcuts"), track.p(), track.p() - originalTrack.tpcInnerParam()); - if (TMath::Abs(trk.phi() - TMath::Pi()) < phiAngleRestriction) { - spectra.fill(HIST("globalP_tpcglobalPDiff_withoutcuts_phirestrict"), trk.p(), trk.p() - originalTrack.tpcInnerParam()); + if (TMath::Abs(track.phi() - TMath::Pi()) < phiAngleRestriction) { + spectra.fill(HIST("globalP_tpcglobalPDiff_withoutcuts_phirestrict"), track.p(), track.p() - originalTrack.tpcInnerParam()); } - if (!jetderiveddatautilities::selectTrack(trk, trackSelection)) { + if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { continue; } - spectra.fill(HIST("globalP_tpcglobalPDiff"), trk.p(), trk.p() - originalTrack.tpcInnerParam()); - if (trk.p() > 0 && originalTrack.tpcInnerParam() > 0) { - spectra.fill(HIST("global1overP_tpcglobalPDiff"), trk.p(), 1. / trk.p() - 1. / originalTrack.tpcInnerParam()); + if (originalTrack.itsNCls() >= 4) { // correspond to number of track hits in ITS layers + spectra.fill(HIST("DCAx_track_Phi_pT"), track.dcaX(), track.phi(), track.pt()); + spectra.fill(HIST("DCAy_track_Phi_pT"), track.dcaY(), track.phi(), track.pt()); + spectra.fill(HIST("DCAz_track_Phi_pT"), track.dcaZ(), track.phi(), track.pt()); + } + + spectra.fill(HIST("nITSClusters_TrackPt"), originalTrack.itsNCls(), track.phi(), track.pt()); + + spectra.fill(HIST("globalP_tpcglobalPDiff"), track.p(), track.p() - originalTrack.tpcInnerParam()); + if (track.p() > 0 && originalTrack.tpcInnerParam() > 0) { + spectra.fill(HIST("global1overP_tpcglobalPDiff"), track.p(), 1. / track.p() - 1. / originalTrack.tpcInnerParam()); } - if (TMath::Abs(trk.phi() - TMath::Pi()) < phiAngleRestriction) { - spectra.fill(HIST("globalP_tpcglobalPDiff_phirestrict"), trk.p(), trk.p() - originalTrack.tpcInnerParam()); + if (TMath::Abs(track.phi() - TMath::Pi()) < phiAngleRestriction) { + spectra.fill(HIST("globalP_tpcglobalPDiff_phirestrict"), track.p(), track.p() - originalTrack.tpcInnerParam()); - if (trk.p() > 0 && originalTrack.tpcInnerParam() > 0) { - spectra.fill(HIST("global1overP_tpcglobalPDiff_phirestrict"), trk.p(), 1. / trk.p() - 1. / originalTrack.tpcInnerParam()); + if (track.p() > 0 && originalTrack.tpcInnerParam() > 0) { + spectra.fill(HIST("global1overP_tpcglobalPDiff_phirestrict"), track.p(), 1. / track.p() - 1. / originalTrack.tpcInnerParam()); } } spectra.fill( - HIST("ptphiTrackInclGood"), trk.pt(), - trk.phi()); // Inclusive Track pT vs phi spectrum in TPC volume + HIST("ptphiTrackInclGood"), track.pt(), + track.phi()); // Inclusive Track pT vs phi spectrum in TPC volume spectra.fill( - HIST("ptetaTrackInclGood"), trk.pt(), - trk.eta()); // Inclusive Track pT vs eta spectrum in TPC volume + HIST("ptetaTrackInclGood"), track.pt(), + track.eta()); // Inclusive Track pT vs eta spectrum in TPC volume if (bAddSupplementHistosToOutput) { spectra.fill( - HIST("phietaTrackAllInclGood"), trk.eta(), - trk.phi()); // Inclusive Track pT vs eta spectrum in TPC volume + HIST("phietaTrackAllInclGood"), track.eta(), + track.phi()); // Inclusive Track pT vs eta spectrum in TPC volume - if (trk.pt() > 5.0) { + if (track.pt() > 5.0) { spectra.fill( - HIST("phietaTrackHighPtInclGood"), trk.eta(), - trk.phi()); // Inclusive Track pT vs eta spectrum in TPC volume + HIST("phietaTrackHighPtInclGood"), track.eta(), + track.phi()); // Inclusive Track pT vs eta spectrum in TPC volume } } - if (trk.pt() > + if (track.pt() > leadingTrackPt) { // Find leading track pT in full TPC volume - leadingTrackPt = trk.pt(); - leadingTrackEta = trk.eta(); - leadingTrackPhi = trk.phi(); + leadingTrackPt = track.pt(); + leadingTrackEta = track.eta(); + leadingTrackPhi = track.phi(); } }