Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
ec9a8917
Commit
ec9a8917
authored
Nov 09, 2018
by
Simon Spannagel
Browse files
Cluster: split into implementation and definition, remove some old members
parent
03f9fc25
Changes
40
Hide whitespace changes
Inline
Side-by-side
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.h
View file @
ec9a8917
...
...
@@ -16,7 +16,7 @@
#include
<TH2F.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/AlignmentMillepede/AlignmentMillepede.cpp
View file @
ec9a8917
...
...
@@ -4,7 +4,7 @@
// Local
#include
"AlignmentMillepede.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
using
namespace
corryvreckan
;
using
namespace
std
;
...
...
@@ -152,9 +152,9 @@ void AlignmentMillepede::finalise() {
for
(
auto
&
cluster
:
track
->
clusters
())
{
auto
detectorID
=
cluster
->
detectorID
();
auto
detector
=
get_detector
(
detectorID
);
ROOT
::
Math
::
XYZPoint
pLocal
(
cluster
->
local
X
(),
cluster
->
local
Y
(),
0.
);
ROOT
::
Math
::
XYZPoint
pLocal
(
cluster
->
local
().
x
(),
cluster
->
local
().
y
(),
0.
);
const
auto
pGlobal
=
detector
->
localToGlobal
(
pLocal
);
cluster
->
setClusterCentre
(
pGlobal
.
x
(),
pGlobal
.
y
(),
pGlobal
.
z
()
);
cluster
->
setClusterCentre
(
pGlobal
);
}
}
if
(
converg
<
m_convergence
)
...
...
@@ -285,9 +285,9 @@ bool AlignmentMillepede::putTrack(Track* track, const size_t nPlanes) {
const
auto
normal
=
detector
->
normal
();
double
nx
=
normal
.
x
()
/
normal
.
z
();
double
ny
=
normal
.
y
()
/
normal
.
z
();
const
double
xg
=
cluster
->
global
X
();
const
double
yg
=
cluster
->
global
Y
();
const
double
zg
=
cluster
->
global
Z
();
const
double
xg
=
cluster
->
global
().
x
();
const
double
yg
=
cluster
->
global
().
y
();
const
double
zg
=
cluster
->
global
().
z
();
// Calculate quasi-local coordinates.
const
double
zl
=
zg
-
detector
->
displacement
().
Z
();
const
double
xl
=
xg
-
detector
->
displacement
().
X
();
...
...
src/modules/AlignmentTrackChi2/AlignmentTrackChi2.h
View file @
ec9a8917
...
...
@@ -10,7 +10,7 @@
#include
<TProfile.h>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Track.hpp"
namespace
corryvreckan
{
...
...
src/modules/AnalysisCLICpix/AnalysisCLICpix.cpp
View file @
ec9a8917
#include
"AnalysisCLICpix.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
@@ -273,8 +273,8 @@ StatusCode AnalysisCLICpix::run(std::shared_ptr<Clipboard> clipboard) {
for
(
auto
&
cluster
:
(
trackclusters
))
{
// Get the distance between this cluster and the track intercept (global)
double
xcorr
=
cluster
->
global
X
()
-
trackIntercept
.
X
();
double
ycorr
=
cluster
->
global
Y
()
-
trackIntercept
.
Y
();
double
xcorr
=
cluster
->
global
().
x
()
-
trackIntercept
.
X
();
double
ycorr
=
cluster
->
global
().
y
()
-
trackIntercept
.
Y
();
// Fill histograms on correlations
hGlobalTrackDifferenceX
->
Fill
(
xcorr
);
...
...
@@ -343,7 +343,7 @@ StatusCode AnalysisCLICpix::run(std::shared_ptr<Clipboard> clipboard) {
hTrackInterceptsAssociated
->
Fill
(
trackIntercept
.
X
(),
trackIntercept
.
Y
());
hGlobalResidualsX
->
Fill
(
xresidualBest
);
hGlobalResidualsY
->
Fill
(
yresidualBest
);
hGlobalAssociatedClusterPositions
->
Fill
((
bestCluster
)
->
global
X
(),
(
bestCluster
)
->
global
Y
());
hGlobalAssociatedClusterPositions
->
Fill
((
bestCluster
)
->
global
().
x
(),
(
bestCluster
)
->
global
().
y
());
nClustersAssociated
++
;
hAssociatedClusterRow
->
Fill
((
bestCluster
)
->
row
());
hAssociatedClusterColumn
->
Fill
((
bestCluster
)
->
column
());
...
...
@@ -563,7 +563,7 @@ void AnalysisCLICpix::fillClusterHistos(Clusters* clusters) {
// Fill cluster histograms
hClusterSizeAll
->
Fill
(
static_cast
<
double
>
((
*
itc
)
->
size
()));
hClusterTOTAll
->
Fill
((
*
itc
)
->
tot
());
hGlobalClusterPositions
->
Fill
((
*
itc
)
->
global
X
(),
(
*
itc
)
->
global
Y
());
hGlobalClusterPositions
->
Fill
((
*
itc
)
->
global
().
x
(),
(
*
itc
)
->
global
().
y
());
}
hClustersPerEvent
->
Fill
(
static_cast
<
double
>
(
clusters
->
size
()));
...
...
src/modules/AnalysisDUT/AnalysisDUT.cpp
View file @
ec9a8917
#include
"AnalysisDUT.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
@@ -257,11 +257,11 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
LOG
(
DEBUG
)
<<
" - Looking at next DUT cluster"
;
// Check distance between track and cluster
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
Z
());
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
().
z
());
// Correlation plots
hTrackCorrelationX
->
Fill
(
intercept
.
X
()
-
cluster
->
global
X
());
hTrackCorrelationY
->
Fill
(
intercept
.
Y
()
-
cluster
->
global
Y
());
hTrackCorrelationX
->
Fill
(
intercept
.
X
()
-
cluster
->
global
().
x
());
hTrackCorrelationY
->
Fill
(
intercept
.
Y
()
-
cluster
->
global
().
y
());
hTrackCorrelationTime
->
Fill
(
track
->
timestamp
()
-
cluster
->
timestamp
());
auto
associated_clusters
=
track
->
associatedClusters
();
...
...
@@ -271,8 +271,8 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
}
LOG
(
DEBUG
)
<<
"Found associated cluster"
;
double
xdistance
=
intercept
.
X
()
-
cluster
->
global
X
();
double
ydistance
=
intercept
.
Y
()
-
cluster
->
global
Y
();
double
xdistance
=
intercept
.
X
()
-
cluster
->
global
().
x
();
double
ydistance
=
intercept
.
Y
()
-
cluster
->
global
().
y
();
double
xabsdistance
=
fabs
(
xdistance
);
double
yabsdistance
=
fabs
(
ydistance
);
...
...
src/modules/AnalysisEfficiency/AnalysisEfficiency.cpp
View file @
ec9a8917
...
...
@@ -9,7 +9,7 @@
#include
"AnalysisEfficiency.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/AnalysisPowerPulsing/AnalysisPowerPulsing.cpp
View file @
ec9a8917
#include
"AnalysisPowerPulsing.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/SpidrSignal.h"
using
namespace
corryvreckan
;
...
...
src/modules/AnalysisTelescope/AnalysisTelescope.cpp
View file @
ec9a8917
#include
"AnalysisTelescope.h"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/MCParticle.h"
#include
<TDirectory.h>
...
...
@@ -95,12 +95,12 @@ StatusCode AnalysisTelescope::run(std::shared_ptr<Clipboard> clipboard) {
}
auto
name
=
detector
->
name
();
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
Z
());
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
().
z
());
auto
interceptLocal
=
detector
->
globalToLocal
(
intercept
);
telescopeResidualsLocalX
[
name
]
->
Fill
(
cluster
->
local
X
()
-
interceptLocal
.
X
());
telescopeResidualsLocalY
[
name
]
->
Fill
(
cluster
->
local
Y
()
-
interceptLocal
.
Y
());
telescopeResidualsX
[
name
]
->
Fill
(
cluster
->
global
X
()
-
intercept
.
X
());
telescopeResidualsY
[
name
]
->
Fill
(
cluster
->
global
Y
()
-
intercept
.
Y
());
telescopeResidualsLocalX
[
name
]
->
Fill
(
cluster
->
local
().
x
()
-
interceptLocal
.
X
());
telescopeResidualsLocalY
[
name
]
->
Fill
(
cluster
->
local
().
y
()
-
interceptLocal
.
Y
());
telescopeResidualsX
[
name
]
->
Fill
(
cluster
->
global
().
x
()
-
intercept
.
X
());
telescopeResidualsY
[
name
]
->
Fill
(
cluster
->
global
().
y
()
-
intercept
.
Y
());
// Get the MC particles from the clipboard
MCParticles
*
mcParticles
=
reinterpret_cast
<
MCParticles
*>
(
clipboard
->
get
(
name
,
"mcparticles"
));
...
...
@@ -109,8 +109,8 @@ StatusCode AnalysisTelescope::run(std::shared_ptr<Clipboard> clipboard) {
}
ROOT
::
Math
::
XYZPoint
particlePosition
=
closestApproach
(
cluster
->
local
(),
mcParticles
);
telescopeMCresidualsLocalX
[
name
]
->
Fill
(
cluster
->
local
X
()
+
detector
->
size
().
X
()
/
2
-
particlePosition
.
X
());
telescopeMCresidualsLocalY
[
name
]
->
Fill
(
cluster
->
local
Y
()
+
detector
->
size
().
Y
()
/
2
-
particlePosition
.
Y
());
telescopeMCresidualsLocalX
[
name
]
->
Fill
(
cluster
->
local
().
x
()
+
detector
->
size
().
X
()
/
2
-
particlePosition
.
X
());
telescopeMCresidualsLocalY
[
name
]
->
Fill
(
cluster
->
local
().
y
()
+
detector
->
size
().
Y
()
/
2
-
particlePosition
.
Y
());
telescopeMCresidualsX
[
name
]
->
Fill
(
interceptLocal
.
X
()
+
detector
->
size
().
X
()
/
2
-
particlePosition
.
X
());
telescopeMCresidualsY
[
name
]
->
Fill
(
interceptLocal
.
Y
()
+
detector
->
size
().
Y
()
/
2
-
particlePosition
.
Y
());
}
...
...
src/modules/Clustering4D/Clustering4D.cpp
View file @
ec9a8917
...
...
@@ -117,7 +117,7 @@ StatusCode Clustering4D::run(std::shared_ptr<Clipboard> clipboard) {
clusterWidthRow
->
Fill
(
cluster
->
rowWidth
());
clusterWidthColumn
->
Fill
(
cluster
->
columnWidth
());
clusterTot
->
Fill
(
cluster
->
tot
());
clusterPositionGlobal
->
Fill
(
cluster
->
global
X
(),
cluster
->
global
Y
());
clusterPositionGlobal
->
Fill
(
cluster
->
global
().
x
(),
cluster
->
global
().
y
());
deviceClusters
->
push_back
(
cluster
);
}
...
...
@@ -215,6 +215,6 @@ void Clustering4D::calculateClusterCentre(Cluster* cluster) {
cluster
->
setTimestamp
(
timestamp
);
cluster
->
setDetectorID
(
detectorID
);
cluster
->
setClusterCentre
(
positionGlobal
.
X
(),
positionGlobal
.
Y
(),
positionGlobal
.
Z
()
);
cluster
->
setClusterCentreLocal
(
positionLocal
.
X
(),
positionLocal
.
Y
(),
positionLocal
.
Z
()
);
cluster
->
setClusterCentre
(
positionGlobal
);
cluster
->
setClusterCentreLocal
(
positionLocal
);
}
src/modules/Clustering4D/Clustering4D.h
View file @
ec9a8917
...
...
@@ -6,7 +6,7 @@
#include
<TH2F.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
namespace
corryvreckan
{
...
...
src/modules/ClusteringSpatial/ClusteringSpatial.cpp
View file @
ec9a8917
...
...
@@ -121,7 +121,7 @@ StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
clusterWidthRow
->
Fill
(
cluster
->
rowWidth
());
clusterWidthColumn
->
Fill
(
cluster
->
columnWidth
());
clusterTot
->
Fill
(
cluster
->
tot
());
clusterPositionGlobal
->
Fill
(
cluster
->
global
X
(),
cluster
->
global
Y
());
clusterPositionGlobal
->
Fill
(
cluster
->
global
().
x
(),
cluster
->
global
().
y
());
deviceClusters
->
push_back
(
cluster
);
}
...
...
@@ -179,6 +179,6 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) {
cluster
->
setError
(
m_detector
->
resolution
());
cluster
->
setDetectorID
(
detectorID
);
cluster
->
setClusterCentre
(
positionGlobal
.
X
(),
positionGlobal
.
Y
(),
positionGlobal
.
Z
()
);
cluster
->
setClusterCentreLocal
(
positionLocal
.
X
(),
positionLocal
.
Y
(),
positionLocal
.
Z
()
);
cluster
->
setClusterCentre
(
positionGlobal
);
cluster
->
setClusterCentreLocal
(
positionLocal
);
}
src/modules/ClusteringSpatial/ClusteringSpatial.h
View file @
ec9a8917
...
...
@@ -6,7 +6,7 @@
#include
<TH2F.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
namespace
corryvreckan
{
/** @ingroup Modules
...
...
src/modules/DUTAssociation/DUTAssociation.cpp
View file @
ec9a8917
...
...
@@ -31,9 +31,9 @@ StatusCode DUTAssociation::run(std::shared_ptr<Clipboard> clipboard) {
// Loop over all DUT clusters
for
(
auto
&
cluster
:
(
*
clusters
))
{
// Check distance between track and cluster
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
Z
());
double
xdistance
=
intercept
.
X
()
-
cluster
->
global
X
();
double
ydistance
=
intercept
.
Y
()
-
cluster
->
global
Y
();
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
cluster
->
global
().
z
());
double
xdistance
=
intercept
.
X
()
-
cluster
->
global
().
x
();
double
ydistance
=
intercept
.
Y
()
-
cluster
->
global
().
y
();
if
(
abs
(
xdistance
)
>
spatialCut
.
x
()
||
abs
(
ydistance
)
>
spatialCut
.
y
())
{
LOG
(
DEBUG
)
<<
"Discarding DUT cluster with distance ("
<<
abs
(
xdistance
)
<<
","
<<
abs
(
ydistance
)
<<
")"
;
continue
;
...
...
src/modules/DUTAssociation/DUTAssociation.h
View file @
ec9a8917
...
...
@@ -6,7 +6,7 @@
#include
<TH2F.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/Dummy/Dummy.h
View file @
ec9a8917
...
...
@@ -16,7 +16,7 @@
#include
<TH2F.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/EtaCalculation/EtaCalculation.h
View file @
ec9a8917
...
...
@@ -9,7 +9,7 @@
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/EtaCorrection/EtaCorrection.cpp
View file @
ec9a8917
...
...
@@ -49,15 +49,15 @@ void EtaCorrection::applyEta(Cluster* cluster) {
return
;
}
double
newX
=
cluster
->
local
X
();
double
newY
=
cluster
->
local
Y
();
double
newX
=
cluster
->
local
().
x
();
double
newY
=
cluster
->
local
().
y
();
if
(
cluster
->
columnWidth
()
==
2
)
{
double
inPixelX
=
m_detector
->
pitch
().
X
()
*
(
cluster
->
column
()
-
floor
(
cluster
->
column
()));
// Apply the eta correction
if
(
m_correctX
)
{
newX
=
floor
(
cluster
->
local
X
()
/
m_detector
->
pitch
().
X
())
*
m_detector
->
pitch
().
X
()
+
newX
=
floor
(
cluster
->
local
().
x
()
/
m_detector
->
pitch
().
X
())
*
m_detector
->
pitch
().
X
()
+
m_etaCorrectorX
->
Eval
(
inPixelX
);
}
}
...
...
@@ -67,7 +67,7 @@ void EtaCorrection::applyEta(Cluster* cluster) {
// Apply the eta correction
if
(
m_correctY
)
{
newY
=
floor
(
cluster
->
local
Y
()
/
m_detector
->
pitch
().
Y
())
*
m_detector
->
pitch
().
Y
()
+
newY
=
floor
(
cluster
->
local
().
y
()
/
m_detector
->
pitch
().
Y
())
*
m_detector
->
pitch
().
Y
()
+
m_etaCorrectorY
->
Eval
(
inPixelY
);
}
}
...
...
src/modules/EtaCorrection/EtaCorrection.h
View file @
ec9a8917
...
...
@@ -9,7 +9,7 @@
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/EventLoaderATLASpix/EventLoaderATLASpix.h
View file @
ec9a8917
...
...
@@ -11,7 +11,7 @@
#include
<stdio.h>
#include
<string.h>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
src/modules/EventLoaderCLICpix/EventLoaderCLICpix.h
View file @
ec9a8917
...
...
@@ -10,7 +10,7 @@
#include
<sstream>
#include
<stdio.h>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.h"
#include
"objects/Cluster.h
pp
"
#include
"objects/Pixel.h"
#include
"objects/Track.hpp"
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment