ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Global
GlobalSimulation
src
IO
LArStripNeighborhoodDumper.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArStripNeighborhoodDumper.h
"
6
7
#include <fstream>
8
9
namespace
GlobalSim
{
10
LArStripNeighborhoodDumper::LArStripNeighborhoodDumper
(){
11
}
12
13
StatusCode
14
LArStripNeighborhoodDumper::dump
(
const
std::string& name,
15
const
xAOD::EventInfo
& eventInfo,
16
const
IOBitwise::eEmNbhoodTOBContainer
& neighborhoodTOBs)
const
{
17
18
std::ofstream out(name +
"_"
+
19
std::to_string(eventInfo.
eventNumber
()) +
20
".log"
);
21
22
out <<
"run "
<< eventInfo.
runNumber
()
23
<<
" evt "
<< eventInfo.
eventNumber
()
24
<<
" is simulation "
<< std::boolalpha
25
<< eventInfo.
eventType
(
xAOD::EventInfo::IS_SIMULATION
)
26
<<
" weight "
<< eventInfo.
mcEventWeight
() <<
'\n'
;
27
28
for
(
const
auto
nbhdTOB : neighborhoodTOBs) {
29
out << nbhdTOB->Neighbourhood() <<
'\n'
;
30
}
31
32
out.close();
33
34
return
StatusCode::SUCCESS;
35
}
36
37
void
dump_stripdataVector
(
const
StripDataVector
& sdv, std::ostream& os) {
38
39
for
(
const
auto
& sd : sdv) {
40
os << sd.m_eta <<
' '
;
41
}
42
os <<
'\n'
;
43
44
45
for
(
const
auto
& sd : sdv) {
46
os << sd.m_phi <<
' '
;
47
}
48
os <<
'\n'
;
49
50
for
(
const
auto
& sd : sdv) {
51
os << sd.m_e <<
' '
;
52
}
53
os <<
'\n'
;
54
os <<
'\n'
;
55
}
56
57
void
dump_n
(
const
LArStripNeighborhood
& n,
58
std::ostream& os){
59
dump_stripdataVector
(n.phi_low(), os);
60
dump_stripdataVector
(n.phi_center(), os);
61
dump_stripdataVector
(n.phi_high(), os);
62
}
63
64
StatusCode
65
LArStripNeighborhoodDumper::dumpTerse
(
const
std::string& name,
66
const
xAOD::EventInfo
& eventInfo,
67
const
IOBitwise::eEmNbhoodTOBContainer
& neighborhoodTOBs)
const
{
68
69
std::ofstream out(name +
"_"
+
70
std::to_string(eventInfo.
eventNumber
()) +
71
"_terse.log"
);
72
out <<
"run "
<< eventInfo.
runNumber
()
73
<<
" evt "
<< eventInfo.
eventNumber
()
74
<<
" is simulation "
<< std::boolalpha
75
<< eventInfo.
eventType
(
xAOD::EventInfo::IS_SIMULATION
)
76
<<
" weight "
<< eventInfo.
mcEventWeight
() <<
'\n'
;
77
78
for
(
const
auto
nTOB : neighborhoodTOBs) {
dump_n
(nTOB->Neighbourhood(), out);}
79
80
81
out.close();
82
83
return
StatusCode::SUCCESS;
84
}
85
}
86
87
LArStripNeighborhoodDumper.h
GlobalSim::LArStripNeighborhoodDumper::dump
StatusCode dump(const std::string &name, const xAOD::EventInfo &eventInfo, const IOBitwise::eEmNbhoodTOBContainer &) const
Definition
LArStripNeighborhoodDumper.cxx:14
GlobalSim::LArStripNeighborhoodDumper::dumpTerse
StatusCode dumpTerse(const std::string &name, const xAOD::EventInfo &eventInfo, const IOBitwise::eEmNbhoodTOBContainer &) const
Definition
LArStripNeighborhoodDumper.cxx:65
GlobalSim::LArStripNeighborhoodDumper::LArStripNeighborhoodDumper
LArStripNeighborhoodDumper()
Definition
LArStripNeighborhoodDumper.cxx:10
GlobalSim::LArStripNeighborhood
Class to hold windows of LAr strip cells in a the neighbourhood of a eFexRoI.
Definition
LArStripNeighborhood.h:37
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition
EventInfo_v1.h:151
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition
EventInfo_v1.cxx:203
GlobalSim::IOBitwise::eEmNbhoodTOBContainer
DataVector< GlobalSim::IOBitwise::eEmNbhoodTOB > eEmNbhoodTOBContainer
Definition
eEmNbhoodTOB.h:79
GlobalSim
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.
Definition
Trigger/TrigT1/Global/GlobalSimulation/src/Egamma1BDT/Egamma1BDT/BDT.h:11
GlobalSim::dump_n
void dump_n(const LArStripNeighborhood &n, std::ostream &os)
Definition
LArStripNeighborhoodDumper.cxx:57
GlobalSim::StripDataVector
std::vector< StripData > StripDataVector
Definition
LArStripNeighborhood.h:24
GlobalSim::dump_stripdataVector
void dump_stripdataVector(const StripDataVector &sdv, std::ostream &os)
Definition
LArStripNeighborhoodDumper.cxx:37
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0