EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReferenceStateOnPlane.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ReferenceStateOnPlane.cc
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 
20 #include "ReferenceStateOnPlane.h"
21 
22 #include "IO.h"
23 
24 namespace genfit {
25 
27  StateOnPlane(),
28  forwardSegmentLength_(0),
29  backwardSegmentLength_(0),
30  forwardTransportMatrix_(),
31  backwardTransportMatrix_(),
32  forwardNoiseMatrix_(),
33  backwardNoiseMatrix_(),
34  forwardDeltaState_(),
35  backwardDeltaState_()
36 {
37  ;
38 }
39 
41  const SharedPlanePtr& plane,
42  const AbsTrackRep* rep) :
43  StateOnPlane(state, plane, rep),
44  forwardSegmentLength_(0),
45  backwardSegmentLength_(0),
46  forwardTransportMatrix_(rep->getDim(), rep->getDim()),
47  backwardTransportMatrix_(rep->getDim(), rep->getDim()),
48  forwardNoiseMatrix_(rep->getDim()),
49  backwardNoiseMatrix_(rep->getDim()),
50  forwardDeltaState_(rep->getDim()),
51  backwardDeltaState_(rep->getDim())
52 {
53  ;
54 }
55 
57  const SharedPlanePtr& plane,
58  const AbsTrackRep* rep,
59  const TVectorD& auxInfo) :
60  StateOnPlane(state, plane, rep, auxInfo),
61  forwardSegmentLength_(0),
62  backwardSegmentLength_(0),
63  forwardTransportMatrix_(rep->getDim(), rep->getDim()),
64  backwardTransportMatrix_(rep->getDim(), rep->getDim()),
65  forwardNoiseMatrix_(rep->getDim()),
66  backwardNoiseMatrix_(rep->getDim()),
67  forwardDeltaState_(rep->getDim()),
68  backwardDeltaState_(rep->getDim())
69 {
70  ;
71 }
72 
73 
75  StateOnPlane(state),
76  forwardSegmentLength_(0),
77  backwardSegmentLength_(0),
78  forwardTransportMatrix_(state.getRep()->getDim(), state.getRep()->getDim()),
79  backwardTransportMatrix_(state.getRep()->getDim(), state.getRep()->getDim()),
80  forwardNoiseMatrix_(state.getRep()->getDim()),
81  backwardNoiseMatrix_(state.getRep()->getDim()),
82  forwardDeltaState_(state.getRep()->getDim()),
83  backwardDeltaState_(state.getRep()->getDim())
84 {
85  errorOut << "should never come here" << std::endl;
86  exit(0);
87 }
88 
89 
91  swap(other);
92  return *this;
93 }
94 
96  StateOnPlane::swap(other);
103  this->forwardNoiseMatrix_.ResizeTo(other.forwardNoiseMatrix_);
105  this->backwardNoiseMatrix_.ResizeTo(other.backwardNoiseMatrix_);
107  this->forwardDeltaState_.ResizeTo(other.forwardDeltaState_);
109  this->backwardDeltaState_.ResizeTo(other.backwardDeltaState_);
111 }
112 
113 
116  forwardTransportMatrix_.UnitMatrix();
117  forwardNoiseMatrix_.Zero();
118  forwardDeltaState_.Zero();
119 }
120 
123  backwardTransportMatrix_.UnitMatrix();
124  backwardNoiseMatrix_.Zero();
125  backwardDeltaState_.Zero();
126 }
127 
128 
129 void ReferenceStateOnPlane::Print(Option_t*) const {
131 
132  printOut << " forwardSegmentLength: " << forwardSegmentLength_ << "\n";
133  printOut << " forwardTransportMatrix: "; forwardTransportMatrix_.Print();
134  printOut << " forwardNoiseMatrix: "; forwardNoiseMatrix_.Print();
135  printOut << " forwardDeltaState: "; forwardDeltaState_.Print();
136 
137  printOut << " backwardSegmentLength_: " << backwardSegmentLength_ << "\n";
138  printOut << " backwardTransportMatrix: "; backwardTransportMatrix_.Print();
139  printOut << " backwardNoiseMatrix: "; backwardNoiseMatrix_.Print();
140  printOut << " backwardDeltaState: "; backwardDeltaState_.Print();
141 }
142 
143 
144 } /* End of namespace genfit */