Belle II Software  release-08-01-10
ReferenceStateOnPlane.h
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
24 #ifndef genfit_ReferenceStateOnPlane_h
25 #define genfit_ReferenceStateOnPlane_h
26 
27 #include "StateOnPlane.h"
28 
29 
30 namespace genfit {
31 
44 
45  public:
46 
48  ReferenceStateOnPlane(const TVectorD& state,
49  const SharedPlanePtr& plane,
50  const AbsTrackRep* rep);
51  ReferenceStateOnPlane(const TVectorD& state,
52  const SharedPlanePtr& plane,
53  const AbsTrackRep* rep,
54  const TVectorD& auxInfo);
55  ReferenceStateOnPlane(const StateOnPlane& state);
57 
58  StateOnPlane& operator=(ReferenceStateOnPlane other);
59  void swap(ReferenceStateOnPlane& other); // nothrow
60 
61  virtual ~ReferenceStateOnPlane() {}
62 
63  void setForwardSegmentLength(double len) {forwardSegmentLength_ = len;}
64  void setBackwardSegmentLength(double len) {backwardSegmentLength_ = len;}
65  void setForwardTransportMatrix(const TMatrixD& mat) {forwardTransportMatrix_.ResizeTo(mat); forwardTransportMatrix_=mat;}
66  void setBackwardTransportMatrix(const TMatrixD& mat) {backwardTransportMatrix_.ResizeTo(mat); backwardTransportMatrix_=mat;}
67  void setTransportMatrix(const TMatrixD& mat, int direction) {if (direction >= 0) setForwardTransportMatrix(mat); else setBackwardTransportMatrix(mat);}
68  void setForwardNoiseMatrix(const TMatrixDSym& mat) {forwardNoiseMatrix_.ResizeTo(mat); forwardNoiseMatrix_=mat;}
69  void setBackwardNoiseMatrix(const TMatrixDSym& mat) {backwardNoiseMatrix_.ResizeTo(mat); backwardNoiseMatrix_=mat;}
70  void setNoiseMatrix(const TMatrixDSym& mat, int direction) {if (direction >= 0) setForwardNoiseMatrix(mat); else setBackwardNoiseMatrix(mat);}
71  void setForwardDeltaState(const TVectorD& mat) {forwardDeltaState_.ResizeTo(mat); forwardDeltaState_=mat;}
72  void setBackwardDeltaState(const TVectorD& mat) {backwardDeltaState_.ResizeTo(mat); backwardDeltaState_=mat;}
73  void setDeltaState(const TVectorD& mat, int direction) {if (direction >= 0) setForwardDeltaState(mat); else setBackwardDeltaState(mat);}
74 
75 
76  double getForwardSegmentLength() const {return forwardSegmentLength_;}
77  double getBackwardSegmentLength() const {return backwardSegmentLength_;}
78  const TMatrixD& getForwardTransportMatrix() const {return forwardTransportMatrix_;}
79  const TMatrixD& getBackwardTransportMatrix() const {return backwardTransportMatrix_;}
80  const TMatrixD& getTransportMatrix(int direction) const {if (direction >= 0) return forwardTransportMatrix_; return backwardTransportMatrix_;}
81  const TMatrixDSym& getForwardNoiseMatrix() const {return forwardNoiseMatrix_;}
82  const TMatrixDSym& getBackwardNoiseMatrix() const {return backwardNoiseMatrix_;}
83  const TMatrixDSym& getNoiseMatrix(int direction) const {if (direction >= 0) return forwardNoiseMatrix_; return backwardNoiseMatrix_;}
84  const TVectorD& getForwardDeltaState() const {return forwardDeltaState_;}
85  const TVectorD& getBackwardDeltaState() const {return backwardDeltaState_;}
86  const TVectorD& getDeltaState(int direction) const {if (direction >= 0) return forwardDeltaState_; return backwardDeltaState_;}
87 
88  void resetForward();
89  void resetBackward();
90 
91  virtual void Print(Option_t* option = "") const override;
92 
93  protected:
94 
99  TMatrixDSym forwardNoiseMatrix_;
100  TMatrixDSym backwardNoiseMatrix_;
105  public:
106 
107  ClassDefOverride(ReferenceStateOnPlane,1)
108 
109 };
110 
111 } /* End of namespace genfit */
114 #endif // genfit_ReferenceStateOnPlane_h
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
#StateOnPlane with linearized transport to that #ReferenceStateOnPlane from previous and next #Refere...
double forwardSegmentLength_
Segment length from previous referenceState.
TMatrixD forwardTransportMatrix_
transport matrix F from previous referenceState
TMatrixDSym forwardNoiseMatrix_
noise matrix N for transport from previous referenceState
TMatrixD backwardTransportMatrix_
transport matrix F from next referenceState
double backwardSegmentLength_
Segment length from next referenceState.
TMatrixDSym backwardNoiseMatrix_
noise matrix N for transport from next referenceState
A state with arbitrary dimension defined in a DetPlane.
Definition: StateOnPlane.h:47
Defines for I/O streams used for error and debug printing.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.