88// In applying this license CERN does not waive the privileges and immunities
99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
11-
1211// /
1312// / \file qaPIDITS.cxx
1413// / \author Nicolò Jacazio [email protected] @@ -163,14 +162,28 @@ struct itsPidQa {
163162 ConfigurableAxis deltaBins{" deltaBins" , {200 , -1000 .f , 1000 .f }, " Binning in Delta (dEdx - expected dEdx)" };
164163 ConfigurableAxis expSigmaBins{" expSigmaBins" , {200 , 0 .f , 200 .f }, " Binning in expected Sigma" };
165164 ConfigurableAxis nSigmaBins{" nSigmaBins" , {401 , -10 .025f , 10 .025f }, " Binning in NSigma" };
166- ConfigurableAxis dEdxBins{ " dEdxBins " , {5000 , 0 . f , 5000 . f }, " Binning in dE/dx " };
165+ ConfigurableAxis avClsBins{ " avClsBins " , {200 , 0 , 20 }, " Binning in average cluster size " };
167166 Configurable<int > trackSelection{" trackSelection" , 1 , " Track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks" };
168167 Configurable<bool > applyRapidityCut{" applyRapidityCut" , false , " Flag to apply rapidity cut" };
169168 Configurable<bool > enableDeDxPlot{" enableDeDxPlot" , true , " Enables the dEdx plot (reduces memory footprint if off)" };
170169 Configurable<int16_t > minTPCNcls{" minTPCNcls" , 0 , " Minimum number or TPC Clusters for tracks" };
171170 ConfigurableAxis tpcNclsBins{" tpcNclsBins" , {16 , 0 , 160 }, " Binning in number of clusters in TPC" };
172171 Configurable<bool > fillTHnSparses{" fillTHnSparses" , false , " Flag to fill multidimensional histograms for nsigma vs pt, eta, Ncls" };
173172
173+ template <typename TrackType>
174+ float averageClusterSizeTrk (const TrackType& track)
175+ {
176+ return o2::aod::ITSResponse::averageClusterSize (track.itsClusterSizes ());
177+ }
178+
179+ float averageClusterSizePerCoslInv (uint32_t itsClusterSizes, float eta) { return o2::aod::ITSResponse::averageClusterSize (itsClusterSizes) * std::cosh (eta); }
180+
181+ template <typename TrackType>
182+ float averageClusterSizePerCoslInv (const TrackType& track)
183+ {
184+ return averageClusterSizePerCoslInv (track.itsClusterSizes (), track.eta ());
185+ }
186+
174187 void init (o2::framework::InitContext&)
175188 {
176189 const AxisSpec vtxZAxis{100 , -20 , 20 , " Vtx_{z} (cm)" };
@@ -183,8 +196,9 @@ struct itsPidQa {
183196 ptAxis.makeLogarithmic ();
184197 pAxis.makeLogarithmic ();
185198 }
186- const AxisSpec dedxAxis{dEdxBins, " d#it{E}/d#it{x} Arb. units" };
187199 const AxisSpec chargeAxis{2 , -2 .f , 2 .f , " Charge" };
200+ const AxisSpec avClsAxis{avClsBins, " <ITS Cls. Size>" };
201+ const AxisSpec avClsEffAxis{avClsBins, " <ITS Cls. Size> / cosh(#eta)" };
188202
189203 // Event properties
190204 auto h = histos.add <TH1>(" event/evsel" , " " , kTH1D , {{10 , 0.5 , 10.5 , " Ev. Sel." }});
@@ -231,6 +245,10 @@ struct itsPidQa {
231245 hNsigmaPos[id] = histos.add <TH2>(Form (" nsigmaPos/%s" , pN[id]), axisTitle, kTH2F , {pAxis, nSigmaAxis});
232246 hNsigmaNeg[id] = histos.add <TH2>(Form (" nsigmaNeg/%s" , pN[id]), axisTitle, kTH2F , {pAxis, nSigmaAxis});
233247 }
248+ histos.add (" event/averageClusterSize" , " " , kTH2F , {ptAxis, avClsAxis});
249+ histos.add (" event/averageClusterSizePerCoslInv" , " " , kTH2F , {ptAxis, avClsEffAxis});
250+ histos.add (" event/SelectedAverageClusterSize" , " " , kTH2F , {ptAxis, avClsAxis});
251+ histos.add (" event/SelectedAverageClusterSizePerCoslInv" , " " , kTH2F , {ptAxis, avClsEffAxis});
234252 LOG (info) << " QA PID ITS histograms:" ;
235253 histos.print ();
236254 }
@@ -294,7 +312,9 @@ struct itsPidQa {
294312 histos.fill (HIST (" event/length" ), track.length ());
295313 histos.fill (HIST (" event/pt" ), track.pt ());
296314 histos.fill (HIST (" event/p" ), track.p ());
297-
315+ const auto & t = tracks.iteratorAt (nTracks);
316+ histos.fill (HIST (" event/averageClusterSize" ), track.pt (), averageClusterSizeTrk (t));
317+ histos.fill (HIST (" event/averageClusterSizePerCoslInv" ), track.pt (), averageClusterSizePerCoslInv (t));
298318 bool discard = false ;
299319 for (int id = 0 ; id < 9 ; id++) {
300320 if (std::abs (nsigmaTPC (track, id)) > tpcSelValues[id]) {
@@ -307,6 +327,9 @@ struct itsPidQa {
307327 if (discard) {
308328 continue ;
309329 }
330+ histos.fill (HIST (" event/SelectedAverageClusterSize" ), track.pt (), averageClusterSizeTrk (t));
331+ histos.fill (HIST (" event/SelectedAverageClusterSizePerCoslInv" ), track.pt (), averageClusterSizePerCoslInv (t));
332+
310333 for (o2::track::PID::ID id = 0 ; id <= o2::track::PID::Last; id++) {
311334 if (!enableParticle[id]) {
312335 continue ;
@@ -317,7 +340,6 @@ struct itsPidQa {
317340 }
318341 }
319342 const float nsigma = nsigmaITS (track, id);
320- const auto & t = tracks.iteratorAt (nTracks);
321343 if (t.sign () > 0 ) {
322344 hNsigmaPos[id]->Fill (t.p (), nsigma);
323345 } else {
0 commit comments