Skip to content

Commit a303201

Browse files
committed
Adding DCA distributions of global tracks
1 parent 1e05327 commit a303201

1 file changed

Lines changed: 38 additions & 25 deletions

File tree

PWGJE/Tasks/ChJetTriggerQATask.cxx

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#include "Framework/HistogramRegistry.h"
4242

4343
using namespace o2;
44-
using namespace o2::framework;
45-
using namespace o2::framework::expressions;
44+
using namespace framework;
45+
using namespace framework::expressions;
4646

4747
// What this task should do
4848
// Event by event fill
@@ -57,15 +57,10 @@ using namespace o2::framework::expressions;
5757
struct ChJetTriggerQATask {
5858

5959
Configurable<std::string> evSel{"evSel", "sel8", "choose event selection"};
60-
Configurable<float> cfgVertexCut{"cfgVertexCut", 10.0,
61-
"Accepted z-vertex range"};
62-
Configurable<float> cfgTPCVolume{"cfgTPCVolume", 0.9,
63-
"Full eta range"}; // eta range of TPC
64-
Configurable<float> cfgJetR{"cfgJetR", 0.4,
65-
"jet resolution parameter"}; // jet cone radius
66-
Configurable<float> cfgJetPtMin{
67-
"cfgJetPtMin", 0.15,
68-
"minimum jet pT constituent cut"}; // minimum jet constituent pT
60+
Configurable<float> cfgVertexCut{"cfgVertexCut", 10.0, "Accepted z-vertex range"};
61+
Configurable<float> cfgTPCVolume{"cfgTPCVolume", 0.9, "Full eta range"}; // eta range of TPC
62+
Configurable<float> cfgJetR{"cfgJetR", 0.4, "jet resolution parameter"}; // jet cone radius
63+
Configurable<float> cfgJetPtMin{"cfgJetPtMin", 0.15, "minimum jet pT constituent cut"}; // minimum jet constituent pT
6964

7065
Configurable<float> cfgTrackPhiMinCut{"cfgTrackPhiMinCut", -999, "track min phi cut"};
7166
Configurable<float> cfgTrackPhiMaxCut{"cfgTrackPhiMaxCut", 999, "track max phi cut"};
@@ -75,19 +70,21 @@ struct ChJetTriggerQATask {
7570
Configurable<bool> bHighPtTrigger{"bHighPtTrigger", false, "charged jet high pT trigger selection"};
7671
Configurable<bool> bTrackLowPtTrigger{"bTrackLowPtTrigger", false, "track low pT trigger selection"};
7772
Configurable<bool> bTrackHighPtTrigger{"bTrackHighPtTrigger", false, "track high pT trigger selection"};
78-
7973
Configurable<bool> bAddSupplementHistosToOutput{"bAddAdditionalHistosToOutput", false, "add supplementary histos to the output"};
8074

8175
Configurable<float> phiAngleRestriction{"phiAngleRestriction", 0.3, "angle to restrict track phi for plotting tpc momentum"};
8276

77+
ConfigurableAxis dcaXY_Binning{"dcaXY_Binning", {100, -5., 5.}, ""};
78+
ConfigurableAxis dcaZ_Binning{"dcaZ_Binning", {100, -5., 5.}, ""};
79+
8380
float fiducialVolume; // 0.9 - jetR
8481

8582
HistogramRegistry spectra;
8683

8784
int eventSelection = -1;
8885
int trackSelection = -1;
89-
void init(o2::framework::InitContext&)
90-
{
86+
87+
void init(InitContext&) {
9188
fiducialVolume = static_cast<float>(cfgTPCVolume) - static_cast<float>(cfgJetR);
9289
eventSelection = jetderiveddatautilities::initialiseEventSelection(static_cast<std::string>(evSel));
9390
trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast<std::string>(trackSelections));
@@ -113,6 +110,11 @@ struct ChJetTriggerQATask {
113110
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.}}});
114111
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.}}});
115112

