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