Skip to content

Commit 25cc6e6

Browse files
committed
Some linter formats
1 parent 9f7d13a commit 25cc6e6

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

PWGJE/TableProducer/jetTaggerHF.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,16 @@ struct JetTaggerHFTask {
298298
std::map<std::string, std::string> metadata;
299299
resoFuncMatch = resoFuncMatching;
300300

301-
const int IPmethodResolutionFunctionSize = 7;
301+
const int mIPmethodResolutionFunctionSize = 7;
302302

303303
auto loadCCDBforIP = [&](const std::vector<std::string>& paths, std::vector<TF1*>& targetVec, const std::string& name) {
304-
if (paths.size() != IPmethodResolutionFunctionSize) {
304+
if (paths.size() != mIPmethodResolutionFunctionSize) {
305305
usepTcategorize.value = false;
306306
LOG(info) << name << " does not have 7 entries. Disabling pT categorization (usepTcategorize = false).";
307307
resoFuncMatch = 0;
308308
return;
309309
}
310-
for (int i = 0; i < IPmethodResolutionFunctionSize; i++) {
310+
for (int i = 0; i < mIPmethodResolutionFunctionSize; i++) {
311311
targetVec.push_back(ccdbApi.retrieveFromTFileAny<TF1>(paths[i], metadata, -1));
312312
}
313313
};
@@ -336,7 +336,7 @@ struct JetTaggerHFTask {
336336
}
337337

338338
maxOrder = numCount + 1; // 0: untagged, >1 : N ordering
339-
const int IPmethodNumOfParameters = 9;
339+
const int mIPmethodNumOfParameters = 9;
340340

341341
// Set up the resolution function
342342
switch (resoFuncMatch) {
@@ -384,7 +384,7 @@ struct JetTaggerHFTask {
384384
for (size_t j = 0; j < resoFuncIncCCDB.size(); j++) {
385385
std::vector<float> params;
386386
if (resoFuncIncCCDB[j]) {
387-
for (int i = 0; i < IPmethodNumOfParameters; i++) {
387+
for (int i = 0; i < mIPmethodNumOfParameters; i++) {
388388
params.emplace_back(resoFuncIncCCDB[j]->GetParameter(i));
389389
}
390390
}
@@ -398,7 +398,7 @@ struct JetTaggerHFTask {
398398
for (size_t j = 0; j < resoFuncBeautyCCDB.size(); j++) {
399399
std::vector<float> params;
400400
if (resoFuncBeautyCCDB[j]) {
401-
for (int i = 0; i < IPmethodNumOfParameters; i++) {
401+
for (int i = 0; i < mIPmethodNumOfParameters; i++) {
402402
params.emplace_back(resoFuncBeautyCCDB[j]->GetParameter(i));
403403
}
404404
}
@@ -407,7 +407,7 @@ struct JetTaggerHFTask {
407407
for (size_t j = 0; j < resoFuncCharmCCDB.size(); j++) {
408408
std::vector<float> params;
409409
if (resoFuncCharmCCDB[j]) {
410-
for (int i = 0; i < IPmethodNumOfParameters; i++) {
410+
for (int i = 0; i < mIPmethodNumOfParameters; i++) {
411411
params.emplace_back(resoFuncCharmCCDB[j]->GetParameter(i));
412412
}
413413
}
@@ -416,7 +416,7 @@ struct JetTaggerHFTask {
416416
for (size_t j = 0; j < resoFuncLfCCDB.size(); j++) {
417417
std::vector<float> params;
418418
if (resoFuncLfCCDB[j]) {
419-
for (int i = 0; i < IPmethodNumOfParameters; i++) {
419+
for (int i = 0; i < mIPmethodNumOfParameters; i++) {
420420
params.emplace_back(resoFuncLfCCDB[j]->GetParameter(i));
421421
}
422422
}
@@ -428,7 +428,7 @@ struct JetTaggerHFTask {
428428
for (size_t j = 0; j < resoFuncDataCCDB.size(); j++) {
429429
std::vector<float> params;
430430
if (resoFuncDataCCDB[j]) {
431-
for (int i = 0; i < IPmethodNumOfParameters; i++) {
431+
for (int i = 0; i < mIPmethodNumOfParameters; i++) {
432432
params.emplace_back(resoFuncDataCCDB[j]->GetParameter(i));
433433
}
434434
}
@@ -527,11 +527,11 @@ struct JetTaggerHFTask {
527527
}
528528

529529
if (bMlResponse.getOutputNodes() > 1) {
530-
auto Db = [](std::vector<float> scores, float fC) {
530+
auto mDb = [](std::vector<float> scores, float fC) {
531531
return std::log(scores[2] / (fC * scores[1] + (1 - fC) * scores[0]));
532532
};
533533

534-
scoreML[analysisJet.globalIndex()] = useDb ? Db(output, fC) : output[2]; // 2 is the b-jet index
534+
scoreML[analysisJet.globalIndex()] = useDb ? mDb(output, fC) : output[2]; // 2 is the b-jet index
535535
} else {
536536
scoreML[analysisJet.globalIndex()] = output[0];
537537
}

PWGJE/Tasks/bjetTaggingML.cxx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ struct BJetTaggingML {
212212
registry.fill(HIST("h2_SVMass_jetpT"), myJet.pt(), massSV, eventweight);
213213

214214
if (doprocessMCJets) {
215-
if (jetFlavor == 2) {
215+
if (jetFlavor == JetTaggingSpecies::beauty) {
216216
registry.fill(HIST("h2_LxyS_jetpT_bjet"), myJet.pt(), candSV.decayLengthXY() / candSV.errorDecayLengthXY(), eventweight);
217217
registry.fill(HIST("h2_Dispersion_jetpT_bjet"), myJet.pt(), candSV.dispersion(), eventweight);
218218
registry.fill(HIST("h2_SVMass_jetpT_bjet"), myJet.pt(), massSV, eventweight);
219-
} else if (jetFlavor == 1) {
219+
} else if (jetFlavor == JetTaggingSpecies::charm) {
220220
registry.fill(HIST("h2_LxyS_jetpT_cjet"), myJet.pt(), candSV.decayLengthXY() / candSV.errorDecayLengthXY(), eventweight);
221221
registry.fill(HIST("h2_Dispersion_jetpT_cjet"), myJet.pt(), candSV.dispersion(), eventweight);
222222
registry.fill(HIST("h2_SVMass_jetpT_cjet"), myJet.pt(), massSV, eventweight);
@@ -250,10 +250,10 @@ struct BJetTaggingML {
250250
registry.fill(HIST("h2_SIPs3D_jetpT"), analysisJet.pt(), sign * std::abs(constituent.dcaXYZ()) / constituent.sigmadcaXYZ(), eventweight);
251251

252252
if (doprocessMCJets) {
253-
if (jetFlavor == 2) {
253+
if (jetFlavor == JetTaggingSpecies::beauty) {
254254
registry.fill(HIST("h2_SIPs2D_jetpT_bjet"), analysisJet.pt(), sign * std::abs(constituent.dcaXY()) / constituent.sigmadcaXY(), eventweight);
255255
registry.fill(HIST("h2_SIPs3D_jetpT_bjet"), analysisJet.pt(), sign * std::abs(constituent.dcaXYZ()) / constituent.sigmadcaXYZ(), eventweight);
256-
} else if (jetFlavor == 1) {
256+
} else if (jetFlavor == JetTaggingSpecies::charm) {
257257
registry.fill(HIST("h2_SIPs2D_jetpT_cjet"), analysisJet.pt(), sign * std::abs(constituent.dcaXY()) / constituent.sigmadcaXY(), eventweight);
258258
registry.fill(HIST("h2_SIPs3D_jetpT_cjet"), analysisJet.pt(), sign * std::abs(constituent.dcaXYZ()) / constituent.sigmadcaXYZ(), eventweight);
259259
} else {
@@ -385,23 +385,23 @@ struct BJetTaggingML {
385385

386386
if (doDataDriven) {
387387
registry.fill(HIST("hSparse_Incljets"), analysisJet.pt(), analysisJet.scoreML(), useDb ? 0 : -1 * std::log(1 - analysisJet.scoreML()), analysisJet.mass(), -1 * std::log(analysisJet.jetProb()), svsParams[0].svMass, svsParams[0].svfE, eventWeight);
388-
if (jetFlavor == 2) {
388+
if (jetFlavor == JetTaggingSpecies::beauty) {
389389
registry.fill(HIST("hSparse_bjets"), analysisJet.pt(), analysisJet.scoreML(), useDb ? 0 : -1 * std::log(1 - analysisJet.scoreML()), analysisJet.mass(), -1 * std::log(analysisJet.jetProb()), svsParams[0].svMass, svsParams[0].svfE, eventWeight);
390-
} else if (jetFlavor == 1) {
390+
} else if (jetFlavor == JetTaggingSpecies::charm) {
391391
registry.fill(HIST("hSparse_cjets"), analysisJet.pt(), analysisJet.scoreML(), useDb ? 0 : -1 * std::log(1 - analysisJet.scoreML()), analysisJet.mass(), -1 * std::log(analysisJet.jetProb()), svsParams[0].svMass, svsParams[0].svfE, eventWeight);
392392
} else {
393393
registry.fill(HIST("hSparse_lfjets"), analysisJet.pt(), analysisJet.scoreML(), useDb ? 0 : -1 * std::log(1 - analysisJet.scoreML()), analysisJet.mass(), -1 * std::log(analysisJet.jetProb()), svsParams[0].svMass, svsParams[0].svfE, eventWeight);
394394
}
395395
}
396396

397-
if (jetFlavor == 2) {
397+
if (jetFlavor == JetTaggingSpecies::beauty) {
398398
registry.fill(HIST("h2_score_jetpT_bjet"), analysisJet.pt(), analysisJet.scoreML(), eventWeight);
399399
if (!useDb) {
400400
registry.fill(HIST("h2_logscore_jetpT_bjet"), analysisJet.pt(), -1 * std::log(1 - analysisJet.scoreML()), eventWeight);
401401
}
402402
registry.fill(HIST("h2_jetMass_jetpT_bjet"), analysisJet.pt(), analysisJet.mass(), eventWeight);
403403
registry.fill(HIST("h_jetpT_detector_bjet"), analysisJet.pt(), eventWeight);
404-
} else if (jetFlavor == 1) {
404+
} else if (jetFlavor == JetTaggingSpecies::charm) {
405405
registry.fill(HIST("h2_score_jetpT_cjet"), analysisJet.pt(), analysisJet.scoreML(), eventWeight);
406406
if (!useDb) {
407407
registry.fill(HIST("h2_logscore_jetpT_cjet"), analysisJet.pt(), -1 * std::log(1 - analysisJet.scoreML()), eventWeight);
@@ -422,9 +422,9 @@ struct BJetTaggingML {
422422
continue;
423423
}
424424

425-
if (jetFlavor == 2) {
425+
if (jetFlavor == JetTaggingSpecies::beauty) {
426426
registry.fill(HIST("h2_Response_DetjetpT_PartjetpT_bjet"), analysisJet.pt(), mcpjet.pt(), eventWeight);
427-
} else if (jetFlavor == 1) {
427+
} else if (jetFlavor == JetTaggingSpecies::charm) {
428428
registry.fill(HIST("h2_Response_DetjetpT_PartjetpT_cjet"), analysisJet.pt(), mcpjet.pt(), eventWeight);
429429
} else {
430430
registry.fill(HIST("h2_Response_DetjetpT_PartjetpT_lfjet"), analysisJet.pt(), mcpjet.pt(), eventWeight);
@@ -457,9 +457,9 @@ struct BJetTaggingML {
457457

458458
registry.fill(HIST("h_jetpT_particle_DetColl"), mcpjet.pt(), eventWeight);
459459

460-
if (jetFlavor == 2) {
460+
if (jetFlavor == JetTaggingSpecies::beauty) {
461461
registry.fill(HIST("h_jetpT_particle_DetColl_bjet"), mcpjet.pt(), eventWeight);
462-
} else if (jetFlavor == 1) {
462+
} else if (jetFlavor == JetTaggingSpecies::charm) {
463463
registry.fill(HIST("h_jetpT_particle_DetColl_cjet"), mcpjet.pt(), eventWeight);
464464
} else {
465465
registry.fill(HIST("h_jetpT_particle_DetColl_lfjet"), mcpjet.pt(), eventWeight);
@@ -496,9 +496,9 @@ struct BJetTaggingML {
496496

497497
int8_t jetFlavor = mcpjet.origin();
498498

499-
if (jetFlavor == 2) {
499+
if (jetFlavor == JetTaggingSpecies::beauty) {
500500
registry.fill(HIST("h_jetpT_particle_bjet"), mcpjet.pt(), eventWeight);
501-
} else if (jetFlavor == 1) {
501+
} else if (jetFlavor == JetTaggingSpecies::charm) {
502502
registry.fill(HIST("h_jetpT_particle_cjet"), mcpjet.pt(), eventWeight);
503503
} else {
504504
registry.fill(HIST("h_jetpT_particle_lfjet"), mcpjet.pt(), eventWeight);

PWGJE/Tasks/bjetTreeCreator.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@ struct BJetTreeCreator {
327327
registry.add("h2_trk_jtrackpt_vs_origtrackpt", "JTracks::pt vs Tracks::pt", {HistType::kTH2F, {{200, 0., 100.}, {200, 0., 100.}}});
328328
registry.add("h_trk_vtx_index", "trk_vtx_index;Vertex index;Entries", {HistType::kTH1F, {{20, 0., 20.}}});
329329
registry.add("h_trk_origin", "trk_origin;Track origin;Entries", {HistType::kTH1F, {{5, 0., 5.}}});
330-
auto h_trk_origin = registry.get<TH1>(HIST("h_trk_origin"));
331-
h_trk_origin->GetXaxis()->SetBinLabel(1, "NotPhysPrim");
332-
h_trk_origin->GetXaxis()->SetBinLabel(2, "Charm");
333-
h_trk_origin->GetXaxis()->SetBinLabel(3, "Beauty");
334-
h_trk_origin->GetXaxis()->SetBinLabel(4, "Primary");
335-
h_trk_origin->GetXaxis()->SetBinLabel(5, "OtherSecondary");
330+
auto hTrackOrigin = registry.get<TH1>(HIST("h_trk_origin"));
331+
hTrackOrigin->GetXaxis()->SetBinLabel(1, "NotPhysPrim");
332+
hTrackOrigin->GetXaxis()->SetBinLabel(2, "Charm");
333+
hTrackOrigin->GetXaxis()->SetBinLabel(3, "Beauty");
334+
hTrackOrigin->GetXaxis()->SetBinLabel(4, "Primary");
335+
hTrackOrigin->GetXaxis()->SetBinLabel(5, "OtherSecondary");
336336
}
337337
}
338338

@@ -558,7 +558,7 @@ struct BJetTreeCreator {
558558
for (const auto& analysisJet : alljets) {
559559

560560
bool jetIncluded = false;
561-
for (const auto jetR : jetRadiiValues) {
561+
for (const auto& jetR : jetRadiiValues) {
562562
if (analysisJet.r() == static_cast<int>(jetR * 100)) {
563563
jetIncluded = true;
564564
break;
@@ -615,7 +615,7 @@ struct BJetTreeCreator {
615615
for (const auto& analysisJet : MCDjets) {
616616

617617
bool jetIncluded = false;
618-
for (const auto jetR : jetRadiiValues) {
618+
for (const auto& jetR : jetRadiiValues) {
619619
if (analysisJet.r() == static_cast<int>(jetR * 100)) {
620620
jetIncluded = true;
621621
break;
@@ -715,7 +715,7 @@ struct BJetTreeCreator {
715715
for (const auto& analysisJet : MCDjets) {
716716

717717
bool jetIncluded = false;
718-
for (const auto jetR : jetRadiiValues) {
718+
for (const auto& jetR : jetRadiiValues) {
719719
if (analysisJet.r() == static_cast<int>(jetR * 100)) {
720720
jetIncluded = true;
721721
break;
@@ -790,7 +790,7 @@ struct BJetTreeCreator {
790790
for (const auto& mcpjet : MCPjets) {
791791

792792
bool jetIncluded = false;
793-
for (const auto jetR : jetRadiiValues) {
793+
for (const auto& jetR : jetRadiiValues) {
794794
if (mcpjet.r() == static_cast<int>(jetR * 100)) {
795795
jetIncluded = true;
796796
break;

0 commit comments

Comments
 (0)