Main Page
Namespaces
Classes
Package Documentation
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:670
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
MessageLogger.h
mps_fire.i
i
Definition:
mps_fire.py:338
diffTreeTool.diff
diff
Definition:
diffTreeTool.py:197
Utilities.operator
operator
Definition:
Utilities.py:24
CSCThrTurnOnFcn.h
N
#define N
Definition:
blowfish.cc:9
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:15
genVertex_cff.x
x
Definition:
genVertex_cff.py:12
vertices_cff.chi2
chi2
Definition:
vertices_cff.py:33
Generated for CMSSW Reference Manual by
1.8.11