BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
SimplePIDSvc.h
Go to the documentation of this file.
1#ifndef SIMPLE_PID_SVC_H
2#define SIMPLE_PID_SVC_H
3
4#include "GaudiKernel/Service.h"
7#include "TH1F.h"
8
9class IDataProviderSvc;
10template <class TYPE> class CnvFactory;
11
12class SimplePIDSvc : public Service, virtual public ISimplePIDSvc
13{
14 friend class CnvFactory<SimplePIDSvc>;
15
16 public :
17
18 SimplePIDSvc(const std::string& name, ISvcLocator* svcLoc);
19 virtual ~SimplePIDSvc();
20
21 virtual StatusCode initialize();
22 virtual StatusCode finalize();
23 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF);
24
25
26 inline void setdedxminchi(double x){m_dedxminchi=x;}
27 inline void settofminchi(double x){m_tofminchi=x;}
28 void preparePID(EvtRecTrack* track);
29 void getConst(int run);
30 void combineTOF();
31 void calprob();
32 bool iselectron(bool eop=false);
33 bool ispion();
34 bool iskaon();
35
36
37 inline double probElectron() { return m_prob[0];};
38 inline double probMuon() { return m_prob[1];};
39 inline double probPion() { return m_prob[2];};
40 inline double probKaon() { return m_prob[3];};
41 inline double probProton() { return m_prob[4];};
42
43 inline double getdEdxChi(int i){return m_dedxchi[i];}
44 inline double getTOFChi(int i){return m_tofchi[i];}
45 inline double getChi2(int i){return pow(m_dedxchi[i],2)+pow(m_tofchi[i],2);}
46
47
48
49 //EvtRecDTag* getBestDTag(int modeid = -1, int charm = 0);
50
51 private:
52
53 //
54 bool m_tofcorrec;
55 double m_dedxminchi;
56 double m_tofminchi;
57 int m_run;
58 vector<double> m_datatof;
59 vector<double> m_mctof;
60 //
61 double m_eop;
62
63 //
64
65 bool m_dedxonly[5];
66 double m_p[5];
67 double m_costh[5];
68 double m_mass[5];
69 double m_tofscale1[5];
70 double m_tofscale2[5];
71
72 double m_dedxchi[5];
73 double m_tofchi[5];
74 double m_tofdt[5];
75 double m_tofdt1[5];
76 double m_tofdt2[5];
77 double m_sigma1;
78 double m_sigma2;
79
80
81 double m_prob[5];
82 private :
83
84 IDataProviderSvc* eventSvc_;
85
86 TH1F* h_ebarlp;
87 TH1F* h_ebarhp;
88 TH1F* h_eendlp;
89 TH1F* h_eendhp;
90 TH1F* h_kbar;
91 TH1F* h_kend;
92 TH1F* h_pibar;
93 TH1F* h_piend;
94
95};
96
97
98
99#endif
Double_t x[10]
NTuple::Item< double > m_p
Definition: MdcHistItem.h:75
#define private
double probPion()
Definition: SimplePIDSvc.h:39
void settofminchi(double x)
Definition: SimplePIDSvc.h:27
void getConst(int run)
bool iselectron(bool eop=false)
double probProton()
Definition: SimplePIDSvc.h:41
double getdEdxChi(int i)
Definition: SimplePIDSvc.h:43
virtual ~SimplePIDSvc()
double getChi2(int i)
Definition: SimplePIDSvc.h:45
void preparePID(EvtRecTrack *track)
void setdedxminchi(double x)
Definition: SimplePIDSvc.h:26
double probMuon()
Definition: SimplePIDSvc.h:38
virtual StatusCode initialize()
virtual StatusCode finalize()
double probKaon()
Definition: SimplePIDSvc.h:40
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)
double getTOFChi(int i)
Definition: SimplePIDSvc.h:44
double probElectron()
Definition: SimplePIDSvc.h:37