#include <KinematicHelper.h>
Public Member Functions | |
double | deltaR (IKinematic &a, IKinematic &b) |
double | deltaR (IKinematic *a, IKinematic *b) |
double | deltaPhi (IKinematic &a, IKinematic &b) |
double | deltaPhi (IKinematic *a, IKinematic *b) |
double | mass (IKinematic &a, IKinematic &b) |
double | mass (IKinematic *a, IKinematic *b) |
template<class Iter> | |
double | mass (Iter begin, Iter end) |
template<class Iter> | |
double | sumETInCone (Iter begin, Iter end, IKinematic *reference, double rCone) |
template<class Iter> | |
double | sumETInHalo (Iter begin, Iter end, IKinematic *reference, double rLower, double rHigher) |
template<class Iter> | |
HepLorentzVector | sumMomentumInHalo (Iter begin, Iter end, IKinematic *reference, double rLower, double rHigher) |
Definition at line 32 of file KinematicHelper.h.
double Atlfast::KinematicHelper::deltaR | ( | IKinematic & | a, | |
IKinematic & | b | |||
) |
Return the distance in eta-phi space between two items
Definition at line 35 of file KinematicHelper.cxx.
00036 { 00037 return this->deltaR( &a, &b ) ; 00038 }
double Atlfast::KinematicHelper::deltaR | ( | IKinematic * | a, | |
IKinematic * | b | |||
) |
Return the distance in eta-phi space between two items
Definition at line 18 of file KinematicHelper.cxx.
00019 { 00020 //IKinematic* a = this->regulateType( aa ) ; 00021 //IKinematic* b = this->regulateType( bb ) ; 00022 00023 // Doing this takes care of cyclic algebra 00024 Phi aphi(a->phi()) ; 00025 Phi bphi(b->phi()) ; 00026 00027 double dist = 00028 sqrt( 00029 (aphi - bphi)*(aphi - bphi) + 00030 (a->eta() - b->eta())*(a->eta() - b->eta()) 00031 ); 00032 return dist ; 00033 }
double Atlfast::KinematicHelper::deltaPhi | ( | IKinematic & | a, | |
IKinematic & | b | |||
) |
Return the distance in phi space between two items
Definition at line 47 of file KinematicHelper.cxx.
00048 { 00049 return this->deltaPhi( &a, &b ) ; 00050 }
double Atlfast::KinematicHelper::deltaPhi | ( | IKinematic * | a, | |
IKinematic * | b | |||
) |
Return the distance in phi space between two items
Definition at line 42 of file KinematicHelper.cxx.
00043 { 00044 return std::abs( Phi( a->phi() - b->phi() ) ) ; 00045 }
double Atlfast::KinematicHelper::mass | ( | IKinematic & | a, | |
IKinematic & | b | |||
) |
Return the invariant mass of two items,
Definition at line 59 of file KinematicHelper.cxx.
00060 { 00061 return this->mass( &a, &b ) ; 00062 }
double Atlfast::KinematicHelper::mass | ( | IKinematic * | a, | |
IKinematic * | b | |||
) |
double Atlfast::KinematicHelper::mass | ( | Iter | begin, | |
Iter | end | |||
) | [inline] |
Return the invariant mass of a collection of IKinematic* (not IKinematic& at present)
Definition at line 76 of file KinematicHelper.h.
00077 { 00078 HepLorentzVector temp(0.,0.,0.,0.) ; 00079 for( Iter i = begin; i < end; ++i ) 00080 { 00081 temp += (*i)->momentum() ; 00082 } 00083 return temp.m() ; 00084 }
double Atlfast::KinematicHelper::sumETInCone | ( | Iter | begin, | |
Iter | end, | |||
IKinematic * | reference, | |||
double | rCone | |||
) | [inline] |
Sum quantities in a given R-cone from a reference.
Definition at line 92 of file KinematicHelper.h.
00097 { 00098 double result = 0.0; 00099 for( Iter itr = begin; itr < end; ++itr ) 00100 { 00101 if( this->deltaR( reference, *itr ) < rCone ) 00102 { 00103 result += (*itr)->eT() ; 00104 } 00105 } 00106 return result ; 00107 }
double Atlfast::KinematicHelper::sumETInHalo | ( | Iter | begin, | |
Iter | end, | |||
IKinematic * | reference, | |||
double | rLower, | |||
double | rHigher | |||
) | [inline] |
Sum scalar ET in a given R-interval from a reference.
Definition at line 114 of file KinematicHelper.h.
00120 { 00121 double result = 0.0; 00122 for( Iter itr = begin; itr < end; ++itr ) 00123 { 00124 if( this->deltaR( reference, *itr ) > rLower 00125 && this->deltaR( reference, *itr ) < rHigher 00126 ) 00127 { 00128 result += (*itr)->eT() ; 00129 } 00130 } 00131 return result ; 00132 }
HepLorentzVector Atlfast::KinematicHelper::sumMomentumInHalo | ( | Iter | begin, | |
Iter | end, | |||
IKinematic * | reference, | |||
double | rLower, | |||
double | rHigher | |||
) | [inline] |
Sum scalar ET in a given R-interval from a reference.
Definition at line 139 of file KinematicHelper.h.
00145 { 00146 HepLorentzVector result(0.,0.,0.,0.); 00147 for( Iter itr = begin; itr < end; ++itr ) 00148 { 00149 if( this->deltaR( reference, *itr ) > rLower 00150 && this->deltaR( reference, *itr ) < rHigher 00151 ) 00152 { 00153 result += (*itr)->momentum() ; 00154 } 00155 } 00156 return result ; 00157 }