Skip to content

Commit 9e3fe6b

Browse files
authored
[PWGLF] Updated with new centrality estimators (#9945)
1 parent 25b1cbe commit 9e3fe6b

File tree

2 files changed

+866
-691
lines changed

2 files changed

+866
-691
lines changed

PWGMM/Mult/Core/include/Functions.h

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,46 @@ concept iterator_with_FT0C = requires(IC const& c) {
4646
c.centFT0C();
4747
};
4848

49+
template <typename C>
50+
concept has_centFT0CVariant1 = requires(C::iterator const& c) {
51+
c.centFT0CVariant1();
52+
};
53+
4954
template <typename IC>
50-
concept iterator_with_FT0M = requires(IC const& c) {
51-
c.centFT0M();
55+
concept iterator_with_centFT0CVariant1 = requires(IC const& c) {
56+
c.centFT0CVariant1();
5257
};
5358

5459
template <typename C>
5560
concept has_FT0M = requires(C::iterator const& c) {
5661
c.centFT0M();
5762
};
5863

64+
template <typename IC>
65+
concept iterator_with_FT0M = requires(IC const& c) {
66+
c.centFT0M();
67+
};
68+
69+
template <typename C>
70+
concept has_centNGlobal = requires(C::iterator const& c) {
71+
c.centNGlobal();
72+
};
73+
74+
template <typename IC>
75+
concept iterator_with_centNGlobal = requires(IC const& c) {
76+
c.centNGlobal();
77+
};
78+
79+
template <typename C>
80+
concept has_centMFT = requires(C::iterator const& c) {
81+
c.centMFT();
82+
};
83+
84+
template <typename IC>
85+
concept iterator_with_centMFT = requires(IC const& c) {
86+
c.centMFT();
87+
};
88+
5989
template <typename C>
6090
concept has_genFT0C = requires(C::iterator const& c) {
6191
c.gencentFT0C();
@@ -77,7 +107,7 @@ concept iterator_with_genFT0M = requires(C const& c) {
77107
};
78108

79109
template <typename C>
80-
concept has_reco_cent = has_FT0C<C> || has_FT0M<C>;
110+
concept has_reco_cent = has_FT0C<C> || has_centFT0CVariant1<C> || has_FT0M<C> || has_centNGlobal<C> || has_centMFT<C>;
81111

82112
template <typename C>
83113
concept has_gen_cent = has_genFT0C<C> && has_genFT0M<C>;
@@ -93,7 +123,7 @@ concept iterator_with_Centrality = requires(MCC const& mcc) {
93123
};
94124

95125
template <typename C>
96-
requires(!(iterator_with_FT0C<C> || iterator_with_FT0M<C>))
126+
requires(!(iterator_with_FT0C<C> || iterator_with_centFT0CVariant1<C> || iterator_with_FT0M<C> || iterator_with_centNGlobal<C> || iterator_with_centMFT<C>))
97127
static float getRecoCent(C const&)
98128
{
99129
return -1;
@@ -105,12 +135,30 @@ static float getRecoCent(C const& collision)
105135
return collision.centFT0C();
106136
}
107137

138+
template <iterator_with_centFT0CVariant1 C>
139+
static float getRecoCent(C const& collision)
140+
{
141+
return collision.centFT0CVariant1();
142+
}
143+
108144
template <iterator_with_FT0M C>
109145
static float getRecoCent(C const& collision)
110146
{
111147
return collision.centFT0M();
112148
}
113149

150+
template <iterator_with_centNGlobal C>
151+
static float getRecoCent(C const& collision)
152+
{
153+
return collision.centNGlobal();
154+
}
155+
156+
template <iterator_with_centMFT C>
157+
static float getRecoCent(C const& collision)
158+
{
159+
return collision.centMFT();
160+
}
161+
114162
template <typename MCC>
115163
requires(!iterator_with_genFT0C<MCC>)
116164
static float getGenCentFT0C(MCC const&)

0 commit comments

Comments
 (0)