Skip to content

Commit

Permalink
Add TF Boarder cut
Browse files Browse the repository at this point in the history
  • Loading branch information
BongHwi committed Feb 29, 2024
1 parent 7d7fe75 commit d2c6784
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PWGLF/TableProducer/LFResonanceInitializer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ struct reso2initializer {
Configurable<bool> ConfEvtTriggerCheck{"ConfEvtTriggerCheck", false, "Evt sel: check for trigger"};
Configurable<int> ConfEvtTriggerSel{"ConfEvtTriggerSel", 8, "Evt sel: trigger"};
Configurable<bool> ConfEvtOfflineCheck{"ConfEvtOfflineCheck", true, "Evt sel: check for offline selection"};
Configurable<bool> ConfEvtTFBorderCut{"ConfEvtTFBorderCut", false, "Evt sel: apply TF border cut"};

Configurable<std::string> cfgMultName{"cfgMultName", "FT0M", "The name of multiplicity estimator"};

Expand Down Expand Up @@ -847,6 +848,7 @@ struct reso2initializer {
colCuts.setCuts(ConfEvtZvtx, ConfEvtTriggerCheck, ConfEvtTriggerSel, ConfEvtOfflineCheck, true);
}
colCuts.init(&qaRegistry);
colCuts.setApplyTFBorderCut(ConfEvtTFBorderCut);
if (!ConfBypassCCDB) {
ccdb->setURL(ccdburl.value);
ccdb->setCaching(true);
Expand Down
11 changes: 11 additions & 0 deletions PWGLF/Utils/collisionCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "Framework/HistogramRegistry.h"
#include "Framework/Logger.h"
#include "Common/DataModel/EventSelection.h"

using namespace o2::framework;

Expand All @@ -46,6 +47,7 @@ class CollisonCuts
mTrigger = trig;
mCheckOffline = checkOffline;
mCheckIsRun3 = checkRun3;
mApplyTFBorderCut = false;
}

/// Initializes histograms for the task
Expand Down Expand Up @@ -76,6 +78,9 @@ class CollisonCuts
/// Scan the trigger alias of the event
void setInitialTriggerScan(bool checkTrigger) { mInitialTriggerScan = checkTrigger; }

/// Set the time frame border cut
void setApplyTFBorderCut(bool applyTFBorderCut) { mApplyTFBorderCut = applyTFBorderCut; }

/// Check whether the collisions fulfills the specified selections
/// \tparam T type of the collision
/// \param col Collision
Expand All @@ -92,6 +97,11 @@ class CollisonCuts
LOGF(debug, "Offline selection failed (Run3)");
return false;
}
if (!col.selection_bit(aod::evsel::kNoTimeFrameBorder) && mApplyTFBorderCut)
{
LOGF(debug, "Time frame border cut failed");
return false;
}
} else { // Run2 case
if (mCheckOffline && !col.sel7()) {
LOGF(debug, "Offline selection failed (sel7)");
Expand Down Expand Up @@ -148,6 +158,7 @@ class CollisonCuts
bool mCheckOffline = false; ///< Check for offline criteria (might change)
bool mCheckIsRun3 = false; ///< Check if running on Pilot Beam
bool mInitialTriggerScan = false; ///< Check trigger when the event is first selected
bool mApplyTFBorderCut = false; ///< Apply time frame border cut
int mTrigger = kINT7; ///< Trigger to check for
float mZvtxMax = 999.f; ///< Maximal deviation from nominal z-vertex (cm)
};
Expand Down

0 comments on commit d2c6784

Please sign in to comment.