BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
TofQPID.cxx
Go to the documentation of this file.
1#include <cmath>
2
4
5#ifndef BEAN
9#endif
10
11TofQPID * TofQPID::m_pointer = 0;
12
14 if(!m_pointer) m_pointer = new TofQPID();
15 return m_pointer;
16}
17
18TofQPID::TofQPID():ParticleIDBase() {
19 ;
20}
21
23 for(int i = 0; i < 5; i++) {
24 m_chi[i] = 99.0;
25 m_prob[i] = -1.0;
26 }
27 m_chimin = 99.;
28 m_ndof = 0;
29 m_hitstatus = -2;
30 // m_q1 = -1;
31 // m_q2 = -1;
32}
33
35 if(particleIDCalculation() == 0) m_ndof=1;
36}
38 int irc = -1;
39 EvtRecTrack* recTrk = PidTrk();
40 if(!(recTrk->isMdcTrackValid())) return irc;
41 // RecMdcTrack* mdcTrk = recTrk->mdcTrack();
42
43 // double ptrk = mdcTrk->p();
44 // double cost = cos(mdcTrk->theta());
45
46 if(!(recTrk->isTofTrackValid())) return irc;
47 // RecTofTrack* tofTrk = recTrk->tofTrack();
48
49 //
50 // two layer hit in barrel TOF are required
51 //
52 // if(tofTrk->getPart() != 1) return irc;
53 // double ph1 = tofTrk->getPh1();
54 // double ph2 = tofTrk->getPh2();
55 // if(ph1 <= 0 || ph2 <= 0) return irc;
56 //
57 // Tof Q calibration is needed
58 //
59 // m_hitstatus = tofTrk->getHitStatus();
60 //m_hitstatus = 1;
61 //if(m_hitstatus == 0 || m_hitstatus == 1) m_q1 = tofTrk->getQ1();
62 //if(m_hitstatus == 0 || m_hitstatus == 2) m_q2 = tofTrk->getQ2();
63
64 //m_q1 = 1.0;
65 //m_q2 = 1.0;
66 m_ndof = 1;
67 irc = 0;
68 return irc;
69}
bool isTofTrackValid()
Definition: EvtRecTrack.h:46
bool isMdcTrackValid()
Definition: EvtRecTrack.h:43
EvtRecTrack * PidTrk() const
void init()
Definition: TofQPID.cxx:22
void calculate()
Definition: TofQPID.cxx:34
int particleIDCalculation()
Definition: TofQPID.cxx:37
static TofQPID * instance()
Definition: TofQPID.cxx:13