LDMX Software
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Functions
Macros
Hcal
include
Hcal
MyClusterWeight.h
1
2
#ifndef HCAL_MYCLUSTERWEIGHT_H_
3
#define HCAL_MYCLUSTERWEIGHT_H_
4
5
#include <iostream>
6
7
#include "Hcal/WorkingCluster.h"
8
9
namespace
hcal {
10
11
class
MyClusterWeight
{
12
public
:
13
double
operator()(
14
const
WorkingCluster
& a,
15
const
WorkingCluster
& b) {
// returns weighting function, where smallest
16
// weights will be combined first
17
18
double
rmol = 10.00;
// Moliere radius of detector, roughly. In mm TODO
19
double
dzchar = 100.0;
// lateral shower development in mm TODO
20
21
double
aE = a.centroid().E();
22
double
aX = a.centroid().Px();
23
double
aY = a.centroid().Py();
24
double
aZ = a.centroid().Pz();
25
26
double
bE = b.centroid().E();
27
double
bX = b.centroid().Px();
28
double
bY = b.centroid().Py();
29
double
bZ = b.centroid().Pz();
30
31
double
dijz;
32
if
(aE >= bE) {
33
// differences in Z
34
dijz = bZ - aZ;
35
}
else
{
36
dijz = aZ - bZ;
37
}
38
39
// Transverse Difference
40
double
dijT = pow(pow(aX - bX, 2) + pow(aY - bY, 2), 0.5);
41
// Trans --> massive
42
double
weightT = exp(pow(dijT / rmol, 2)) - 1;
43
// Long
44
double
weightZ = (exp(abs(dijz) / dzchar) - 1);
45
46
// Return the highest of the two weights
47
if
(weightT <= weightZ) {
48
return
weightZ;
49
}
else
{
50
return
weightT;
51
}
52
}
53
};
11
class
MyClusterWeight
{
…
};
54
}
// namespace hcal
55
56
#endif
hcal::MyClusterWeight
Definition
MyClusterWeight.h:11
hcal::WorkingCluster
Definition
WorkingCluster.h:15
Generated by
1.12.0