Jpp  15.0.4
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  new TF1("fit","gaus",maximum-15,maximum+15);
19  fitresult = h->Fit("fit","QRS");
20  return fitresult;
21  }
22 
23 }
JCombinatorics::pair_type pair_type
TFitResultPtr Fit(TH1D *h)
Definition: JNanobeacon.hh:14
bool comparepair(const pair_type &A, const pair_type &B)
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A