113+
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.}});
114+
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.}});
115+
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.}});
116+
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.}});
117+
116118
// Supplementary plots
117119
if (bAddSupplementHistosToOutput) {
118120
spectra.add("ptJetChInclFullVol", "inclusive charged jet pT in full volume", {HistType::kTH1F, {{200, 0., +200.}}});
@@ -137,14 +139,14 @@ struct ChJetTriggerQATask {
137139
Filter trackFilter = (nabs(aod::jtrack::eta) < static_cast<float>(cfgTPCVolume)) && (aod::jtrack::phi > static_cast<float>(cfgTrackPhiMinCut)) && (aod::jtrack::phi < static_cast<float>(cfgTrackPhiMaxCut)) && (aod::jtrack::pt > static_cast<float>(cfgJetPtMin));
138140

139141
// declare filters on jets
140-
Filter jetRadiusSelection = (o2::aod::jet::r == nround(cfgJetR.node() * 100.0f));
141-
142-
using filteredJets = o2::soa::Filtered<o2::aod::ChargedJets>;
143-
144-
void
145-
process(soa::Filtered<soa::Join<JetCollisions,
146-
aod::JChTrigSels, aod::EvSels>>::iterator const& collision,
147-
soa::Filtered<soa::Join<JetTracks, aod::JTrackPIs>> const& tracks, o2::soa::Filtered<soa::Join<o2::aod::ChargedJets, aod::ChargedJetConstituents>> const& jets, soa::Join<aod::Tracks, aod::TracksExtra> const&)
142+
Filter jetRadiusSelection = (aod::jet::r == nround(cfgJetR.node() * 100.0f));
143+
144+
using filteredColl = soa::Filtered<soa::Join<JetCollisions, aod::JChTrigSels, aod::EvSels>>::iterator;
145+
using filteredJTracks = soa::Filtered<soa::Join<aod::JTracks, aod::JTrackPIs>>;
146+
// using Tracks = soa::Join<aod::Tracks, aod::TracksExtra>; // could be deleted? it is not iterator
147+
using filteredJets = soa::Filtered<soa::Join<aod::ChargedJets, aod::ChargedJetConstituents>>;
148+
149+
void process(filteredColl const& collision, filteredJTracks const& tracks, filteredJets const& jets/*, Tracks const&*/)
148150
{
149151

150152
if (!collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
@@ -179,9 +181,10 @@ struct ChJetTriggerQATask {
179181
spectra.fill(HIST("vertexZ"),
180182
collision.posZ()); // Inclusive Track Cross TPC Rows
181183

182-
for (auto& trk : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV
184+
for (auto const& trk : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV
185+
186+
auto const& originalTrack = trk.track_as<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA>>();
183187

184-
auto const& originalTrack = trk.track_as<soa::Join<aod::Tracks, aod::TracksExtra>>();
185188
spectra.fill(HIST("globalP_tpcglobalPDiff_withoutcuts"), trk.p(), trk.p() - originalTrack.tpcInnerParam());
186189

187190
if (TMath::Abs(trk.phi() - TMath::Pi()) < phiAngleRestriction) {
@@ -192,6 +195,16 @@ struct ChJetTriggerQATask {
192195
continue;
193196
}
194197

198+
if(originalTrack.itsNCls() >= 4){ // correspond to number of track hits in ITS layers
199+
auto dcaX = originalTrack.x() - collision.posX();
200+
auto dcaY = originalTrack.y() - collision.posY();
201+
spectra.fill(HIST("DCAx_track_Phi_pT"), dcaX, trk.phi(), trk.pt());
202+
spectra.fill(HIST("DCAy_track_Phi_pT"), dcaY, trk.phi(), trk.pt());
203+
spectra.fill(HIST("DCAz_track_Phi_pT"), originalTrack.dcaZ(), trk.phi(), trk.pt());
204+
}
205+
206+
spectra.fill(HIST("nITSClusters_TrackPt"), originalTrack.itsNCls(), trk.phi(), trk.pt());
207+
195208
spectra.fill(HIST("globalP_tpcglobalPDiff"), trk.p(), trk.p() - originalTrack.tpcInnerParam());
196209
if (trk.p() > 0 && originalTrack.tpcInnerParam() > 0) {
197210
spectra.fill(HIST("global1overP_tpcglobalPDiff"), trk.p(), 1. / trk.p() - 1. / originalTrack.tpcInnerParam());
@@ -308,4 +321,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
308321

309322
return WorkflowSpec{adaptAnalysisTask<ChJetTriggerQATask>(
310323
cfgc, TaskName{"jet-charged-trigger-qa"})};
311-
}
324+
}

0 commit comments

Comments
 (0)