@@ -44,6 +44,11 @@ using namespace o2;
4444using namespace o2 ::framework;
4545using namespace o2 ::framework::expressions;
4646
47+ using filteredColl = soa::Filtered<soa::Join<JetCollisions, aod::JChTrigSels, aod::EvSels>>::iterator;
48+ using filteredJTracks = soa::Filtered<soa::Join<aod::JTracks, aod::JTrackPIs, aod::JTrackExtras>>;
49+ using filteredJets = soa::Filtered<soa::Join<aod::ChargedJets, aod::ChargedJetConstituents>>;
50+ using joinedTracks = soa::Join<aod::Tracks, aod::TracksExtra>;
51+
4752// What this task should do
4853// Event by event fill
4954// 1) pT spectrum of tracks in TPC volume
@@ -57,15 +62,10 @@ using namespace o2::framework::expressions;
5762struct ChJetTriggerQATask {
5863
5964 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
65+ Configurable<float > cfgVertexCut{" cfgVertexCut" , 10.0 , " Accepted z-vertex range" };
66+ Configurable<float > cfgTPCVolume{" cfgTPCVolume" , 0.9 , " Full eta range" }; // eta range of TPC
67+ Configurable<float > cfgJetR{" cfgJetR" , 0.4 , " jet resolution parameter" }; // jet cone radius
68+ Configurable<float > cfgJetPtMin{" cfgJetPtMin" , 0.15 , " minimum jet pT constituent cut" }; // minimum jet constituent pT
6969
7070 Configurable<float > cfgTrackPhiMinCut{" cfgTrackPhiMinCut" , -999 , " track min phi cut" };
7171 Configurable<float > cfgTrackPhiMaxCut{" cfgTrackPhiMaxCut" , 999 , " track max phi cut" };
@@ -75,18 +75,21 @@ struct ChJetTriggerQATask {
7575 Configurable<bool > bHighPtTrigger{" bHighPtTrigger" , false , " charged jet high pT trigger selection" };
7676 Configurable<bool > bTrackLowPtTrigger{" bTrackLowPtTrigger" , false , " track low pT trigger selection" };
7777 Configurable<bool > bTrackHighPtTrigger{" bTrackHighPtTrigger" , false , " track high pT trigger selection" };
78-
7978 Configurable<bool > bAddSupplementHistosToOutput{" bAddAdditionalHistosToOutput" , false , " add supplementary histos to the output" };
8079
8180 Configurable<float > phiAngleRestriction{" phiAngleRestriction" , 0.3 , " angle to restrict track phi for plotting tpc momentum" };
8281
82+ ConfigurableAxis dcaXY_Binning{" dcaXY_Binning" , {100 , -5 ., 5 .}, " " };
83+ ConfigurableAxis dcaZ_Binning{" dcaZ_Binning" , {100 , -5 ., 5 .}, " " };
84+
8385 float fiducialVolume; // 0.9 - jetR
8486
8587 HistogramRegistry spectra;
8688
8789 int eventSelection = -1 ;
8890 int trackSelection = -1 ;
89- void init (o2::framework::InitContext&)
91+
92+ void init (InitContext&)
9093 {
9194 fiducialVolume = static_cast <float >(cfgTPCVolume) - static_cast <float >(cfgJetR);
9295 eventSelection = jetderiveddatautilities::initialiseEventSelection (static_cast <std::string>(evSel));
@@ -113,6 +116,11 @@ struct ChJetTriggerQATask {
113116 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 .}}});
114117 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 .}}});
115118
119+ 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 .}});
120+ 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 .}});
121+ 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 .}});
122+ 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 .}});
123+
116124 // Supplementary plots
117125 if (bAddSupplementHistosToOutput) {
118126 spectra.add (" ptJetChInclFullVol" , " inclusive charged jet pT in full volume" , {HistType::kTH1F , {{200 , 0 ., +200 .}}});
@@ -137,14 +145,9 @@ struct ChJetTriggerQATask {
137145 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));
138146
139147 // declare filters on jets
140- Filter jetRadiusSelection = (o2:: aod::jet::r == nround(cfgJetR.node() * 100 .0f ));
148+ Filter jetRadiusSelection = (aod::jet::r == nround(cfgJetR.node() * 100 .0f ));
141149
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 &)
150+ void process (filteredColl const & collision, filteredJTracks const & tracks, filteredJets const & jets, joinedTracks const &)
148151 {
149152
150153 if (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
@@ -179,55 +182,64 @@ struct ChJetTriggerQATask {
179182 spectra.fill (HIST (" vertexZ" ),
180183 collision.posZ ()); // Inclusive Track Cross TPC Rows
181184
182- for (auto & trk : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV
185+ for (auto const & track : tracks) { // loop over filtered tracks in full TPC volume having pT > 100 MeV
186+
187+ auto const & originalTrack = track.track_as <joinedTracks>();
183188
184- auto const & originalTrack = trk.track_as <soa::Join<aod::Tracks, aod::TracksExtra>>();
185- spectra.fill (HIST (" globalP_tpcglobalPDiff_withoutcuts" ), trk.p (), trk.p () - originalTrack.tpcInnerParam ());
189+ spectra.fill (HIST (" globalP_tpcglobalPDiff_withoutcuts" ), track.p (), track.p () - originalTrack.tpcInnerParam ());
186190
187- if (TMath::Abs (trk .phi () - TMath::Pi ()) < phiAngleRestriction) {
188- spectra.fill (HIST (" globalP_tpcglobalPDiff_withoutcuts_phirestrict" ), trk .p (), trk .p () - originalTrack.tpcInnerParam ());
191+ if (TMath::Abs (track .phi () - TMath::Pi ()) < phiAngleRestriction) {
192+ spectra.fill (HIST (" globalP_tpcglobalPDiff_withoutcuts_phirestrict" ), track .p (), track .p () - originalTrack.tpcInnerParam ());
189193 }
190194
191- if (!jetderiveddatautilities::selectTrack (trk , trackSelection)) {
195+ if (!jetderiveddatautilities::selectTrack (track , trackSelection)) {
192196 continue ;
193197 }
194198
195- spectra.fill (HIST (" globalP_tpcglobalPDiff" ), trk.p (), trk.p () - originalTrack.tpcInnerParam ());
196- if (trk.p () > 0 && originalTrack.tpcInnerParam () > 0 ) {
197- spectra.fill (HIST (" global1overP_tpcglobalPDiff" ), trk.p (), 1 . / trk.p () - 1 . / originalTrack.tpcInnerParam ());
199+ if (originalTrack.itsNCls () >= 4 ) { // correspond to number of track hits in ITS layers
200+ spectra.fill (HIST (" DCAx_track_Phi_pT" ), track.dcaX (), track.phi (), track.pt ());
201+ spectra.fill (HIST (" DCAy_track_Phi_pT" ), track.dcaY (), track.phi (), track.pt ());
202+ spectra.fill (HIST (" DCAz_track_Phi_pT" ), track.dcaZ (), track.phi (), track.pt ());
203+ }
204+
205+ spectra.fill (HIST (" nITSClusters_TrackPt" ), originalTrack.itsNCls (), track.phi (), track.pt ());
206+
207+ spectra.fill (HIST (" globalP_tpcglobalPDiff" ), track.p (), track.p () - originalTrack.tpcInnerParam ());
208+ if (track.p () > 0 && originalTrack.tpcInnerParam () > 0 ) {
209+ spectra.fill (HIST (" global1overP_tpcglobalPDiff" ), track.p (), 1 . / track.p () - 1 . / originalTrack.tpcInnerParam ());
198210 }
199- if (TMath::Abs (trk .phi () - TMath::Pi ()) < phiAngleRestriction) {
200- spectra.fill (HIST (" globalP_tpcglobalPDiff_phirestrict" ), trk .p (), trk .p () - originalTrack.tpcInnerParam ());
211+ if (TMath::Abs (track .phi () - TMath::Pi ()) < phiAngleRestriction) {
212+ spectra.fill (HIST (" globalP_tpcglobalPDiff_phirestrict" ), track .p (), track .p () - originalTrack.tpcInnerParam ());
201213
202- if (trk .p () > 0 && originalTrack.tpcInnerParam () > 0 ) {
203- spectra.fill (HIST (" global1overP_tpcglobalPDiff_phirestrict" ), trk .p (), 1 . / trk .p () - 1 . / originalTrack.tpcInnerParam ());
214+ if (track .p () > 0 && originalTrack.tpcInnerParam () > 0 ) {
215+ spectra.fill (HIST (" global1overP_tpcglobalPDiff_phirestrict" ), track .p (), 1 . / track .p () - 1 . / originalTrack.tpcInnerParam ());
204216 }
205217 }
206218
207219 spectra.fill (
208- HIST (" ptphiTrackInclGood" ), trk .pt (),
209- trk .phi ()); // Inclusive Track pT vs phi spectrum in TPC volume
220+ HIST (" ptphiTrackInclGood" ), track .pt (),
221+ track .phi ()); // Inclusive Track pT vs phi spectrum in TPC volume
210222 spectra.fill (
211- HIST (" ptetaTrackInclGood" ), trk .pt (),
212- trk .eta ()); // Inclusive Track pT vs eta spectrum in TPC volume
223+ HIST (" ptetaTrackInclGood" ), track .pt (),
224+ track .eta ()); // Inclusive Track pT vs eta spectrum in TPC volume
213225
214226 if (bAddSupplementHistosToOutput) {
215227 spectra.fill (
216- HIST (" phietaTrackAllInclGood" ), trk .eta (),
217- trk .phi ()); // Inclusive Track pT vs eta spectrum in TPC volume
228+ HIST (" phietaTrackAllInclGood" ), track .eta (),
229+ track .phi ()); // Inclusive Track pT vs eta spectrum in TPC volume
218230
219- if (trk .pt () > 5.0 ) {
231+ if (track .pt () > 5.0 ) {
220232 spectra.fill (
221- HIST (" phietaTrackHighPtInclGood" ), trk .eta (),
222- trk .phi ()); // Inclusive Track pT vs eta spectrum in TPC volume
233+ HIST (" phietaTrackHighPtInclGood" ), track .eta (),
234+ track .phi ()); // Inclusive Track pT vs eta spectrum in TPC volume
223235 }
224236 }
225237
226- if (trk .pt () >
238+ if (track .pt () >
227239 leadingTrackPt) { // Find leading track pT in full TPC volume
228- leadingTrackPt = trk .pt ();
229- leadingTrackEta = trk .eta ();
230- leadingTrackPhi = trk .phi ();
240+ leadingTrackPt = track .pt ();
241+ leadingTrackEta = track .eta ();
242+ leadingTrackPhi = track .phi ();
231243 }
232244 }
233245
0 commit comments