12 : Object(componentPtr_), Object_Group() , Axis1(), Axis2(), seed_meth(seed_method), hemi_meth(hemisphere_association_method),
status(0) {
40 LogDebug(
"HemisphereAlgo") <<
" HemisphereAlgo method ";
46 for(
int j = 0; j < vsize; j++){
50 for(
int j = 0; j < 5; j++){
56 for (
int i = 0;
i <vsize;
i++){
61 <<
" less than P = " << (*
Object[
i]).
p() ;
75 float DeltaRP_Max = 0.;
78 for (
int i=0;
i<vsize;
i++){
93 for (
int i=0;
i<vsize;
i++){
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;
127 for (
int i=0;
i<vsize;
i++){
130 for (
int j=
i+1;j<vsize;j++){
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;
213 for (
int i=0;
i<vsize;
i++){
216 if (P_Long1 >= P_Long2){
225 Sum1_E += (*
Object[
i]).energy();
235 Sum2_E += (*
Object[
i]).energy();
241 for (
int i=0;
i<vsize;
i++){
248 Sum1_E += (*
Object[
i]).energy();
249 }
else if (
i == J_Max) {
255 Sum2_E += (*
Object[
i]).energy();
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();
276 NewAxis1_E = NewAxis1_E - (*
Object[
i]).energy();
280 NewAxis2_Px = NewAxis2_Px - (*
Object[
i]).px();
281 NewAxis2_Py = NewAxis2_Py - (*
Object[
i]).py();
282 NewAxis2_Pz = NewAxis2_Pz - (*
Object[
i]).pz();
283 NewAxis2_E = NewAxis2_E - (*
Object[
i]).energy();
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()));
311 Sum1_E += (*
Object[
i]).energy();
321 Sum2_E += (*
Object[
i]).energy();
333 Sum1_E += (*
Object[
i]).energy();
340 Sum2_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 = ";
380 for (
int i=0;
i<vsize;
i++){
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()
std::vector< reco::CandidatePtr > Object
std::vector< float > getAxis2()