DTMeanTimerFitter

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#ifndef CalibMuon_DTMeanTimerFitter_H
#define CalibMuon_DTMeanTimerFitter_H

/** \class DTMeanTimerFitter
 *  Fit the Tmax histograms with a gaussian 
 *  returning the mean values and the sigmas.
 *
 *  \author S. Bolognesi - INFN Torino
 */
#include <vector>
#include "TString.h"

class TH1F;
class TFile;
class TF1;

class DTMeanTimerFitter {
public:
  /// Constructor
  DTMeanTimerFitter(TFile* file);

  /// Destructor
  virtual ~DTMeanTimerFitter();

  /// Fit the TMax histos and evaluate VDrift and resolution
  std::vector<float> evaluateVDriftAndReso(const TString& N);

  /// Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug
  void setVerbosity(unsigned int lvl) { theVerbosityLevel = lvl; }

  /// Really do the fit
  TF1* fitTMax(TH1F* histo);

protected:
private:
  TFile* hDebugFile;
  TFile* hInputFile;

  unsigned int theVerbosityLevel;
};

#endif