CMS 3D CMS Logo

SymmetryFit.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripLorentzAngle_SymmetryFit
2 #define CalibTracker_SiStripLorentzAngle_SymmetryFit
3 
4 #include "TH1.h"
5 #include "TF1.h"
6 #include <string>
7 
8 class SymmetryFit {
9 public:
10  static TH1* symmetryChi2(std::string, const std::vector<TH1*>&, const std::pair<unsigned, unsigned>);
11  static TH1* symmetryChi2(const TH1*, const std::pair<unsigned, unsigned>);
12  static std::string name(std::string base) { return base + "_symmchi2"; }
13  static TF1* fitfunction();
14  static std::vector<double> pol2_from_pol2(TH1* hist);
15  static std::vector<double> pol2_from_pol3(TH1* hist);
16 
17 private:
18  SymmetryFit(const TH1*, const std::pair<unsigned, unsigned>);
19  std::pair<unsigned, unsigned> findUsableMinMax() const;
20  std::vector<std::pair<unsigned, unsigned> > continuousRanges() const;
21  float chi2_element(std::pair<unsigned, unsigned>);
22  float chi2(std::pair<unsigned, unsigned>);
23  void makeChi2Histogram();
24  void fillchi2();
25  int fit();
27  ndf_ += R.ndf_;
28  chi2_->Add(R.chi2_);
29  return *this;
30  }
31 
32  const TH1* symm_candidate_;
33  const unsigned minDF_;
34  const std::pair<unsigned, unsigned> range_, minmaxUsable_;
35  unsigned ndf_;
36  TH1* chi2_;
37 };
38 
39 #endif
SymmetryFit::range_
const std::pair< unsigned, unsigned > range_
Definition: SymmetryFit.h:34
SymmetryFit::makeChi2Histogram
void makeChi2Histogram()
Definition: SymmetryFit.cc:49
SymmetryFit::minmaxUsable_
const std::pair< unsigned, unsigned > minmaxUsable_
Definition: SymmetryFit.h:34
SymmetryFit::pol2_from_pol2
static std::vector< double > pol2_from_pol2(TH1 *hist)
Definition: SymmetryFit.cc:154
SymmetryFit
Definition: SymmetryFit.h:8
SymmetryFit::findUsableMinMax
std::pair< unsigned, unsigned > findUsableMinMax() const
Definition: SymmetryFit.cc:58
SymmetryFit::name
static std::string name(std::string base)
Definition: SymmetryFit.h:12
SymmetryFit::fit
int fit()
Definition: SymmetryFit.cc:127
SymmetryFit::pol2_from_pol3
static std::vector< double > pol2_from_pol3(TH1 *hist)
Definition: SymmetryFit.cc:174
SymmetryFit::symmetryChi2
static TH1 * symmetryChi2(std::string, const std::vector< TH1 * > &, const std::pair< unsigned, unsigned >)
Definition: SymmetryFit.cc:6
SymmetryFit::chi2_
TH1 * chi2_
Definition: SymmetryFit.h:36
SymmetryFit::fitfunction
static TF1 * fitfunction()
Definition: SymmetryFit.cc:145
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SymmetryFit::chi2_element
float chi2_element(std::pair< unsigned, unsigned >)
Definition: SymmetryFit.cc:119
SymmetryFit::ndf_
unsigned ndf_
Definition: SymmetryFit.h:35
gpuVertexFinder::hist
__shared__ Hist hist
Definition: gpuClusterTracksDBSCAN.h:48
SymmetryFit::continuousRanges
std::vector< std::pair< unsigned, unsigned > > continuousRanges() const
Definition: SymmetryFit.cc:81
SymmetryFit::symm_candidate_
const TH1 * symm_candidate_
Definition: SymmetryFit.h:32
SymmetryFit::chi2
float chi2(std::pair< unsigned, unsigned >)
Definition: SymmetryFit.cc:106
SymmetryFit::fillchi2
void fillchi2()
Definition: SymmetryFit.cc:96
SymmetryFit::operator+=
SymmetryFit operator+=(const SymmetryFit &R)
Definition: SymmetryFit.h:26
SymmetryFit::SymmetryFit
SymmetryFit(const TH1 *, const std::pair< unsigned, unsigned >)
Definition: SymmetryFit.cc:38
newFWLiteAna.base
base
Definition: newFWLiteAna.py:92
dttmaxenums::R
Definition: DTTMax.h:29
SymmetryFit::minDF_
const unsigned minDF_
Definition: SymmetryFit.h:33