00001 //================================================= 00002 // 00003 // 00004 // make particle-cluster associations 00005 // 00006 // Author: Peter Sherwood 00007 // 00008 // 00009 //=================================================== 00010 #ifndef ATLFAST_ASSOCIATION_H 00011 #define ATLFAST_ASSOCIATION_H 00012 00013 #include <list> 00014 #include "AtlfastCode/Trio.h" 00015 #include "AtlfastCode/Cluster.h" 00016 #include "AtlfastCode/ClusterCollection.h" 00017 #include "AtlfastCode/ReconstructedParticle.h" 00018 00019 namespace Atlfast{ 00027 typedef list<Cluster*>::iterator ClI; 00028 typedef list<ReconstructedParticle*>::iterator RpI; 00029 00030 00031 class Association { 00032 public: 00033 Association() 00034 :m_association(0., NULL, NULL){} 00035 Association(double d, ClusListI c, RpI r) 00036 :m_association(d, c, r){} 00037 ~Association(){} 00038 00039 RpI particle() const{return m_association.third;} 00040 ClI cluster() const{return m_association.second;} 00041 double distance() const{return m_association.first;} 00042 00043 void associate(){ 00044 (*(this->cluster() ) )->associate( *( this->particle() ) );} 00045 00046 private: 00047 Trio<double, ClusListI, RpI> m_association; 00048 }; 00049 00050 } 00051 #endif 00052 00053 00054 00055 00056 00057 00058 00059