Skip to content

Commit ad50ace

Browse files
authored
Fix issue in DCA cut
1 parent 9840db8 commit ad50ace

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2-
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3-
// All rights not expressly granted are reserved.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright
3+
// holders. All rights not expressly granted are reserved.
44
//
55
// This software is distributed under the terms of the GNU General Public
66
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
77
//
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
11+
///
1212
/// \file trHeAnalysis.cxx
13+
///
1314
/// \brief triton and helion analysis on Run 3 pp data
15+
///
1416
/// \author Esther Bartsch <esther.bartsch@cern.ch>, Goethe University Frankfurt
1517

1618
#include "MetadataHelper.h"
@@ -285,6 +287,7 @@ struct TrHeAnalysis {
285287
Configurable<float> cfgMaxDCAXY{"cfgMaxDCAXY", 10000.f, "Maximum DCA to PV in Z"};
286288
Configurable<float> cfgMinDCAZ{"cfgMinDCAZ", 0.f, "Minimum DCA to PV in XY"};
287289
Configurable<float> cfgMaxDCAZ{"cfgMaxDCAZ", 10000.f, "Maximum DCA to PV in Z"};
290+
Configurable<int> cfgTrackSign{"cfgTrackSign", 0, "1: positive only, -1: negative only, 0: all tracks"};
288291
} trackCuts;
289292

290293
Configurable<LabeledArray<float>> cfgBetheBlochParams{"cfgBetheBlochParams",
@@ -459,6 +462,8 @@ struct TrHeAnalysis {
459462
if (!track.has_mcParticle())
460463
continue;
461464
}
465+
if (track.sign() * trackCuts.cfgTrackSign < 0)
466+
continue;
462467
float rigidity = getRigidity(track);
463468
histos.fill(HIST("PID/histdEdx"), track.sign() * rigidity,
464469
track.tpcSignal());
@@ -584,13 +589,13 @@ struct TrHeAnalysis {
584589
continue;
585590
histCuts.at(species)->Fill(12., pt);
586591

587-
if (track.dcaXY() < trackCuts.cfgMinDCAXY ||
588-
track.dcaXY() > trackCuts.cfgMaxDCAXY)
592+
if (std::abs(track.dcaXY()) < trackCuts.cfgMinDCAXY ||
593+
std::abs(track.dcaXY()) > trackCuts.cfgMaxDCAXY)
589594
continue;
590595
histCuts.at(species)->Fill(13., pt);
591596

592-
if (track.dcaZ() < trackCuts.cfgMinDCAZ ||
593-
track.dcaZ() > trackCuts.cfgMaxDCAZ)
597+
if (std::abs(track.dcaZ()) < trackCuts.cfgMinDCAZ ||
598+
std::abs(track.dcaZ()) > trackCuts.cfgMaxDCAZ)
594599
continue;
595600
histCuts.at(species)->Fill(14., pt);
596601

0 commit comments

Comments
 (0)