BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
WidgetSigma.h
Go to the documentation of this file.
1//********************************************************************************
2// This file is part of the Widget, a package for performing dE/dx calibration.
3//
4// Author: Jake Bennett
5// Date: July 8, 2015
6//
7//
8// For additional details, see the Widget document.
9//
10//********************************************************************************
11#ifndef WIDGETSIGMA_H
12#define WIDGETSIGMA_H
13
14#include <math.h>
15#include <iostream>
16
18
19 public:
20
22 virtual ~WidgetSigma() {};
23
24 double sigmaCurve( double *x, double *par ){
25
26 // sometimes we want to constrain certain parameters
27 double f = 0;
28 if( par[0] == 1 ){
29 // return dedx parameterization
30 f = par[1]+par[2]*x[0];
31 }
32 else if( par[0] == 2 ){
33 // return nhit or sin(theta) parameterization
34 f = par[1]*pow(x[0],4)+par[2]*pow(x[0],3)+
35 par[3]*x[0]*x[0]+par[4]*x[0]+par[5];
36 }
37
38 return f;
39 }
40
41 double operator()( double *x, double *par ){
42 return sigmaCurve(x,par);
43 }
44};
45#endif
double operator()(double *x, double *par)
Definition: WidgetSigma.h:41
double sigmaCurve(double *x, double *par)
Definition: WidgetSigma.h:24
virtual ~WidgetSigma()
Definition: WidgetSigma.h:22
double x[1000]
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")