SND@LHC Software
Loading...
Searching...
No Matches
MeasurementOnPlane.h
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
24#ifndef genfit_MeasurementOnPlane_h
25#define genfit_MeasurementOnPlane_h
26
28#include "AbsHMatrix.h"
29
30#include <TMatrixD.h>
31
32#include <cmath>
33
34
35namespace genfit {
36
45
46 public:
47
48 MeasurementOnPlane(const AbsTrackRep* rep = NULL) :
49 MeasuredStateOnPlane(rep), hMatrix_(NULL), weight_(0) {}
50 MeasurementOnPlane(const TVectorD& state, const TMatrixDSym& cov, SharedPlanePtr plane, const AbsTrackRep* rep, const AbsHMatrix* hMatrix, double weight = 1.) :
51 MeasuredStateOnPlane(state, cov, plane, rep), hMatrix_(hMatrix), weight_(weight) {}
52
57 void swap(MeasurementOnPlane& other);
58
60
61 const AbsHMatrix* getHMatrix() const {return hMatrix_.get();}
62 double getWeight() const {return weight_;}
63
64 TMatrixDSym getWeightedCov() {return weight_*cov_;}
65
66 void setHMatrix(const AbsHMatrix* hMatrix) {hMatrix_.reset(hMatrix);}
67 void setWeight(double weight) {weight_ = fmax(weight, 1.E-10);}
68
69 void Print(Option_t* option = "") const ;
70
71 protected:
72
73#ifndef __CINT__
74 boost::scoped_ptr<const AbsHMatrix> hMatrix_; // Ownership
75#else
76 const AbsHMatrix* hMatrix_;
77#endif
78 double weight_;
79
80 public:
81 ClassDef(MeasurementOnPlane,1)
82
83};
84
85} /* End of namespace */
88#endif // _MeasurementOnPlane_h
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition AbsHMatrix.h:37
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
StateOnPlane with additional covariance matrix.
Measured coordinates on a plane.
MeasurementOnPlane(const TVectorD &state, const TMatrixDSym &cov, SharedPlanePtr plane, const AbsTrackRep *rep, const AbsHMatrix *hMatrix, double weight=1.)
void Print(Option_t *option="") const
void setHMatrix(const AbsHMatrix *hMatrix)
void swap(MeasurementOnPlane &other)
MeasurementOnPlane & operator=(MeasurementOnPlane other)
assignment operator
boost::scoped_ptr< const AbsHMatrix > hMatrix_
void setWeight(double weight)
const AbsHMatrix * getHMatrix() const
MeasurementOnPlane(const AbsTrackRep *rep=NULL)
Matrix inversion tools.
Definition AbsBField.h:29
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.