Skip to content

Commit 7457864

Browse files
committed
fixed errors
1 parent ec74487 commit 7457864

1 file changed

Lines changed: 26 additions & 46 deletions

File tree

PWGLF/Tasks/Resonances/kstarqa.cxx

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ struct Kstarqa {
224224

225225
rEventSelection.add("hEventCut", "No. of event after cuts", kTH1D, {{20, 0, 20}});
226226
std::shared_ptr<TH1> hEventSelection = rEventSelection.get<TH1>(HIST("hEventCut"));
227-
rTrackSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}});
228-
std::shared_ptr<TH1> hTrackSelection = rTrackSelection.get<TH1>(HIST("hTrackCut"));
227+
rEventSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}});
228+
std::shared_ptr<TH1> hTrackSelection = rEventSelection.get<TH1>(HIST("hTrackCut"));
229229

230230
auto check = [](bool enabled) { return enabled ? "" : " #otimes"; }; // check if a cut is enabled and put #otimes beside that label if not enabled
231231

@@ -249,8 +249,8 @@ struct Kstarqa {
249249
std::vector<std::string> trackCutLabels = {
250250
"All Tracks",
251251
std::string("GlobalTracks") + check(configGp.isGlobalTracks.value),
252-
std::string("pT > ") + std::to_string(configGp.cfgCutPT.value),
253-
std::string("|#eta| < ") + std::to_string(configGp.cfgCutEtaMax.value),
252+
std::string("pT > ") + std::to_string(configGp.cfgCutPT),
253+
std::string("|#eta| < ") + std::to_string(configGp.cfgCutEtaMax),
254254
std::string("DCAxy < ") + std::to_string(configGp.cfgCutDCAxyMax.value) + check(!configGp.isApplyPtDepDCACut.value),
255255
std::string("DCAz < ") + std::to_string(configGp.cfgCutDCAz.value),
256256
std::string("ITS clusters > ") + std::to_string(configGp.cfgITScluster.value),
@@ -506,27 +506,24 @@ struct Kstarqa {
506506
template <typename T>
507507
bool selectionTrack(const T& candidate)
508508
{
509-
if (fillHist)
510-
rEventSelection.fill(HIST("hTrackCut"), 0);
509+
510+
rEventSelection.fill(HIST("hTrackCut"), 0);
511511

512512
if (configGp.isGlobalTracks) {
513513
if (!candidate.isGlobalTrack())
514514
return false;
515515

516-
if (fillHist)
517-
rEventSelection.fill(HIST("hTrackCut"), 1);
516+
rEventSelection.fill(HIST("hTrackCut"), 1);
518517

519518
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
520519
return false;
521520

522-
if (fillHist)
523-
rEventSelection.fill(HIST("hTrackCut"), 2);
521+
rEventSelection.fill(HIST("hTrackCut"), 2);
524522

525523
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
526524
return false;
527525

528-
if (fillHist)
529-
rEventSelection.fill(HIST("hTrackCut"), 3);
526+
rEventSelection.fill(HIST("hTrackCut"), 3);
530527

531528
if (!configGp.isApplyPtDepDCACut) {
532529
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
@@ -537,8 +534,7 @@ struct Kstarqa {
537534
return false;
538535
}
539536

540-
if (fillHist)
541-
rEventSelection.fill(HIST("hTrackCut"), 4);
537+
rEventSelection.fill(HIST("hTrackCut"), 4);
542538

543539
if (!configGp.isApplyPtDepDCACut) {
544540
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
@@ -548,26 +544,22 @@ struct Kstarqa {
548544
return false;
549545
}
550546

551-
if (fillHist)
552-
rEventSelection.fill(HIST("hTrackCut"), 5);
547+
rEventSelection.fill(HIST("hTrackCut"), 5);
553548

554549
if (candidate.itsNCls() < configGp.cfgITScluster)
555550
return false;
556551

557-
if (fillHist)
558-
rEventSelection.fill(HIST("hTrackCut"), 6);
552+
rEventSelection.fill(HIST("hTrackCut"), 6);
559553

560554
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
561555
return false;
562556

563-
if (fillHist)
564-
rEventSelection.fill(HIST("hTrackCut"), 7);
557+
rEventSelection.fill(HIST("hTrackCut"), 7);
565558

566559
if (configGp.hasITS && !candidate.hasITS())
567560
return false;
568561

569-
if (fillHist)
570-
rEventSelection.fill(HIST("hTrackCut"), 8);
562+
rEventSelection.fill(HIST("hTrackCut"), 8);
571563

572564
if (configGp.isITSTPCRefit) {
573565
if (!(candidate.flags() & o2::aod::track::ITSrefit) ||
@@ -576,37 +568,31 @@ struct Kstarqa {
576568
}
577569
}
578570

579-
if (fillHist)
580-
rEventSelection.fill(HIST("hTrackCut"), 9);
571+
rEventSelection.fill(HIST("hTrackCut"), 9);
581572

582573
if (configGp.cfgPVContributor && !candidate.isPVContributor())
583574
return false;
584575

585-
if (fillHist)
586-
rEventSelection.fill(HIST("hTrackCut"), 10);
576+
rEventSelection.fill(HIST("hTrackCut"), 10);
587577

588578
} else if (!configGp.isGlobalTracks) {
589579

590-
if (fillHist)
591-
rEventSelection.fill(HIST("hTrackCut"), 0);
580+
rEventSelection.fill(HIST("hTrackCut"), 0);
592581

593582
if (!candidate.isGlobalTrackWoDCA())
594583
return false;
595584

596-
if (fillHist)
597-
rEventSelection.fill(HIST("hTrackCut"), 1);
585+
rEventSelection.fill(HIST("hTrackCut"), 1);
598586

599587
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
600588
return false;
601589

602-
if (fillHist)
603-
rEventSelection.fill(HIST("hTrackCut"), 2);
590+
rEventSelection.fill(HIST("hTrackCut"), 2);
604591

605592
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
606593
return false;
607594

608-
if (fillHist)
609-
rEventSelection.fill(HIST("hTrackCut"), 3);
595+
rEventSelection.fill(HIST("hTrackCut"), 3);
610596

611597
if (!configGp.isApplyPtDepDCACut) {
612598
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
@@ -617,8 +603,7 @@ struct Kstarqa {
617603
return false;
618604
}
619605

620-
if (fillHist)
621-
rEventSelection.fill(HIST("hTrackCut"), 4);
606+
rEventSelection.fill(HIST("hTrackCut"), 4);
622607

623608
if (!configGp.isApplyPtDepDCACut) {
624609
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
@@ -628,23 +613,20 @@ struct Kstarqa {
628613
return false;
629614
}
630615

631-
if (fillHist)
632-
rEventSelection.fill(HIST("hTrackCut"), 5);
616+
rEventSelection.fill(HIST("hTrackCut"), 5);
633617

634618
if (candidate.itsNCls() < configGp.cfgITScluster)
635619
return false;
636620

637-
if (fillHist)
638-
rEventSelection.fill(HIST("hTrackCut"), 6);
621+
rEventSelection.fill(HIST("hTrackCut"), 6);
639622

640623
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
641624
return false;
642625

643626
if (configGp.hasITS && !candidate.hasITS())
644627
return false;
645628

646-
if (fillHist)
647-
rEventSelection.fill(HIST("hTrackCut"), 7);
629+
rEventSelection.fill(HIST("hTrackCut"), 7);
648630

649631
if (configGp.isITSTPCRefit) {
650632
if (!(candidate.flags() & o2::aod::track::ITSrefit) ||
@@ -653,14 +635,12 @@ struct Kstarqa {
653635
}
654636
}
655637

656-
if (fillHist)
657-
rEventSelection.fill(HIST("hTrackCut"), 8);
638+
rEventSelection.fill(HIST("hTrackCut"), 8);
658639

659640
if (configGp.cfgPVContributor && !candidate.isPVContributor())
660641
return false;
661642

662-
if (fillHist)
663-
rEventSelection.fill(HIST("hTrackCut"), 9);
643+
rEventSelection.fill(HIST("hTrackCut"), 9);
664644
}
665645

666646
return true;

0 commit comments

Comments
 (0)