GENFIT Rev: NoNumberAvailable
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*/
22
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), trackPoint_(nullptr) {;}
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 TVectorD& getRawHitCoords() {return rawHitCoords_;}
61 TMatrixDSym& getRawHitCov() {return rawHitCov_;}
62 int getDetId() const {return detId_;}
63 int getHitId() const {return hitId_;}
64
66 virtual bool isLeftRightMeasurement() const {return false;}
67 virtual int getLeftRightResolution() const {return 0;}
68
69 unsigned int getDim() const {return rawHitCoords_.GetNrows();}
70
71 void setRawHitCoords(const TVectorD& coords) {rawHitCoords_ = coords;}
72 void setRawHitCov(const TMatrixDSym& cov) {rawHitCov_ = cov;}
73 void setDetId(int detId) {detId_ = detId;}
74 void setHitId(int hitId) {hitId_ = hitId;}
75
76
84 virtual SharedPlanePtr constructPlane(const StateOnPlane& state) const = 0;
85
95 virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const StateOnPlane& state) const = 0;
96
100 virtual const AbsHMatrix* constructHMatrix(const AbsTrackRep*) const = 0;
101
102 virtual void Print(const Option_t* = "") const;
103
104
105 private:
107 AbsMeasurement& operator=(const AbsMeasurement&); // default cannot work because TVector and TMatrix = operators don't do resizing
108
109 protected:
112
114 TMatrixDSym rawHitCov_;
115 int detId_; // detId id is -1 per default
116 int hitId_; // hitId id is -1 per default
117
120
121 public:
122 ClassDef(AbsMeasurement, 3)
123};
124
125} /* End of namespace genfit */
127
128#endif // genfit_AbsMeasurement_h
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition AbsHMatrix.h:37
virtual void Print(const Option_t *="") const
void setTrackPoint(TrackPoint *tp)
TVectorD & getRawHitCoords()
TrackPoint * trackPoint_
Pointer to TrackPoint where the measurement belongs to.
void setHitId(int hitId)
virtual bool isLeftRightMeasurement() const
If the AbsMeasurement is a wire hit, the left/right resolution will be used.
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const StateOnPlane &state) const =0
virtual const AbsHMatrix * constructHMatrix(const AbsTrackRep *) const =0
virtual int getLeftRightResolution() const
virtual AbsMeasurement * clone() const =0
Deep copy ctor for polymorphic class.
void setRawHitCoords(const TVectorD &coords)
void setRawHitCov(const TMatrixDSym &cov)
void setDetId(int detId)
TrackPoint * getTrackPoint() const
TMatrixDSym & getRawHitCov()
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:46
Defines for I/O streams used for error and debug printing.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.