File indexing completed on 2023-03-17 11:23:25
0001 #ifndef KinematicParticle_H
0002 #define KinematicParticle_H
0003
0004 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
0006 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
0007
0008 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 class KinematicConstraint;
0019 class KinematicTree;
0020
0021 class KinematicParticle : public ReferenceCounted {
0022 public:
0023 typedef ReferenceCountingPointer<LinearizedTrackState<6> > RefCountedLinearizedTrackState;
0024
0025 friend class KinematicParticleVertexFitter;
0026 friend class KinematicTree;
0027
0028
0029
0030
0031
0032
0033 KinematicParticle() {}
0034
0035 ~KinematicParticle() override;
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 virtual bool operator==(const KinematicParticle& other) const = 0;
0046
0047 virtual bool operator==(const ReferenceCountingPointer<KinematicParticle>& other) const = 0;
0048
0049 virtual bool operator!=(const KinematicParticle& other) const = 0;
0050
0051
0052
0053
0054
0055
0056 virtual bool operator<(const KinematicParticle& other) const;
0057
0058
0059
0060
0061
0062 virtual KinematicState initialState() const;
0063
0064
0065
0066
0067 virtual KinematicState currentState() const;
0068
0069
0070
0071
0072
0073
0074 virtual KinematicState stateAtPoint(const GlobalPoint& point) const = 0;
0075
0076
0077
0078
0079
0080
0081
0082 virtual ReferenceCountingPointer<KinematicParticle> refittedParticle(const KinematicState& state,
0083 float chi2,
0084 float ndf,
0085 KinematicConstraint* cons = nullptr) const = 0;
0086
0087
0088
0089
0090
0091
0092 virtual RefCountedLinearizedTrackState particleLinearizedTrackState(const GlobalPoint& point) const = 0;
0093
0094
0095
0096
0097
0098 virtual KinematicConstraint* lastConstraint() const;
0099
0100
0101
0102
0103
0104 virtual ReferenceCountingPointer<KinematicParticle> previousParticle() const;
0105
0106
0107
0108
0109
0110
0111
0112 virtual KinematicTree* correspondingTree() const;
0113
0114
0115
0116
0117
0118 virtual float chiSquared() const;
0119
0120 virtual float degreesOfFreedom() const;
0121
0122 const MagneticField* magneticField() const { return theField; }
0123
0124 reco::TransientTrack refittedTransientTrack() const;
0125
0126 protected:
0127 virtual void setTreePointer(KinematicTree* tr) const;
0128
0129
0130
0131
0132
0133
0134 const MagneticField* theField;
0135
0136
0137
0138 mutable KinematicTree* tree;
0139
0140
0141 mutable KinematicConstraint* lConstraint;
0142
0143
0144 mutable ReferenceCountingPointer<KinematicParticle> pState;
0145
0146
0147
0148 KinematicState initState;
0149
0150
0151 mutable KinematicState cState;
0152
0153
0154 float chi2;
0155
0156 float ndf;
0157 };
0158 #endif