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:510
i
int i
Definition:
DBlmapReader.cc:9
MessageLogger.h
ExpressReco_HICollisions_FallBack.chi2
tuple chi2
Definition:
ExpressReco_HICollisions_FallBack.py:26076
diffTreeTool.diff
list diff
Definition:
diffTreeTool.py:194
ExpressReco_HICollisions_FallBack.y
tuple y
Definition:
ExpressReco_HICollisions_FallBack.py:4645
MultiGaussianStateTransform::N
Definition:
MultiGaussianStateTransform.h:19
lumiNorm.norm
tuple norm
Definition:
lumiNorm.py:78
CSCThrTurnOnFcn.h
cmsCodeRules.cppFunctionSkipper.operator
string operator
Definition:
cppFunctionSkipper.py:10
ExpressReco_HICollisions_FallBack.x
tuple x
Definition:
ExpressReco_HICollisions_FallBack.py:4646
findQualityFiles.size
tuple size
Write out results.
Definition:
findQualityFiles.py:322
Gflash::par
const double par[8 *NPar][4]
Definition:
GflashNameSpace.h:177
Generated for CMSSW Reference Manual by
1.8.5