BOSS 8.0.0
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 "EvtRecEvent/EvtRecTrack.h"
7# include "MdcRecEvent/RecMdcTrack.h"
8# include "TofRecEvent/RecTofTrack.h"
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
21 for ( int i = 0; i < 5; i++ )
22 {
23 m_chi[i] = 99.0;
24 m_prob[i] = -1.0;
25 }
26 m_chimin = 99.;
27 m_ndof = 0;
28 m_hitstatus = -2;
29 // m_q1 = -1;
30 // m_q2 = -1;
31}
32
34 if ( particleIDCalculation() == 0 ) m_ndof = 1;
35}
37 int irc = -1;
38 EvtRecTrack* recTrk = PidTrk();
39 if ( !( recTrk->isMdcTrackValid() ) ) return irc;
40 // RecMdcTrack* mdcTrk = recTrk->mdcTrack();
41
42 // double ptrk = mdcTrk->p();
43 // double cost = cos(mdcTrk->theta());
44
45 if ( !( recTrk->isTofTrackValid() ) ) return irc;
46 // RecTofTrack* tofTrk = recTrk->tofTrack();
47
48 //
49 // two layer hit in barrel TOF are required
50 //
51 // if(tofTrk->getPart() != 1) return irc;
52 // double ph1 = tofTrk->getPh1();
53 // double ph2 = tofTrk->getPh2();
54 // if(ph1 <= 0 || ph2 <= 0) return irc;
55 //
56 // Tof Q calibration is needed
57 //
58 // m_hitstatus = tofTrk->getHitStatus();
59 // m_hitstatus = 1;
60 // if(m_hitstatus == 0 || m_hitstatus == 1) m_q1 = tofTrk->getQ1();
61 // if(m_hitstatus == 0 || m_hitstatus == 2) m_q2 = tofTrk->getQ2();
62
63 // m_q1 = 1.0;
64 // m_q2 = 1.0;
65 m_ndof = 1;
66 irc = 0;
67 return irc;
68}
void init()
Definition TofQPID.cxx:20
void calculate()
Definition TofQPID.cxx:33
int particleIDCalculation()
Definition TofQPID.cxx:36
static TofQPID * instance()
Definition TofQPID.cxx:13