EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EICPIDParticle.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EICPIDParticle.h
1 // TeLogLikelyhood emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef EICPID_EICPIDParticle_H
4 #define EICPID_EICPIDParticle_H
5 
6 #include <phool/PHObject.h>
7 
8 #include <climits>
9 #include <cmath>
10 #include <iostream>
11 #include <map>
12 #include <string>
13 #include <utility>
14 #include "EICPIDDefs.h"
15 
16 class EICPIDParticle : public PHObject
17 {
18  public:
20  ~EICPIDParticle() override {}
21 
22  void identify(std::ostream &os = std::cout) const override;
23  void CopyFrom(const PHObject *phobj) override;
24  void Reset() override;
25 
27  virtual void set_id(const EICPIDDefs::keytype) { return; }
28 
29  virtual float get_SumLogLikelyhood(EICPIDDefs::PIDCandidate) const { return 0; }
32 
34  { //
35  type_int = 1,
36  type_uint = 2,
39  };
40 
44  enum PROPERTY
45  {
46  Truth_PID = 0,
49 
50  //
51  CTTL_beta = 10,
54 
56  prop_MAX_NUMBER = UCHAR_MAX
57  };
58 
59  // property info definition in the EICPIDParticle.cc file
60  const static std::map<PROPERTY,
61  std::pair<const std::string, EICPIDParticle::PROPERTY_TYPE> >
63 
64  virtual bool has_property(const PROPERTY /*prop_id*/) const { return false; }
65  virtual float get_property_float(const PROPERTY /*prop_id*/) const { return NAN; }
66  virtual int get_property_int(const PROPERTY /*prop_id*/) const { return INT_MIN; }
67  virtual unsigned int get_property_uint(const PROPERTY /*prop_id*/) const { return UINT_MAX; }
68  virtual void set_property(const PROPERTY /*prop_id*/, const float /*value*/) { return; }
69  virtual void set_property(const PROPERTY /*prop_id*/, const int /*value*/) { return; }
70  virtual void set_property(const PROPERTY /*prop_id*/, const unsigned int /*value*/) { return; }
71  static std::pair<const std::string, PROPERTY_TYPE> get_property_info(PROPERTY prop_id);
72  static bool check_property(const PROPERTY prop_id, const PROPERTY_TYPE prop_type);
73  static std::string get_property_type(const PROPERTY_TYPE prop_type);
74 
75  protected:
76  static constexpr float m_minLogLikelihood = -100;
77 
78  virtual unsigned int get_property_nocheck(const PROPERTY /*prop_id*/) const { return UINT_MAX; }
79  virtual void set_property_nocheck(const PROPERTY /*prop_id*/, const unsigned int) { return; }
80  ClassDefOverride(EICPIDParticle, 1)
81 };
82 
83 #endif