1313// / \author Yuto Nishida <yuto.nishida@cern.ch>
1414// / \brief Task for measuring the dependence of the jet shape function rho(r) on the distance r from the jet axis.
1515
16- #include < string>
17- #include < vector>
18- #include < cmath>
19-
20- #include " Framework/ASoA.h"
21- #include " Framework/AnalysisDataModel.h"
22- #include " Framework/AnalysisTask.h"
23- #include " Framework/HistogramRegistry.h"
16+ #include " PWGJE/Core/FastJetUtilities.h"
17+ #include " PWGJE/Core/JetDerivedDataUtilities.h"
18+ #include " PWGJE/Core/JetUtilities.h"
19+ #include " PWGJE/DataModel/Jet.h"
2420
2521#include " Common/Core/RecoDecay.h"
2622#include " Common/Core/TrackSelection.h"
2723#include " Common/Core/TrackSelectionDefaults.h"
2824#include " Common/DataModel/EventSelection.h"
2925#include " Common/DataModel/TrackSelectionTables.h"
3026
31- #include " PWGJE/Core/FastJetUtilities.h"
32- #include " PWGJE/Core/JetUtilities.h"
33- #include " PWGJE/Core/JetDerivedDataUtilities.h"
34- #include " PWGJE/DataModel/Jet.h"
35-
27+ #include " Framework/ASoA.h"
28+ #include " Framework/AnalysisDataModel.h"
29+ #include " Framework/AnalysisTask.h"
30+ #include " Framework/HistogramRegistry.h"
3631#include " Framework/runDataProcessing.h"
3732
33+ #include < cmath>
34+ #include < string>
35+ #include < vector>
36+
3837using namespace o2 ;
3938using namespace o2 ::framework;
4039using namespace o2 ::framework::expressions;
@@ -61,6 +60,7 @@ struct JetShapeTask {
6160 {" ptSum" , " ptSum" , {HistType::kTH2F , {{14 , 0 , 0.7 }, {300 , 0 , 300 }}}},
6261 {" ptSumBg1" , " ptSumBg1" , {HistType::kTH2F , {{14 , 0 , 0.7 }, {300 , 0 , 300 }}}},
6362 {" ptSumBg2" , " ptSumBg2" , {HistType::kTH2F , {{14 , 0 , 0.7 }, {300 , 0 , 300 }}}},
63+ {" event/vertexz" , " ;Vtx_{z} (cm);Entries" , {HistType::kTH1F , {{100 , -20 , 20 }}}},
6464 {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}}}};
6565
6666 Configurable<float > vertexZCut{" vertexZCut" , 10 .0f , " Accepted z-vertex range" };
@@ -79,9 +79,13 @@ struct JetShapeTask {
7979 Configurable<std::vector<float >> distanceCategory{" distanceCategory" , {0 .00f , 0 .05f , 0 .10f , 0 .15f , 0 .20f , 0 .25f , 0 .30f , 0 .35f , 0 .40f , 0 .45f , 0 .50f , 0 .55f , 0 .60f , 0 .65f , 0 .70f }, " distance of category" };
8080
8181 // for ppi production
82- Configurable<float > maxTpcNClsCrossedRows{" maxTpcNClsCrossedRows" , 70 , " " };
83- Configurable<float > maxDcaXY{" maxDcaXY" , 0.2 , " " };
84- Configurable<float > maxItsNCls{" maxItsNCls" , 2 , " " };
82+ Configurable<float > etaTrUp{" etaTrUp" , 0 .7f , " maximum track eta" };
83+ Configurable<float > dcaxyMax{" dcaxyMax" , 2 .0f , " mximum DCA xy" };
84+ Configurable<float > chi2ItsMax{" chi2ItsMax" , 15 .0f , " its chi2 cut" };
85+ Configurable<float > chi2TpcMax{" chi2TpcMax" , 4 .0f , " tpc chi2 cut" };
86+ Configurable<float > nclItsMin{" nclItsMin" , 2 .0f , " its # of cluster cut" };
87+ Configurable<float > nclTpcMin{" nclTpcMin" , 100 .0f , " tpc # if cluster cut" };
88+ Configurable<float > nclcrossTpcMin{" nclcrossTpcMin" , 70 .0f , " tpc # of crossedRows cut" };
8589
8690 Configurable<std::string> triggerMasks{" triggerMasks" , " " , " possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL" };
8791
@@ -145,18 +149,10 @@ struct JetShapeTask {
145149
146150 void processJetShape (soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator const & collision, aod::JetTracks const & tracks, soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const & jets)
147151 {
148- if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
149- return ;
150- }
151- std::vector<float > ptDensity;
152- std::vector<float > ptDensityBg1;
153- std::vector<float > ptDensityBg2;
154-
155- ptDensity.reserve (distanceCategory->size () - 1 );
156- ptDensityBg1.reserve (distanceCategory->size () - 1 );
157- ptDensityBg2.reserve (distanceCategory->size () - 1 );
158152
159- // std::cout << collision.centrality() << std::endl;
153+ std::vector<float > ptDensity (distanceCategory->size () - 1 , 0 .f );
154+ std::vector<float > ptDensityBg1 (distanceCategory->size () - 1 , 0 .f );
155+ std::vector<float > ptDensityBg2 (distanceCategory->size () - 1 , 0 .f );
160156
161157 for (auto const & jet : jets) {
162158 if (!isAcceptedJet<aod::JetTracks>(jet)) {
@@ -178,12 +174,10 @@ struct JetShapeTask {
178174 registry.fill (HIST (" ptVsCentrality" ), collision.centrality (), track.pt ());
179175
180176 // calculate compornents of jetshapefunction rho(r)
181- std::vector<float > trackPtSum;
182- std::vector<float > trackPtSumBg1;
183- std::vector<float > trackPtSumBg2;
184- trackPtSum.reserve (distanceCategory->size () - 1 );
185- trackPtSumBg1.reserve (distanceCategory->size () - 1 );
186- trackPtSumBg2.reserve (distanceCategory->size () - 1 );
177+ std::vector<float > trackPtSum (distanceCategory->size () - 1 , 0 .f );
178+ std::vector<float > trackPtSumBg1 (distanceCategory->size () - 1 , 0 .f );
179+ std::vector<float > trackPtSumBg2 (distanceCategory->size () - 1 , 0 .f );
180+
187181 float phiBg1 = jet.phi () + (o2::constants::math::PIHalf);
188182 float phiBg2 = jet.phi () - (o2::constants::math::PIHalf);
189183
@@ -197,11 +191,11 @@ struct JetShapeTask {
197191 float distanceBg2 = std::sqrt (deltaEta * deltaEta + deltaPhiBg2 * deltaPhiBg2);
198192
199193 for (size_t i = 0 ; i < distanceCategory->size () - 1 ; i++) {
200- if (distance < distanceCategory->at (i + 1 ))
194+ if (distanceCategory-> at (i) <= distance && distance < distanceCategory->at (i + 1 ))
201195 trackPtSum[i] += track.pt ();
202- if (distanceBg1 < distanceCategory->at (i + 1 ))
196+ if (distanceCategory-> at (i) <= distanceBg1 && distanceBg1 < distanceCategory->at (i + 1 ))
203197 trackPtSumBg1[i] += track.pt ();
204- if (distanceBg2 < distanceCategory->at (i + 1 ))
198+ if (distanceCategory-> at (i) <= distanceBg2 && distanceBg2 < distanceCategory->at (i + 1 ))
205199 trackPtSumBg2[i] += track.pt ();
206200 }
207201
@@ -221,9 +215,9 @@ struct JetShapeTask {
221215
222216 for (size_t i = 0 ; i < distanceCategory->size () - 1 ; i++) {
223217 double jetX = (distanceCategory->at (i + 1 ) - distanceCategory->at (i)) * i + (distanceCategory->at (i + 1 ) - distanceCategory->at (i)) / 2 ;
224- double jetShapeFunction = ptDensity[i + 1 ];
225- double jetShapeFunctionBg1 = ptDensityBg1[i + 1 ];
226- double jetShapeFunctionBg2 = ptDensityBg2[i + 1 ];
218+ double jetShapeFunction = ptDensity[i];
219+ double jetShapeFunctionBg1 = ptDensityBg1[i];
220+ double jetShapeFunctionBg2 = ptDensityBg2[i];
227221 registry.fill (HIST (" ptSum" ), jetX, jetShapeFunction);
228222 registry.fill (HIST (" ptSumBg1" ), jetX, jetShapeFunctionBg1);
229223 registry.fill (HIST (" ptSumBg2" ), jetX, jetShapeFunctionBg2);
@@ -238,20 +232,29 @@ struct JetShapeTask {
238232 return ;
239233 }
240234
235+ registry.fill (HIST (" event/vertexz" ), collision.posZ ());
236+
241237 for (auto const & jet : jets) {
242238 if (!isAcceptedJet<aod::JetTracks>(jet)) {
243239 continue ;
244240 }
245241
246242 // tracks conditions
247243 for (const auto & track : tracks) {
248- if (track.tpcNClsCrossedRows () < maxTpcNClsCrossedRows )
244+ if (std::abs ( track.eta ()) > etaTrUp )
249245 continue ;
250- if (std::fabs ( track.dcaXY ()) > maxDcaXY )
246+ if (track.tpcNClsCrossedRows () < nclcrossTpcMin )
251247 continue ;
252- if (track.itsNCls () < maxItsNCls) {
248+ if (std::abs (track.dcaXY ()) > dcaxyMax)
249+ continue ;
250+ if (track.itsChi2NCl () > chi2ItsMax)
251+ continue ;
252+ if (track.tpcChi2NCl () > chi2TpcMax)
253+ continue ;
254+ if (track.tpcNClsFound () < nclTpcMin)
255+ continue ;
256+ if (track.itsNCls () < nclItsMin)
253257 continue ;
254- }
255258
256259 // PID check
257260 registry.fill (HIST (" tpcDedx" ), track.pt (), track.tpcSignal ());
0 commit comments