Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
ed114409
Commit
ed114409
authored
Nov 10, 2017
by
Simon Spannagel
Browse files
Detector: make members private and add new getter functions for l2g & g2l
parent
a226de99
Pipeline
#235795
failed with stages
in 2 minutes and 53 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/algorithms/Alignment/Alignment.cpp
View file @
ed114409
...
...
@@ -96,7 +96,7 @@ void Alignment::MinimiseTrackChi2(Int_t& npar, Double_t* grad, Double_t& result,
// Recalculate the global position from the local
PositionVector3D
<
Cartesian3D
<
double
>>
positionLocal
(
trackCluster
->
localX
(),
trackCluster
->
localY
(),
trackCluster
->
localZ
());
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
globalDetector
->
m_
localToGlobal
)
*
positionLocal
;
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
globalDetector
->
localToGlobal
()
)
*
positionLocal
;
trackCluster
->
setClusterCentre
(
positionGlobal
.
X
(),
positionGlobal
.
Y
(),
positionGlobal
.
Z
());
}
...
...
@@ -148,7 +148,7 @@ void Alignment::MinimiseResiduals(Int_t& npar, Double_t* grad, Double_t& result,
// Recalculate the global position from the local
PositionVector3D
<
Cartesian3D
<
double
>>
positionLocal
(
associatedCluster
->
localX
(),
associatedCluster
->
localY
(),
associatedCluster
->
localZ
());
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
globalDetector
->
m_
localToGlobal
)
*
positionLocal
;
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
globalDetector
->
localToGlobal
()
)
*
positionLocal
;
// Get the track intercept with the detector
ROOT
::
Math
::
XYZPoint
intercept
=
track
->
intercept
(
positionGlobal
.
Z
());
// Calculate the residuals
...
...
src/algorithms/ClicpixAnalysis/ClicpixAnalysis.cpp
View file @
ed114409
...
...
@@ -222,7 +222,7 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard) {
// Get the track intercept with the clicpix plane (global and local
// co-ordinates)
PositionVector3D
<
Cartesian3D
<
double
>>
trackIntercept
=
detector
->
getIntercept
(
track
);
PositionVector3D
<
Cartesian3D
<
double
>>
trackInterceptLocal
=
*
(
detector
->
m_
globalToLocal
)
*
trackIntercept
;
PositionVector3D
<
Cartesian3D
<
double
>>
trackInterceptLocal
=
*
(
detector
->
globalToLocal
()
)
*
trackIntercept
;
// Plot the difference between track intercepts and all clicpix clusters
// Also record which cluster is the closest
...
...
@@ -549,7 +549,7 @@ void ClicpixAnalysis::fillResponseHistos(double trackInterceptX, double trackInt
Pixel
*
pixel
=
(
*
itp
);
// Get the pixel local then global position
PositionVector3D
<
Cartesian3D
<
double
>>
pixelPositionLocal
=
detector
->
getLocalPosition
(
pixel
->
m_row
,
pixel
->
m_column
);
PositionVector3D
<
Cartesian3D
<
double
>>
pixelPositionGlobal
=
*
(
detector
->
m_
localToGlobal
)
*
pixelPositionLocal
;
PositionVector3D
<
Cartesian3D
<
double
>>
pixelPositionGlobal
=
*
(
detector
->
localToGlobal
()
)
*
pixelPositionLocal
;
// Fill the response histograms
hPixelResponseX
->
Fill
(
pixelPositionGlobal
.
X
()
-
trackInterceptX
);
...
...
src/algorithms/SpatialClustering/SpatialClustering.cpp
View file @
ed114409
...
...
@@ -175,7 +175,7 @@ void SpatialClustering::calculateClusterCentre(Detector* detector, Cluster* clus
detector
->
pitchY
()
*
(
row
-
detector
->
nPixelsY
()
/
2.
),
0
);
// Calculate global cluster position
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
detector
->
m_
localToGlobal
)
*
positionLocal
;
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
detector
->
localToGlobal
()
)
*
positionLocal
;
// Set the cluster parameters
cluster
->
setRow
(
row
);
...
...
src/algorithms/Timepix3Clustering/Timepix3Clustering.cpp
View file @
ed114409
...
...
@@ -200,7 +200,7 @@ void Timepix3Clustering::calculateClusterCentre(Cluster* cluster) {
PositionVector3D
<
Cartesian3D
<
double
>>
positionLocal
(
detector
->
pitchX
()
*
(
column
-
detector
->
nPixelsX
()
/
2
),
detector
->
pitchY
()
*
(
row
-
detector
->
nPixelsY
()
/
2
),
0
);
// Calculate global cluster position
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
detector
->
m_
localToGlobal
)
*
positionLocal
;
PositionVector3D
<
Cartesian3D
<
double
>>
positionGlobal
=
*
(
detector
->
localToGlobal
()
)
*
positionLocal
;
// Set the cluster parameters
cluster
->
setRow
(
row
);
...
...
src/core/Detector.h
View file @
ed114409
...
...
@@ -104,8 +104,11 @@ namespace corryvreckan {
double
inPixelX
(
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
);
double
inPixelY
(
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
);
// Member variables
Transform3D
*
localToGlobal
()
{
return
m_localToGlobal
;
};
Transform3D
*
globalToLocal
()
{
return
m_globalToLocal
;
};
private:
// Member variables
// Detector information
std
::
string
m_detectorType
;
std
::
string
m_detectorName
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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