8 for (
const auto& vec : inputVectors) {
18 : inputVectors_(inputVectors), eigenVectors_(3, 3) {
27 for (
const auto& vec : inputVectors) {
38 for (
const auto& vec : inputVectors) {
51 double phi = 0, eIn = -1., eOut = -1.;
55 double cosphi = TMath::Cos(
phi);
56 double sinphi = TMath::Sin(
phi);
59 sum +=
TMath::Abs(cosphi * vec.x() + sinphi * vec.y());
61 if (eOut < 0. || sum < eOut)
63 if (eIn < 0. || sum > eIn)
66 return (eIn - eOut) / eIn;
75 area += TMath::Sqrt(vec.x() * vec.x() + vec.y() * vec.y());
79 double sum = 0,
tmp = 0.;
80 double cosphi = TMath::Cos(
phi);
81 double sinphi = TMath::Sin(
phi);
83 sum +=
TMath::Abs(cosphi * vec.x() + sinphi * vec.y());
114 TMatrixDSym momentumTensor(3);
115 momentumTensor.Zero();
120 double p2 = vec.Dot(vec);
121 double pR = (
r_ == 2.) ?
p2 : TMath::Power(
p2, 0.5 *
r_);
123 double pRminus2 = (
r_ == 2.) ? 1. : TMath::Power(
p2, 0.5 *
r_ - 1.);
124 momentumTensor(0, 0) += pRminus2 * vec.x() * vec.x();
125 momentumTensor(0, 1) += pRminus2 * vec.x() * vec.y();
126 momentumTensor(0, 2) += pRminus2 * vec.x() * vec.z();
127 momentumTensor(1, 0) += pRminus2 * vec.y() * vec.x();
128 momentumTensor(1, 1) += pRminus2 * vec.y() * vec.y();
129 momentumTensor(1, 2) += pRminus2 * vec.y() * vec.z();
130 momentumTensor(2, 0) += pRminus2 * vec.z() * vec.x();
131 momentumTensor(2, 1) += pRminus2 * vec.z() * vec.y();
132 momentumTensor(2, 2) += pRminus2 * vec.z() * vec.z();
135 if (momentumTensor.IsSymmetric() && (momentumTensor.NonZeros() != 0)) {
143 momentumTensor *= (1. / norm);
146 if (momentumTensor.IsSymmetric() && (momentumTensor.NonZeros() != 0)) {
222 double esum_total(0.);
226 double esum_total_sq = esum_total * esum_total;
233 for (
unsigned int j = 0;
j <=
i;
j++) {
240 int symmetry_factor = 2;
243 double p_ij = p_i * p_j;
245 double pi_pj_over_etot2 = p_ij / esum_total_sq;
254 Pn2 = pi_pj_over_etot2;
255 fwmom_[0] += Pn2 * symmetry_factor;
257 Pn1 = pi_pj_over_etot2 * cosTheta;
258 fwmom_[1] += Pn1 * symmetry_factor;
260 double Pn = ((2 *
n - 1) * cosTheta * Pn1 - (
n - 1) * Pn2) /
n;
261 fwmom_[
n] += Pn * symmetry_factor;