Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:43

0001 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResidualsBfieldAngleFitter_H
0002 #define Alignment_MuonAlignmentAlgorithms_MuonResidualsBfieldAngleFitter_H
0003 
0004 /** \class MuonResidualsBfieldAngleFitter
0005  *  $Date: 2010/03/12 22:23:26 $
0006  *  $Revision: 1.5 $
0007  *  \author J. Pivarski - Texas A&M University <pivarski@physics.tamu.edu>
0008  */
0009 
0010 #include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h"
0011 
0012 class MuonResidualsBfieldAngleFitter : public MuonResidualsFitter {
0013 public:
0014   enum { kAngle = 0, kBfrompt, kBfrompz, kdEdx, kSigma, kGamma, kNPar };
0015 
0016   enum { kResidual = 0, kQoverPt, kQoverPz, kNData };
0017 
0018   MuonResidualsBfieldAngleFitter(int residualsModel, int minHitsPerRegion, int useResiduals, bool weightAlignment = true)
0019       : MuonResidualsFitter(residualsModel, minHitsPerRegion, useResiduals, weightAlignment) {}
0020 
0021   int type() const override { return MuonResidualsFitter::kAngleBfieldFitter; }
0022 
0023   int npar() override {
0024     if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails)
0025       return kNPar - 1;
0026     else if (residualsModel() == kPowerLawTails)
0027       return kNPar;
0028     else if (residualsModel() == kROOTVoigt)
0029       return kNPar;
0030     else
0031       assert(false);
0032   }
0033   int ndata() override { return kNData; }
0034 
0035   bool fit(Alignable *ali) override;
0036   double sumofweights() override { return numResiduals(); }
0037   double plot(std::string name, TFileDirectory *dir, Alignable *ali) override;
0038 
0039 protected:
0040   void inform(TMinuit *tMinuit) override;
0041 };
0042 
0043 #endif  // Alignment_MuonAlignmentAlgorithms_MuonResidualsBfieldAngleFitter_H