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
SimG4CMS
Calo
src
CaloG4Hit.cc
Go to the documentation of this file.
1
// File: CaloG4Hit.cc
3
// Description: Transient Hit class for the calorimeters
5
#include "
SimG4CMS/Calo/interface/CaloG4Hit.h
"
6
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
7
#include <iostream>
8
9
#include "G4SystemOfUnits.hh"
10
11
G4ThreadLocal G4Allocator<CaloG4Hit>*
fpCaloG4HitAllocator
=
nullptr
;
12
13
CaloG4Hit::CaloG4Hit
() {
14
setEntry
(0., 0., 0.);
15
setEntryLocal
(0., 0., 0.);
16
elem
= 0.;
17
hadr
= 0.;
18
theIncidentEnergy
= 0.;
19
}
20
21
CaloG4Hit::~CaloG4Hit
() {}
22
23
CaloG4Hit::CaloG4Hit
(
const
CaloG4Hit
& right) {
24
entry
= right.
entry
;
25
entryLocal
= right.
entryLocal
;
26
pos
= right.
pos
;
27
elem
= right.
elem
;
28
hadr
= right.
hadr
;
29
theIncidentEnergy
= right.
theIncidentEnergy
;
30
hitID
= right.
hitID
;
31
}
32
33
const
CaloG4Hit
&
CaloG4Hit::operator=
(
const
CaloG4Hit
& right) {
34
entry
= right.
entry
;
35
entryLocal
= right.
entryLocal
;
36
pos
= right.
pos
;
37
elem
= right.
elem
;
38
hadr
= right.
hadr
;
39
theIncidentEnergy
= right.
theIncidentEnergy
;
40
hitID
= right.
hitID
;
41
42
return
*
this
;
43
}
44
45
void
CaloG4Hit::addEnergyDeposit
(
double
em,
double
hd) {
46
elem
+= em;
47
hadr
+= hd;
48
}
49
50
void
CaloG4Hit::addEnergyDeposit
(
const
CaloG4Hit
& aHit) {
addEnergyDeposit
(aHit.
getEM
(), aHit.
getHadr
()); }
51
52
void
CaloG4Hit::Print
() {
edm::LogVerbatim
(
"CaloSim"
) << (*this); }
53
54
std::ostream&
operator<<
(std::ostream& os,
const
CaloG4Hit
&
hit
) {
55
os <<
" Data of this CaloG4Hit are:"
56
<<
"\n"
57
<<
" HitID: "
<<
hit
.getID() <<
"\n"
58
<<
" EnergyDeposit of EM particles = "
<<
hit
.getEM() <<
"\n"
59
<<
" EnergyDeposit of HD particles = "
<<
hit
.getHadr() <<
"\n"
60
<<
" Energy of primary particle = "
<<
hit
.getIncidentEnergy() /
MeV
<<
" (MeV)"
61
<<
"\n"
62
<<
" Entry point in Calorimeter (global) : "
<<
hit
.getEntry() <<
" (local) "
<<
hit
.getEntryLocal() <<
"\n"
63
<<
" Position of Hit (global) : "
<<
hit
.getPosition() <<
"\n"
64
<<
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
;
65
return
os;
66
}
MessageLogger.h
pos
Definition:
PixelAliasList.h:18
fpCaloG4HitAllocator
G4ThreadLocal G4Allocator< CaloG4Hit > * fpCaloG4HitAllocator
Definition:
CaloG4Hit.cc:11
MeV
const double MeV
CaloG4Hit::elem
double elem
Definition:
CaloG4Hit.h:83
CaloG4Hit::pos
math::XYZPoint pos
Definition:
CaloG4Hit.h:82
CaloG4Hit::hadr
double hadr
Definition:
CaloG4Hit.h:84
operator<<
std::ostream & operator<<(std::ostream &os, const CaloG4Hit &hit)
Definition:
CaloG4Hit.cc:54
CaloG4Hit::entry
math::XYZPoint entry
Definition:
CaloG4Hit.h:80
CaloG4Hit::entryLocal
math::XYZPoint entryLocal
Definition:
CaloG4Hit.h:81
CaloG4Hit::hitID
CaloHitID hitID
Definition:
CaloG4Hit.h:86
CaloG4Hit::getEM
double getEM() const
Definition:
CaloG4Hit.h:55
CaloG4Hit::CaloG4Hit
CaloG4Hit()
Definition:
CaloG4Hit.cc:13
CaloG4Hit::setEntryLocal
void setEntryLocal(double x, double y, double z)
Definition:
CaloG4Hit.h:50
CaloG4Hit::theIncidentEnergy
double theIncidentEnergy
Definition:
CaloG4Hit.h:85
CaloG4Hit::setEntry
void setEntry(double x, double y, double z)
Definition:
CaloG4Hit.h:47
edm::LogVerbatim
Definition:
MessageLogger.h:297
CaloG4Hit
Definition:
CaloG4Hit.h:32
CaloG4Hit::~CaloG4Hit
~CaloG4Hit() override
Definition:
CaloG4Hit.cc:21
CaloG4Hit::operator=
const CaloG4Hit & operator=(const CaloG4Hit &right)
Definition:
CaloG4Hit.cc:33
CaloG4Hit::getHadr
double getHadr() const
Definition:
CaloG4Hit.h:58
CaloG4Hit.h
CaloG4Hit::Print
void Print() override
Definition:
CaloG4Hit.cc:52
CaloG4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition:
CaloG4Hit.cc:45
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
Generated for CMSSW Reference Manual by
1.8.16