BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
DQAKsInfo.cxx
Go to the documentation of this file.
2
3DQAKsInfo::DQAKsInfo(): m_track0(0),m_track1(0)
4{
5 m_vtxFit = VertexFit::instance();
6 m_2ndVtxFit = SecondVertexFit::instance();
7}
8
10{
11 m_vtxFit = VertexFit::instance();
12 m_2ndVtxFit = SecondVertexFit::instance();
13 m_track0 = track0;
14 m_track1 = track1;
15 m_vtxpar = vtxpar;
16 m_privtxpar = privtxpar;
17}
19{
20 m_track0 = 0;
21 m_track1 = 0;
22 m_p4 = HepLorentzVector(0,0,0,0);
23 m_vmks = 0;
24}
26{
27 if (m_track0 == 0 || m_track1 == 0 ) return false;
28 RecMdcKalTrack* pion1Trk = m_track0->mdcKalTrack();
29 RecMdcKalTrack* pion2Trk = m_track1->mdcKalTrack();
30 HepLorentzVector pion1p4 = pion1Trk->p4(Ksinfo_mpi);
31 HepLorentzVector pion2p4 = pion2Trk->p4(Ksinfo_mpi);
32 HepLorentzVector ksp4 = pion1p4 + pion2p4;
33 m_mksp4 = ksp4.m();
34
35 WTrackParameter wvTrk1(Ksinfo_mpi, pion1Trk->getZHelix(), pion1Trk->getZError());
36 WTrackParameter wvTrk2(Ksinfo_mpi, pion2Trk->getZHelix(), pion2Trk->getZError());
37
38 m_vtxFit->init();
39 m_vtxFit->setChisqCut(100);
40 m_vtxFit->AddTrack(0, wvTrk1);
41 m_vtxFit->AddTrack(1, wvTrk2);
42 m_vtxFit->AddVertex(0, m_vtxpar, 0, 1);
43 if ( ! m_vtxFit->Fit(0) ) return false;
44 m_vtxFit->Swim(0);
45 m_vtxFit->BuildVirtualParticle(0);
46 WTrackParameter wtKs = m_vtxFit->wVirtualTrack(0);
47 VertexParameter vtKs = m_vtxFit->vpar(0);
48
49 m_2ndVtxFit->init();
50 m_2ndVtxFit->setChisqCut(100);
51 m_2ndVtxFit->setPrimaryVertex(m_privtxpar);
52 m_2ndVtxFit->AddTrack(0, wtKs);
53 m_2ndVtxFit->setVpar(vtKs);
54 if ( ! m_2ndVtxFit->Fit() ) return false;
55 HepLorentzVector vp4Ks = m_2ndVtxFit->p4par();
56 m_p4 = vp4Ks;
57 m_vmks = vp4Ks.m();
58 m_vchi2ks1 = m_vtxFit->chisq(0);
59 m_vchi2ks2 = m_2ndVtxFit->chisq();
60 m_vlks = m_2ndVtxFit->decayLength();
61 m_vrks = m_2ndVtxFit->decayLength() / m_2ndVtxFit->decayLengthError();
62 return true;
63}
const double Ksinfo_mpi
Definition: DQAKsInfo.h:18
bool calculate()
Definition: DQAKsInfo.cxx:25
const HepLorentzVector p4() const
RecMdcKalTrack * mdcKalTrack()
Definition: EvtRecTrack.h:54
const HepVector & getZHelix() const
const HepSymMatrix & getZError() const
HepLorentzVector p4par() const
void setPrimaryVertex(const VertexParameter vpar)
double decayLength() const
double decayLengthError() const
static SecondVertexFit * instance()
void setVpar(const VertexParameter vpar)
double chisq() const
void setChisqCut(const double chicut=500, const double chiter=1.0e-2)
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
Definition: TrackPool.cxx:22
double chisq() const
Definition: VertexFit.h:65
WTrackParameter wVirtualTrack(int n) const
Definition: VertexFit.h:91
void init()
Definition: VertexFit.cxx:29
void AddVertex(int number, VertexParameter vpar, std::vector< int > lis)
Definition: VertexFit.cxx:89
static VertexFit * instance()
Definition: VertexFit.cxx:15
VertexParameter vpar(int n) const
Definition: VertexFit.h:88
void BuildVirtualParticle(int number)
Definition: VertexFit.cxx:619
void Swim(int n)
Definition: VertexFit.h:58
bool Fit()
Definition: VertexFit.cxx:301
void setChisqCut(const double chicut=1000, const double chiter=1.0e-3)
Definition: VertexFit.h:48