FairRoot/PandaRoot
RecoTrackStateProvider.h
Go to the documentation of this file.
1 // ******************************************************
2 // DecayTreeFitter Package
3 // We thank the original author Wouter Hulsbergen
4 // (BaBar, LHCb) for providing the sources.
5 // http://arxiv.org/abs/physics/0503191v1 (2005)
6 // Adaptation & Development for PANDA: Ralf Kliemt (2015)
7 // ******************************************************
8 #ifndef DECAYTREEFITTER_RECOTRACKSTATEPROVIDER_H
9 #define DECAYTREEFITTER_RECOTRACKSTATEPROVIDER_H 1
10 
11 //#include "TrackInterfaces/ITrackStateProvider.h"
12 //#include "TrackKernel/TrackTraj.h"
13 //FIXME Make a Panda state provider...
14 #include "RhoCalculationTools.h"
15 //#include "LineTool.h"
16 #include "State.h"
17 #include "Rtypes.h"
18 #include "RhoCandidate.h"
19 #include "TVectorD.h"
20 #include "TMatrixDSym.h"
21 
22 namespace DecayTreeFitter
23 {
24  // wrapper around ITrackStateProviderTool
26  {
27  public:
28  RecoTrackStateProvider(double ztolerance)
29  : m_ztolerance(ztolerance) {};
30 
32  : m_ztolerance(0) {};
33 
35 
37  {
38  return state(aState, track, track->Pos().x(), track->Pos().y(), track->Pos().z());
39  };
40 
41  double ToleranceZ() const {return m_ztolerance;};
42  void SetToleranceZ(double z) {m_ztolerance=z;};
43 
44  void state( DecayTreeFitter::State& aState, RhoCandidate* track, double vx, double vy, double vz) const
45  {
46  TVectorD statevec = aState.stateVector();
47  TMatrixDSym statecov = aState.covariance();
48  double newz=RhoCalculationTools::StateFromTrajectory( statevec, statecov, track, vx, vy, vz, m_ztolerance) ;
49  aState.setState(statevec);
50  aState.setZ(newz);
51  aState.setCovariance(statecov);
52  };
53 
54  void P6FromTrack (TVectorD& p6, TMatrixDSym& cov6, RhoCandidate* track, double z) const {
56  };
57  private:
58  double m_ztolerance ;
59  bool m_usetraj ;
60  ClassDef ( RecoTrackStateProvider,1 )
61  } ;
62 }
63 
64 #endif
static Bool_t P6FromTrajectory(TVectorD &mom6, TMatrixDSym &cov6, RhoCandidate *cand, double z, double ztolerance)
const TMatrixDSym & covariance() const
Definition: State.h:159
TVector3 Pos() const
Definition: RhoCandidate.h:186
PndMCTrack * track
Definition: anaLmdCluster.C:89
Double_t z
void setCovariance(const TMatrixDSym &value)
Definition: State.h:139
void setZ(double value)
Definition: State.h:143
static Double_t StateFromTrajectory(TVectorD &state, TMatrixDSym &cov, RhoCandidate *track, double vx, double vy, double vz, double ztolerance)
void state(DecayTreeFitter::State &aState, RhoCandidate *track) const
const TVectorD & stateVector() const
Definition: State.h:156
void state(DecayTreeFitter::State &aState, RhoCandidate *track, double vx, double vy, double vz) const
void P6FromTrack(TVectorD &p6, TMatrixDSym &cov6, RhoCandidate *track, double z) const
void setState(const TVectorD &state)
Definition: State.h:134