ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MuonIdentification
MuonCombinedBaseTools
src
SortInDetCandidates.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONCOMBINED_SORTINDETCANDIDATES
6
#define MUONCOMBINED_SORTINDETCANDIDATES
7
8
#include "
MuonCombinedEvent/CaloTag.h
"
9
#include "
MuonCombinedEvent/CombinedFitTag.h
"
10
#include "
MuonCombinedEvent/InDetCandidate.h
"
11
#include "
MuonCombinedEvent/MuGirlTag.h
"
12
#include "
MuonCombinedEvent/SegmentTag.h
"
13
#include "
MuonCombinedEvent/StacoTag.h
"
14
15
namespace
MuonCombined
{
16
17
class
SortInDetCandidates
{
18
public
:
19
bool
operator()
(
const
std::pair<
const
InDetCandidate
*, std::vector<const TagBase*> >& c1,
20
const
std::pair<
const
InDetCandidate
*, std::vector<const TagBase*> >& c2)
const
{
21
if
(c1.second.empty() || c2.second.empty()) {
return
c1.second.empty(); }
22
23
const
TagBase
& t1 = *c1.second.front();
24
const
TagBase
& t2 = *c2.second.front();
25
// compare based on author/type
26
bool
s1 = t1 < t2;
27
bool
s2 = t2 < t1;
28
if
(s1 && !s2)
return
true
;
29
if
(s2 && !s1)
return
false
;
30
31
// if we get here we have the same author and type
32
// this is not too elegant, maybe rethink implementation
33
if
(t1.type() == xAOD::Muon::MuonType::Combined) {
34
// work out type of tag
35
const
CombinedFitTag
* cbFitTag1 =
dynamic_cast<
const
CombinedFitTag
*
>
(&t1);
36
if
(cbFitTag1) {
37
const
CombinedFitTag
* cbFitTag2 =
dynamic_cast<
const
CombinedFitTag
*
>
(&t2);
38
if
(!cbFitTag2)
return
false
;
39
return
*cbFitTag1 < *cbFitTag2;
40
}
41
const
StacoTag
* stacoTag1 =
dynamic_cast<
const
StacoTag
*
>
(&t1);
42
if
(stacoTag1) {
43
const
StacoTag
* stacoTag2 =
dynamic_cast<
const
StacoTag
*
>
(&t2);
44
if
(!stacoTag2)
return
false
;
45
return
*stacoTag1 < *stacoTag2;
46
}
47
const
MuGirlTag
* muGirlTag1 =
dynamic_cast<
const
MuGirlTag
*
>
(&t1);
48
if
(muGirlTag1) {
49
const
MuGirlTag
* muGirlTag2 =
dynamic_cast<
const
MuGirlTag
*
>
(&t2);
50
if
(!muGirlTag2)
return
false
;
51
return
*muGirlTag1 < *muGirlTag2;
52
}
53
return
false
;
54
}
else
if
(t1.type() == xAOD::Muon::MuonType::SegmentTagged) {
55
const
SegmentTag
* segmentTag1 =
dynamic_cast<
const
SegmentTag
*
>
(&t1);
56
if
(segmentTag1) {
57
const
SegmentTag
* segmentTag2 =
dynamic_cast<
const
SegmentTag
*
>
(&t2);
58
if
(!segmentTag2)
return
false
;
59
return
*segmentTag1 < *segmentTag2;
60
}
61
const
MuGirlTag
* muGirlTag1 =
dynamic_cast<
const
MuGirlTag
*
>
(&t1);
62
if
(muGirlTag1) {
63
const
MuGirlTag
* muGirlTag2 =
dynamic_cast<
const
MuGirlTag
*
>
(&t2);
64
if
(!muGirlTag2)
return
false
;
65
return
*muGirlTag1 < *muGirlTag2;
66
}
67
return
false
;
68
}
else
if
(t1.type() == xAOD::Muon::MuonType::CaloTagged) {
69
const
CaloTag
* caloTag1 =
dynamic_cast<
const
CaloTag
*
>
(&t1);
70
if
(caloTag1) {
71
const
CaloTag
* caloTag2 =
dynamic_cast<
const
CaloTag
*
>
(&t2);
72
if
(!caloTag2)
return
false
;
73
return
*caloTag1 < *caloTag2;
74
}
75
return
false
;
76
}
77
return
false
;
78
}
79
};
80
81
}
// namespace MuonCombined
82
83
#endif
CaloTag.h
CombinedFitTag.h
InDetCandidate.h
MuGirlTag.h
SegmentTag.h
StacoTag.h
MuonCombined::CaloTag
TagBase implementation for a calo tag.
Definition
CaloTag.h:17
MuonCombined::CombinedFitTag
TagBase implementation for a combined fit.
Definition
CombinedFitTag.h:24
MuonCombined::InDetCandidate
Definition
InDetCandidate.h:18
MuonCombined::MuGirlTag
TagBase implementation for a combined fit.
Definition
MuGirlTag.h:23
MuonCombined::SegmentTag
TagBase implementation for a segment tagger.
Definition
SegmentTag.h:14
MuonCombined::SortInDetCandidates
Definition
SortInDetCandidates.h:17
MuonCombined::SortInDetCandidates::operator()
bool operator()(const std::pair< const InDetCandidate *, std::vector< const TagBase * > > &c1, const std::pair< const InDetCandidate *, std::vector< const TagBase * > > &c2) const
Definition
SortInDetCandidates.h:19
MuonCombined::StacoTag
TagBase implementation for a combined fit.
Definition
StacoTag.h:22
MuonCombined::TagBase
base-class for combined reconstruction output Provides access to MuonType and Author
Definition
TagBase.h:49
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition
IMuonSystemExtensionTool.h:23
Generated on
for ATLAS Offline Software by
1.17.0