CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTTimeBoxFitter.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTTimeBoxFitter_H
2 #define CalibMuon_DTTimeBoxFitter_H
3 
11 #include <utility>
12 
13 class TH1F;
14 class TFile;
15 #include "TString.h"
16 
18 public:
20  DTTimeBoxFitter(const TString& debugFileName = TString(""));
21 
23  virtual ~DTTimeBoxFitter();
24 
25  // Operations
26 
28  std::pair<double, double> fitTimeBox(TH1F* hTimeBox);
29 
31  void getFitSeeds(TH1F* hTBox, double& mean, double& sigma, double& tBoxMax, double& xFitMin, double& xFitMax);
32 
35  TH1F* hTBox, double& mean, double& sigma, double& tBoxMax, double& xFitMin, double& xFitMax);
36 
38  void setVerbosity(unsigned int lvl) { theVerbosityLevel = lvl; }
39 
41  void setInteractiveFit(bool isInteractive) { interactiveFit = isInteractive; }
42 
44  void setRebinning(int reb) { rebin = reb; }
45 
46  void setFitSigma(double sigma) { theSigma = sigma; }
47 
48 protected:
49 private:
50  TFile* hDebugFile;
51 
52  unsigned int theVerbosityLevel;
54  int rebin;
55  double theSigma;
56 };
57 
58 // Define the integral of the gaussian to be used in the fit
59 double intGauss(double* x, double* par);
60 
61 #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)
uint16_t const *__restrict__ x
Definition: gpuClustering.h:39
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) ...