12 : Object(componentPtr_), Object_Group() , Axis1(), Axis2(), seed_meth(seed_method), hemi_meth(hemisphere_association_method),
status(0) {
14 for(
int i = 0;
i < (int)
Object.size();
i++){
40 LogDebug(
"HemisphereAlgo") <<
" HemisphereAlgo method ";
50 for(
int j = 0;
j < 5;
j++){
61 <<
" less than P = " << (*
Object[
i]).
p() ;
75 float DeltaRP_Max = 0.;
99 float DeltaRP = DeltaR * (*
Object[
i]).
p();
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;
144 InvariantMass = 2. * (pti*ptj - (*
Object[
i]).px()*(*
Object[
j]).px()
147 if ( Mass_Max < InvariantMass){
176 LogDebug(
"HemisphereAlgo") <<
" Axis 1 is Object = " << I_Max;
177 LogDebug(
"HemisphereAlgo") <<
" Axis 2 is Object = " << J_Max;
181 throw cms::Exception(
"Configuration") <<
"Please give a valid seeding method!";
193 while (I_Move && (numLoop < 100)){
197 LogDebug(
"HemisphereAlgo") <<
" Iteration = " << numLoop;
216 if (P_Long1 >= P_Long2){
249 }
else if (
i == J_Max) {
262 float NewAxis1_Py = Axis1[1] * Axis1[3];
263 float NewAxis1_Pz = Axis1[2] * Axis1[3];
264 float NewAxis1_E = Axis1[4];
267 float NewAxis2_Py = Axis2[1] * Axis2[3];
268 float NewAxis2_Pz = Axis2[2] * Axis2[3];
269 float NewAxis2_E = Axis2[4];
273 NewAxis1_Px = NewAxis1_Px - (*
Object[
i]).px();
274 NewAxis1_Py = NewAxis1_Py - (*
Object[
i]).py();
275 NewAxis1_Pz = NewAxis1_Pz - (*
Object[
i]).pz();
280 NewAxis2_Px = NewAxis2_Px - (*
Object[
i]).px();
281 NewAxis2_Py = NewAxis2_Py - (*
Object[
i]).py();
282 NewAxis2_Pz = NewAxis2_Pz - (*
Object[
i]).pz();
287 float mass1 = NewAxis1_E - (((*
Object[
i]).px()*NewAxis1_Px + (*
Object[
i]).py()*NewAxis1_Py +
290 float mass2 = NewAxis2_E - (((*
Object[
i]).px()*NewAxis2_Px + (*
Object[
i]).py()*NewAxis2_Py +
295 mass1 *= NewAxis1_E/((NewAxis1_E+(*
Object[
i]).
energy())*(NewAxis1_E+(*
Object[i]).energy()));
297 mass2 *= NewAxis2_E/((NewAxis2_E+(*
Object[
i]).
energy())*(NewAxis2_E+(*
Object[i]).energy()));
352 <<
"Please give a valid hemisphere association method!";
357 Axis1[3] =
sqrt(Sum1_Px*Sum1_Px + Sum1_Py*Sum1_Py + Sum1_Pz*Sum1_Pz);
358 if (
Axis1[3]<0.0001) {
369 Axis2[3] =
sqrt(Sum2_Px*Sum2_Px + Sum2_Py*Sum2_Py + Sum2_Pz*Sum2_Pz);
370 if (
Axis2[3]<0.0001) {
379 LogDebug(
"HemisphereAlgo") <<
" Grouping = ";
383 LogTrace(
"HemisphereAlgo") << std::endl;
std::vector< int > Object_Noseed
std::vector< float > Axis2
std::vector< float > Axis1
std::vector< int > Object_Group
std::vector< float > getAxis1()
VDouble InvariantMass(Tau)
HemisphereAlgo(const std::vector< reco::CandidatePtr > &componentRefs_, const int seed_method=0, const int hemisphere_association_method=0)
std::vector< int > getGrouping()
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< reco::CandidatePtr > Object
std::vector< float > getAxis2()