You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (std::abs(event[iPart].y()) >1.) // skip particles with y > 1
87
86
{
88
87
continue;
89
88
}
90
-
if (event[iPart].id()==2212*sign)
89
+
switch (std::abs(event[iPart].id()))
91
90
{
92
-
protons.push_back(iPart);
93
-
}
94
-
elseif (event[iPart].id() ==2112*sign)
95
-
{
96
-
neutrons.push_back(iPart);
97
-
}
98
-
elseif (event[iPart].id() ==3122*sign)
99
-
{
100
-
lambdas.push_back(iPart);
91
+
case2212:
92
+
protons[event[iPart].id() >0].push_back(iPart);
93
+
break;
94
+
case2112:
95
+
neutrons[event[iPart].id() >0].push_back(iPart);
96
+
break;
97
+
case3122:
98
+
lambdas[event[iPart].id() >0].push_back(iPart);
99
+
break;
100
+
default:
101
+
break;
101
102
}
102
103
}
103
-
doublecoalescenceRadius{0.5*1.122462*mCoalMomentum}; /// 1.122462 [2^(1/6)] from PRL 126, 101101 (2021), only for 3 body coalescence
104
-
if (protons.size() <2||neutrons.size() <1) // at least 2 protons and 1 neutron
105
-
{
106
-
return false;
107
-
}
108
-
for (uint32_ti{0}; i<protons.size(); ++i)
109
-
{
110
-
for (uint32_tj{i+1}; j<protons.size(); ++j)
104
+
constdoublecoalescenceRadius{0.5*1.122462*mCoalMomentum}; /// 1.122462 [2^(1/6)] from PRL 126, 101101 (2021), only for 3 body coalescence
105
+
106
+
auto coalescence= [&](intiC, intpdgCode, floatmass, intiD1, intiD2, intiD3) {
107
+
auto p1=event[iD1].p();
108
+
auto p2=event[iD2].p();
109
+
auto p3=event[iD3].p();
110
+
auto p=p1+p2+p3;
111
+
p1.bstback(p);
112
+
p2.bstback(p);
113
+
p3.bstback(p);
114
+
115
+
if (p1.pAbs() <= coalescenceRadius&&p2.pAbs() <= coalescenceRadius&&p3.pAbs() <= coalescenceRadius)
111
116
{
112
-
for (uint32_tk{0}; k<neutrons.size(); ++k)
113
-
{
114
-
auto p1=event[protons[i]].p();
115
-
auto p2=event[protons[j]].p();
116
-
auto p3=event[neutrons[k]].p();
117
-
auto p=p1+p2+p3;
118
-
p1.bstback(p);
119
-
p2.bstback(p);
120
-
p3.bstback(p);
117
+
p.e(std::hypot(p.pAbs(), mass));
118
+
/// In order to avoid the transport of the mother particles, but to still keep them in the stack, we set the status to negative and we mark the nucleus status as 94 (decay product)
if (p1.pAbs() <= coalescenceRadius&&p2.pAbs() <= coalescenceRadius&&p3.pAbs() <= coalescenceRadius)
123
-
{
124
-
p.e(std::hypot(p.pAbs(), 2.80839160743));
125
-
/// In order to avoid the transport of the mother particles, but to still keep them in the stack, we set the status to negative and we mark the nucleus status as 94 (decay product)
0 commit comments