CMS 3D CMS Logo

ChiSquaredFitBase.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
2 #define L1Trigger_TrackFindingTMTT_ChiSquaredFitBase_h
3 
5 
7 
12 #include <TMatrixD.h>
13 #include <TVectorD.h>
14 
15 #include <vector>
16 #include <map>
17 #include <utility>
18 
19 namespace tmtt {
20 
22  public:
23  enum PAR_IDS { INVR, PHI0, T, Z0, D0 };
24 
25  public:
26  ChiSquaredFitBase(const Settings* settings, const uint nPar);
27 
28  L1fittedTrack fit(const L1track3D& l1track3D) override;
29 
30  protected:
31  /* Methods */
32  virtual TVectorD seed(const L1track3D& l1track3D) = 0;
33  virtual TVectorD residuals(const TVectorD& x) = 0; // Stub residuals/uncertainty
34  virtual TMatrixD D(const TVectorD& x) = 0; // derivatives
35  virtual TMatrixD Vinv() = 0; // Covariances
36 
37  /* Variables */
38  double qOverPt_seed_;
39  std::vector<Stub*> stubs_;
40  TVectorD trackParams_;
44  double chiSq_;
45 
46  private:
47  void calculateChiSq(const TVectorD& resids);
48  void calculateDeltaChiSq(const TVectorD& deltaX, const TVectorD& covX);
49 
54 
55  unsigned int minStubLayers_;
56  unsigned int minStubLayersRed_;
57  };
58 
59 } // namespace tmtt
60 
61 #endif
tmtt::ChiSquaredFitBase::Vinv
virtual TMatrixD Vinv()=0
tmtt::ChiSquaredFitBase::PAR_IDS
PAR_IDS
Definition: ChiSquaredFitBase.h:23
tmtt::ChiSquaredFitBase::residuals
virtual TVectorD residuals(const TVectorD &x)=0
tmtt::ChiSquaredFitBase::Z0
Definition: ChiSquaredFitBase.h:23
tmtt::ChiSquaredFitBase::calculateDeltaChiSq
void calculateDeltaChiSq(const TVectorD &deltaX, const TVectorD &covX)
Definition: ChiSquaredFitBase.cc:39
tmtt::ChiSquaredFitBase::INVR
Definition: ChiSquaredFitBase.h:23
tmtt::ChiSquaredFitBase::PHI0
Definition: ChiSquaredFitBase.h:23
tmtt::ChiSquaredFitBase::calculateChiSq
void calculateChiSq(const TVectorD &resids)
Definition: ChiSquaredFitBase.cc:30
tmtt::ChiSquaredFitBase::fit
L1fittedTrack fit(const L1track3D &l1track3D) override
Definition: ChiSquaredFitBase.cc:45
Stub.h
tmtt::ChiSquaredFitBase::nPar_
uint nPar_
Definition: ChiSquaredFitBase.h:41
tmtt::ChiSquaredFitBase
Definition: ChiSquaredFitBase.h:21
L1track3D.h
tmtt::ChiSquaredFitBase::minStubLayersRed_
unsigned int minStubLayersRed_
Definition: ChiSquaredFitBase.h:56
parallelization.uint
uint
Definition: parallelization.py:124
HcalResponse_cfi.nPar
nPar
Definition: HcalResponse_cfi.py:33
tmtt::TrackFitGeneric
Definition: TrackFitGeneric.h:18
tmtt::ChiSquaredFitBase::generalResidualCut_
double generalResidualCut_
Definition: ChiSquaredFitBase.h:52
tmtt::ChiSquaredFitBase::killingResidualCut_
double killingResidualCut_
Definition: ChiSquaredFitBase.h:53
tmtt::ChiSquaredFitBase::trackParams_
TVectorD trackParams_
Definition: ChiSquaredFitBase.h:40
tmtt::ChiSquaredFitBase::minStubLayers_
unsigned int minStubLayers_
Definition: ChiSquaredFitBase.h:55
tmtt::ChiSquaredFitBase::D0
Definition: ChiSquaredFitBase.h:23
tmtt::ChiSquaredFitBase::D
virtual TMatrixD D(const TVectorD &x)=0
tmtt::L1fittedTrack
Definition: L1fittedTrack.h:30
tmtt::ChiSquaredFitBase::seed
virtual TVectorD seed(const L1track3D &l1track3D)=0
tmtt::Settings
Definition: Settings.h:17
tmtt::ChiSquaredFitBase::numFittingIterations_
int numFittingIterations_
Definition: ChiSquaredFitBase.h:50
tmtt::ChiSquaredFitBase::qOverPt_seed_
double qOverPt_seed_
Definition: ChiSquaredFitBase.h:38
tmtt::ChiSquaredFitBase::largestresid_
float largestresid_
Definition: ChiSquaredFitBase.h:42
tmtt::ChiSquaredFitBase::stubs_
std::vector< Stub * > stubs_
Definition: ChiSquaredFitBase.h:39
Settings.h
tmtt::ChiSquaredFitBase::killTrackFitWorstHit_
int killTrackFitWorstHit_
Definition: ChiSquaredFitBase.h:51
TrackFitGeneric.h
tmtt::ChiSquaredFitBase::ChiSquaredFitBase
ChiSquaredFitBase(const Settings *settings, const uint nPar)
Definition: ChiSquaredFitBase.cc:17
tmtt::ChiSquaredFitBase::T
Definition: ChiSquaredFitBase.h:23
tmtt::L1track3D
Definition: L1track3D.h:24
tmtt
=== This is the base class for the linearised chi-squared track fit algorithms.
Definition: Array2D.h:16
tmtt::ChiSquaredFitBase::chiSq_
double chiSq_
Definition: ChiSquaredFitBase.h:44
tmtt::ChiSquaredFitBase::ilargestresid_
int ilargestresid_
Definition: ChiSquaredFitBase.h:43