Skip to content

Commit 9794920

Browse files
committed
merged conflicts resolved
1 parent 4498e22 commit 9794920

1 file changed

Lines changed: 46 additions & 26 deletions

File tree

‎PWGLF/Tasks/Resonances/kstarqa.cxx‎

Lines changed: 46 additions & 26 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-
rEventSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}});
228-
std::shared_ptr<TH1> hTrackSelection = rEventSelection.get<TH1>(HIST("hTrackCut"));
227+
rTrackSelection.add("hTrackCut", "No. of tracks after cuts", kTH1D, {{20, 0, 20}});
228+
std::shared_ptr<TH1> hTrackSelection = rTrackSelection.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),
253-
std::string("|#eta| < ") + std::to_string(configGp.cfgCutEtaMax),
252+
std::string("pT > ") + std::to_string(configGp.cfgCutPT.value),
253+
std::string("|#eta| < ") + std::to_string(configGp.cfgCutEtaMax.value),
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,24 +506,27 @@ struct Kstarqa {
506506
template <typename T>
507507
bool selectionTrack(const T& candidate)
508508
{
509-
510-
rEventSelection.fill(HIST("hTrackCut"), 0);
509+
if (fillHist)
510+
rEventSelection.fill(HIST("hTrackCut"), 0);
511511

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

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

518519
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
519520
return false;
520521

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

523525
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
524526
return false;
525527

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

528531
if (!configGp.isApplyPtDepDCACut) {
529532
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
@@ -534,7 +537,8 @@ struct Kstarqa {
534537
return false;
535538
}
536539

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

539543
if (!configGp.isApplyPtDepDCACut) {
540544
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
@@ -544,22 +548,26 @@ struct Kstarqa {
544548
return false;
545549
}
546550

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

549554
if (candidate.itsNCls() < configGp.cfgITScluster)
550555
return false;
551556

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

554560
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
555561
return false;
556562

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

559566
if (configGp.hasITS && !candidate.hasITS())
560567
return false;
561568

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

564572
if (configGp.isITSTPCRefit) {
565573
if (!(candidate.flags() & o2::aod::track::ITSrefit) ||
@@ -568,31 +576,37 @@ struct Kstarqa {
568576
}
569577
}
570578

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

573582
if (configGp.cfgPVContributor && !candidate.isPVContributor())
574583
return false;
575584

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

578588
} else if (!configGp.isGlobalTracks) {
579589

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

582593
if (!candidate.isGlobalTrackWoDCA())
583594
return false;
584595

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

587599
if (std::abs(candidate.pt()) < configGp.cfgCutPT)
588600
return false;
589601

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

592605
if (std::abs(candidate.eta()) > configGp.cfgCutEtaMax)
593606
return false;
594607

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

597611
if (!configGp.isApplyPtDepDCACut) {
598612
if (std::abs(candidate.dcaXY()) > configGp.cfgCutDCAxyMax)
@@ -603,7 +617,8 @@ struct Kstarqa {
603617
return false;
604618
}
605619

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

608623
if (!configGp.isApplyPtDepDCACut) {
609624
if (std::abs(candidate.dcaZ()) > configGp.cfgCutDCAz)
@@ -613,20 +628,23 @@ struct Kstarqa {
613628
return false;
614629
}
615630

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

618634
if (candidate.itsNCls() < configGp.cfgITScluster)
619635
return false;
620636

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

623640
if (candidate.tpcNClsFound() < configGp.cfgTPCcluster)
624641
return false;
625642

626643
if (configGp.hasITS && !candidate.hasITS())
627644
return false;
628645

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

631649
if (configGp.isITSTPCRefit) {
632650
if (!(candidate.flags() & o2::aod::track::ITSrefit) ||
@@ -635,12 +653,14 @@ struct Kstarqa {
635653
}
636654
}
637655

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

640659
if (configGp.cfgPVContributor && !candidate.isPVContributor())
641660
return false;
642661

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

646666
return true;

0 commit comments

Comments
 (0)