1313// / \brief Ds-tagged jet analysis with substructure histogram outputs
1414// / \author Monalisa Melo <monalisa.melo@cern.ch>, Universidade de São Paulo
1515
16- #include " PWGHF/DataModel/CandidateReconstructionTables.h"
1716#include " PWGHF/Core/DecayChannels.h"
17+ #include " PWGHF/DataModel/CandidateReconstructionTables.h"
1818#include " PWGHF/DataModel/CandidateSelectionTables.h"
1919#include " PWGJE/Core/JetDerivedDataUtilities.h"
2020#include " PWGJE/Core/JetUtilities.h"
3737#include < Framework/runDataProcessing.h>
3838
3939#include < TH1.h>
40- #include " TVector3.h"
41-
40+ #include < TVector3.h>
4241
4342#include < cmath>
4443#include < string>
@@ -48,29 +47,26 @@ using namespace o2;
4847using namespace o2 ::framework;
4948using namespace o2 ::framework::expressions;
5049
51-
5250consteval float getValFromBin (int bin)
5351{
5452 return static_cast <float >(bin) - 0 .5f ;
5553}
5654
57- enum BinExpColCntr {AllCollisions = 1 ,
58- Sel8ZCut = 2 };
55+ enum BinExpColCntr { AllCollisions = 1 ,
56+ Sel8ZCut = 2 };
5957
60- enum BinExpJetCntr {ChargedJets = 1 };
61- enum BinMCColCntr {All = 1 ,
62- ZCut = 2 ,
63- Matched = 3 ,
64- MatchedSel8ZCut = 4
65- };
66-
67- enum BinMCJetCntr {DetectorLevelJetInMCCollision = 1 ,
68- ParticleLevelJetInMCCollision = 2 ,
69- DetectorLevelJetWithMatchedCandidate = 3 ,
70- ParticleLevelJetWithMatchedCandidate = 4
58+ enum BinExpJetCntr { ChargedJets = 1 };
59+ enum BinMCColCntr { All = 1 ,
60+ ZCut = 2 ,
61+ Matched = 3 ,
62+ MatchedSel8ZCut = 4
7163};
7264
73-
65+ enum BinMCJetCntr { DetectorLevelJetInMCCollision = 1 ,
66+ ParticleLevelJetInMCCollision = 2 ,
67+ DetectorLevelJetWithMatchedCandidate = 3 ,
68+ ParticleLevelJetWithMatchedCandidate = 4
69+ };
7470
7571struct JetDsSpecSubs {
7672
@@ -85,7 +81,7 @@ struct JetDsSpecSubs {
8581 using DsDataJets = soa::Join<aod::DsChargedJets, aod::DsChargedJetConstituents>;
8682 using DsMCDJets = soa::Join<aod::DsChargedMCDetectorLevelJets, aod::DsChargedMCDetectorLevelJetConstituents, aod::DsChargedMCDetectorLevelJetsMatchedToDsChargedMCParticleLevelJets>;
8783 using DsMCPJets = soa::Join<aod::DsChargedMCParticleLevelJets, aod::DsChargedMCParticleLevelJetConstituents, aod::DsChargedMCDetectorLevelJetsMatchedToDsChargedMCParticleLevelJets>;
88-
84+
8985 // Slices for access to proper HF MCD jet collision that is associated to MCCollision
9086 PresliceUnsorted<aod::JetCollisionsMCD> collisionsPerMCCollisionPreslice = aod::jmccollisionlb::mcCollisionId;
9187 Preslice<DsMCDJets> dsMCDJetsPerEXPCollisionPreslice = aod::jet::collisionId;
@@ -104,16 +100,17 @@ struct JetDsSpecSubs {
104100 int trackSelection = -1 ;
105101
106102 // Filters
107- // Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
108- // Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut;
103+ // Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
104+ // Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut;
109105
110106 // =============
111107 // Histograms
112108 // =============
113109
114110 HistogramRegistry registry{
115111 " registry" ,
116- { {" h_collisions" , " event status;event status;entries" , {HistType::kTH1F , {{10 , 0.0 , 10.0 }}}},
112+ {
113+ {" h_collisions" , " event status;event status;entries" , {HistType::kTH1F , {{10 , 0.0 , 10.0 }}}},
117114 {" h_collision_counter_data" , " ;event counter;entries" , {HistType::kTH1F , {{10 , 0 ., 10 .}}}},
118115 {" h_collision_counter_mcd" , " ;event counter;entries" , {HistType::kTH1F , {{10 , 0 ., 10 .}}}},
119116 {" h_collision_counter_mcp" , " ;event counter;entries" , {HistType::kTH1F , {{10 , 0 ., 10 .}}}},
@@ -124,20 +121,20 @@ struct JetDsSpecSubs {
124121
125122 // Data histograms
126123 {" h_dsjet_counter_data" , " ;type;counts" , {HistType::kTH1F , {{3 , 0 ., 3 .}}}},
127-
124+
128125 {" h_jet_pt_data" , " jet pT;#it{p}_{T,jet} (GeV/#it{c});entries" , {HistType::kTH1F , {{200 , 0 ., 200 .}}}},
129126 {" h_jet_eta_data" , " jet #eta;#eta_{jet};entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}},
130127 {" h_jet_phi_data" , " jet #phi;#phi_{jet};entries" , {HistType::kTH1F , {{80 , -1.0 , 7 .}}}},
131-
128+
132129 {" h_ds_mass_data" , " ;m_{D_{S}} (GeV/#it{c}^{2});entries" , {HistType::kTH1F , {{1000 , 0 ., 6 .}}}},
133130 {" h_ds_pt_data" , " ;#it{p}_{T,D_{S}} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
134131 {" h_ds_eta_data" , " ;#eta_{D_{S}};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
135132 {" h_ds_phi_data" , " ;#phi_{D_{S}};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
136-
133+
137134 {" h_ds_jet_pt_data" , " ;#it{p}_{T,D_{S} jet} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
138135 {" h_ds_jet_eta_data" , " ;#eta_{D_{S} jet};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
139136 {" h_ds_jet_phi_data" , " ;#phi_{D_{S} jet};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
140-
137+
141138 {" h_ds_jet_projection_data" , " ;z^{D_{S},jet}_{||};entries" , {HistType::kTH1F , {{1000 , 0 ., 2 .}}}},
142139 {" h_ds_jet_distance_data" , " ;#DeltaR_{D_{S},jet};entries" , {HistType::kTH1F , {{1000 , 0 ., 1 .}}}},
143140 {" h_ds_jet_mass_data" , " ;m_{jet}^{ch} (GeV/#it{c}^{2});entries" , {HistType::kTH1F , {{200 , 0 ., 50 .}}}},
@@ -151,12 +148,12 @@ struct JetDsSpecSubs {
151148 {" h_jet_pt_mcd" , " detector-level jet pT;#it{p}_{T,jet}^{det} (GeV/#it{c});entries" , {HistType::kTH1F , {{200 , 0 ., 200 .}}}},
152149 {" h_jet_eta_mcd" , " detector-level jet #eta;#eta_{jet}^{det};entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}},
153150 {" h_jet_phi_mcd" , " detector-level jet #phi;#phi_{jet}^{det};entries" , {HistType::kTH1F , {{80 , -1.0 , 7 .}}}},
154-
151+
155152 {" h_ds_mass_mcd" , " ;m_{D_{S}}^{rec} (GeV/#it{c}^{2});entries" , {HistType::kTH1F , {{1000 , 0 ., 6 .}}}},
156153 {" h_ds_pt_mcd" , " ;#it{p}_{T,D_{S}}^{det} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
157154 {" h_ds_eta_mcd" , " ;#eta_{D_{S}}^{det};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
158155 {" h_ds_phi_mcd" , " ;#phi_{D_{S}}^{det};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
159-
156+
160157 {" h_ds_jet_pt_mcd" , " ;#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
161158 {" h_ds_jet_eta_mcd" , " ;#eta_{D_{S} jet}^{det};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
162159 {" h_ds_jet_phi_mcd" , " ;#phi_{D_{S} jet}^{det};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
@@ -172,11 +169,11 @@ struct JetDsSpecSubs {
172169 {" h_jet_pt_mcp" , " particle-level jet pT;#it{p}_{T,jet}^{part} (GeV/#it{c});entries" , {HistType::kTH1F , {{200 , 0 ., 200 .}}}},
173170 {" h_jet_eta_mcp" , " particle-level jet #eta;#eta_{jet}^{part};entries" , {HistType::kTH1F , {{100 , -1.0 , 1.0 }}}},
174171 {" h_jet_phi_mcp" , " particle-level jet #phi;#phi_{jet}^{part};entries" , {HistType::kTH1F , {{80 , -1.0 , 7 .}}}},
175-
172+
176173 {" h_ds_pt_mcp" , " ;#it{p}_{T,D_{S}}^{part} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
177174 {" h_ds_eta_mcp" , " ;#eta_{D_{S}}^{part};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
178175 {" h_ds_phi_mcp" , " ;#phi_{D_{S}}^{part};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
179-
176+
180177 {" h_ds_jet_pt_mcp" , " ;#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries" , {HistType::kTH1F , {{1000 , 0 ., 100 .}}}},
181178 {" h_ds_jet_eta_mcp" , " ;#eta_{D_{S} jet}^{part};entries" , {HistType::kTH1F , {{250 , -1 ., 1 .}}}},
182179 {" h_ds_jet_phi_mcp" , " ;#phi_{D_{S} jet}^{part};entries" , {HistType::kTH1F , {{250 , -1 ., 7 .}}}},
@@ -203,7 +200,7 @@ struct JetDsSpecSubs {
203200 hMcp->GetXaxis ()->SetBinLabel (2 , " Ds particles" );
204201 hMcp->GetXaxis ()->SetBinLabel (3 , " Ds jets with >=1 particle" );
205202
206- // Labels
203+ // Labels
207204 auto mcCollisionCounter = registry.get <TH1 >(HIST (" McEffCol" ));
208205 mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr::All, " mccollisions" );
209206 mcCollisionCounter->GetXaxis ()->SetBinLabel (BinMCColCntr::ZCut, " z_cut" );
@@ -215,7 +212,6 @@ struct JetDsSpecSubs {
215212 jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr::DetectorLevelJetInMCCollision, " detector level" );
216213 jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr::DetectorLevelJetWithMatchedCandidate, " particle matched jets" );
217214 jetCounter->GetXaxis ()->SetBinLabel (BinMCJetCntr::ParticleLevelJetWithMatchedCandidate, " detector matched jets" );
218-
219215 }
220216 // ===============
221217 // Lambda compute
@@ -298,7 +294,6 @@ struct JetDsSpecSubs {
298294 }
299295 PROCESS_SWITCH (JetDsSpecSubs, processCollisions, " collision QA" , false );
300296
301-
302297 // ==============
303298 // DATA process
304299 // ==============
@@ -314,9 +309,9 @@ struct JetDsSpecSubs {
314309 }
315310
316311 registry.fill (HIST (" h_collision_counter_data" ), 3.0 );
317-
312+
318313 for (const auto & jet : jets) {
319- registry.fill (HIST (" h_dsjet_counter_data" ), 0.5 ); // DsChargedJets entries
314+ registry.fill (HIST (" h_dsjet_counter_data" ), 0.5 ); // DsChargedJets entries
320315
321316 registry.fill (HIST (" h_jet_pt_data" ), jet.pt ());
322317 registry.fill (HIST (" h_jet_eta_data" ), jet.eta ());
@@ -329,7 +324,6 @@ struct JetDsSpecSubs {
329324
330325 const float mjet = computeJetMass (jetTracks);
331326
332-
333327 TVector3 jetVector (jet.px (), jet.py (), jet.pz ());
334328
335329 int nDsInJet = 0 ;
@@ -369,7 +363,7 @@ struct JetDsSpecSubs {
369363 if (nDsInJet > 0 ) {
370364
371365 registry.fill (HIST (" h_dsjet_counter_data" ), 2.5 ); // Ds jets with at least one associated candidate
372-
366+
373367 // Jet properties
374368 registry.fill (HIST (" h_ds_jet_pt_data" ), jet.pt ());
375369 registry.fill (HIST (" h_ds_jet_eta_data" ), jet.eta ());
@@ -384,12 +378,10 @@ struct JetDsSpecSubs {
384378 if (lambda12 >= 0 .f ) {
385379 registry.fill (HIST (" h_ds_jet_lambda12_data" ), lambda12);
386380 }
387-
388381 }
389382 }
390383 }
391384 PROCESS_SWITCH (JetDsSpecSubs, processDataChargedSubstructure, " Data charged jets" , false );
392-
393385
394386 // ==============
395387 // MC function
@@ -435,7 +427,7 @@ struct JetDsSpecSubs {
435427 // Detector-level Ds-tagged jets associated with the current reconstructed collision
436428 const auto dsmcdJetsPerCollision = mcdjets.sliceBy (jetmcdpreslice, collision.globalIndex ());
437429 for (const auto & mcdjet : dsmcdJetsPerCollision) {
438-
430+
439431 // Detector-level jet found in a matched collision
440432 registry.fill (HIST (" McEffJet" ), getValFromBin (BinMCJetCntr::DetectorLevelJetInMCCollision));
441433
@@ -477,9 +469,7 @@ struct JetDsSpecSubs {
477469 mcdjet.pt (),
478470 mcd_zParallel,
479471 mcd_deltaR);
480-
481472 }
482-
483473 }
484474 }
485475 }
@@ -508,8 +498,6 @@ struct JetDsSpecSubs {
508498 mcdCandidates,
509499 mcpCandidates,
510500 jettracks);
511-
512-
513501 }
514502 PROCESS_SWITCH (JetDsSpecSubs, processMonteCarloEfficiencyDs, " Non-matched and matched MC Ds and jets" , false );
515503};
0 commit comments