CondFormats
SiPixelObjects
src
SiPixelCPEGenericErrorParm.cc
Go to the documentation of this file.
1
#include "
CondFormats/SiPixelObjects/interface/SiPixelCPEGenericErrorParm.h
"
2
#include "
FWCore/ParameterSet/interface/FileInPath.h
"
3
#include <fstream>
4
5
void
SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm
(
double
version
,
std::string
file
) {
6
//--- Open the file
7
std::ifstream
in
(
file
.c_str(),
std::ios::in
);
8
9
//--- Currently do not need to store part of detector, but is in input file
10
int
part
;
11
set_version
(
version
);
12
13
DbEntry
Entry
;
14
in
>>
part
>>
Entry
.bias >>
Entry
.pix_height >>
Entry
.ave_Qclus >>
Entry
.
sigma
>>
Entry
.rms;
15
16
while
(!
in
.eof()) {
17
errors_
.push_back(
Entry
);
18
19
in
>>
part
>>
Entry
.bias >>
Entry
.pix_height >>
Entry
.ave_Qclus >>
Entry
.
sigma
>>
Entry
.rms;
20
}
21
//--- Finished parsing the file, we're done.
22
in
.close();
23
24
//--- Specify the current binning sizes to use
25
DbEntryBinSize
ErrorsBinSize;
26
//--- Part = 1 By
27
ErrorsBinSize.
partBin_size
= 0;
28
ErrorsBinSize.
sizeBin_size
= 40;
29
ErrorsBinSize.
alphaBin_size
= 10;
30
ErrorsBinSize.
betaBin_size
= 1;
31
errorsBinSize_
.push_back(ErrorsBinSize);
32
//--- Part = 2 Bx
33
ErrorsBinSize.
partBin_size
= 240;
34
ErrorsBinSize.
alphaBin_size
= 1;
35
ErrorsBinSize.
betaBin_size
= 10;
36
errorsBinSize_
.push_back(ErrorsBinSize);
37
//--- Part = 3 Fy
38
ErrorsBinSize.
partBin_size
= 360;
39
ErrorsBinSize.
alphaBin_size
= 10;
40
ErrorsBinSize.
betaBin_size
= 1;
41
errorsBinSize_
.push_back(ErrorsBinSize);
42
//--- Part = 4 Fx
43
ErrorsBinSize.
partBin_size
= 380;
44
ErrorsBinSize.
alphaBin_size
= 1;
45
ErrorsBinSize.
betaBin_size
= 10;
46
errorsBinSize_
.push_back(ErrorsBinSize);
47
}
48
49
std::ostream&
operator<<
(std::ostream&
s
,
const
SiPixelCPEGenericErrorParm
& genericErrors) {
50
for
(
unsigned
int
count
= 0;
count
< genericErrors.
errors_
.size(); ++
count
) {
51
s
.precision(6);
52
53
s
<< genericErrors.
errors_
[
count
].bias <<
" "
<< genericErrors.
errors_
[
count
].pix_height <<
" "
54
<< genericErrors.
errors_
[
count
].ave_Qclus <<
" "
<<
std::fixed
<< genericErrors.
errors_
[
count
].sigma <<
" "
55
<< genericErrors.
errors_
[
count
].rms << std::endl;
56
57
s
.unsetf(
std::ios_base::fixed
);
58
}
59
return
s
;
60
}
SiPixelCPEGenericErrorParm
Definition:
SiPixelCPEGenericErrorParm.h:15
alignBH_cfg.fixed
fixed
Definition:
alignBH_cfg.py:54
SiPixelCPEGenericErrorParm::DbEntryBinSize::alphaBin_size
int alphaBin_size
Definition:
SiPixelCPEGenericErrorParm.h:35
SiPixelCPEGenericErrorParm::DbEntryBinSize::partBin_size
int partBin_size
Definition:
SiPixelCPEGenericErrorParm.h:33
SiPixelCPEGenericErrorParm::set_version
void set_version(double v)
Definition:
SiPixelCPEGenericErrorParm.h:75
SiPixelCPEGenericErrorParm::errorsBinSize_
DbBinSizeVector errorsBinSize_
Definition:
SiPixelCPEGenericErrorParm.h:81
SiPixelCPEGenericErrorParm::version
double & version()
Definition:
SiPixelCPEGenericErrorParm.h:57
FileInPath.h
Entry::sigma
ALIdouble sigma() const
Definition:
Entry.h:55
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
part
part
Definition:
HCALResponse.h:20
submitPVResolutionJobs.count
count
Definition:
submitPVResolutionJobs.py:352
SiPixelCPEGenericErrorParm::DbEntryBinSize::sizeBin_size
int sizeBin_size
Definition:
SiPixelCPEGenericErrorParm.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelCPEGenericErrorParm::DbEntryBinSize
A struct to hold the binning information for (part, size, alpha, beta)
Definition:
SiPixelCPEGenericErrorParm.h:32
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
SiPixelCPEGenericErrorParm::DbEntry
A struct to hold information for a given (alpha,beta,size)
Definition:
SiPixelCPEGenericErrorParm.h:18
FrontierConditions_GlobalTag_cff.file
file
Definition:
FrontierConditions_GlobalTag_cff.py:13
Entry
Definition:
Entry.h:18
SiPixelCPEGenericErrorParm::errors_
DbVector errors_
Definition:
SiPixelCPEGenericErrorParm.h:80
SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm
void fillCPEGenericErrorParm(double version, std::string file)
Function to fill the db object given a filename.
Definition:
SiPixelCPEGenericErrorParm.cc:5
SiPixelCPEGenericErrorParm::DbEntryBinSize::betaBin_size
int betaBin_size
Definition:
SiPixelCPEGenericErrorParm.h:36
BeamSplash_cfg.version
version
Definition:
BeamSplash_cfg.py:45
SiPixelCPEGenericErrorParm.h
operator<<
std::ostream & operator<<(std::ostream &s, const SiPixelCPEGenericErrorParm &genericErrors)
Definition:
SiPixelCPEGenericErrorParm.cc:49
Generated for CMSSW Reference Manual by
1.8.16