Go to the documentation of this file.00001 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H
00002 #define Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H
00003
00010 #include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h"
00011
00012 class MuonResiduals5DOFFitter: public MuonResidualsFitter {
00013 public:
00014 enum {
00015 kAlignX = 0,
00016 kAlignZ,
00017 kAlignPhiX,
00018 kAlignPhiY,
00019 kAlignPhiZ,
00020 kResidSigma,
00021 kResSlopeSigma,
00022 kAlpha,
00023 kResidGamma,
00024 kResSlopeGamma,
00025 kNPar
00026 };
00027
00028 enum {
00029 kResid = 0,
00030 kResSlope,
00031 kPositionX,
00032 kPositionY,
00033 kAngleX,
00034 kAngleY,
00035 kRedChi2,
00036 kNData
00037 };
00038
00039 MuonResiduals5DOFFitter(int residualsModel, int minHits, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, weightAlignment) {};
00040
00041 int type() const { return MuonResidualsFitter::k5DOF; };
00042
00043 int npar() {
00044 if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 2;
00045 else if (residualsModel() == kPowerLawTails) return kNPar;
00046 else if (residualsModel() == kROOTVoigt) return kNPar;
00047 else assert(false);
00048 };
00049 int ndata() { return kNData; };
00050
00051 double sumofweights();
00052 bool fit(Alignable *ali);
00053 double plot(std::string name, TFileDirectory *dir, Alignable *ali);
00054
00055 protected:
00056 void inform(TMinuit *tMinuit);
00057 };
00058
00059 double MuonResiduals5DOFFitter_resid(double delta_x, double delta_z, double delta_phix, double delta_phiy, double delta_phiz, double track_x, double track_y, double track_dxdz, double track_dydz, double alpha, double resslope);
00060 double MuonResiduals5DOFFitter_resslope(double delta_x, double delta_z, double delta_phix, double delta_phiy, double delta_phiz, double track_x, double track_y, double track_dxdz, double track_dydz);
00061
00062 #endif // Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H