Skip to content

Commit edd6029

Browse files
committed
Please consider the following formatting changes
1 parent d2b44fe commit edd6029

1 file changed

Lines changed: 32 additions & 44 deletions

File tree

PWGJE/Tasks/jetDsSpecSubs.cxx

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
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"
@@ -38,8 +38,7 @@
3838

3939
#include <Math/Vector4D.h>
4040
#include <TH1.h>
41-
#include "TVector3.h"
42-
41+
#include <TVector3.h>
4342

4443
#include <cmath>
4544
#include <string>
@@ -49,29 +48,26 @@ using namespace o2;
4948
using namespace o2::framework;
5049
using namespace o2::framework::expressions;
5150

52-
5351
consteval float getValFromBin(int bin)
5452
{
5553
return static_cast<float>(bin) - 0.5f;
5654
}
5755

58-
enum BinExpColCntr {AllCollisions = 1,
59-
Sel8ZCut = 2};
56+
enum BinExpColCntr { AllCollisions = 1,
57+
Sel8ZCut = 2 };
6058

61-
enum BinExpJetCntr {ChargedJets = 1 };
62-
enum BinMCColCntr {All = 1,
63-
ZCut = 2,
64-
Matched = 3,
65-
MatchedSel8ZCut = 4
66-
};
67-
68-
enum BinMCJetCntr {DetectorLevelJetInMCCollision = 1,
69-
ParticleLevelJetInMCCollision = 2,
70-
DetectorLevelJetWithMatchedCandidate = 3,
71-
ParticleLevelJetWithMatchedCandidate = 4
59+
enum BinExpJetCntr { ChargedJets = 1 };
60+
enum BinMCColCntr { All = 1,
61+
ZCut = 2,
62+
Matched = 3,
63+
MatchedSel8ZCut = 4
7264
};
7365

74-
66+
enum BinMCJetCntr { DetectorLevelJetInMCCollision = 1,
67+
ParticleLevelJetInMCCollision = 2,
68+
DetectorLevelJetWithMatchedCandidate = 3,
69+
ParticleLevelJetWithMatchedCandidate = 4
70+
};
7571

7672
struct JetDsSpecSubs {
7773

@@ -86,7 +82,7 @@ struct JetDsSpecSubs {
8682
using DsDataJets = soa::Join<aod::DsChargedJets, aod::DsChargedJetConstituents>;
8783
using DsMCDJets = soa::Join<aod::DsChargedMCDetectorLevelJets, aod::DsChargedMCDetectorLevelJetConstituents, aod::DsChargedMCDetectorLevelJetsMatchedToDsChargedMCParticleLevelJets>;
8884
using DsMCPJets = soa::Join<aod::DsChargedMCParticleLevelJets, aod::DsChargedMCParticleLevelJetConstituents, aod::DsChargedMCDetectorLevelJetsMatchedToDsChargedMCParticleLevelJets>;
89-
85+
9086
// Slices for access to proper HF MCD jet collision that is associated to MCCollision
9187
PresliceUnsorted<aod::JetCollisionsMCD> collisionsPerMCCollisionPreslice = aod::jmccollisionlb::mcCollisionId;
9288
Preslice<DsMCDJets> dsMCDJetsPerEXPCollisionPreslice = aod::jet::collisionId;
@@ -105,16 +101,17 @@ struct JetDsSpecSubs {
105101
int trackSelection = -1;
106102

107103
// Filters
108-
//Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
109-
//Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut;
104+
// Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
105+
// Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut;
110106

111107
//=============
112108
// Histograms
113109
//=============
114110

115111
HistogramRegistry registry{
116112
"registry",
117-
{ {"h_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}},
113+
{
114+
{"h_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}},
118115
{"h_collision_counter_data", ";event counter;entries", {HistType::kTH1F, {{10, 0., 10.}}}},
119116
{"h_collision_counter_mcd", ";event counter;entries", {HistType::kTH1F, {{10, 0., 10.}}}},
120117
{"h_collision_counter_mcp", ";event counter;entries", {HistType::kTH1F, {{10, 0., 10.}}}},
@@ -125,20 +122,20 @@ struct JetDsSpecSubs {
125122

126123
// Data histograms
127124
{"h_dsjet_counter_data", ";type;counts", {HistType::kTH1F, {{3, 0., 3.}}}},
128-
125+
129126
{"h_jet_pt_data", "jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
130127
{"h_jet_eta_data", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}},
131128
{"h_jet_phi_data", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}},
132-
129+
133130
{"h_ds_mass_data", ";m_{D_{S}} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{1000, 0., 6.}}}},
134131
{"h_ds_pt_data", ";#it{p}_{T,D_{S}} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
135132
{"h_ds_eta_data", ";#eta_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
136133
{"h_ds_phi_data", ";#phi_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
137-
134+
138135
{"h_ds_jet_pt_data", ";#it{p}_{T,D_{S} jet} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
139136
{"h_ds_jet_eta_data", ";#eta_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
140137
{"h_ds_jet_phi_data", ";#phi_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
141-
138+
142139
{"h_ds_jet_projection_data", ";z^{D_{S},jet}_{||};entries", {HistType::kTH1F, {{1000, 0., 2.}}}},
143140
{"h_ds_jet_distance_data", ";#DeltaR_{D_{S},jet};entries", {HistType::kTH1F, {{1000, 0., 1.}}}},
144141
{"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{200, 0., 50.}}}},
@@ -152,12 +149,12 @@ struct JetDsSpecSubs {
152149
{"h_jet_pt_mcd", "detector-level jet pT;#it{p}_{T,jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
153150
{"h_jet_eta_mcd", "detector-level jet #eta;#eta_{jet}^{det};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}},
154151
{"h_jet_phi_mcd", "detector-level jet #phi;#phi_{jet}^{det};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}},
155-
152+
156153
{"h_ds_mass_mcd", ";m_{D_{S}}^{rec} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{1000, 0., 6.}}}},
157154
{"h_ds_pt_mcd", ";#it{p}_{T,D_{S}}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
158155
{"h_ds_eta_mcd", ";#eta_{D_{S}}^{det};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
159156
{"h_ds_phi_mcd", ";#phi_{D_{S}}^{det};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
160-
157+
161158
{"h_ds_jet_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
162159
{"h_ds_jet_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
163160
{"h_ds_jet_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
@@ -173,11 +170,11 @@ struct JetDsSpecSubs {
173170
{"h_jet_pt_mcp", "particle-level jet pT;#it{p}_{T,jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}},
174171
{"h_jet_eta_mcp", "particle-level jet #eta;#eta_{jet}^{part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}},
175172
{"h_jet_phi_mcp", "particle-level jet #phi;#phi_{jet}^{part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}},
176-
173+
177174
{"h_ds_pt_mcp", ";#it{p}_{T,D_{S}}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
178175
{"h_ds_eta_mcp", ";#eta_{D_{S}}^{part};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
179176
{"h_ds_phi_mcp", ";#phi_{D_{S}}^{part};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
180-
177+
181178
{"h_ds_jet_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}},
182179
{"h_ds_jet_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
183180
{"h_ds_jet_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
@@ -204,7 +201,7 @@ struct JetDsSpecSubs {
204201
hMcp->GetXaxis()->SetBinLabel(2, "Ds particles");
205202
hMcp->GetXaxis()->SetBinLabel(3, "Ds jets with >=1 particle");
206203

207-
// Labels
204+
// Labels
208205
auto mcCollisionCounter = registry.get<TH1>(HIST("McEffCol"));
209206
mcCollisionCounter->GetXaxis()->SetBinLabel(BinMCColCntr::All, "mccollisions");
210207
mcCollisionCounter->GetXaxis()->SetBinLabel(BinMCColCntr::ZCut, "z_cut");
@@ -216,7 +213,6 @@ struct JetDsSpecSubs {
216213
jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetInMCCollision, "detector level");
217214
jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetWithMatchedCandidate, "particle matched jets");
218215
jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::ParticleLevelJetWithMatchedCandidate, "detector matched jets");
219-
220216
}
221217
//===============
222218
// Lambda compute
@@ -299,7 +295,6 @@ struct JetDsSpecSubs {
299295
}
300296
PROCESS_SWITCH(JetDsSpecSubs, processCollisions, "collision QA", false);
301297

302-
303298
//==============
304299
// DATA process
305300
//==============
@@ -315,9 +310,9 @@ struct JetDsSpecSubs {
315310
}
316311

317312
registry.fill(HIST("h_collision_counter_data"), 3.0);
318-
313+
319314
for (const auto& jet : jets) {
320-
registry.fill(HIST("h_dsjet_counter_data"), 0.5); //DsChargedJets entries
315+
registry.fill(HIST("h_dsjet_counter_data"), 0.5); // DsChargedJets entries
321316

322317
registry.fill(HIST("h_jet_pt_data"), jet.pt());
323318
registry.fill(HIST("h_jet_eta_data"), jet.eta());
@@ -330,7 +325,6 @@ struct JetDsSpecSubs {
330325

331326
const float mjet = computeJetMass(jetTracks);
332327

333-
334328
TVector3 jetVector(jet.px(), jet.py(), jet.pz());
335329

336330
int nDsInJet = 0;
@@ -370,7 +364,7 @@ struct JetDsSpecSubs {
370364
if (nDsInJet > 0) {
371365

372366
registry.fill(HIST("h_dsjet_counter_data"), 2.5); // Ds jets with at least one associated candidate
373-
367+
374368
// Jet properties
375369
registry.fill(HIST("h_ds_jet_pt_data"), jet.pt());
376370
registry.fill(HIST("h_ds_jet_eta_data"), jet.eta());
@@ -385,12 +379,10 @@ struct JetDsSpecSubs {
385379
if (lambda12 >= 0.f) {
386380
registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12);
387381
}
388-
389382
}
390383
}
391384
}
392385
PROCESS_SWITCH(JetDsSpecSubs, processDataChargedSubstructure, "Data charged jets", false);
393-
394386

395387
//==============
396388
// MC function
@@ -436,7 +428,7 @@ struct JetDsSpecSubs {
436428
// Detector-level Ds-tagged jets associated with the current reconstructed collision
437429
const auto dsmcdJetsPerCollision = mcdjets.sliceBy(jetmcdpreslice, collision.globalIndex());
438430
for (const auto& mcdjet : dsmcdJetsPerCollision) {
439-
431+
440432
// Detector-level jet found in a matched collision
441433
registry.fill(HIST("McEffJet"), getValFromBin(BinMCJetCntr::DetectorLevelJetInMCCollision));
442434

@@ -478,9 +470,7 @@ struct JetDsSpecSubs {
478470
mcdjet.pt(),
479471
mcd_zParallel,
480472
mcd_deltaR);
481-
482473
}
483-
484474
}
485475
}
486476
}
@@ -509,8 +499,6 @@ struct JetDsSpecSubs {
509499
mcdCandidates,
510500
mcpCandidates,
511501
jettracks);
512-
513-
514502
}
515503
PROCESS_SWITCH(JetDsSpecSubs, processMonteCarloEfficiencyDs, "Non-matched and matched MC Ds and jets", false);
516504
};

0 commit comments

Comments
 (0)