Skip to content

Commit 4dafc11

Browse files
committed
adding TOF and TPC circular cut
1 parent 5f0de8f commit 4dafc11

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

PWGLF/Tasks/Resonances/k892analysispbpb.cxx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ struct K892analysispbpb {
114114
Configurable<bool> cTPClowpt{"cTPClowpt", true, "apply TPC at low pt"};
115115
Configurable<bool> cTOFonlyHighpt{"cTOFonlyHighpt", false, "apply TOF only at high pt"};
116116
Configurable<bool> cTOFandTPCHighpt{"cTOFandTPCHighpt", false, "apply TOF and TPC at high pt"};
117-
117+
Configurable<bool> circularCut{"circularCut", false, "apply TOF and TPC circular cut (applied only if cTOFandTPCHighpt is true)"};
118+
118119
// rotational bkg
119120
Configurable<int> cfgNoRotations{"cfgNoRotations", 3, "Number of rotations per pair for rotbkg"};
120121
Configurable<int> rotationalCut{"rotationalCut", 10, "Cut value (Rotation angle pi - pi/cut and pi + pi/cut)"};
@@ -409,10 +410,17 @@ struct K892analysispbpb {
409410

410411
} else if (cTOFandTPCHighpt) {
411412

412-
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaKa()) <= cMaxTOFnSigmaKaon && candidate.hasTPC() && std::abs(candidate.tpcNSigmaKa()) <= cMaxTPCnSigmaKaon) { // tof and tpc cut
413-
return true;
414-
}
413+
if(circularCut) {
414+
415+
if (candidate.hasTOF() && candidate.hasTPC() && std::sqrt( std::pow(candidate.tpcNSigmaKa(),2) + std::pow(candidate.tofNSigmaKa(),2) ) <= cMaxTPCnSigmaKaon) // tof and tpc circular cut
416+
return true;
417+
418+
} else {
415419

420+
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaKa()) <= cMaxTOFnSigmaKaon && candidate.hasTPC() && std::abs(candidate.tpcNSigmaKa()) <= cMaxTPCnSigmaKaon) // tof and tpc cut
421+
return true;
422+
423+
}
416424
} else {
417425

418426
if (candidate.hasTPC() && std::abs(candidate.tpcNSigmaKa()) <= cMaxTPCnSigmaKaon) { // tpc cut, tof when available
@@ -447,8 +455,15 @@ struct K892analysispbpb {
447455

448456
} else if (cTOFandTPCHighpt) {
449457

450-
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPi()) <= cMaxTOFnSigmaPion && candidate.hasTPC() && std::abs(candidate.tpcNSigmaPi()) <= cMaxTPCnSigmaPion) { // tof and tpc cut
451-
return true;
458+
if(circularCut) {
459+
460+
if (candidate.hasTOF() && candidate.hasTPC() && std::sqrt( std::pow(candidate.tpcNSigmaPi(),2) + std::pow(candidate.tofNSigmaPi(),2) ) <= cMaxTPCnSigmaPion) // tof and tpc circular cut
461+
return true;
462+
463+
} else {
464+
465+
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPi()) <= cMaxTOFnSigmaPion && candidate.hasTPC() && std::abs(candidate.tpcNSigmaPi()) <= cMaxTPCnSigmaPion) // tof and tpc cut
466+
return true;
452467
}
453468

454469
} else {

0 commit comments

Comments
 (0)