ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonSegmentMakers
MuonSegmentMakerUtils
src
MuonSegmentKey.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 "
MuonSegmentMakerUtils/MuonSegmentKey.h
"
6
7
#include "
MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h
"
8
#include "
MuonRIO_OnTrack/CscClusterOnTrack.h
"
9
#include "
MuonRIO_OnTrack/MMClusterOnTrack.h
"
10
#include "
MuonRIO_OnTrack/MdtDriftCircleOnTrack.h
"
11
#include "
MuonRIO_OnTrack/sTgcClusterOnTrack.h
"
12
#include "
MuonSegment/MuonSegment.h
"
13
#include "
TrkEventPrimitives/LocalDirection.h
"
14
#include "
TrkRIO_OnTrack/RIO_OnTrack.h
"
15
16
Muon::MuonSegmentKey::MuonSegmentKey
() =
default
;
17
18
Muon::MuonSegmentKey::MuonSegmentKey
(
const
Muon::MuonSegment
& segment) {
19
// to ensure consistent usage of MDT signs flip
20
int
signCor = segment.
localDirection
().
angleYZ
() < 0 ? -1 : 1;
21
calculateKeys
(segment.
containedMeasurements
(), signCor);
22
}
23
24
Muon::MuonSegmentKey::MuonSegmentKey
(
const
std::vector<const Trk::MeasurementBase*>& measurements) {
calculateKeys
(measurements, 1); }
25
26
void
Muon::MuonSegmentKey::calculateKeys
(
const
std::vector<const Trk::MeasurementBase*>& measurements,
int
signCor) {
27
// clear internal lists
28
m_measKeys
.clear();
29
m_measKeysTrigger
.clear();
30
31
// loop over measurements
32
std::vector<const Trk::MeasurementBase*>::const_iterator it = measurements.begin(), itEnd = measurements.end();
33
for
(; it != itEnd; ++it) {
34
const
Trk::RIO_OnTrack
* rot =
dynamic_cast<
const
Trk::RIO_OnTrack
*
>
(*it);
35
const
Muon::CompetingMuonClustersOnTrack
* crot =
nullptr
;
36
if
(!rot) {
37
crot =
dynamic_cast<
const
Muon::CompetingMuonClustersOnTrack
*
>
(*it);
38
39
if
(crot && !crot->
containedROTs
().empty()) rot = &crot->
rioOnTrack
(0);
40
}
41
if
(!rot)
continue
;
42
43
// cast Identifier to an int
44
unsigned
int
id
= rot->
identify
().
get_identifier32
().
get_compact
();
45
int
sign
= 1;
46
// only consider MDT's and CSCs for now
47
const
Muon::MdtDriftCircleOnTrack
* mdt =
dynamic_cast<
const
Muon::MdtDriftCircleOnTrack
*
>
(*it);
48
if
(mdt) {
49
// get drift radius for MDTs
50
const
Trk::LocalParameters
& locParams = (*it)->localParameters();
51
52
// only take into account sign if more than 1 mm from wire
53
if
(signCor * locParams.
get
(
Trk::loc1
) < -1.)
sign
= -1;
54
55
// if signCor == 2 ignore sign
56
if
(signCor == 2)
sign
= 1;
57
58
m_measKeys
.insert(std::make_pair(
id
,
sign
));
59
}
else
if
(
dynamic_cast<
const
Muon::CscClusterOnTrack
*
>
(*it)) {
60
m_measKeys
.insert(std::make_pair(
id
,
sign
));
61
}
else
if
(
dynamic_cast<
const
Muon::MMClusterOnTrack
*
>
(*it)) {
62
m_measKeys
.insert(std::make_pair(
id
,
sign
));
63
}
else
if
(
dynamic_cast<
const
Muon::sTgcClusterOnTrack
*
>
(*it)) {
64
m_measKeys
.insert(std::make_pair(
id
,
sign
));
65
}
else
{
66
m_measKeysTrigger
.insert(std::make_pair(
id
,
sign
));
67
}
68
}
69
}
70
71
Muon::MuonSegmentKey::~MuonSegmentKey
() =
default
;
CompetingMuonClustersOnTrack.h
CscClusterOnTrack.h
LocalDirection.h
MMClusterOnTrack.h
MdtDriftCircleOnTrack.h
MuonSegmentKey.h
MuonSegment.h
RIO_OnTrack.h
sign
int sign(int a)
Definition
TRT_StrawNeighbourSvc.h:108
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition
Identifier32.h:47
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Muon::CompetingMuonClustersOnTrack
Class for competing MuonClusters, it extends the Trk::CompetingRIOsOnTrack base class.
Definition
CompetingMuonClustersOnTrack.h:54
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< std::unique_ptr< const MuonClusterOnTrack > > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition
CompetingMuonClustersOnTrack.h:180
Muon::CompetingMuonClustersOnTrack::rioOnTrack
const MuonClusterOnTrack & rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
Definition
CompetingMuonClustersOnTrack.h:185
Muon::CscClusterOnTrack
Class to represent the calibrated clusters created from CSC strips.
Definition
CscClusterOnTrack.h:47
Muon::MMClusterOnTrack
Class to represent calibrated clusters formed from TGC strips.
Definition
MMClusterOnTrack.h:26
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition
MdtDriftCircleOnTrack.h:37
Muon::MuonSegmentKey::m_measKeysTrigger
MeasurementKeys m_measKeysTrigger
Definition
MuonSegmentKey.h:52
Muon::MuonSegmentKey::MuonSegmentKey
MuonSegmentKey()
default constructor
Muon::MuonSegmentKey::calculateKeys
void calculateKeys(const std::vector< const Trk::MeasurementBase * > &measurements, int signCor=1)
function to calculate keys from a vector of measurements, the signCor is can be use to flip the signs...
Definition
MuonSegmentKey.cxx:26
Muon::MuonSegmentKey::m_measKeys
MeasurementKeys m_measKeys
Definition
MuonSegmentKey.h:51
Muon::MuonSegmentKey::~MuonSegmentKey
virtual ~MuonSegmentKey()
Muon::MuonSegment
This is the common class for 3D segments used in the muon spectrometer.
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Muon::MuonSegment::localDirection
const Trk::LocalDirection & localDirection() const
local direction
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:169
Muon::sTgcClusterOnTrack
Class to represent calibrated clusters formed from TGC strips.
Definition
sTgcClusterOnTrack.h:30
Trk::LocalDirection::angleYZ
double angleYZ() const
access method for angle of local YZ projection
Definition
LocalDirection.h:106
Trk::LocalParameters
Definition
LocalParameters.h:100
Trk::LocalParameters::get
double get(ParamDefs par) const
Retrieve specified parameter (const version).
Trk::RIO_OnTrack
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition
RIO_OnTrack.h:70
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition
RIO_OnTrack.h:152
Trk::Segment::containedMeasurements
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Definition
Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:166
Trk::loc1
@ loc1
Definition
ParamDefs.h:34
sTgcClusterOnTrack.h
Generated on
for ATLAS Offline Software by
1.17.0