Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JNanobeacon.hh
Go to the documentation of this file.
2 #include "TH1.h"
3 #include "TFitResult.h"
4 
5 using namespace JPP;
6 
7 namespace JNANOBEACON{
8 
10  inline bool comparepair(const pair_type& A, const pair_type& B) {
11  return( abs(A.first - A.second) > abs(B.first - B.second) ) ;
12  }
13 
14  inline TFitResultPtr Fit(TH1D* h){
15  TFitResultPtr fitresult;
16  int MaxBin = h->GetMaximumBin();
17  double maximum = h->GetBinCenter(MaxBin);
18  TF1 f1("fit","gaus",maximum-15,maximum+15);
19  fitresult = h->Fit(&f1,"QRS");
20  return fitresult;
21  }
22 
23 }
JCombinatorics::pair_type pair_type
Data structure for a pair of indices.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
JRootfit_t< JF1_t > Fit(const TH1 &h1, const JF1_t &f1, const index_list &ls=index_list(), const range_type &X=range_type())
Global fit fuction.
Definition: JRootfit.hh:1247
bool comparepair(const pair_type &A, const pair_type &B)
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A