Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
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
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
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
y
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
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File 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
l
m
n
o
p
q
r
s
t
u
v
w
x
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
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
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
Macros
_
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
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloSimEvent
src
FCS_StepInfo.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ISF_FastCaloSimEvent/FCS_StepInfo.h
"
6
7
#include "GaudiKernel/MsgStream.h"
8
9
/*
10
ISF_FCS_Parametrization::FCS_StepInfo::FCS_StepInfo(const FCS_StepInfo& first,
11
const FCS_StepInfo& second)
12
{
13
double esum = first.m_energy + second.m_energy;
14
double w1 = 0;
15
double w2 = 0;
16
17
if (esum > 0) {
18
w1 = first.m_energy/esum;
19
w2 = second.m_energy/esum;
20
}
21
22
m_pos = w1*first.m_pos + w2*second.m_pos;
23
m_time = w1*first.m_time + w2*second.m_time;
24
m_energy = esum;
25
m_valid = true;
26
m_detector = first.m_detector; //need to make sure that it's not merging hits
27
from different detector parts.. m_ID = first.m_ID; //dtto
28
}
29
*/
30
double
31
ISF_FCS_Parametrization::FCS_StepInfo::diff2
(
const
FCS_StepInfo
&
other
)
const
{
32
return
(this->
position
().
diff2
(other.
position
()));
33
}
34
35
ISF_FCS_Parametrization::FCS_StepInfo
&
36
ISF_FCS_Parametrization::FCS_StepInfo::operator+=
(
37
const
ISF_FCS_Parametrization::FCS_StepInfo
&
other
) {
38
if
(
identify
() !=
other
.identify()) {
39
ATH_MSG_WARNING
(
"Not merging hits from different cells!!! "
40
<<
identify
() <<
" / "
<<
other
.identify());
41
return
*
this
;
42
}
43
44
if
((fabs(
energy
()) > 1
e
-9) && (fabs(
other
.energy()) > 1
e
-9)) {
45
// both !=0
46
// Use absolute energies for weighting
47
double
eabssum = fabs(
energy
()) + fabs(
other
.energy());
48
double
esum =
energy
() +
other
.energy();
49
double
w1 = fabs(
energy
()) / eabssum;
50
double
w2 = fabs(
other
.energy()) / eabssum;
51
// Average position, time, energy sum
52
m_pos = w1 * m_pos + w2 *
other
.m_pos;
53
setEnergy(esum);
54
setTime(w1 * time() + w2 *
other
.time());
55
56
}
else
if
(fabs(
energy
()) < 1
e
-9) {
57
// original is 0, use other
58
setEnergy(
other
.energy());
59
setP(
other
.position());
60
setTime(
other
.time());
61
}
else
if
(fabs(
other
.energy()) < 1
e
-9) {
62
// other is 0, use original
63
// don't need to do anything...
64
}
else
{
65
ATH_MSG_WARNING
(
"merging hits something weird: "
66
<<
"\nOriginal hit: "
<<
energy
() <<
" "
<< position()
67
<<
"\nSecond hit: "
<<
other
.energy() <<
" "
68
<<
other
.position());
69
}
70
71
/*
72
double esum = energy() + other.energy();
73
74
double w1 = 0;
75
double w2 = 0;
76
77
//ignore negative energies
78
if (energy() <= 0.)
79
{
80
if (other.energy()>0.)
81
{
82
//use the other hit + sum energy
83
//setEnergy(other.energy());
84
setEnergy(esum);
85
setTime(other.time());
86
setP(other.position());
87
}
88
else
89
{
90
//both are negative -> set both to 0
91
setEnergy(0.);
92
setTime(0.);
93
setP(CLHEP::Hep3Vector(0,0,0));
94
//both are negative -> set both to 0
95
}
96
}
97
else if (other.energy() <0.)
98
{
99
//keep original, but with sum energy
100
setEnergy(esum);
101
}
102
else if (esum > 0) {
103
w1 = energy()/esum;
104
w2 = other.energy()/esum;
105
106
m_pos = w1*m_pos + w2*other.m_pos;
107
setEnergy(esum);
108
setTime(w1* time()+ w2 * other.time());
109
//m_time = w1*m_time + w2*other.m_time; //average time??
110
//what about m_ID...
111
}
112
else
113
{
114
ATH_MSG_INFO("Wow, you're still here??");
115
}
116
*/
117
return
*
this
;
118
}
AllowedVariables::e
e
Definition:
AsgElectronSelectorTool.cxx:37
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition:
MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:87
ISF_FCS_Parametrization::FCS_StepInfo::operator+=
FCS_StepInfo & operator+=(const FCS_StepInfo &other)
energy weighted sum
Definition:
FCS_StepInfo.cxx:36
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition:
ParticleGun_FastCalo_ChargeFlip_Config.py:78
ISF_FCS_Parametrization::FCS_StepInfo::position
CLHEP::Hep3Vector position() const
return spacial position
Definition:
FCS_StepInfo.h:79
FCS_StepInfo.h
ISF_FCS_Parametrization::FCS_StepInfo
Definition:
FCS_StepInfo.h:45
InDetDD::other
@ other
Definition:
InDetDD_Defs.h:16
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition:
AthMsgStreamMacros.h:32
ISF_FCS_Parametrization::FCS_StepInfo::diff2
double diff2(const FCS_StepInfo &other) const
return spactial distance squared
Definition:
FCS_StepInfo.cxx:31
Generated on Mon May 12 2025 21:09:47 for ATLAS Offline Software by
1.8.18