CMS 3D CMS Logo

TrackHelixVertexFitter.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_ImpactParameter_TrackHelixVertexFitter_h
2 #define RecoTauTag_ImpactParameter_TrackHelixVertexFitter_h
3 
4 /* From SimpleFits Package
5  * Designed an written by
6  * author: Ian M. Nugent
7  * Humboldt Foundations
8  */
9 
10 // system include files
11 #include <TMatrixT.h>
12 #include <TVectorT.h>
13 #include <TLorentzVector.h>
14 #include <TVector3.h>
15 #include <TVectorD.h>
16 
21 
22 namespace tauImpactParameter {
23 
25  public:
26  enum FreeVertexPar { x0 = 0, y0, z0, NFreeVertexPar };
28  enum ExtraPar { BField0 = 0, MassOffSet = 1, NExtraPar = 1 };
29 
30  TrackHelixVertexFitter(const std::vector<TrackParticle>& particles, const TVector3& vguess);
31  virtual ~TrackHelixVertexFitter();
32 
33  virtual bool fit() = 0;
34  virtual double updateChisquare(const TVectorT<double>& inpar);
35  virtual double chiSquare() { return chi2_; }
36  virtual double ndf() { return ndf_; }
38  virtual std::vector<TrackParticle> getRefitTracks();
39  std::vector<LorentzVectorParticle> getRefitLorentzVectorParticles();
40  virtual TVector3 getVertex();
41  virtual TMatrixTSym<double> getVertexError();
42 
43  static void computedxydz(const TVectorT<double>& inpar,
44  int particle,
45  double& kappa,
46  double& lam,
47  double& phi,
48  double& x,
49  double& y,
50  double& z,
51  double& s,
52  double& dxy,
53  double& dz);
54  static TVectorT<double> computeLorentzVectorPar(const TVectorT<double>& inpar);
55 
56  protected:
58  TVectorT<double> par_;
59  TMatrixTSym<double> parcov_;
60  virtual TString freeParName(int Par);
61  double chi2_, ndf_;
62 
63  private:
64  static TVectorT<double> computePar(const TVectorT<double>& inpar);
65  static TVectorT<double> computeTrackPar(const TVectorT<double>& inpar, int p = 0);
66  static TVectorT<double> computeMotherLorentzVectorPar(const TVectorT<double>& inpar);
67 
68  static int measuredValueIndex(int TrackPar, int Particle) { return TrackPar + Particle * TrackParticle::NHelixPar; }
69  static int freeParIndex(int Par, int Particle) {
70  if (Par == x0 || Par == y0 || Par == z0)
71  return Par;
72  return Par + Particle * (NFreeTrackPar - NFreeVertexPar);
73  }
74  static void parSizeInfo(const TVectorT<double>& inpar, int& np, int& parsize, bool hasextras = false);
75 
76  std::vector<TrackParticle> particles_;
77  TVectorT<double> val_;
78  TMatrixTSym<double> cov_;
79  TMatrixTSym<double> cov_inv_;
81  };
82 
83 } // namespace tauImpactParameter
84 #endif
tauImpactParameter::TrackHelixVertexFitter::cov_
TMatrixTSym< double > cov_
Definition: TrackHelixVertexFitter.h:78
tauImpactParameter::TrackHelixVertexFitter::nVal_
int nVal_
Definition: TrackHelixVertexFitter.h:80
tauImpactParameter::TrackHelixVertexFitter::chiSquare
virtual double chiSquare()
Definition: TrackHelixVertexFitter.h:35
tauImpactParameter::TrackHelixVertexFitter::kappa0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::LorentzVectorParticle
Definition: LorentzVectorParticle.h:17
tauImpactParameter::TrackHelixVertexFitter::FreeTrackPar
FreeTrackPar
Definition: TrackHelixVertexFitter.h:27
TrackParticle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
np
int np
Definition: AMPTWrapper.h:43
tauImpactParameter::TrackHelixVertexFitter::computeMotherLorentzVectorPar
static TVectorT< double > computeMotherLorentzVectorPar(const TVectorT< double > &inpar)
Definition: TrackHelixVertexFitter.cc:234
tauImpactParameter::TrackHelixVertexFitter::particles_
std::vector< TrackParticle > particles_
Definition: TrackHelixVertexFitter.h:76
tauImpactParameter
Definition: Chi2VertexFitter.h:14
tauImpactParameter::TrackHelixVertexFitter::val_
TVectorT< double > val_
Definition: TrackHelixVertexFitter.h:77
tauImpactParameter::TrackHelixVertexFitter::NFreeVertexPar
Definition: TrackHelixVertexFitter.h:26
tauImpactParameter::TrackHelixVertexFitter::getVertex
virtual TVector3 getVertex()
Definition: TrackHelixVertexFitter.cc:143
tauImpactParameter::TrackHelixVertexFitter::x0
Definition: TrackHelixVertexFitter.h:26
tauImpactParameter::TrackHelixVertexFitter::parcov_
TMatrixTSym< double > parcov_
Definition: TrackHelixVertexFitter.h:59
tauImpactParameter::TrackHelixVertexFitter::isConfigured_
bool isConfigured_
Definition: TrackHelixVertexFitter.h:57
tauImpactParameter::TrackHelixVertexFitter::cov_inv_
TMatrixTSym< double > cov_inv_
Definition: TrackHelixVertexFitter.h:79
Particle.h
tauImpactParameter::TrackHelixVertexFitter::updateChisquare
virtual double updateChisquare(const TVectorT< double > &inpar)
Definition: TrackHelixVertexFitter.cc:68
tauImpactParameter::TrackHelixVertexFitter::phi0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::TrackHelixVertexFitter::chi2_
double chi2_
Definition: TrackHelixVertexFitter.h:61
ecalTrigSettings_cff.particles
particles
Definition: ecalTrigSettings_cff.py:11
tauImpactParameter::TrackHelixVertexFitter::NExtraPar
Definition: TrackHelixVertexFitter.h:28
tauImpactParameter::TrackHelixVertexFitter::nPar_
int nPar_
Definition: TrackHelixVertexFitter.h:80
alignCSCRings.s
s
Definition: alignCSCRings.py:92
tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
Definition: TrackHelixVertexFitter.cc:213
tauImpactParameter::TrackParticle::NHelixPar
Definition: TrackParticle.h:17
tauImpactParameter::TrackHelixVertexFitter::BField0
Definition: TrackHelixVertexFitter.h:28
tauImpactParameter::TrackHelixVertexFitter::getRefitTracks
virtual std::vector< TrackParticle > getRefitTracks()
Definition: TrackHelixVertexFitter.cc:75
tauImpactParameter::TrackHelixVertexFitter
Definition: TrackHelixVertexFitter.h:24
tauImpactParameter::TrackHelixVertexFitter::lambda0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::TrackHelixVertexFitter::parSizeInfo
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=false)
Definition: TrackHelixVertexFitter.cc:290
tauImpactParameter::TrackHelixVertexFitter::ExtraPar
ExtraPar
Definition: TrackHelixVertexFitter.h:28
LorentzVectorParticle.h
tauImpactParameter::TrackHelixVertexFitter::freeParName
virtual TString freeParName(int Par)
Definition: TrackHelixVertexFitter.cc:265
tauImpactParameter::TrackHelixVertexFitter::getVertexError
virtual TMatrixTSym< double > getVertexError()
Definition: TrackHelixVertexFitter.cc:147
tauImpactParameter::TrackHelixVertexFitter::computePar
static TVectorT< double > computePar(const TVectorT< double > &inpar)
Definition: TrackHelixVertexFitter.cc:188
tauImpactParameter::TrackHelixVertexFitter::measuredValueIndex
static int measuredValueIndex(int TrackPar, int Particle)
Definition: TrackHelixVertexFitter.h:68
tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::TrackHelixVertexFitter::ndf_
double ndf_
Definition: TrackHelixVertexFitter.h:61
tauImpactParameter::TrackHelixVertexFitter::ndf
virtual double ndf()
Definition: TrackHelixVertexFitter.h:36
tauImpactParameter::TrackHelixVertexFitter::FreeVertexPar
FreeVertexPar
Definition: TrackHelixVertexFitter.h:26
tauImpactParameter::TrackHelixVertexFitter::computeTrackPar
static TVectorT< double > computeTrackPar(const TVectorT< double > &inpar, int p=0)
Definition: TrackHelixVertexFitter.cc:200
tauImpactParameter::TrackHelixVertexFitter::freeParIndex
static int freeParIndex(int Par, int Particle)
Definition: TrackHelixVertexFitter.h:69
tauImpactParameter::TrackHelixVertexFitter::MassOffSet
Definition: TrackHelixVertexFitter.h:28
tauImpactParameter::TrackHelixVertexFitter::fit
virtual bool fit()=0
tauImpactParameter::TrackHelixVertexFitter::~TrackHelixVertexFitter
virtual ~TrackHelixVertexFitter()
Definition: TrackHelixVertexFitter.cc:66
tauImpactParameter::TrackHelixVertexFitter::computedxydz
static void computedxydz(const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)
Definition: TrackHelixVertexFitter.cc:157
tauImpactParameter::TrackHelixVertexFitter::nParticles_
int nParticles_
Definition: TrackHelixVertexFitter.h:80
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
PVValHelper::dz
Definition: PVValidationHelpers.h:50
tauImpactParameter::TrackHelixVertexFitter::getRefitLorentzVectorParticles
std::vector< LorentzVectorParticle > getRefitLorentzVectorParticles()
Definition: TrackHelixVertexFitter.cc:99
tauImpactParameter::TrackHelixVertexFitter::getMother
LorentzVectorParticle getMother(int pdgid)
Definition: TrackHelixVertexFitter.cc:121
tauImpactParameter::TrackHelixVertexFitter::TrackHelixVertexFitter
TrackHelixVertexFitter(const std::vector< TrackParticle > &particles, const TVector3 &vguess)
Definition: TrackHelixVertexFitter.cc:13
Particle
Definition: Particle.py:1
tauImpactParameter::TrackHelixVertexFitter::isFit_
bool isFit_
Definition: TrackHelixVertexFitter.h:57
tauImpactParameter::TrackHelixVertexFitter::par_
TVectorT< double > par_
Definition: TrackHelixVertexFitter.h:58
tauImpactParameter::TrackHelixVertexFitter::y0
Definition: TrackHelixVertexFitter.h:26
tauImpactParameter::TrackHelixVertexFitter::z0
Definition: TrackHelixVertexFitter.h:26
kappa
static const G4double kappa
Definition: UrbanMscModel93.cc:35
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:30
ErrorMatrixPropagator.h