Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
SimMuon
Neutron
src
AsciiNeutronWriter.cc
Go to the documentation of this file.
1
#include "
SimMuon/Neutron/src/AsciiNeutronWriter.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include <sstream>
4
#include <fstream>
5
6
using namespace
std
;
7
8
AsciiNeutronWriter::AsciiNeutronWriter
(
string
fileNameBase) : theFileNameBase(fileNameBase) {}
9
10
AsciiNeutronWriter::~AsciiNeutronWriter
() {}
11
12
void
AsciiNeutronWriter::writeCluster
(
int
chamberType,
const
edm::PSimHitContainer
&
hits
) {
13
// open the correct file
14
stringstream
s
;
15
s
<<
theFileNameBase
<< chamberType;
16
LogDebug
(
"NeutronWriter"
) <<
"opening "
<<
s
.str();
17
ofstream os;
18
os.open(
s
.str().c_str(), ofstream::app);
19
os <<
hits
.size() << endl;
20
for
(
size_t
i
= 0;
i
<
hits
.size(); ++
i
) {
21
PSimHit
h
=
hits
[
i
];
22
os <<
h
.entryPoint().x() <<
" "
<<
h
.entryPoint().y() <<
" "
<<
h
.entryPoint().z() <<
" "
<<
h
.exitPoint().x()
23
<<
" "
<<
h
.exitPoint().y() <<
" "
<<
h
.exitPoint().z() <<
" "
<<
h
.pabs() <<
" "
24
<<
" "
<<
h
.timeOfFlight() <<
" "
<<
h
.energyLoss() <<
" "
<<
h
.particleType() <<
" "
<<
h
.detUnitId() <<
" "
25
<<
h
.trackId() <<
" "
<<
h
.momentumAtEntry().theta() <<
" "
<<
h
.momentumAtEntry().phi() << endl;
26
}
27
}
AsciiNeutronWriter::writeCluster
void writeCluster(int chamberType, const edm::PSimHitContainer &hits) override
writes out a list of SimHits.
Definition:
AsciiNeutronWriter.cc:12
mps_fire.i
i
Definition:
mps_fire.py:355
MessageLogger.h
hfClusterShapes_cfi.hits
hits
Definition:
hfClusterShapes_cfi.py:5
AsciiNeutronWriter::~AsciiNeutronWriter
~AsciiNeutronWriter() override
Definition:
AsciiNeutronWriter.cc:10
AsciiNeutronWriter::theFileNameBase
std::string theFileNameBase
Definition:
AsciiNeutronWriter.h:20
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
h
AsciiNeutronWriter.h
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:670
std
Definition:
JetResolutionObject.h:76
AsciiNeutronWriter::AsciiNeutronWriter
AsciiNeutronWriter(std::string fileNameBase)
Definition:
AsciiNeutronWriter.cc:8
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition:
PSimHitContainer.h:11
PSimHit
Definition:
PSimHit.h:15
Generated for CMSSW Reference Manual by
1.8.16