NueFCSensitivity.h File Reference

#include <string>
#include "NueAna/NueAnaTools/NueConvention.h"
#include "NueSenseConfig.h"
#include "TFile.h"
#include "TH1.h"
#include "TH3.h"
#include "TTree.h"
#include "OscProb/OscCalc.h"
#include <vector>
#include <map>
#include "NueSensitivity.h"
#include "TObject.h"

Go to the source code of this file.

Classes

class  NueFCSensitivity

Functions

double Poisson (double mean, int n, bool numOnly=false)
double Gaussian (double x, double mean, double sig)
void WrapperFunction (Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)

Function Documentation

double Gaussian ( double  x,
double  mean,
double  sig 
)

Definition at line 50 of file NueFit2D.cxx.

Referenced by NueFCSensitivity::EvaluateOmega(), and NueFit2D::EvaluateOmega().

00051 { 
00052   double front = 1/TMath::Sqrt(2*3.1415926*sig);
00053   double exp = (x-mean)*(x-mean)/(2*sig);
00054   return front*TMath::Exp(-exp);
00055 } 

double Poisson ( double  mean,
int  n,
bool  numOnly = false 
)

Definition at line 31 of file NueFit2D.cxx.

References Poisson().

Referenced by NueFCSensitivity::EvaluateOmega(), NueFit2D::EvaluateOmega(), and Poisson().

00032 {
00033   double numerator = 1;
00034   if(mean > 100 || n > 100){
00035       // use roots protected function -
00036     if(!numOnly) return TMath::Poisson(n, mean);
00037 
00038       // else     pull a trick to prevent explosions
00039     double logN = n*TMath::Log(mean) - mean;
00040     numerator = TMath::Exp(logN);
00041   } 
00042   else{
00043     numerator = TMath::Power(mean,n)*TMath::Exp(-mean);   
00044   }
00045   double denom = 1.0;
00046   if(!numOnly) denom = TMath::Factorial(n);
00047   return numerator/denom;
00048 } 

void WrapperFunction ( Int_t &  npar,
Double_t *  gin,
Double_t &  f,
Double_t *  par,
Int_t  iflag 
)

Definition at line 37 of file NueFCSensitivity.cxx.

References NueFCSensitivity::MinimizationFunction().

00038 {
00039    NueFCSensitivity * fcs = dynamic_cast<NueFCSensitivity *>(gMinuit->GetObjectFit());
00040 
00041 //   std::cout<<"In the wrapper"<<par[0]<<"  "<<par[1]<<std::endl;
00042    f = fcs->MinimizationFunction(par);
00043 }


Generated on 8 Jul 2019 for loon by  doxygen 1.6.1