SND@LHC Software
Loading...
Searching...
No Matches
ReferenceStateOnPlane.cc
Go to the documentation of this file.
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
21
22#include <iostream>
23
24
25namespace genfit {
26
29 forwardSegmentLength_(0),
30 backwardSegmentLength_(0),
31 forwardTransportMatrix_(),
32 backwardTransportMatrix_(),
33 forwardNoiseMatrix_(),
34 backwardNoiseMatrix_(),
35 forwardDeltaState_(),
36 backwardDeltaState_()
37{
38 ;
39}
40
42 const SharedPlanePtr& plane,
43 const AbsTrackRep* rep) :
44 StateOnPlane(state, plane, rep),
45 forwardSegmentLength_(0),
46 backwardSegmentLength_(0),
47 forwardTransportMatrix_(rep->getDim(), rep->getDim()),
48 backwardTransportMatrix_(rep->getDim(), rep->getDim()),
49 forwardNoiseMatrix_(rep->getDim()),
50 backwardNoiseMatrix_(rep->getDim()),
51 forwardDeltaState_(rep->getDim()),
52 backwardDeltaState_(rep->getDim())
53{
54 ;
55}
56
58 const SharedPlanePtr& plane,
59 const AbsTrackRep* rep,
60 const TVectorD& auxInfo) :
61 StateOnPlane(state, plane, rep, auxInfo),
62 forwardSegmentLength_(0),
63 backwardSegmentLength_(0),
64 forwardTransportMatrix_(rep->getDim(), rep->getDim()),
65 backwardTransportMatrix_(rep->getDim(), rep->getDim()),
66 forwardNoiseMatrix_(rep->getDim()),
67 backwardNoiseMatrix_(rep->getDim()),
68 forwardDeltaState_(rep->getDim()),
69 backwardDeltaState_(rep->getDim())
70{
71 ;
72}
73
74
76 StateOnPlane(state),
77 forwardSegmentLength_(0),
78 backwardSegmentLength_(0),
79 forwardTransportMatrix_(state.getRep()->getDim(), state.getRep()->getDim()),
80 backwardTransportMatrix_(state.getRep()->getDim(), state.getRep()->getDim()),
81 forwardNoiseMatrix_(state.getRep()->getDim()),
82 backwardNoiseMatrix_(state.getRep()->getDim()),
83 forwardDeltaState_(state.getRep()->getDim()),
84 backwardDeltaState_(state.getRep()->getDim())
85{
86 std::cout << "should never come here" << std::endl;
87 exit(0);
88}
89
90
95
97 StateOnPlane::swap(other);
98 std::swap(this->forwardSegmentLength_, other.forwardSegmentLength_);
99 std::swap(this->backwardSegmentLength_, other.backwardSegmentLength_);
101 std::swap(this->forwardTransportMatrix_, other.forwardTransportMatrix_);
104 this->forwardNoiseMatrix_.ResizeTo(other.forwardNoiseMatrix_);
105 std::swap(this->forwardNoiseMatrix_, other.forwardNoiseMatrix_);
106 this->backwardNoiseMatrix_.ResizeTo(other.backwardNoiseMatrix_);
107 std::swap(this->backwardNoiseMatrix_, other.backwardNoiseMatrix_);
108 this->forwardDeltaState_.ResizeTo(other.forwardDeltaState_);
109 std::swap(this->forwardDeltaState_, other.forwardDeltaState_);
110 this->backwardDeltaState_.ResizeTo(other.backwardDeltaState_);
111 std::swap(this->backwardDeltaState_, other.backwardDeltaState_);
112}
113
114
121
128
129
130void ReferenceStateOnPlane::Print(Option_t*) const {
132
133 std::cout << " forwardSegmentLength: " << forwardSegmentLength_ << "\n";
134 std::cout << " forwardTransportMatrix: "; forwardTransportMatrix_.Print();
135 std::cout << " forwardNoiseMatrix: "; forwardNoiseMatrix_.Print();
136 std::cout << " forwardDeltaState: "; forwardDeltaState_.Print();
137
138 std::cout << " backwardSegmentLength_: " << backwardSegmentLength_ << "\n";
139 std::cout << " backwardTransportMatrix: "; backwardTransportMatrix_.Print();
140 std::cout << " backwardNoiseMatrix: "; backwardNoiseMatrix_.Print();
141 std::cout << " backwardDeltaState: "; backwardDeltaState_.Print();
142
143}
144
145
146} /* End of namespace genfit */
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
StateOnPlane with linearized transport to that ReferenceStateOnPlane from previous and next Reference...
virtual void Print(Option_t *option="") const
void swap(ReferenceStateOnPlane &other)
StateOnPlane & operator=(ReferenceStateOnPlane other)
A state with arbitrary dimension defined in a DetPlane.
virtual void Print(Option_t *option="") const
void swap(StateOnPlane &other)
Matrix inversion tools.
Definition AbsBField.h:29
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.