forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpairCleaner.h
More file actions
76 lines (67 loc) · 2.2 KB
/
pairCleaner.h
File metadata and controls
76 lines (67 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file pairCleaner.h
/// \brief pair cleaner class
/// \author anton.riedel@tum.de, TU München, anton.riedel@tum.de
#ifndef PWGCF_FEMTO_CORE_PAIRCLEANER_H_
#define PWGCF_FEMTO_CORE_PAIRCLEANER_H_
namespace o2::analysis::femto
{
namespace paircleaner
{
class BasePairCleaner
{
public:
BasePairCleaner() = default;
virtual ~BasePairCleaner() = default;
protected:
template <typename T1, typename T2>
bool isCleanTrackPair(const T1& track1, const T2& track2) const
{
return track1.globalIndex() != track2.globalIndex();
};
};
class TrackTrackPairCleaner : public BasePairCleaner
{
public:
TrackTrackPairCleaner() = default;
template <typename T>
bool isCleanPair(const T& track1, const T& track2) const
{
return this->isCleanTrackPair(track1, track2);
}
};
class TrackV0PairCleaner : public BasePairCleaner
{
public:
TrackV0PairCleaner() = default;
template <typename T1, typename T2, typename T3>
bool isCleanPair(const T1& track, const T2& v0, const T3& /*trackTable */) const
{
auto posDaughter = v0.template posDau_as<T3>();
auto negDaughter = v0.template negDau_as<T3>();
return this->isCleanTrackPair(posDaughter, track) && this->isCleanTrackPair(negDaughter, track);
}
};
class TrackKinkPairCleaner : public BasePairCleaner
{
public:
TrackKinkPairCleaner() = default;
template <typename T1, typename T2, typename T3>
bool isCleanPair(const T1& track, const T2& kink, const T3& /*trackTable */) const
{
auto chaDaughter = kink.template chaDau_as<T3>();
return this->isCleanTrackPair(chaDaughter, track);
}
};
} // namespace paircleaner
} // namespace o2::analysis::femto
#endif // PWGCF_FEMTO_CORE_PAIRCLEANER_H_