BOSS
7.1.1
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
17
class
WidgetSigma
{
18
19
public
:
20
21
WidgetSigma
() {}
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
f
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
x
Double_t x[10]
Definition
DataBase/tau_mode.c:57
WidgetSigma
Definition
WidgetSigma.h:17
WidgetSigma::WidgetSigma
WidgetSigma()
Definition
WidgetSigma.h:21
WidgetSigma::operator()
double operator()(double *x, double *par)
Definition
WidgetSigma.h:41
WidgetSigma::sigmaCurve
double sigmaCurve(double *x, double *par)
Definition
WidgetSigma.h:24
WidgetSigma::~WidgetSigma
virtual ~WidgetSigma()
Definition
WidgetSigma.h:22
7.1.1
Mdc
DedxCalibAlg
DedxCalibAlg-00-02-01
share
template
HadronCalib
Widget
Widget
WidgetHelpers
WidgetSigma.h
Generated by
1.12.0