Skip to content

Commit 59bca4f

Browse files
vojmachVojtech Machacek
andauthored
[PWGCF] RCTflag fix + addition to flowMC (#16221)
Co-authored-by: Vojtech Machacek <vmachacek@Vojtechs-MacBook-Pro-3.local>
1 parent b2fc38e commit 59bca4f

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "PWGMM/Mult/DataModel/Index.h" // for Particles2Tracks table
2121

2222
#include "Common/CCDB/EventSelectionParams.h"
23+
#include "Common/CCDB/RCTSelectionFlags.h"
2324
#include "Common/Core/RecoDecay.h"
2425
#include "Common/Core/TrackSelection.h"
2526
#include "Common/Core/TrackSelectionDefaults.h"
@@ -63,6 +64,7 @@
6364
using namespace o2;
6465
using namespace o2::framework;
6566
using namespace o2::framework::expressions;
67+
using namespace o2::aod::rctsel;
6668

6769
#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};
6870

@@ -113,6 +115,7 @@ struct FlowMc {
113115
O2_DEFINE_CONFIGURABLE(cfgRecoEvSelkNoCollInTimeRangeStandard, bool, false, "no collisions in specified time range")
114116
O2_DEFINE_CONFIGURABLE(cfgRecoEvSelkNoCollInRofStandard, bool, false, "no other collisions in this Readout Frame with per-collision multiplicity above threshold")
115117
O2_DEFINE_CONFIGURABLE(cfgRecoEvSelkNoHighMultCollInPrevRof, bool, false, "veto an event if FT0C amplitude in previous ITS ROF is above threshold")
118+
O2_DEFINE_CONFIGURABLE(cfgEvSelRCTflags, std::string, "", "keep empty to disable, usage: 'CentralBarrelTracking', 'CBT_hadronPID' ")
116119

117120
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.6003720411, 0.6152630970, 0.6288860646, 0.6360694031, 0.6409494798, 0.6450540203, 0.6482117301, 0.6512592056, 0.6640008690, 0.6862631416, 0.7005738691, 0.7106567432, 0.7170728333}, "parameter 0 for track density efficiency correction"};
118121
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-1.007592e-05, -8.932635e-06, -9.114538e-06, -1.054818e-05, -1.220212e-05, -1.312304e-05, -1.376433e-05, -1.412813e-05, -1.289562e-05, -1.050065e-05, -8.635725e-06, -7.380821e-06, -6.201250e-06}, "parameter 1 for track density efficiency correction"};
@@ -177,6 +180,8 @@ struct FlowMc {
177180
TRandom3* fRndm = new TRandom3(0);
178181
double epsilon = 1e-6;
179182

183+
RCTFlagsChecker rctChecker{"CBT"};
184+
180185
void init(InitContext&)
181186
{
182187
ccdb->setURL(ccdbUrl.value);
@@ -338,6 +343,9 @@ struct FlowMc {
338343
funcV4 = new TF1("funcV4", "[0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x", 0, 100);
339344
funcV4->SetParameters(0.008845, 0.000259668, -3.24435e-06, 4.54837e-08, -6.01825e-10);
340345
}
346+
if (!cfgEvSelRCTflags.value.empty()) {
347+
rctChecker.init(cfgEvSelRCTflags.value.c_str()); // override initialzation
348+
}
341349
}
342350

343351
void loadCorrections(uint64_t timestamp)
@@ -435,6 +443,8 @@ struct FlowMc {
435443
if (cfgRecoEvSel8 && !collision.sel8()) {
436444
return 0;
437445
}
446+
if (!cfgEvSelRCTflags.value.empty() && !rctChecker(*collision))
447+
return 0;
438448
if (cfgRecoEvkNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) {
439449
// rejects collisions which are associated with the same "found-by-T0" bunch crossing
440450
// https://indico.cern.ch/event/1396220/#1-event-selection-with-its-rof

PWGCF/Flow/Tasks/flowTask.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ struct FlowTask {
323323
std::unordered_map<int, TH2*> gHadronicRate;
324324
ctpRateFetcher mRateFetcher;
325325
TH2* gCurrentHadronicRate;
326-
RCTFlagsChecker rctChecker{"CentralBarrelTracking"};
326+
RCTFlagsChecker rctChecker{"CBT"};
327327

328328
// phi-EP correction
329329
std::vector<TF1*> funcEff;
@@ -759,7 +759,7 @@ struct FlowTask {
759759
LOGF(info, "DCAz pt-dependence function for Nch: %s", Form("%0.1f * %s", cfgTrackCuts->getData()[kDCAzNSigma][kTrCutNch], cfgFuncParas.cfgDCAzFunc->c_str()));
760760
}
761761
if (!cfgEvSelRCTflags.value.empty()) {
762-
rctChecker.init(cfgEvSelRCTflags.value.c_str(), true); // override initialzation
762+
rctChecker.init(cfgEvSelRCTflags.value.c_str()); // override initialzation
763763
}
764764
}
765765

0 commit comments

Comments
 (0)