SND@LHC Software
Loading...
Searching...
No Matches
AbsMeasurement.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*/
23#ifndef genfit_AbsMeasurement_h
24#define genfit_AbsMeasurement_h
25
26#include "MeasurementOnPlane.h"
27#include "AbsHMatrix.h"
28
29#include <TObject.h>
30
31
32namespace genfit {
33
34class AbsTrackRep;
35class TrackPoint;
36
42class AbsMeasurement : public TObject {
43
44 public:
45
47 AbsMeasurement(int nDims) : rawHitCoords_(nDims), rawHitCov_(nDims), detId_(-1), hitId_(-1) {;}
48 AbsMeasurement(const TVectorD& rawHitCoords, const TMatrixDSym& rawHitCov, int detId, int hitId, TrackPoint* trackPoint);
49
50 virtual ~AbsMeasurement();
51
53 virtual AbsMeasurement* clone() const = 0;
54
57
58 const TVectorD& getRawHitCoords() const {return rawHitCoords_;}
59 const TMatrixDSym& getRawHitCov() const {return rawHitCov_;}
60 int getDetId() const {return detId_;}
61 int getHitId() const {return hitId_;}
62
63 unsigned int getDim() const {return rawHitCoords_.GetNrows();}
64
65 void setDetId(int detId) {detId_ = detId;}
66 void setHitId(int hitId) {hitId_ = hitId;}
67
68
76 virtual SharedPlanePtr constructPlane(const StateOnPlane& state) const = 0;
77
87 virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const StateOnPlane& state) const = 0;
88
92 virtual const AbsHMatrix* constructHMatrix(const AbsTrackRep*) const = 0;
93
94 virtual void Print(const Option_t* = "") const;
95
96
97 private:
99 AbsMeasurement& operator=(const AbsMeasurement&); // default cannot work because TVector and TMatrix = operators don't do resizing
100
101 protected:
104
106 TMatrixDSym rawHitCov_;
107 int detId_; // detId id is -1 per default
108 int hitId_; // hitId id is -1 per default
109
112
113 public:
114 ClassDef(AbsMeasurement, 1)
115
116};
117
118} /* End of namespace genfit */
121#endif // genfit_AbsMeasurement_h
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition AbsHMatrix.h:37
Contains the measurement and covariance in raw detector coordinates.
virtual void Print(const Option_t *="") const
void setTrackPoint(TrackPoint *tp)
TrackPoint * trackPoint_
Pointer to TrackPoint where the measurement belongs to.
void setHitId(int hitId)
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const StateOnPlane &state) const =0
virtual const AbsHMatrix * constructHMatrix(const AbsTrackRep *) const =0
virtual AbsMeasurement * clone() const =0
Deep copy ctor for polymorphic class.
void setDetId(int detId)
TrackPoint * getTrackPoint() const
AbsMeasurement & operator=(const AbsMeasurement &)
protect from calling assignment operator from outside the class. Use clone() if you want a copy!
const TMatrixDSym & getRawHitCov() const
const TVectorD & getRawHitCoords() const
unsigned int getDim() const
virtual SharedPlanePtr constructPlane(const StateOnPlane &state) const =0
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
A state with arbitrary dimension defined in a DetPlane.
Object containing AbsMeasurement and AbsFitterInfo objects.
Definition TrackPoint.h:50
Matrix inversion tools.
Definition AbsBField.h:29
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.