CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFrphiFitter.h

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