CMS 3D CMS Logo

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
DTTimeBoxFitter::theVerbosityLevel
unsigned int theVerbosityLevel
Definition: DTTimeBoxFitter.h:52
DTTimeBoxFitter::getInteractiveFitSeeds
void getInteractiveFitSeeds(TH1F *hTBox, double &mean, double &sigma, double &tBoxMax, double &xFitMin, double &xFitMax)
Ask the user to provide the seeds.
Definition: DTTimeBoxFitter.cc:99
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
DTTimeBoxFitter::hDebugFile
TFile * hDebugFile
Definition: DTTimeBoxFitter.h:50
intGauss
double intGauss(double *x, double *par)
Definition: DTTimeBoxFitter.cc:257
DTTimeBoxFitter::setFitSigma
void setFitSigma(double sigma)
Definition: DTTimeBoxFitter.h:46
DTTimeBoxFitter::theSigma
double theSigma
Definition: DTTimeBoxFitter.h:55
DTTimeBoxFitter::rebin
int rebin
Definition: DTTimeBoxFitter.h:54
vertices_cff.x
x
Definition: vertices_cff.py:29
DTTimeBoxFitter::DTTimeBoxFitter
DTTimeBoxFitter(const TString &debugFileName=TString(""))
Constructor.
Definition: DTTimeBoxFitter.cc:21
DTTimeBoxFitter::setRebinning
void setRebinning(int reb)
Set the rebin.
Definition: DTTimeBoxFitter.h:44
DTTimeBoxFitter::setVerbosity
void setVerbosity(unsigned int lvl)
Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug.
Definition: DTTimeBoxFitter.h:38
DTTimeBoxFitter::fitTimeBox
std::pair< double, double > fitTimeBox(TH1F *hTimeBox)
Fit the rising edge of the time box returning mean value and sigma (first and second respectively)
Definition: DTTimeBoxFitter.cc:36
DTTimeBoxFitter
Definition: DTTimeBoxFitter.h:17
DTTimeBoxFitter::setInteractiveFit
void setInteractiveFit(bool isInteractive)
Switch to interactive fit.
Definition: DTTimeBoxFitter.h:41
DTTimeBoxFitter::interactiveFit
bool interactiveFit
Definition: DTTimeBoxFitter.h:53
DTTimeBoxFitter::~DTTimeBoxFitter
virtual ~DTTimeBoxFitter()
Destructor.
Definition: DTTimeBoxFitter.cc:30
DTTimeBoxFitter::getFitSeeds
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.
Definition: DTTimeBoxFitter.cc:125