12 const int seed_method,
13 const int hemisphere_association_method)
14 : Object(componentPtr_),
18 seed_meth(seed_method),
19 hemi_meth(hemisphere_association_method),
49 LogDebug(
"HemisphereAlgo") <<
" HemisphereAlgo method ";
55 for (
int j = 0;
j < vsize;
j++) {
59 for (
int j = 0;
j < 5;
j++) {
64 for (
int i = 0;
i < vsize;
i++) {
67 <<
" less than P = " << (*
Object[
i]).
p();
77 float DeltaRP_Max = 0.;
80 for (
int i = 0;
i < vsize;
i++) {
95 for (
int i = 0;
i < vsize;
i++) {
100 if (DeltaRP > DeltaRP_Max) {
101 DeltaRP_Max = DeltaRP;
117 LogDebug(
"HemisphereAlgo") <<
" Axis 1 is Object = " << I_Max;
118 LogDebug(
"HemisphereAlgo") <<
" Axis 2 is Object = " << J_Max;
125 for (
int i = 0;
i < vsize;
i++) {
128 for (
int j =
i + 1;
j < vsize;
j++) {
173 LogDebug(
"HemisphereAlgo") <<
" Axis 1 is Object = " << I_Max;
174 LogDebug(
"HemisphereAlgo") <<
" Axis 2 is Object = " << J_Max;
177 throw cms::Exception(
"Configuration") <<
"Please give a valid seeding method!";
188 while (I_Move && (numLoop < 100)) {
191 LogDebug(
"HemisphereAlgo") <<
" Iteration = " << numLoop;
205 for (
int i = 0;
i < vsize;
i++) {
208 if (P_Long1 >= P_Long2) {
232 for (
int i = 0;
i < vsize;
i++) {
240 }
else if (
i == J_Max) {
252 float NewAxis1_E =
Axis1[4];
257 float NewAxis2_E =
Axis2[4];
260 NewAxis1_Px = NewAxis1_Px - (*
Object[
i]).
px();
261 NewAxis1_Py = NewAxis1_Py - (*
Object[
i]).
py();
262 NewAxis1_Pz = NewAxis1_Pz - (*
Object[
i]).pz();
266 NewAxis2_Px = NewAxis2_Px - (*
Object[
i]).
px();
267 NewAxis2_Py = NewAxis2_Py - (*
Object[
i]).
py();
268 NewAxis2_Pz = NewAxis2_Pz - (*
Object[
i]).pz();
283 mass1 *= NewAxis1_E / ((NewAxis1_E + (*
Object[
i]).
energy()) * (NewAxis1_E + (*
Object[
i]).energy()));
285 mass2 *= NewAxis2_E / ((NewAxis2_E + (*
Object[
i]).
energy()) * (NewAxis2_E + (*
Object[
i]).energy()));
330 throw cms::Exception(
"Configuration") <<
"Please give a valid hemisphere association method!";
335 Axis1[3] =
sqrt(Sum1_Px * Sum1_Px + Sum1_Py * Sum1_Py + Sum1_Pz * Sum1_Pz);
336 if (
Axis1[3] < 0.0001) {
345 Axis2[3] =
sqrt(Sum2_Px * Sum2_Px + Sum2_Py * Sum2_Py + Sum2_Pz * Sum2_Pz);
346 if (
Axis2[3] < 0.0001) {
355 LogDebug(
"HemisphereAlgo") <<
" Grouping = ";
356 for (
int i = 0;
i < vsize;
i++) {
359 LogTrace(
"HemisphereAlgo") << std::endl;