BOSS
7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TofQPID.cxx
Go to the documentation of this file.
1
#include <cmath>
2
3
#include "
ParticleID/TofQPID.h
"
4
5
#ifndef BEAN
6
#include "
MdcRecEvent/RecMdcTrack.h
"
7
#include "
TofRecEvent/RecTofTrack.h
"
8
#include "
EvtRecEvent/EvtRecTrack.h
"
9
#endif
10
11
TofQPID
* TofQPID::m_pointer = 0;
12
13
TofQPID
*
TofQPID::instance
() {
14
if
(!m_pointer) m_pointer =
new
TofQPID
();
15
return
m_pointer;
16
}
17
18
TofQPID::TofQPID():
ParticleIDBase
() {
19
;
20
}
21
22
void
TofQPID::init
() {
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
34
void
TofQPID::calculate
() {
35
if
(
particleIDCalculation
() == 0) m_ndof=1;
36
}
37
int
TofQPID::particleIDCalculation
() {
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
}
EvtRecTrack.h
RecMdcTrack.h
RecTofTrack.h
TofQPID.h
EvtRecTrack
Definition
EvtRecTrack.h:21
EvtRecTrack::isTofTrackValid
bool isTofTrackValid()
Definition
EvtRecTrack.h:46
EvtRecTrack::isMdcTrackValid
bool isMdcTrackValid()
Definition
EvtRecTrack.h:43
ParticleIDBase
Definition
ParticleIDBase.h:21
ParticleIDBase::PidTrk
EvtRecTrack * PidTrk() const
Definition
ParticleIDBase.h:36
TofQPID
Definition
TofQPID.h:13
TofQPID::init
void init()
Definition
TofQPID.cxx:22
TofQPID::calculate
void calculate()
Definition
TofQPID.cxx:34
TofQPID::particleIDCalculation
int particleIDCalculation()
Definition
TofQPID.cxx:37
TofQPID::instance
static TofQPID * instance()
Definition
TofQPID.cxx:13
7.1.1
Analysis
ParticleID
ParticleID-00-04-70
src
TofQPID.cxx
Generated by
1.12.0