00001 #ifndef LaserAlignment_BeamProfileFitter_h
00002 #define LaserAlignment_BeamProfileFitter_h
00003
00012
00013 #include "FWCore/Framework/interface/eventSetupGetImplementation.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016
00017
00018 #include "DataFormats/DetId/interface/DetId.h"
00019
00020
00021 #include "DataFormats/LaserAlignment/interface/LASBeamProfileFit.h"
00022
00023
00024 #include "TVector3.h"
00025 #include "TSpectrum.h"
00026 class TH1D;
00027
00028 #include <string>
00029
00030 class BeamProfileFitter {
00031 public:
00033 BeamProfileFitter(edm::ParameterSet const& theConf, const edm::EventSetup* aSetup );
00034
00036 ~BeamProfileFitter();
00037
00039 std::vector<LASBeamProfileFit> doFit( DetId theDetUnitId, TH1D* theHistogram,
00040 bool theSaveHistograms,
00041 int ScalingFactor, int theBeam,
00042 int theDisc, int theRing,
00043 int theSide, bool isTEC2TEC,
00044 bool & isGoodResult );
00045
00047 std::vector<double> findPeakGaus(TH1D* theHist, int theDisc, int theRing);
00048
00049 private:
00050
00051 const edm::EventSetup* theSetup;
00052
00053 bool theClearHistoAfterFit;
00054 bool theScaleHisto;
00055 double theMinSignalHeight;
00057 bool theCorrectBSkink;
00059 double theBSAnglesSystematic;
00060
00062 Double_t phiError(TVector3 thePosition, TMatrix theCovarianceMatrix);
00063
00065 double angle(double theAngle);
00066 };
00067 #endif