Go to the documentation of this file.00001 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H
00002 #define Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H
00003
00010 #ifdef STANDALONE_FITTER
00011 #include "MuonResidualsFitter.h"
00012 #else
00013 #include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h"
00014 #endif
00015
00016 class TTree;
00017
00018 class MuonResiduals5DOFFitter: public MuonResidualsFitter
00019 {
00020 public:
00021 enum {
00022 kAlignX = 0,
00023 kAlignZ,
00024 kAlignPhiX,
00025 kAlignPhiY,
00026 kAlignPhiZ,
00027 kResidSigma,
00028 kResSlopeSigma,
00029 kAlpha,
00030 kResidGamma,
00031 kResSlopeGamma,
00032 kNPar
00033 };
00034
00035 enum {
00036 kResid = 0,
00037 kResSlope,
00038 kPositionX,
00039 kPositionY,
00040 kAngleX,
00041 kAngleY,
00042 kRedChi2,
00043 kPz,
00044 kPt,
00045 kCharge,
00046 kNData
00047 };
00048
00049 MuonResiduals5DOFFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {}
00050 virtual ~MuonResiduals5DOFFitter(){}
00051
00052 int type() const { return MuonResidualsFitter::k5DOF; }
00053
00054 int npar() {
00055 if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D || residualsModel() == kGaussPowerTails) return kNPar - 2;
00056 else if (residualsModel() == kPowerLawTails) return kNPar;
00057 else if (residualsModel() == kROOTVoigt) return kNPar;
00058 else assert(false);
00059 }
00060 int ndata() { return kNData; }
00061
00062 double sumofweights();
00063 bool fit(Alignable *ali);
00064 double plot(std::string name, TFileDirectory *dir, Alignable *ali);
00065
00066 void correctBField();
00067
00068 TTree * readNtuple(std::string fname, unsigned int wheel, unsigned int station, unsigned int sector, unsigned int preselected = 1);
00069
00070 protected:
00071 void inform(TMinuit *tMinuit);
00072 };
00073
00074 #endif // Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H