00001
00002 #ifndef IMPL_PARTICLEIDIMPL_H
00003 #define IMPL_PARTICLEIDIMPL_H 1
00004
00005 #include "EVENT/ParticleID.h"
00006 #include "AccessChecked.h"
00007 #include <functional>
00008
00009 namespace IMPL {
00010
00011
00014 struct PIDSort{
00015 bool operator()(const EVENT::ParticleID* p1, const EVENT::ParticleID* p2){
00016 return p1->getLikelihood() > p2->getLikelihood() ;
00017 }
00018 };
00019
00020
00028 class ParticleIDImpl : public EVENT::ParticleID, public AccessChecked {
00029
00030 public:
00031
00034 ParticleIDImpl() ;
00035
00037 virtual ~ParticleIDImpl() ;
00038
00039 virtual int id() const { return simpleUID() ; }
00040
00043 virtual int getType() const ;
00044
00047 virtual int getPDG() const ;
00048
00051 virtual float getLikelihood() const ;
00052
00057 virtual int getAlgorithmType() const ;
00058
00062 virtual const EVENT::FloatVec & getParameters() const ;
00063
00066 virtual EVENT::FloatVec& parameters() ;
00067
00068
00069 void setType( int type ) ;
00070 void setPDG( int pdg ) ;
00071 void setLikelihood( float logL ) ;
00072 void setAlgorithmType(int algorithmType ) ;
00073 void addParameter( float p ) ;
00074
00075 protected:
00076 int _type ;
00077 int _pdg ;
00078 float _likelihood ;
00079 int _algorithmType ;
00080 EVENT::FloatVec _parameters{} ;
00081
00082 };
00083
00084 }
00085 #endif