Go to the documentation of this file.00001 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResidualsPositionFitter_H
00002 #define Alignment_MuonAlignmentAlgorithms_MuonResidualsPositionFitter_H
00003
00010 #include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h"
00011
00012 class MuonResidualsPositionFitter: public MuonResidualsFitter {
00013 public:
00014 enum {
00015 kPosition = 0,
00016 kZpos,
00017 kPhiz,
00018 kScattering,
00019 kSigma,
00020 kGamma,
00021 kNPar
00022 };
00023
00024 enum {
00025 kResidual = 0,
00026 kAngleError,
00027 kTrackAngle,
00028 kTrackPosition,
00029 kNData
00030 };
00031
00032 MuonResidualsPositionFitter(int residualsModel, int minHits, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, weightAlignment) {};
00033
00034 int type() const { return MuonResidualsFitter::kPositionFitter; };
00035
00036 int npar() {
00037 if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 1;
00038 else if (residualsModel() == kPowerLawTails) return kNPar;
00039 else if (residualsModel() == kROOTVoigt) return kNPar;
00040 else assert(false);
00041 };
00042 int ndata() { return kNData; };
00043
00044 bool fit(Alignable *ali);
00045 double sumofweights() { return numResiduals(); };
00046 double plot(std::string name, TFileDirectory *dir, Alignable *ali);
00047
00048 protected:
00049 void inform(TMinuit *tMinuit);
00050 };
00051
00052 #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsPositionFitter_H