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+
12+ // / \file jetD0AngSubstructure.cxx
1113// /
12- // / \file JetD0AngSubstructure.cxx
13- // / \brief Analysis task for the reconstruction and study of charged jets
14- // / containing D_0 mesons in pp collisions. The code is partially inherited from
15- // / hfFragmentationFunction.cxx.
14+ // / \brief Analysis task for the reconstruction and study of charged jets containing D_0 mesons in pp collisions. The code is partially inherited from hfFragmentationFunction.cxx.
1615// /
1716// / \author P. Dhankher
1817// / \author L.J. Huisman
@@ -291,19 +290,19 @@ consteval float getValFromBin(int bin)
291290 return static_cast <float >(bin) - 0 .5f ;
292291}
293292
294- enum BIN_EX_COLCNTR { AllCollisions = 1 ,
295- Sel8ZCut = 2 };
293+ enum BinExpColCntr { AllCollisions = 1 ,
294+ Sel8ZCut = 2 };
296295
297- enum BIN_EX_JETCNTR { ChargedJets = 1 };
298- enum BIN_MC_COLCNTR { All = 1 ,
299- ZCut = 2 ,
300- Matched = 3 ,
301- MatchedSel8ZCut = 4 };
296+ enum BinExpJetCntr { ChargedJets = 1 };
297+ enum BinMCColCntr { All = 1 ,
298+ ZCut = 2 ,
299+ Matched = 3 ,
300+ MatchedSel8ZCut = 4 };
302301
303- enum BIN_MC_JETCNTR { DetectorLevelJetInMCCollision = 1 ,
304- ParticleLevelJetInMCCollision = 2 ,
305- DetectorLevelJetWithMatchedCandidate = 3 ,
306- ParticleLevelJetWithMatchedCandidate = 4
302+ enum BinMCJetCntr { DetectorLevelJetInMCCollision = 1 ,
303+ ParticleLevelJetInMCCollision = 2 ,
304+ DetectorLevelJetWithMatchedCandidate = 3 ,
305+ ParticleLevelJetWithMatchedCandidate = 4
307306};
308307
309308struct JetD0AngSubstructure {
@@ -372,11 +371,11 @@ struct JetD0AngSubstructure {
372371 registry.add (histnames::ex_hfl_phi, " ;#phi_{D^{0}};dN/d#phi_{D^{0}}" , {HistType::kTH1F , {{250 , -10 ., 10 .}}});
373372 // Labels
374373 auto expCollisionCounter = registry.get <TH1>(HIST (histnames::ex_col));
375- expCollisionCounter->GetXaxis ()->SetBinLabel (BIN_EX_COLCNTR ::AllCollisions, " all" );
376- expCollisionCounter->GetXaxis ()->SetBinLabel (BIN_EX_COLCNTR ::Sel8ZCut, " sel8 + zcut" );
374+ expCollisionCounter->GetXaxis ()->SetBinLabel (BinExpColCntr ::AllCollisions, " all" );
375+ expCollisionCounter->GetXaxis ()->SetBinLabel (BinExpColCntr ::Sel8ZCut, " sel8 + zcut" );
377376
378377 auto expJetCounter = registry.get <TH1>(HIST (histnames::ex_jet));
379- expJetCounter->GetXaxis ()->SetBinLabel (BIN_EX_JETCNTR ::ChargedJets, " Charged jets with D0" );
378+ expJetCounter->GetXaxis ()->SetBinLabel (BinExpJetCntr ::ChargedJets, " Charged jets with D0" );
380379 /*
381380 // Monte Carlo Data Efficiency Histograms
382381 */
@@ -393,16 +392,16 @@ struct JetD0AngSubstructure {
393392 registry.add (histnames::mc_eff_det_hfl_phi, " ;#phi_{det D^{0}};dN/d#phi_{det D^{0}}" , {HistType::kTH1F , {{250 , -10 ., 10 .}}});
394393 // Labels
395394 auto mcCollisionCounter = registry.get <TH1>(HIST (histnames::mc_eff_col));
396- mcCollisionCounter->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::All, " mccollisions" );
397- mcCollisionCounter->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::ZCut, " z_cut" );
398- mcCollisionCounter->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::Matched, " collisions" );
399- mcCollisionCounter->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::MatchedSel8ZCut, " sel8" );
395+ mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr ::All, " mccollisions" );
396+ mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr ::ZCut, " z_cut" );
397+ mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr ::Matched, " collisions" );
398+ mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr ::MatchedSel8ZCut, " sel8" );
400399
401400 auto jetCounter = registry.get <TH1>(HIST (histnames::mc_eff_jet));
402- jetCounter->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::ParticleLevelJetInMCCollision, " particle level" );
403- jetCounter->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::DetectorLevelJetInMCCollision, " detector level" );
404- jetCounter->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::DetectorLevelJetWithMatchedCandidate, " particle matched jets" );
405- jetCounter->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::ParticleLevelJetWithMatchedCandidate, " detector matched jets" );
401+ jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr ::ParticleLevelJetInMCCollision, " particle level" );
402+ jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr ::DetectorLevelJetInMCCollision, " detector level" );
403+ jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr ::DetectorLevelJetWithMatchedCandidate, " particle matched jets" );
404+ jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr ::ParticleLevelJetWithMatchedCandidate, " detector matched jets" );
406405 /*
407406 // Monte Carlo Data Histograms
408407 */
@@ -418,16 +417,16 @@ struct JetD0AngSubstructure {
418417 registry.add (histnames::mc_det_hfl_phi, " ;#phi_{det D^{0}};dN/d#phi_{det D^{0}}" , {HistType::kTH1F , {{250 , -10 ., 10 .}}});
419418 // Labels
420419 auto mcCollisionCounter2 = registry.get <TH1>(HIST (histnames::mc_col));
421- mcCollisionCounter2->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::All, " mccollisions" );
422- mcCollisionCounter2->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::ZCut, " z_cut" );
423- mcCollisionCounter2->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::Matched, " collisions" );
424- mcCollisionCounter2->GetXaxis ()->SetBinLabel (BIN_MC_COLCNTR ::MatchedSel8ZCut, " sel8" );
420+ mcCollisionCounter2->GetXaxis ()->SetBinLabel (BinMCColCntr ::All, " mccollisions" );
421+ mcCollisionCounter2->GetXaxis ()->SetBinLabel (BinMCColCntr ::ZCut, " z_cut" );
422+ mcCollisionCounter2->GetXaxis ()->SetBinLabel (BinMCColCntr ::Matched, " collisions" );
423+ mcCollisionCounter2->GetXaxis ()->SetBinLabel (BinMCColCntr ::MatchedSel8ZCut, " sel8" );
425424
426425 auto jetCounter2 = registry.get <TH1>(HIST (histnames::mc_jet));
427- jetCounter2->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::DetectorLevelJetInMCCollision, " detector level" );
428- jetCounter2->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::ParticleLevelJetInMCCollision, " particle level" );
429- jetCounter2->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::DetectorLevelJetWithMatchedCandidate, " particle matched jets" );
430- jetCounter2->GetXaxis ()->SetBinLabel (BIN_MC_JETCNTR ::ParticleLevelJetWithMatchedCandidate, " detector matched jets" );
426+ jetCounter2->GetXaxis ()->SetBinLabel (BinMCJetCntr ::DetectorLevelJetInMCCollision, " detector level" );
427+ jetCounter2->GetXaxis ()->SetBinLabel (BinMCJetCntr ::ParticleLevelJetInMCCollision, " particle level" );
428+ jetCounter2->GetXaxis ()->SetBinLabel (BinMCJetCntr ::DetectorLevelJetWithMatchedCandidate, " particle matched jets" );
429+ jetCounter2->GetXaxis ()->SetBinLabel (BinMCJetCntr ::ParticleLevelJetWithMatchedCandidate, " detector matched jets" );
431430 };
432431
433432 template <typename T, typename U>
@@ -471,16 +470,16 @@ struct JetD0AngSubstructure {
471470 aod::JetTracks const & tracks)
472471 {
473472 // apply event selection and fill histograms for sanity check
474- registry.fill (HIST (histnames::ex_col), getValFromBin (BIN_EX_COLCNTR ::AllCollisions));
473+ registry.fill (HIST (histnames::ex_col), getValFromBin (BinExpColCntr ::AllCollisions));
475474 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits) || !(std::abs (collision.posZ ()) < vertexZCut)) {
476475 return ;
477476 }
478- registry.fill (HIST (histnames::ex_col), getValFromBin (BIN_EX_COLCNTR ::Sel8ZCut));
477+ registry.fill (HIST (histnames::ex_col), getValFromBin (BinExpColCntr ::Sel8ZCut));
479478
480479 // Loop over jets containing D0 candidates
481480 for (const auto & jet : jets) {
482481 // number of charged jets with D0
483- registry.fill (HIST (histnames::ex_jet), getValFromBin (BIN_EX_JETCNTR ::ChargedJets));
482+ registry.fill (HIST (histnames::ex_jet), getValFromBin (BinExpJetCntr ::ChargedJets));
484483 // obtaining jet 3-vector
485484 TVector3 jetVector (jet.px (), jet.py (), jet.pz ());
486485
@@ -555,37 +554,37 @@ struct JetD0AngSubstructure {
555554 {
556555 for (const auto & mccollision : mccollisions) {
557556
558- registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BIN_MC_COLCNTR ::All));
557+ registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BinMCColCntr ::All));
559558 // skip collisions outside of |z| < vertexZCut
560559 if (std::abs (mccollision.posZ ()) > vertexZCut) {
561560 continue ;
562561 }
563- registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BIN_MC_COLCNTR ::ZCut));
562+ registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BinMCColCntr ::ZCut));
564563
565564 // reconstructed collisions associated to same mccollision
566565 const auto collisionsPerMCCollision = collisions.sliceBy (collisionsPerMCCollisionPreslice, mccollision.globalIndex ());
567566 for (const auto & collision : collisionsPerMCCollision) {
568567
569- registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BIN_MC_COLCNTR ::Matched));
568+ registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BinMCColCntr ::Matched));
570569 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits) ||
571570 !(std::abs (collision.posZ ()) < vertexZCut)) {
572571 continue ;
573572 }
574- registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BIN_MC_COLCNTR ::MatchedSel8ZCut));
573+ registry.fill (HIST (histnames::mc_eff_col), getValFromBin (BinMCColCntr ::MatchedSel8ZCut));
575574
576575 // d0 detector level jets associated to the current same collision
577576 const auto d0mcdJetsPerCollision = mcdjets.sliceBy (jetmcdpreslice, collision.globalIndex ());
578577 for (const auto & mcdjet : d0mcdJetsPerCollision) {
579578
580579 registry.fill (
581- HIST (histnames::mc_eff_jet), getValFromBin (BIN_MC_JETCNTR ::DetectorLevelJetInMCCollision));
580+ HIST (histnames::mc_eff_jet), getValFromBin (BinMCJetCntr ::DetectorLevelJetInMCCollision));
582581
583582 // obtain leading HF candidate in jet
584583 auto mcdd0cand = mcdjet.template candidates_first_as <CandidatesMCD>();
585584
586585 if (mcdjet.has_matchedJetCand ()) {
587586 registry.fill (
588- HIST (histnames::mc_eff_jet), getValFromBin (BIN_MC_JETCNTR ::DetectorLevelJetWithMatchedCandidate));
587+ HIST (histnames::mc_eff_jet), getValFromBin (BinMCJetCntr ::DetectorLevelJetWithMatchedCandidate));
589588 }
590589
591590 // reflection information for storage: D0 = +1, D0bar = -1, neither =
@@ -650,13 +649,13 @@ struct JetD0AngSubstructure {
650649 const auto d0mcpJetsPerMCCollision = mcpjets.sliceBy (jetmcppreslice, mccollision.globalIndex ());
651650 for (const auto & mcpjet : d0mcpJetsPerMCCollision) {
652651
653- registry.fill (HIST (histnames::mc_eff_jet), getValFromBin (BIN_MC_JETCNTR ::ParticleLevelJetInMCCollision));
652+ registry.fill (HIST (histnames::mc_eff_jet), getValFromBin (BinMCJetCntr ::ParticleLevelJetInMCCollision));
654653
655654 // obtain leading HF particle in jet
656655 auto mcpd0cand = mcpjet.template candidates_first_as <CandidatesMCP>();
657656
658657 if (mcpjet.has_matchedJetCand ()) {
659- registry.fill (HIST (histnames::mc_eff_jet), getValFromBin (BIN_MC_JETCNTR ::ParticleLevelJetWithMatchedCandidate));
658+ registry.fill (HIST (histnames::mc_eff_jet), getValFromBin (BinMCJetCntr ::ParticleLevelJetWithMatchedCandidate));
660659 }
661660 TVector3 mcpjetvector (mcpjet.px (), mcpjet.py (), mcpjet.pz ());
662661 TVector3 mcpcandvector (mcpd0cand.px (), mcpd0cand.py (), mcpd0cand.pz ());
@@ -711,18 +710,18 @@ struct JetD0AngSubstructure {
711710 aod::JetParticles const & jetparticles)
712711 {
713712 for (const auto & mccollision : mccollisions) {
714- registry.fill (HIST (histnames::mc_col), getValFromBin (BIN_MC_COLCNTR ::All));
713+ registry.fill (HIST (histnames::mc_col), getValFromBin (BinMCColCntr ::All));
715714 // skip collisions outside of |z| < vertexZCut
716715 if (std::abs (mccollision.posZ ()) > vertexZCut) {
717716 continue ;
718717 }
719- registry.fill (HIST (histnames::mc_col), getValFromBin (BIN_MC_COLCNTR ::ZCut));
718+ registry.fill (HIST (histnames::mc_col), getValFromBin (BinMCColCntr ::ZCut));
720719
721720 // hf particle level jets associated to same mccollision
722721 const JetD0MCPTable mcpJetsPerMCCollision = mcpjets.sliceBy (jetmcpreslice, mccollision.globalIndex ());
723722 for (const auto & mcpjet : mcpJetsPerMCCollision) {
724723
725- registry.fill (HIST (histnames::mc_jet), getValFromBin (BIN_MC_JETCNTR ::ParticleLevelJetInMCCollision));
724+ registry.fill (HIST (histnames::mc_jet), getValFromBin (BinMCJetCntr ::ParticleLevelJetInMCCollision));
726725
727726 // obtain leading HF particle in jet
728727 auto mcpcand = mcpjet.template candidates_first_as <CandidatesMCP>();
@@ -732,19 +731,19 @@ struct JetD0AngSubstructure {
732731 float mcpzparallel = (mcpjetvector * mcpcandvector) / (mcpjetvector * mcpjetvector);
733732
734733 if (mcpjet.has_matchedJetCand ()) {
735- registry.fill (HIST (histnames::mc_jet), getValFromBin (BIN_MC_JETCNTR ::ParticleLevelJetWithMatchedCandidate));
734+ registry.fill (HIST (histnames::mc_jet), getValFromBin (BinMCJetCntr ::ParticleLevelJetWithMatchedCandidate));
736735
737736 // loop over detector level matched to current particle level
738737 for (const auto & mcdjet : mcpjet.template matchedJetCand_as <JetTableMCD>()) {
739- registry.fill (HIST (histnames::mc_jet), getValFromBin (BIN_MC_JETCNTR ::DetectorLevelJetWithMatchedCandidate));
738+ registry.fill (HIST (histnames::mc_jet), getValFromBin (BinMCJetCntr ::DetectorLevelJetWithMatchedCandidate));
740739
741740 // apply collision sel8 selection on detector level jet's collision
742741 const auto & collision = collisions.iteratorAt (mcdjet.collisionId ());
743- registry.fill (HIST (histnames::mc_col), getValFromBin (BIN_MC_COLCNTR ::Matched));
742+ registry.fill (HIST (histnames::mc_col), getValFromBin (BinMCColCntr ::Matched));
744743 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits) || !(std::abs (collision.posZ ()) < vertexZCut)) {
745744 continue ;
746745 }
747- registry.fill (HIST (histnames::mc_col), getValFromBin (BIN_MC_COLCNTR ::MatchedSel8ZCut));
746+ registry.fill (HIST (histnames::mc_col), getValFromBin (BinMCColCntr ::MatchedSel8ZCut));
748747
749748 // obtain leading HF candidate in jet
750749 auto mcdcand = mcdjet.template candidates_first_as <CandidatesMCD>();
0 commit comments