Skip to content

Commit 68d918e

Browse files
author
Marta Razza
committed
Required fixes
1 parent 9cdabd1 commit 68d918e

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

PWGHF/D2H/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ o2physics_add_dpl_workflow(task-hidden-charm
170170
COMPONENT_NAME Analysis)
171171

172172
o2physics_add_dpl_workflow(task-h2-from-Lb
173-
SOURCES taskH2fromLb.cxx
173+
SOURCES taskH2FromLb.cxx
174174
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
175175
COMPONENT_NAME Analysis)
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ struct H2fromLb {
7575
Configurable<float> cfgTOFNsigma_min{"cfgTOFNsigma_min", 3.0f, "TOF n sigma min for deuteron PID"};
7676
Configurable<float> cfgTOFNsigma_max{"cfgTOFNsigma_max", 4.0f, "TOF n sigma max for deuteron PID"};
7777
Configurable<float> ptThresholdPid{"ptThresholdPid", 1.0f, "pT threshold to switch between 4 and 3 sigmas for TOF PID"};
78+
Configurable<float> rapidityCut{"rapidityCut", 0.5f, "Rapidity cut"};
7879
// PDG codes
7980
Configurable<int> pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"};
8081
Configurable<int> pdgCodeDaughter{"pdgCodeDaughter", -1000010020, "PDG code of the daughter particle (default: anti-deuteron)"};
@@ -262,13 +263,13 @@ struct H2fromLb {
262263

263264
auto mcParticle = track.mcParticle();
264265
if (mcParticle.pdgCode() == pdgCodeDaughter) {
265-
if (std::abs(mcParticle.y()) > 0.5) {
266+
if (std::abs(mcParticle.y()) > rapidityCut) {
266267
continue;
267268
}
268269
if (mcParticle.isPhysicalPrimary()) {
269270
bool isFromLb = false;
270271
if (separateAntideuterons) {
271-
for (auto& mom : mcParticle.mothers_as<o2::aod::McParticles>()) {
272+
for (const auto& mom : mcParticle.mothers_as<o2::aod::McParticles>()) {
272273
if (mom.pdgCode() == pdgCodeMother) { // Lambda_b
273274
isFromLb = true;
274275

@@ -294,18 +295,18 @@ struct H2fromLb {
294295
hProcessedEvents->Fill(0.5);
295296
for (const auto& mcParticle : mcParticles) {
296297
if (mcParticle.pdgCode() == pdgCodeMother) {
297-
if (std::abs(mcParticle.y()) <= 0.5) {
298+
if (std::abs(mcParticle.y()) <= rapidityCut) {
298299
QAHistos.fill(HIST("ptGeneratedLb"), mcParticle.pt()); // rinominato
299300
}
300301
}
301302

302303
if (mcParticle.pdgCode() == pdgCodeDaughter) {
303-
if (std::abs(mcParticle.y()) > 0.5)
304+
if (std::abs(mcParticle.y()) > rapidityCut)
304305
continue;
305306

306307
bool isFromLb = false;
307308
if (mcParticle.has_mothers()) {
308-
for (auto& mom : mcParticle.mothers_as<o2::aod::McParticles>()) {
309+
for (const auto& mom : mcParticle.mothers_as<o2::aod::McParticles>()) {
309310
if (mom.pdgCode() == pdgCodeMother) {
310311
isFromLb = true;
311312
break;
@@ -327,5 +328,5 @@ struct H2fromLb {
327328
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
328329
{
329330
return WorkflowSpec{
330-
adaptAnalysisTask<H2fromLb>(cfgc, TaskName{"task-h2-from-Lb"})};
331+
adaptAnalysisTask<H2fromLb>(cfgc)};
331332
}

0 commit comments

Comments
 (0)