CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h

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