forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cms-tau-pog/CMSSW_5_3_X_HighPt
Merging highPt fixes into boostedTaus
- Loading branch information
Showing
39 changed files
with
2,432 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* From SimpleFits Package | ||
* Designed an written by | ||
* author: Ian M. Nugent | ||
* Humboldt Foundations | ||
*/ | ||
|
||
#ifndef Chi2VertexFitter_h | ||
#define Chi2VertexFitter_h | ||
|
||
#include "Minuit2/FunctionMinimum.h" | ||
#include "Minuit2/FCNBase.h" | ||
#include "RecoTauTag/ImpactParameter/interface/TrackHelixVertexFitter.h" | ||
|
||
class Chi2VertexFitter : public TrackHelixVertexFitter { | ||
public: | ||
Chi2VertexFitter(std::vector<TrackParticle> &particles,TVector3 vguess,double nsigma_=4.0):TrackHelixVertexFitter(particles,vguess),nsigma(nsigma_){}; | ||
virtual ~Chi2VertexFitter(){}; | ||
|
||
virtual bool Fit(); | ||
|
||
private: | ||
double nsigma; | ||
}; | ||
#endif | ||
|
||
|
30 changes: 30 additions & 0 deletions
30
RecoTauTag/ImpactParameter/interface/ChiSquareFunctionUpdator.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* From SimpleFits Package | ||
* Designed an written by | ||
* author: Ian M. Nugent | ||
* Humboldt Foundations | ||
*/ | ||
#ifndef ChiSquareFunctionUpdator_h | ||
#define ChiSquareFunctionUpdator_h | ||
|
||
#include "Minuit2/FCNBase.h" | ||
#include "TMatrixT.h" | ||
#include "RecoTauTag/ImpactParameter/interface/TrackHelixVertexFitter.h" | ||
|
||
class ChiSquareFunctionUpdator : public ROOT::Minuit2::FCNBase { | ||
public: | ||
ChiSquareFunctionUpdator(TrackHelixVertexFitter *VF_){VF=VF_;} | ||
virtual ~ChiSquareFunctionUpdator(){}; | ||
|
||
virtual double operator() (const std::vector<double> & x)const{ | ||
TMatrixT<double> X(x.size(),1); | ||
for(unsigned int i=0; i<x.size();i++){X(i,0)=x.at(i);} | ||
return VF->UpdateChisquare(X); | ||
} | ||
virtual double Up()const{return 1.0;}// Error definiton for Chi^2 | ||
|
||
private: | ||
TrackHelixVertexFitter *VF; | ||
|
||
}; | ||
#endif | ||
|
20 changes: 20 additions & 0 deletions
20
RecoTauTag/ImpactParameter/interface/ErrorMatrixPropagator.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* From SimpleFits Package | ||
* Designed an written by | ||
* author: Ian M. Nugent | ||
* Humboldt Foundations | ||
*/ | ||
#ifndef ErrorMatrixPropagator_h | ||
#define ErrorMatrixPropagator_h | ||
|
||
#include "TMatrixT.h" | ||
#include "TMatrixTSym.h" | ||
|
||
class ErrorMatrixPropagator { | ||
public: | ||
ErrorMatrixPropagator(){}; | ||
virtual ~ErrorMatrixPropagator(){}; | ||
static TMatrixTSym<double> PropogateError(TMatrixT<double> (*f)(TMatrixT<double> &par),TMatrixT<double> inPar,TMatrixTSym<double> inCov, double epsilon=0.001, double errorEpsilonRatio=1000); | ||
}; | ||
#endif | ||
|
||
|
This file was deleted.
Oops, something went wrong.
76 changes: 76 additions & 0 deletions
76
RecoTauTag/ImpactParameter/interface/LagrangeMultipliersFitter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* From SimpleFits Package | ||
* Designed an written by | ||
* author: Ian M. Nugent | ||
* Humboldt Foundations | ||
*/ | ||
#ifndef LagrangeMultipliersFitter_H | ||
#define LagrangeMultipliersFitter_H | ||
|
||
#include "RecoTauTag/ImpactParameter/interface/LorentzVectorParticle.h" | ||
#include "TMatrixT.h" | ||
#include "TVectorT.h" | ||
#include "TMatrixTSym.h" | ||
#include <vector> | ||
|
||
class LagrangeMultipliersFitter{ | ||
public: | ||
enum Position{pos_x=0,pos_y,pos_z,nposdim}; | ||
enum Parameters{par_vx=0,par_vy,par_vz,par_px,par_py,par_pz,par_m,npardim}; | ||
enum ConvergeProc{ConstraintMin=0,Chi2Min,Chi2AndConstaintMin}; | ||
|
||
LagrangeMultipliersFitter(); | ||
virtual ~LagrangeMultipliersFitter(){}; | ||
|
||
virtual void SetWeight(double weight){weight_=weight;} | ||
virtual void SetMaxDelta(double MaxDelta){MaxDelta_=MaxDelta;} | ||
virtual void SetNIterMax(int Nitermax){nitermax_=Nitermax;} | ||
|
||
virtual bool Fit(); | ||
virtual bool isConverged(); | ||
virtual bool isConfigured(){return isconfigured;} | ||
virtual double ChiSquare(){return chi2;} | ||
virtual double CSum(){return delta;}; | ||
virtual double NIter(){return niter;}; | ||
virtual double NConstraints()=0; | ||
virtual double NDF()=0; | ||
virtual int NDaughters()=0; | ||
|
||
virtual std::vector<LorentzVectorParticle> GetReFitDaughters()=0; | ||
virtual LorentzVectorParticle GetMother()=0; | ||
|
||
static TVectorT<double> convertToVector(TMatrixT<double> M); | ||
static TMatrixT<double> convertToMatrix(TVectorT<double> V); | ||
|
||
protected: | ||
virtual TVectorD Value(TVectorD &v)=0; | ||
|
||
TVectorD par_0; // parameter values for linearization point | ||
TVectorD par; // current parameter values | ||
TMatrixTSym<double> cov_0; //covariance matrix for linearization point (corresponding to par_0) | ||
TMatrixTSym<double> cov; // current covariance matrix (corresponding to par) | ||
bool isconfigured; | ||
bool isFit; | ||
|
||
private: | ||
bool ApplyLagrangianConstraints(); | ||
TMatrixT<double> Derivative(); | ||
double ChiSquare(TMatrixT<double> delta_alpha,TMatrixT<double> lambda,TMatrixT<double> D,TMatrixT<double> d); | ||
double ChiSquareUsingInitalPoint(TMatrixT<double> alpha,TMatrixT<double> lambda); | ||
double ConstraintDelta(TVectorT<double> par); | ||
TMatrixT<double> ComputeVariance(); | ||
|
||
// Configuration parameters | ||
double epsilon_,weight_,MaxDelta_,nitermax_; | ||
|
||
// Fit variables | ||
double chi2,chi2prev,delta,niter; | ||
|
||
// covariances and derivatives info | ||
TMatrixTSym<double> V_alpha0_inv; | ||
TMatrixT<double> D; | ||
TMatrixTSym<double> V_D; | ||
double ScaleFactor; | ||
TMatrixT<double> V_corr_prev; | ||
|
||
}; | ||
#endif |
Oops, something went wrong.