Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JNANOBEACON Namespace Reference

Functions

bool comparepair (const pair_type &A, const pair_type &B)
 
TFitResultPtr Fit (TH1D *h)
 

Function Documentation

◆ comparepair()

bool JNANOBEACON::comparepair ( const pair_type & A,
const pair_type & B )
inline

Definition at line 10 of file JNanobeacon.hh.

10 {
11 return( abs(A.first - A.second) > abs(B.first - B.second) ) ;
12 }

◆ Fit()

TFitResultPtr JNANOBEACON::Fit ( TH1D * h)
inline

Definition at line 14 of file JNanobeacon.hh.

14 {
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 }