11#include "EventComplexCut.h"
14#include "TrackComplexCut.h"
16#include "TwoTrackComplexCut.h"
17#include "TwoTrackCut.h"
21 std::vector<Int_t> GetCollectionsFlags(Int_t startCol, TString option) {
22 std::vector<Int_t> res;
24 if (!Hal::Std::FindExpressionSingleValue(option, single, kTRUE)) { single = startCol; }
26 if (Hal::Std::FindExpressionTwoValues(option, n, jump, kTRUE)) {
27 for (
int i = 0; i < n; i++) {
28 res.push_back(single);
33 res.push_back(single);
39 Hal::Cut* MakeCutCopy(
const Hal::Cut& cut, TString flag, Bool_t acceptNulls) {
43 case ECutUpdate::kEvent: {
44 return new EventRealCut(
static_cast<const EventCut&
>(cut));
46 case ECutUpdate::kTrack: {
47 return new TrackRealCut(
static_cast<const TrackCut&
>(cut));
49 case ECutUpdate::kTwoTrack: {
50 return new TwoTrackRealCut(
static_cast<const TwoTrackCut&
>(cut));
52 case ECutUpdate::kTwoTrackBackground: {
53 return new TwoTrackRealCut(
static_cast<const TwoTrackCut&
>(cut));
55 default:
return nullptr;
break;
60 case ECutUpdate::kEvent: {
61 auto tempcut =
new EventImaginaryCut(
static_cast<const EventCut&
>(cut));
62 if (acceptNulls)
static_cast<EventImaginaryCut*
>(tempcut)->AcceptNulls(kTRUE);
65 case ECutUpdate::kTrack: {
66 auto tempcut =
new TrackImaginaryCut(
static_cast<const TrackCut&
>(cut));
67 if (acceptNulls)
static_cast<TrackImaginaryCut*
>(tempcut)->AcceptNulls(kTRUE);
70 case ECutUpdate::kTwoTrack: {
71 auto tempcut =
new TwoTrackImaginaryCut(
static_cast<const TwoTrackCut&
>(cut));
72 if (acceptNulls)
static_cast<TwoTrackImaginaryCut*
>(tempcut)->AcceptNulls(kTRUE);
75 case ECutUpdate::kTwoTrackBackground: {
76 auto tempcut =
new TwoTrackImaginaryCut(
static_cast<const TwoTrackCut&
>(cut));
77 if (acceptNulls)
static_cast<TwoTrackImaginaryCut*
>(tempcut)->AcceptNulls(kTRUE);
80 default:
return nullptr;
break;
85 TString GetCutUpdateRatioName(ECutUpdate upd) {
86 TString update_ratio_name;
88 case ECutUpdate::kEvent: update_ratio_name =
"event";
break;
89 case ECutUpdate::kTrack: update_ratio_name =
"track";
break;
90 case ECutUpdate::kTwoTrack: update_ratio_name =
"two_track";
break;
91 case ECutUpdate::kTwoTrackBackground: update_ratio_name =
"two_track<background>";
break;
94 update_ratio_name =
"unknown";
97 return update_ratio_name;
static void PrintInfo(TString text, Hal::EInfo status)
ECutUpdate GetUpdateRatio() const