00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __Atlfast_kinehelper__
00019 #define __Atlfast_kinehelper__
00020
00021 #include "AtlfastCode/IKinematic.h"
00022 #include "AtlfastCode/Cluster.h"
00023 #include "AtlfastCode/Phi.h"
00024
00025 namespace Atlfast {
00030 class KinematicHelper {
00031
00032 public:
00033
00034
00035
00036
00037
00041 double deltaR( IKinematic& a, IKinematic& b ) ;
00045 double deltaR( IKinematic* a, IKinematic* b ) ;
00046
00047
00048
00052 double deltaPhi( IKinematic& a, IKinematic& b ) ;
00056 double deltaPhi( IKinematic* a, IKinematic* b ) ;
00057
00058
00059
00063 double mass( IKinematic& a, IKinematic& b ) ;
00067 double mass( IKinematic* a, IKinematic* b ) ;
00068
00073 template< class Iter >
00074 double mass( Iter begin, Iter end )
00075 {
00076 HepLorentzVector temp(0.,0.,0.,0.) ;
00077 for( Iter i = begin; i < end; ++i )
00078 {
00079 temp += (*i)->momentum() ;
00080 }
00081 return temp.m() ;
00082 }
00083
00084
00085
00089 template< class Iter>
00090 double sumETInCone( Iter begin,
00091 Iter end,
00092 IKinematic* reference,
00093 double rCone
00094 )
00095 {
00096 double result = 0.0;
00097 for( Iter itr = begin; itr < end; ++itr )
00098 {
00099 if( this->deltaR( reference, *itr ) < rCone )
00100 {
00101 result += (*itr)->eT() ;
00102 }
00103 }
00104 return result ;
00105 }
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 private:
00119
00120
00121
00122
00123
00124
00125 };
00126
00127 }
00128
00129 #endif
00130
00131
00132
00133