32 #include "TClonesArray.h"
45 #include "TLorentzVector.h"
50 #include "RKTrackRep.h"
59 fMvdBranchName(
""), fCentralTrackerBranchName(
""),
60 fUseGeane(kTRUE), fPropagateToIP(kTRUE), fPerpPlane(kFALSE), fNumIt(1), fVerbose(0), fTrackRep(0)
71 Error(
"PndRecoKalmanFit::Init",
"RootManager not instantiated!");
91 Error(
"PndRecoKalmanFit::Init",
"Only GEANE Propagatio available!!!");
99 std::cout <<
"===PndRecoKalmanFit::Init() finished ===================================================" << std::endl;
114 if (
fVerbose>0) std::cout<<
"PndRecoKalmanFit::Fit"<<std::endl;
142 Bool_t rc = fPro0->
Propagate(helix, fRes, PDGCode);
145 StartPos.SetXYZ(fRes->
GetX(), fRes->
GetY(), fRes->
GetZ());
152 TVector3 plane_v1, plane_v2;
155 plane_v1 = StartMom.Orthogonal();
156 plane_v2 = StartPos.Cross(plane_v1);
160 plane_v1.SetXYZ(1.,0.,0.);
161 plane_v2.SetXYZ(0.,1.,0.);
163 GFDetPlane start_pl(StartPos, plane_v1, plane_v2);
169 StartPosErr,StartMomErr,
177 StartPosErr, StartMomErr,
183 std::cout <<
"*** PndRecoKalmanFit::Exec" <<
"\t" <<
"Not existing Track Representation " <<
fTrackRep << std::endl;
200 std::cout <<
"*** PndRecoKalmanFit::Exec" <<
"\t" <<
"Genfit Exception: trk->addHitVector " << e.
what() << std::endl;
207 if (store_track_parameterization) trk->
setSmoothing(
true,
true);
213 std::cout<<
"*** FITTER EXCEPTION ***"<<std::endl;
214 std::cout<<e.
what()<<std::endl;
216 if (
fVerbose>0) std::cout<<
"SUCCESSFULL FIT!"<<std::endl;
224 std::cout<<
"*** PndGenfitAdapters EXCEPTION ***"<<std::endl;
225 std::cout<<e.
what()<<std::endl;
230 if (
fVerbose>0) std::cout<<
"Fitting done"<<std::endl;
231 if (store_track_parameterization) {
236 for(
unsigned ih=0; ih<trk->
getNumHits(); ih++) {