@@ -109,8 +109,6 @@ struct JetHadronRecoil {
109109 0.207 , 0.21 , 0.213 , 0.216 , 0.219 , 0.222 , 0.225 , 0.228 , 0.231 , 0.234 ,
110110 0.237 , 0.24 , 0.27 , 0.30 , 0.33 , 0.36 , 0.39 , 0.42 , 0.45 , 0.48 , 0.51 , 0.54 ,
111111 0.57 , 0.60 };
112- std::vector<double > pThatBinning = {0.0 , 0.25 , 0.5 , 0.75 , 1.0 , 1.25 , 1.5 , 1.75 , 2.0 , 2.25 , 2.5 , 2.75 , 3.0 ,
113- 3.25 , 3.5 , 3.75 , 4.0 , 4.25 , 4.5 , 4.75 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 20.0 , 30.0 };
114112
115113 AxisSpec dRAxis = {dRBinning, " #Delta R" };
116114 AxisSpec ptAxisDet = {ptBinningDet, " #it{p}_{T,det} (GeV/c)" };
@@ -119,7 +117,6 @@ struct JetHadronRecoil {
119117 AxisSpec phiAxisPart = {100 , 0.0 , o2::constants::math::TwoPI, " #phi_{part}" };
120118 AxisSpec dRAxisDet = {dRBinning, " #Delta R_{det}" };
121119 AxisSpec dRAxisPart = {dRBinning, " #Delta R_{part}" };
122- AxisSpec pThatAxis = {pThatBinning, " #hat{p_{T}}" };
123120
124121 HistogramRegistry registry;
125122
@@ -145,18 +142,18 @@ struct JetHadronRecoil {
145142
146143 if (doprocessData || doprocessDataWithRhoSubtraction || doprocessMCD || doprocessMCDWithRhoSubtraction || doprocessMCDWeighted || doprocessMCDWeightedWithRhoSubtraction || doprocessMCP || doprocessMCPWeighted || doprocessMCPWeightedWithMatchedTracks) {
147144 registry.add (" hNtrig" , " number of triggers;trigger type;entries" , {HistType::kTH1F , {{2 , 0 , 2 }}}, doSumw);
148- registry.add (" hSignalTriggersPtHard" , " Signal triggers vs PtHard" , {HistType::kTH1F , {pThatAxis }}, doSumw);
149- registry.add (" hReferenceTriggersPtHard" , " Reference triggers vs PtHard" , {HistType::kTH1F , {pThatAxis }}, doSumw);
145+ registry.add (" hSignalTriggersPtHard" , " Signal triggers vs PtHard" , {HistType::kTH1F , {{ 20 , 0 , 5 } }}, doSumw);
146+ registry.add (" hReferenceTriggersPtHard" , " Reference triggers vs PtHard" , {HistType::kTH1F , {{ 20 , 0 , 5 } }}, doSumw);
150147 registry.add (" hConstituents3D" , " 3D constituents histogram;p_{T};#eta;#phi" , {HistType::kTH3F , {{200 , 0 , 200 }, {100 , -1.0 , 1.0 }, {100 , 0.0 , o2::constants::math::TwoPI}}}, doSumw);
151148 registry.add (" hReferencePtDPhi" , " jet p_{T} vs DPhi;#Delta#phi;p_{T,jet}" , {HistType::kTH2F , {{100 , 0 , o2::constants::math::TwoPI}, {500 , -100 , 400 }}}, doSumw);
152149 registry.add (" hReferencePtDPhiShifts" , " rho shifts;#Delta#phi;p_{T,jet};shifts" , {HistType::kTH3F , {{100 , 0 , o2::constants::math::TwoPI}, {500 , -100 , 400 }, {20 , 0.0 , 2.0 }}}, doSumw);
153150 registry.add (" hSignalPtDPhi" , " jet p_{T} vs DPhi;#Delta#phi;p_{T,jet}" , {HistType::kTH2F , {{100 , 0 , o2::constants::math::TwoPI}, {500 , -100 , 400 }}}, doSumw);
154151 registry.add (" hReferencePt" , " jet p_{T};p_{T,jet};entries" , {HistType::kTH1F , {{500 , -100 , 400 }}}, doSumw);
155152 registry.add (" hSignalPt" , " jet p_{T};p_{T,jet};entries" , {HistType::kTH1F , {{500 , -100 , 400 }}}, doSumw);
156153 registry.add (" hSignalTriggers" , " trigger p_{T};p_{T,trig};entries" , {HistType::kTH1F , {{150 , 0 , 150 }}}, doSumw);
157- registry.add (" hSignalPtHard" , " jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}" , {HistType::kTH2F , {{500 , -100 , 400 }, pThatAxis }}, doSumw);
154+ registry.add (" hSignalPtHard" , " jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}" , {HistType::kTH2F , {{500 , -100 , 400 }, { 20 , 0 , 5 } }}, doSumw);
158155 registry.add (" hReferenceTriggers" , " trigger p_{T};p_{T,trig};entries" , {HistType::kTH1F , {{150 , 0 , 150 }}}, doSumw);
159- registry.add (" hReferencePtHard" , " jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}" , {HistType::kTH2F , {{500 , -100 , 400 }, pThatAxis }}, doSumw);
156+ registry.add (" hReferencePtHard" , " jet p_{T} vs #hat{p};p_{T,jet};#frac{p_{T,trig}}{#hat{p}}" , {HistType::kTH2F , {{500 , -100 , 400 }, { 20 , 0 , 5 } }}, doSumw);
160157 registry.add (" hSigEventTriggers" , " N_{triggers};events" , {HistType::kTH1F , {{10 , 0 , 10 }}}, doSumw);
161158 registry.add (" hRefEventTriggers" , " N_{triggers};events" , {HistType::kTH1F , {{10 , 0 , 10 }}}, doSumw);
162159 registry.add (" hJetPt" , " jet p_{T};p_{T,jet};entries" , {HistType::kTH1F , {{500 , -100 , 400 }}}, doSumw);
@@ -170,7 +167,7 @@ struct JetHadronRecoil {
170167 registry.add (" hEtaTrack" , " Track #eta;#eta;entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}, doSumw);
171168 registry.add (" hPhiTrack" , " Track #phi;#phi;entries" , {HistType::kTH1F , {{100 , 0.0 , o2::constants::math::TwoPI}}}, doSumw);
172169 registry.add (" hTrack3D" , " 3D tracks histogram;p_{T};#eta;#phi" , {HistType::kTH3F , {{200 , 0 , 200 }, {100 , -1.0 , 1.0 }, {100 , 0.0 , o2::constants::math::TwoPI}}}, doSumw);
173- registry.add (" hPtTrackPtHard" , " Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}" , {HistType::kTH2F , {pThatAxis , {200 , 0 , 200 }}}, doSumw);
170+ registry.add (" hPtTrackPtHard" , " Tracks vs pThard;#frac{p_{T}}{#hat{p}};p_{T}" , {HistType::kTH2F , {{ 20 , 0 , 5 } , {200 , 0 , 200 }}}, doSumw);
174171 registry.add (" hTracksvsJets" , " comparing leading tracks and jets;p_{T,track};p_{T,jet};#hat{p}" , {HistType::kTH3F , {{200 , 0 , 200 }, {500 , -100 , 400 }, {195 , 5 , 200 }}}, doSumw);
175172 registry.add (" hRhoSignal" , " Signal Rho bkg;#rho;entries" , {HistType::kTH1F , {{220 , 0 , 220 }}}, doSumw);
176173 registry.add (" hRhoReference" , " Reference Rho bkg;#rho;entries" , {HistType::kTH1F , {{220 , 0 , 220 }}}, doSumw);
@@ -192,7 +189,7 @@ struct JetHadronRecoil {
192189 registry.add (" hEtaPart" , " Particle #eta;#eta;entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}, doSumw);
193190 registry.add (" hPhiPart" , " Particle #phi;#phi;entries" , {HistType::kTH1F , {{100 , 0.0 , o2::constants::math::TwoPI}}}, doSumw);
194191 registry.add (" hPart3D" , " 3D tracks histogram;p_{T};#eta;#phi" , {HistType::kTH3F , {{200 , 0 , 200 }, {100 , -1.0 , 1.0 }, {100 , 0.0 , o2::constants::math::TwoPI}}}, doSumw);
195- registry.add (" hPtPartPtHard" , " Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}" , {HistType::kTH2F , {{200 , 0 , 200 }, pThatAxis }}, doSumw);
192+ registry.add (" hPtPartPtHard" , " Track p_{T} vs #hat{p};p_{T};#frac{p_{T}}{#hat{p}}" , {HistType::kTH2F , {{200 , 0 , 200 }, { 20 , 0 , 5 } }}, doSumw);
196193 registry.add (" hDeltaRSignalPart" , " Particle #DeltaR;#DeltaR;#frac{1}{N_{jets}}#frac{dN_{jets}}{d#DeltaR}" , {HistType::kTH1F , {dRAxis}}, doSumw);
197194 registry.add (" hDeltaRpTSignalPart" , " Particle jet p_{T} vs #DeltaR;p_{T,jet};#DeltaR" , {HistType::kTH2F , {{400 , 0 , 400 }, dRAxis}}, doSumw);
198195 registry.add (" hDeltaRpTDPhiSignalPart" , " Particle jet p_{T} vs #DeltaR vs #Delta#phi;p_{T,jet};#Delta#phi;#DeltaR" , {HistType::kTH3F , {{400 , 0 , 400 }, {100 , 0 , o2::constants::math::TwoPI}, dRAxis}}, doSumw);
@@ -350,8 +347,8 @@ struct JetHadronRecoil {
350347 registry.fill (HIST (" hTracksvsJets" ), leadingTrackPt, leadingJetPt, pTHat, weight);
351348 }
352349
353- template <typename T, typename U, typename P >
354- void fillHistogramsMCD (T const & jets, U const & tracks, P const &, float weight = 1.0 , float rho = 0.0 , float pTHat = 999.0 )
350+ template <typename T, typename U>
351+ void fillHistogramsMCD (T const & jets, U const & tracks, float weight = 1.0 , float rho = 0.0 , float pTHat = 999.0 )
355352 {
356353 bool isSigCol;
357354 std::vector<double > phiTTAr;
@@ -402,10 +399,10 @@ struct JetHadronRecoil {
402399 registry.fill (HIST (" hPhiTrack" ), track.phi (), weight);
403400 registry.fill (HIST (" hTrack3D" ), track.pt (), track.eta (), track.phi (), weight);
404401 registry.fill (HIST (" hPtTrackPtHard" ), track.pt () / pTHat, track.pt (), weight);
405- if (track.has_mcParticle ()) {
402+ if (track.has_mcParticle () && collision. has_mcCollision () ) {
406403 registry.fill (HIST (" hPtTrackMatched" ), track.pt (), weight);
407- auto particle = track.template mcParticle_as <P> ();
408- if (track. collisionId () == particle .mcCollisionId ()) {
404+ auto mcParticle = track.mcParticle ();
405+ if (mcParticle. mcCollisionId () == collision .mcCollisionId ()) {
409406 registry.fill (HIST (" hPtTrackMatchedToCollisions" ), track.pt (), weight);
410407 }
411408 }
@@ -620,8 +617,10 @@ struct JetHadronRecoil {
620617 {
621618 bool isSigCol;
622619 std::vector<double > phiTTAr;
620+ std::vector<double > phiTTArTrack;
623621 std::vector<double > ptTTAr;
624622 double phiTT = 0 ;
623+ double phiTTTrack = 0 ;
625624 double ptTT = 0 ;
626625 int trigNumber = 0 ;
627626 int nTT = 0 ;
@@ -657,13 +656,15 @@ struct JetHadronRecoil {
657656 }
658657 if (isSigCol && particle.pt () < ptTTsigMax && particle.pt () > ptTTsigMin && track.pt () < ptTTsigMax && track.pt () > ptTTsigMin) {
659658 phiTTAr.push_back (particle.phi ());
659+ phiTTArTrack.push_back (track.phi ());
660660 ptTTAr.push_back (particle.pt ());
661661 nTT++;
662662 registry.fill (HIST (" hSignalTriggers" ), particle.pt (), weight);
663663 }
664664 if (!isSigCol && particle.pt () < ptTTrefMax && particle.pt () > ptTTrefMin && track.pt () < ptTTrefMax && track.pt () > ptTTrefMin) {
665665 phiTTAr.push_back (particle.phi ());
666666 ptTTAr.push_back (particle.pt ());
667+ phiTTArTrack.push_back (track.phi ());
667668 nTT++;
668669 registry.fill (HIST (" hReferenceTriggers" ), particle.pt (), weight);
669670 }
@@ -677,6 +678,7 @@ struct JetHadronRecoil {
677678 if (nTT > 0 ) {
678679 trigNumber = rand->Integer (nTT);
679680 phiTT = phiTTAr[trigNumber];
681+ phiTTTrack = phiTTArTrack[trigNumber];
680682 ptTT = ptTTAr[trigNumber];
681683 if (isSigCol) {
682684 registry.fill (HIST (" hNtrig" ), 1.5 , weight);
@@ -711,6 +713,7 @@ struct JetHadronRecoil {
711713
712714 if (nTT > 0 ) {
713715 float dphi = RecoDecay::constrainAngle (jet.phi () - phiTT);
716+ float dphiTrack = RecoDecay::constrainAngle (jet.phi () - phiTTTrack);
714717 double dR = getWTAaxisDifference (jet, particles);
715718 if (isSigCol) {
716719 if (std::abs (dphi - o2::constants::math::PI) < 0.6 ) {
@@ -719,7 +722,7 @@ struct JetHadronRecoil {
719722 }
720723 registry.fill (HIST (" hDeltaRpTDPhiSignalPart" ), jet.pt (), dphi, dR, weight);
721724 registry.fill (HIST (" hSignalPtDPhi" ), dphi, jet.pt (), weight);
722- if (std::abs (dphi - o2::constants::math::PI) < 0.6 ) {
725+ if (std::abs (dphi - o2::constants::math::PI) < 0.6 && std::abs (dphiTrack - o2::constants::math::PI) < 0.6 ) {
723726 registry.fill (HIST (" hSignalPt" ), jet.pt (), weight);
724727 registry.fill (HIST (" hSignalPtHard" ), jet.pt (), ptTT / pTHat, weight);
725728 }
@@ -961,8 +964,8 @@ struct JetHadronRecoil {
961964 void processMCDWeighted (soa::Filtered<soa::Join<aod::JetCollisions, aod::JMcCollisionLbs>>::iterator const & collision,
962965 aod::JMcCollisions const &,
963966 soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents>> const & jets,
964- soa::Filtered<aod::JetTracksMCD > const & tracks,
965- soa::Filtered<aod::JetParticles> const & particles )
967+ soa::Filtered<soa::Join< aod::JetTracks, aod::JTrackExtras, aod::JMcTrackLbs> > const & tracks,
968+ )
966969 {
967970 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
968971 return ;
@@ -980,7 +983,7 @@ struct JetHadronRecoil {
980983 return ;
981984 }
982985 registry.fill (HIST (" hZvtxSelected" ), collision.posZ (), collision.mcCollision ().weight ());
983- fillHistogramsMCD (jets, tracks, particles, collision.mcCollision ().weight (), 0.0 , collision.mcCollision ().ptHard ());
986+ fillHistogramsMCD (jets, tracks, collision.mcCollision ().weight (), 0.0 , collision.mcCollision ().ptHard ());
984987 }
985988 PROCESS_SWITCH (JetHadronRecoil, processMCDWeighted, " process MC detector level with event weights" , false );
986989
0 commit comments