RecoVertex
BeamSpotProducer
interface
BeamSpotWrite2Txt.h
Go to the documentation of this file.
1
#ifndef RecoVertex_BeamSpotProducer_BeamSpotWrite2Txt_h
2
#define RecoVertex_BeamSpotProducer_BeamSpotWrite2Txt_h
3
4
#include <fstream>
5
6
#include "
DataFormats/BeamSpot/interface/BeamSpot.h
"
7
8
namespace
beamspot
{
9
10
struct
BeamSpotContainer
{
11
reco::BeamSpot
beamspot
;
12
int
run
;
13
char
beginTimeOfFit
[32];
14
char
endTimeOfFit
[32];
15
int
beginLumiOfFit
;
16
int
endLumiOfFit
;
17
std::time_t
reftime
[2];
18
};
19
20
inline
void
dumpBeamSpotTxt
(std::ofstream&
outFile
,
BeamSpotContainer
const
& bsContainer) {
21
outFile
<<
"Runnumber "
<< bsContainer.
run
<< std::endl;
22
outFile
<<
"BeginTimeOfFit "
<< bsContainer.
beginTimeOfFit
<<
" "
<< bsContainer.
reftime
[0] << std::endl;
23
outFile
<<
"EndTimeOfFit "
<< bsContainer.
endTimeOfFit
<<
" "
<< bsContainer.
reftime
[1] << std::endl;
24
outFile
<<
"LumiRange "
<< bsContainer.
beginLumiOfFit
<<
" - "
<< bsContainer.
endLumiOfFit
<< std::endl;
25
outFile
<<
"Type "
<< bsContainer.
beamspot
.
type
() << std::endl;
26
outFile
<<
"X0 "
<< bsContainer.
beamspot
.
x0
() << std::endl;
27
outFile
<<
"Y0 "
<< bsContainer.
beamspot
.
y0
() << std::endl;
28
outFile
<<
"Z0 "
<< bsContainer.
beamspot
.
z0
() << std::endl;
29
outFile
<<
"sigmaZ0 "
<< bsContainer.
beamspot
.
sigmaZ
() << std::endl;
30
outFile
<<
"dxdz "
<< bsContainer.
beamspot
.
dxdz
() << std::endl;
31
outFile
<<
"dydz "
<< bsContainer.
beamspot
.
dydz
() << std::endl;
32
outFile
<<
"BeamWidthX "
<< bsContainer.
beamspot
.
BeamWidthX
() << std::endl;
33
outFile
<<
"BeamWidthY "
<< bsContainer.
beamspot
.
BeamWidthY
() << std::endl;
34
for
(
int
i
= 0;
i
< 6; ++
i
) {
35
outFile
<<
"Cov("
<<
i
<<
",j) "
;
36
for
(
int
j
= 0;
j
< 7; ++
j
) {
37
outFile
<< bsContainer.
beamspot
.
covariance
(
i
,
j
) <<
" "
;
38
}
39
outFile
<< std::endl;
40
}
41
// Uncertainties on sigmaX and sigmaY are set to be equal. Legacy from a distant past
42
outFile
<<
"Cov(6,j) 0 0 0 0 0 0 "
<< bsContainer.
beamspot
.
covariance
(6, 6) << std::endl;
43
outFile
<<
"EmittanceX "
<< bsContainer.
beamspot
.
emittanceX
() << std::endl;
44
outFile
<<
"EmittanceY "
<< bsContainer.
beamspot
.
emittanceY
() << std::endl;
45
outFile
<<
"BetaStar "
<< bsContainer.
beamspot
.
betaStar
() << std::endl;
46
}
47
48
}
// end namespace beamspot
49
50
#endif
beamspot::BeamSpotContainer::endTimeOfFit
char endTimeOfFit[32]
Definition:
BeamSpotWrite2Txt.h:14
mps_fire.i
i
Definition:
mps_fire.py:428
reco::BeamSpot::emittanceX
double emittanceX() const
additional information
Definition:
BeamSpot.h:129
reco::BeamSpot::z0
double z0() const
z coordinate
Definition:
BeamSpot.h:65
reco::BeamSpot::covariance
double covariance(int i, int j) const
(i,j)-th element of error matrix
Definition:
BeamSpot.h:108
beamspot::BeamSpotContainer::reftime
std::time_t reftime[2]
Definition:
BeamSpotWrite2Txt.h:17
reco::BeamSpot::dxdz
double dxdz() const
dxdz slope
Definition:
BeamSpot.h:78
beamspot::BeamSpotContainer::beginLumiOfFit
int beginLumiOfFit
Definition:
BeamSpotWrite2Txt.h:15
reco::BeamSpot::sigmaZ
double sigmaZ() const
sigma z
Definition:
BeamSpot.h:76
beamspot::BeamSpotContainer::beamspot
reco::BeamSpot beamspot
Definition:
BeamSpotWrite2Txt.h:11
beamspot::BeamSpotContainer::endLumiOfFit
int endLumiOfFit
Definition:
BeamSpotWrite2Txt.h:16
BeamSpot.h
beamspot::dumpBeamSpotTxt
void dumpBeamSpotTxt(std::ofstream &outFile, BeamSpotContainer const &bsContainer)
Definition:
BeamSpotWrite2Txt.h:20
reco::BeamSpot::type
BeamType type() const
return beam type
Definition:
BeamSpot.h:122
reco::BeamSpot
Definition:
BeamSpot.h:21
beamspot
Definition:
BeamSpotWrite2Txt.h:8
L1TdeCSCTF_cfi.outFile
outFile
Definition:
L1TdeCSCTF_cfi.py:5
reco::BeamSpot::betaStar
double betaStar() const
Definition:
BeamSpot.h:131
beamspot::BeamSpotContainer::run
int run
Definition:
BeamSpotWrite2Txt.h:12
reco::BeamSpot::BeamWidthX
double BeamWidthX() const
beam width X
Definition:
BeamSpot.h:82
reco::BeamSpot::dydz
double dydz() const
dydz slope
Definition:
BeamSpot.h:80
reco::BeamSpot::x0
double x0() const
x coordinate
Definition:
BeamSpot.h:61
beamspot::BeamSpotContainer::beginTimeOfFit
char beginTimeOfFit[32]
Definition:
BeamSpotWrite2Txt.h:13
beamspot::BeamSpotContainer
Definition:
BeamSpotWrite2Txt.h:10
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
reco::BeamSpot::y0
double y0() const
y coordinate
Definition:
BeamSpot.h:63
reco::BeamSpot::emittanceY
double emittanceY() const
Definition:
BeamSpot.h:130
reco::BeamSpot::BeamWidthY
double BeamWidthY() const
beam width Y
Definition:
BeamSpot.h:84
Generated for CMSSW Reference Manual by
1.8.16