Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
OnlineDB
CSCCondDB
src
CSCThrTurnOnFcn.cc
Go to the documentation of this file.
1
#include <
OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h
>
2
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
3
#include <cmath>
4
#include <iostream>
5
#include <vector>
6
#include "TMath.h"
7
8
double
CSCThrTurnOnFcn::operator
()
9
(
const
std::vector<double>& par)
const
{
10
11
double
x
,
y
,er,fn;
12
double
N
=norm;
13
double
chi2 = 0.;
14
15
int
size
=xdata.size();
16
for
(
int
i
= 0;
i
<
size
; ++
i
) {
17
x=xdata[
i
];
18
y=ydata[
i
];
19
er=ery[
i
];
20
21
fn=(x-par[0])/(par[1]*1.4142);
22
fn=N * (1.- TMath::Erf(fn))/2.;
23
24
double
diff
= y-fn;
25
chi2 += diff*diff / (er*er);
26
27
// std::cout<<"CSC AFEB threshold fit "<<i+1<<" "<<x<<" "<<y<<" "
28
// <<er<<" "<<fn<<" "<<chi2<<" "
29
// <<par[0]<<" "<<par[1]<<"\n";
30
31
LogDebug
(
"CSC"
)<<
" AFEB threshold fit "
<<
i
+1<<
" "
<<x<<
" "
<<y<<
" "
32
<<er<<
" "
<<fn<<
" "
<<chi2<<
" "
33
<<par[0]<<
" "
<<par[1]<<
"\n"
;
34
}
35
// std::cout<<"Chi2 "<<chi2<<std::endl;
36
return
chi2;
37
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
i
int i
Definition:
DBlmapReader.cc:9
MessageLogger.h
cppFunctionSkipper.operator
string operator
Definition:
cppFunctionSkipper.py:10
diffTreeTool.diff
list diff
Definition:
diffTreeTool.py:194
CSCThrTurnOnFcn.h
N
#define N
Definition:
blowfish.cc:9
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:15
x
Definition:
DDAxes.h:10
findQualityFiles.size
tuple size
Write out results.
Definition:
findQualityFiles.py:442
Generated for CMSSW Reference Manual by
1.8.5