Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JNanobeacon.hh
Go to the documentation of this file.
2#include "TH1.h"
3#include "TFitResult.h"
4
5using namespace JPP;
6
7namespace 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
TFitResultPtr Fit(TH1D *h)
bool comparepair(const pair_type &A, const pair_type &B)
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Data structure for a pair of indices.