#include <FunctionObjects.h>
Public Methods | |
DeltaR (Atlfast::IKinematic *reference) | |
Constructor which accepts the reference. | |
DeltaR (Atlfast::IKinematic &reference) | |
Constructor which accepts the reference. | |
bool | operator() (const Atlfast::IKinematic *a, const Atlfast::IKinematic *b) const |
function operator for comparing two objects | |
bool | operator() (const Atlfast::IKinematic &a, const Atlfast::IKinematic &b) const |
forwarded function operator for comparing two objects | |
Private Attributes | |
Atlfast::IKinematic * | ref |
Used to sort a container of IKinematic objects or pointers in delta R from a reference IKinematic.
Definition at line 311 of file FunctionObjects.h.
|
Constructor which accepts the reference.
Definition at line 319 of file FunctionObjects.h. References ref.
00319 : ref(reference) {} |
|
Constructor which accepts the reference.
Definition at line 321 of file FunctionObjects.h. References ref.
00321 : ref(&reference) {} |
|
function operator for comparing two objects
Definition at line 325 of file FunctionObjects.h. References ref. Referenced by operator()().
00325 { 00326 00327 Phi a_dPhi( a->phi() - ref->phi() ) ; 00328 Phi b_dPhi( b->phi() - ref->phi() ) ; 00329 00330 double dista = 00331 sqrt( 00332 (a_dPhi*a_dPhi) + 00333 (a->eta() - ref->eta())*(a->eta() - ref->eta()) 00334 ); 00335 00336 double distb = 00337 sqrt( 00338 (b_dPhi*b_dPhi) + 00339 (b->eta() - ref->eta())*(b->eta() - ref->eta()) 00340 ); 00341 00342 return ( dista < distb ) ; 00343 } |
|
forwarded function operator for comparing two objects
Definition at line 348 of file FunctionObjects.h. References operator()().
00349 { return this->operator() ( &a, &b ) ; } |
|
Definition at line 314 of file FunctionObjects.h. Referenced by DeltaR(), and operator()(). |