LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ParticleIDImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef IMPL_PARTICLEIDIMPL_H
3 #define IMPL_PARTICLEIDIMPL_H 1
4 
5 #include "EVENT/ParticleID.h"
6 #include "AccessChecked.h"
7 #include <functional>
8 
9 namespace IMPL {
10 
11 
14  struct PIDSort{
15  bool operator()(const EVENT::ParticleID* p1, const EVENT::ParticleID* p2){
16  return p1->getLikelihood() > p2->getLikelihood() ;
17  }
18  };
19 
20 
29 
30  public:
31 
34  ParticleIDImpl() ;
35 
37  virtual ~ParticleIDImpl() ;
38 
39  virtual int id() const { return simpleUID() ; }
40 
43  virtual int getType() const ;
44 
47  virtual int getPDG() const ;
48 
51  virtual float getLikelihood() const ;
52 
57  virtual int getAlgorithmType() const ;
58 
62  virtual const EVENT::FloatVec & getParameters() const ;
63 
66  virtual EVENT::FloatVec& parameters() ;
67 
68  // setters
69  void setType( int type ) ;
70  void setPDG( int pdg ) ;
71  void setLikelihood( float logL ) ;
72  void setAlgorithmType(int algorithmType ) ;
73  void addParameter( float p ) ;
74 
75  protected:
76  int _type ;
77  int _pdg ;
78  float _likelihood ;
81 
82 }; // class
83 
84 } // namespace IMPL
85 #endif /* ifndef IMPL_PARTICLEIDIMLP_H */
void setType(int type)
void setAlgorithmType(int algorithmType)
virtual const EVENT::FloatVec & getParameters() const
Parameters associated with this hypothesis.
Implementation of ParticleID.
Helper class to sort ParticleIDs wrt.
virtual ~ParticleIDImpl()
Destructor.
virtual float getLikelihood() const =0
The likelihood of this hypothesis - in a user defined normalization.
EVENT::FloatVec _parameters
bool operator()(const EVENT::ParticleID *p1, const EVENT::ParticleID *p2)
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Persistent interface for LCIO ParticleIDs.
Definition: ParticleID.h:28
void addParameter(float p)
virtual int getType() const
Type - userdefined.
void setLikelihood(float logL)
virtual int simpleUID() const
Definition: AccessChecked.h:26
virtual int getAlgorithmType() const
Type of the algorithm/module that created this hypothesis - NOTE: must be unique within one collectio...
ParticleIDImpl()
Default constructor, initializes values to 0.
void setPDG(int pdg)
virtual float getLikelihood() const
The likelihood of this hypothesis - in a user defined normalization.
Controls access to objects.
Definition: AccessChecked.h:18
virtual int getPDG() const
The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
virtual EVENT::FloatVec & parameters()
Access to parameters associated with this hypothesis.