BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHelixMaker.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkHelixMaker.cxx,v 1.1.1.1 2005/04/21 06:26:56 maqm Exp $
4//
5// Description:
6//
7// Environment:
8// Software developed for the BaBar Detector at the SLAC B-Factory.
9//
10// Authors: Steve Schaffner
11//
12//------------------------------------------------------------------------
13#include "TrkFitter/TrkHelixMaker.h"
14#include "TrkFitter/TrkHelixRep.h"
15#include "TrkBase/TrkRecoTrk.h"
16#include "TrkBase/TrkExchangePar.h"
17#include "TrkBase/TrkHitOnTrk.h"
18
19//------------------------------------------------------------------------
21//------------------------------------------------------------------------
22
23//------------------------------------------------------------------------
25//------------------------------------------------------------------------
26
27
28void
30 double tanDip, double chi2)
31{
32 PdtPid::PidType hypo = theTrack.defaultType();
33// const TrkRep* defrep = getRep(theTrack,hypo);
34// const TrkHotList *hl = defrep->hotList();//yzhang delete
35 TrkRep* defrep = getRep(theTrack,hypo);
36 TrkHotList *hl = defrep->hotList();//yzhang temp
37 const TrkFit* theFit = theTrack.fitResult();
38 if (theFit == 0) {
39 std::cout<<"ErrMsg(error)"
40 << "TrkSimpleMaker::addZValues() cannot get helix from invalid fit."
41 << std::endl;
42 return;
43 }
44
45 TrkExchangePar oldPar = theFit->helix(0.0);
46 oldPar.setZ0(z0);
47 oldPar.setTanDip(tanDip);
48 /*
49 std::cout << "#########################before newHelix" << std::endl;//yzhang debug
50 std::cout << "track--------- " << std::endl;//yzhang debug
51 theTrack.printAll(std::cout);//track
52 std::cout << "rep of track--------- " << std::endl;//yzhang debug
53 getRep(theTrack,hypo)->printAll(std::cout);//track Rep
54 std::cout << "circle rep's hotlist--------- " << std::endl;//yzhang debug
55 hl->printAll(std::cout);//Circle Rep 's hotList
56 */
57
58 TrkHelixRep* newRep = new TrkHelixRep(oldPar, &theTrack, hypo, hl);
59/*
60 std::cout << "#########################after new helix before setRep" << std::endl;//yzhang debug
61 std::cout << "track--------- " << std::endl;//yzhang debug
62 theTrack.printAll(std::cout);//track
63 std::cout << "rep of track--------- " << std::endl;//yzhang debug
64 std::cout <<newRep->hotList()<<std::endl;
65 std::cout << "circle hotlist --------- " << std::endl;//yzhang debug
66 std::cout <<hl<<std::endl;
67 std::cout << "helix hotlist --------- " << std::endl;//yzhang debug
68 getRep(theTrack,hypo)->printAll(std::cout);//track Rep
69 std::cout << "circle rep's hotlist--------- " << std::endl;//yzhang debug
70 hl->printAll(std::cout);//Circle Rep 's hotList
71 std::cout << "helix rep's hotlist--------- " << std::endl;//yzhang debug
72 newRep->hotList()->printAll(std::cout);//Helix Rep's hotList
73 */
74
75 newRep->fitter().setFittingPar(false, false);
76 setRep(theTrack, newRep); // theTrack will delete all old Reps
77
78 /*
79 std::cout << "#########################after setRep" << std::endl;//yzhang debug
80 std::cout << "track--------- " << std::endl;//yzhang debug
81 theTrack.printAll(std::cout);//track
82 std::cout << "rep of track--------- " << std::endl;//yzhang debug
83 getRep(theTrack,hypo)->printAll(std::cout);//track Rep
84 //std::cout << "circle rep--------- " << std::endl;//yzhang debug
85 //defrep->printAll(std::cout);
86 //std::cout << "circle rep's hotlist--------- " << std::endl;//yzhang debug
87 //hl->printAll(std::cout);//Circle Rep 's hotList
88 std::cout << "helix rep's hotlist--------- " << std::endl;//yzhang debug
89 newRep->hotList()->printAll(std::cout);//Helix Rep's hotList
90
91 std::cout << "######################### " << std::endl;//yzhang debug
92
93 */
94 newRep->setChisq(chi2);
95 if (chi2 > 0.0) newRep->setValid(true);
96 newRep->setCurrent(false);
97}
TrkRep * getRep(TrkRecoTrk &, PdtPid::PidType) const
Definition: TrkFitMaker.cxx:42
void setRep(TrkRecoTrk &, TrkRep *) const
Definition: TrkFitMaker.cxx:36
void setValid(bool v)
virtual TrkExchangePar helix(double fltL) const =0
void setFittingPar(bool allowFlips, bool allowDrops)
void addZValues(TrkRecoTrk &theTrack, double z0, double tanDip, double chi2)
virtual ~TrkHelixMaker()
const TrkFit * fitResult() const
Definition: TrkRecoTrk.cxx:387
virtual TrkHotList * hotList()
void setChisq(double c)