Project
Loading...
Searching...
No Matches
TrackCuts.cxx
Go to the documentation of this file.
1// 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.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include <fairlogger/Logger.h>
13
16
18
19using namespace o2::tpc;
20
21TrackCuts::TrackCuts(float PMin, float PMax, float NClusMin, float dEdxMin, float dEdxMax)
22 : mPMin(PMin),
23 mPMax(PMax),
24 mNClusMin(NClusMin),
25 mdEdxMin(dEdxMin),
26 mdEdxMax(dEdxMax)
27{
28}
29
30//______________________________________________________________________________
32{
33 const auto p = track.getP();
34 const auto nClusters = track.getNClusterReferences();
35 const auto dEdx = track.getdEdx().dEdxTotTPC;
36
37 if (p > mPMax) {
38 return false;
39 }
40 if (p < mPMin) {
41 return false;
42 }
43 if (nClusters < mNClusMin) {
44 return false;
45 }
46 if (dEdx > mdEdxMax) {
47 return false;
48 }
49 if (dEdx < mdEdxMin) {
50 return false;
51 }
52 if ((std::abs(track.getOuterParam().getZ()) - std::abs(track.getZ())) < -10) {
53 return false;
54 }
55 return true;
56}
ClassImp(o2::tpc::TrackCuts)
int nClusters
track cut class
Definition TrackCuts.h:37
bool goodTrack(o2::tpc::TrackTPC const &track)
Definition TrackCuts.cxx:31
Global TPC definitions and constants.
Definition SimTraits.h:167