CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTimeBoxFitter.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTTimeBoxFitter_H
2 #define CalibMuon_DTTimeBoxFitter_H
3 
13 #include <utility>
14 
15 
16 class TH1F;
17 class TFile;
18 #include "TString.h"
19 
21 public:
23  DTTimeBoxFitter(const TString& debugFileName = TString(""));
24 
26  virtual ~DTTimeBoxFitter();
27 
28  // Operations
29 
31  std::pair<double, double> fitTimeBox(TH1F *hTimeBox);
32 
33 
35  void getFitSeeds(TH1F *hTBox, double& mean, double& sigma, double& tBoxMax, double& xFitMin,
36  double& xFitMax);
37 
39  void getInteractiveFitSeeds(TH1F *hTBox, double& mean, double& sigma, double& tBoxMax,
40  double& xFitMin, double& xFitMax);
41 
42 
44  void setVerbosity(unsigned int lvl) {
45  theVerbosityLevel = lvl;
46  }
47 
49  void setInteractiveFit(bool isInteractive) {
50  interactiveFit = isInteractive;
51  }
52 
54  void setRebinning(int reb) {
55  rebin = reb;
56  }
57 
58  void setFitSigma(double sigma) {
59  theSigma = sigma;
60  }
61 
62 protected:
63 
64 private:
65 
66  TFile *hDebugFile;
67 
68  unsigned int theVerbosityLevel;
70  int rebin;
71  double theSigma;
72 
73 };
74 
75 // Define the integral of the gaussian to be used in the fit
76 double intGauss(double *x, double *par);
77 
78 #endif
double intGauss(double *x, double *par)
void setVerbosity(unsigned int lvl)
Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug.
void setRebinning(int reb)
Set the rebin.
void setFitSigma(double sigma)
void getFitSeeds(TH1F *hTBox, double &mean, double &sigma, double &tBoxMax, double &xFitMin, double &xFitMax)
Automatically compute the seeds the range to be used for time box fit.
virtual ~DTTimeBoxFitter()
Destructor.
void getInteractiveFitSeeds(TH1F *hTBox, double &mean, double &sigma, double &tBoxMax, double &xFitMin, double &xFitMax)
Ask the user to provide the seeds.
DTTimeBoxFitter(const TString &debugFileName=TString(""))
Constructor.
unsigned int theVerbosityLevel
void setInteractiveFit(bool isInteractive)
Switch to interactive fit.
std::pair< double, double > fitTimeBox(TH1F *hTimeBox)
Fit the rising edge of the time box returning mean value and sigma (first and second respectively) ...
x
Definition: VDTMath.h:216