Fitter.cxx File Reference

#include "Fitter.h"
#include "TemplateMap.h"
#include "TemplateCalculator.h"
#include "TemplateWriter.h"
#include "TString.h"
#include "TRandom.h"
#include "TMarker.h"
#include "TGraph.h"
#include "TH2.h"
#include "TH1.h"
#include <iostream>
#include <cmath>
#include <ctime>

Go to the source code of this file.

Functions

static void OscFitLikelihoodFunction (Int_t &, Double_t *, Double_t &f, Double_t *par, Int_t)

Variables

static FitterfgFitter = 0

Function Documentation

static void OscFitLikelihoodFunction ( Int_t &  ,
Double_t *  ,
Double_t &  f,
Double_t *  par,
Int_t   
) [static]

Definition at line 24 of file Fitter.cxx.

Referenced by OscFit::Fitter::RunFit().

00025 {
00026   Bool_t printDebug = 0;
00027 
00028   Double_t dmsq           = fgFitter->fDmsq;
00029   Double_t sinsq          = fgFitter->fSinsq;
00030   Double_t dmsqbar        = fgFitter->fDmsqBar;
00031   Double_t sinsqbar       = fgFitter->fSinsqBar;
00032 
00033   if( fgFitter->fForceCPT ){
00034     dmsq  = dmsqbar;
00035     sinsq = sinsqbar;
00036   }
00037 
00038   Double_t delta_dmsq     = fgFitter->fDeltaDmsq; 
00039   Double_t delta_sinsq    = fgFitter->fDeltaSinsq; 
00040   Double_t delta_dmsqbar  = fgFitter->fDeltaDmsqBar; 
00041   Double_t delta_sinsqbar = fgFitter->fDeltaSinsqBar; 
00042   Double_t norm           = fgFitter->fNorm; 
00043   Double_t ncbkg          = fgFitter->fNCBkg; 
00044   Double_t shwen          = fgFitter->fShwEn;
00045   Double_t trken          = fgFitter->fTrkEn;
00046 
00047   if( fgFitter->fFittingDmsq )     delta_dmsq     = par[0];
00048   if( fgFitter->fFittingSinsq )    delta_sinsq    = par[1];
00049   if( fgFitter->fFittingDmsqBar )  delta_dmsqbar  = par[2];
00050   if( fgFitter->fFittingSinsqBar ) delta_sinsqbar = par[3];
00051   if( fgFitter->fFittingNorm )     norm           = par[4];
00052   if( fgFitter->fFittingNCBkg )    ncbkg          = par[5];
00053   if( fgFitter->fFittingShwEn )    shwen          = par[6];
00054   if( fgFitter->fFittingTrkEn )    trken          = par[7];
00055 
00056   if( fgFitter->fForceCPT ){
00057     delta_dmsqbar  = delta_dmsq;
00058     delta_sinsqbar = delta_sinsq;
00059   }
00060 
00061   dmsq     += delta_dmsq;
00062   sinsq    += delta_sinsq;
00063   dmsqbar  += delta_dmsqbar;
00064   sinsqbar += delta_sinsqbar;
00065 
00066   fgFitter->GetLnL(dmsq,sinsq,
00067                    dmsqbar,sinsqbar,
00068                    norm,ncbkg,
00069                    shwen,trken,
00070                    f);
00071 
00072   if( printDebug ){
00073     std::cout << " --- [" << fgFitter->get_counter() << "] debug: dmsq=" << dmsq << " sinsq=" << sinsq << " dmsqbar=" << dmsqbar << " sinsqbar=" << sinsqbar << " norm=" << norm << " ncbkg=" << ncbkg << " shwen=" << shwen << " trken=" << trken << " f=" << f << std::endl;
00074   }
00075 
00076   fgFitter->itr();
00077 
00078   return;
00079 }


Variable Documentation

Fitter* fgFitter = 0 [static]

Definition at line 22 of file Fitter.cxx.

Referenced by OscFit::Fitter::Instance().


Generated on 19 Jan 2018 for loon by  doxygen 1.6.1