L1Trigger
TrackFindingTracklet
src
CleanTrackMemory.cc
Go to the documentation of this file.
1
#include "
L1Trigger/TrackFindingTracklet/interface/CleanTrackMemory.h
"
2
#include "
L1Trigger/TrackFindingTracklet/interface/Tracklet.h
"
3
#include "
L1Trigger/TrackFindingTracklet/interface/SLHCEvent.h
"
4
#include <iomanip>
5
6
using namespace
std
;
7
using namespace
trklet
;
8
9
CleanTrackMemory::CleanTrackMemory(
10
string
name
,
Settings
const
& settings,
unsigned
int
iSector,
double
phimin
,
double
phimax
)
11
:
MemoryBase
(
name
, settings, iSector) {
12
phimin_
=
phimin
;
13
phimax_
=
phimax
;
14
}
15
16
void
CleanTrackMemory::writeCT
(
bool
first
) {
17
std::ostringstream oss;
18
oss <<
"../data/MemPrints/CleanTrack/CleanTrack_"
<<
getName
() <<
"_"
<< std::setfill(
'0'
) << std::setw(2)
19
<< (
iSector_
+ 1) <<
".dat"
;
20
auto
const
&
fname
= oss.str();
21
22
if
(
first
) {
23
bx_
= 0;
24
event_
= 1;
25
out_
.open(
fname
.c_str());
26
}
else
27
out_
.open(
fname
.c_str(), std::ofstream::app);
28
29
out_
<<
"BX = "
<< (bitset<3>)
bx_
<<
" Event : "
<<
event_
<< endl;
30
31
for
(
unsigned
int
j
= 0;
j
<
tracks_
.size();
j
++) {
32
out_
<<
"0x"
;
33
out_
<< std::setfill(
'0'
) << std::setw(2);
34
out_
<< hex <<
j
<<
dec
<<
" "
;
35
out_
<<
tracks_
[
j
]->trackfitstr() <<
" "
<<
trklet::hexFormat
(
tracks_
[
j
]->trackfitstr());
36
out_
<<
"\n"
;
37
}
38
out_
.close();
39
40
// --------------------------------------------------------------
41
// print separately ALL cleaned tracks in single file
42
if
(
settings_
.
writeMonitorData
(
"CT"
)) {
43
std::string
fnameAll =
"CleanTracksAll.dat"
;
44
if
(
first
&&
getName
() ==
"CT_L1L2"
&&
iSector_
== 0)
45
out_
.open(fnameAll.c_str());
46
else
47
out_
.open(fnameAll.c_str(), std::ofstream::app);
48
49
if
(!
tracks_
.empty())
50
out_
<<
"BX= "
<< (bitset<3>)
bx_
<<
" event= "
<<
event_
<<
" seed= "
<<
getName
()
51
<<
" phisector= "
<<
iSector_
+ 1 << endl;
52
53
for
(
unsigned
int
j
= 0;
j
<
tracks_
.size();
j
++) {
54
if
(
j
< 16)
55
out_
<<
"0"
;
56
out_
<< hex <<
j
<<
dec
<<
" "
;
57
out_
<<
tracks_
[
j
]->trackfitstr();
58
out_
<<
"\n"
;
59
}
60
out_
.close();
61
}
62
// --------------------------------------------------------------
63
64
bx_
++;
65
event_
++;
66
if
(
bx_
> 7)
67
bx_
= 0;
68
}
trklet::MemoryBase::settings_
Settings const & settings_
Definition:
MemoryBase.h:50
phimin
float phimin
Definition:
ReggeGribovPartonMCHadronizer.h:107
trklet::Settings
Definition:
Settings.h:26
trklet::MemoryBase::event_
int event_
Definition:
MemoryBase.h:48
trklet::MemoryBase::out_
std::ofstream out_
Definition:
MemoryBase.h:46
CleanTrackMemory.h
trklet::MemoryBase::bx_
int bx_
Definition:
MemoryBase.h:47
dqmdumpme.first
first
Definition:
dqmdumpme.py:55
trklet::MemoryBase::getName
std::string const & getName() const
Definition:
MemoryBase.h:19
trklet::CleanTrackMemory::phimin_
double phimin_
Definition:
CleanTrackMemory.h:28
SLHCEvent.h
trklet::CleanTrackMemory::phimax_
double phimax_
Definition:
CleanTrackMemory.h:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
trklet::MemoryBase
Definition:
MemoryBase.h:13
trklet::CleanTrackMemory::writeCT
void writeCT(bool first)
Definition:
CleanTrackMemory.cc:16
trklet::CleanTrackMemory::tracks_
std::vector< Tracklet * > tracks_
Definition:
CleanTrackMemory.h:30
trklet
Definition:
AllProjectionsMemory.h:9
phimax
float phimax
Definition:
ReggeGribovPartonMCHadronizer.h:106
alignmentValidation.fname
string fname
main script
Definition:
alignmentValidation.py:959
trklet::Settings::writeMonitorData
bool writeMonitorData(std::string module) const
Definition:
Settings.h:86
std
Definition:
JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
trklet::hexFormat
std::string hexFormat(const std::string &binary)
Definition:
Util.h:14
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
Tracklet.h
trklet::MemoryBase::iSector_
unsigned int iSector_
Definition:
MemoryBase.h:44
Generated for CMSSW Reference Manual by
1.8.16