38 std::vector<TLorentzVector> clusterP4Vector;
39 clusterP4Vector.reserve(vertexedClusterList.size());
42 clusterP4Vector.push_back(vertexedCluster.p4());
58 double sum_of_E2 = 0.;
59 double sum_radii = 0.;
62 for (
const TLorentzVector& clusterP4 : clusterP4Vector) {
64 sum_of_E2 += clusterP4.E()*clusterP4.E();
65 sum_radii += clusterP4.DeltaR(
centroid);
66 sum_e += clusterP4.E();
67 sum_px += clusterP4.Px();
68 sum_py += clusterP4.Py();
69 sum_pz += clusterP4.Pz();
79 double mass2 = sum_e * sum_e - (sum_px * sum_px + sum_py * sum_py + sum_pz * sum_pz);
80 this->
m_totMass = mass2 > 0 ? std::sqrt(mass2) : -std::sqrt(-mass2);
110 for (
const TLorentzVector& clusterP4 : clusterP4Vector) {
111 if (icount <= 0)
break;
114 sum_radii += clusterP4.DeltaR(
centroid);
115 sum_e += clusterP4.E();
116 sum_px += clusterP4.Px();
117 sum_py += clusterP4.Py();
118 sum_pz += clusterP4.Pz();
128 double mass2 = sum_e * sum_e - (sum_px * sum_px + sum_py * sum_py + sum_pz * sum_pz);
129 this->
m_effMass = mass2 > 0 ? std::sqrt(mass2) : -std::sqrt(-mass2);
149 for (
const TLorentzVector& clusterP4: clusterP4Vector) {
150 if (nConst <= 0)
break;
153 modulus = std::sqrt((clusterP4.Px() * clusterP4.Px()) + (clusterP4.Py() * clusterP4.Py()) + (clusterP4.Pz() * clusterP4.Pz()));
155 px += clusterP4.Px() / modulus;
156 py += clusterP4.Py() / modulus;
157 pz += clusterP4.Pz() / modulus;