ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronSelectorHelpers Namespace Reference

Functions

std::size_t numberOfPixelHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of Pixel hits plus dead sensors in the track particle
std::size_t numberOfSCTHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of SCT hits plus dead sensors in the track particle
std::size_t numberOfSiliconHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of Silicon hits plus dead sensors in the track particle
bool passBLayerRequirement (const xAOD::TrackParticle &tp)
 return true if effective number of BL hits + outliers is at least one
bool passAmbiguity (xAOD::AmbiguityTool::AmbiguityType type, const uint16_t criterion)
 return true if the ambiguity type is one of several that are stored in a bitmask

Function Documentation

◆ numberOfPixelHitsAndDeadSensors()

std::size_t ElectronSelectorHelpers::numberOfPixelHitsAndDeadSensors ( const xAOD::TrackParticle & tp)

return the number of Pixel hits plus dead sensors in the track particle

Definition at line 12 of file ElectronSelectorHelpers.cxx.

14{
15
16 uint8_t nPixHits(0);
17 uint8_t nPixDead(0);
18
19 bool allFound = true;
20 allFound = allFound && tp.summaryValue(nPixHits, xAOD::numberOfPixelHits);
21 allFound =
22 allFound && tp.summaryValue(nPixDead, xAOD::numberOfPixelDeadSensors);
23 if (!allFound) {
24 throw std::runtime_error(
25 "numberOfPixelHitsAndDeadSensors : Failed to load variables");
26 }
27
28 return nPixHits + nPixDead;
29}
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].

◆ numberOfSCTHitsAndDeadSensors()

std::size_t ElectronSelectorHelpers::numberOfSCTHitsAndDeadSensors ( const xAOD::TrackParticle & tp)

return the number of SCT hits plus dead sensors in the track particle

Definition at line 32 of file ElectronSelectorHelpers.cxx.

34{
35 uint8_t nSCTHits(0);
36 uint8_t nSCTDead(0);
37
38 bool allFound = true;
39 allFound = allFound && tp.summaryValue(nSCTHits, xAOD::numberOfSCTHits);
40 allFound =
41 allFound && tp.summaryValue(nSCTDead, xAOD::numberOfSCTDeadSensors);
42 if (!allFound) {
43 throw std::runtime_error(
44 "numberOfSCTHitsAndDeadSensors : Failed to load variables");
45 }
46
47 return nSCTHits + nSCTDead;
48}
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].

◆ numberOfSiliconHitsAndDeadSensors()

std::size_t ElectronSelectorHelpers::numberOfSiliconHitsAndDeadSensors ( const xAOD::TrackParticle & tp)

return the number of Silicon hits plus dead sensors in the track particle

Definition at line 51 of file ElectronSelectorHelpers.cxx.

53{
56}
std::size_t numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Pixel hits plus dead sensors in the track particle
std::size_t numberOfSCTHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of SCT hits plus dead sensors in the track particle

◆ passAmbiguity()

bool ElectronSelectorHelpers::passAmbiguity ( xAOD::AmbiguityTool::AmbiguityType type,
const uint16_t criterion )

return true if the ambiguity type is one of several that are stored in a bitmask

Definition at line 104 of file ElectronSelectorHelpers.cxx.

106{
107
108 // helper to check if ambiguity type is one of several that are stored in a
109 // bitmask
110 //
111 return (criterion & 0x1 << type);
112}

◆ passBLayerRequirement()

bool ElectronSelectorHelpers::passBLayerRequirement ( const xAOD::TrackParticle & tp)

return true if effective number of BL hits + outliers is at least one

Definition at line 59 of file ElectronSelectorHelpers.cxx.

60{
61
62 uint8_t expectInnermostLayer(0);
63 uint8_t nInnermostLayerHits(0);
64 uint8_t nInnermostLayerOutliers(0);
65 uint8_t expectNextToInnermostLayer(0);
66 uint8_t nNextToInnermostLayerHits(0);
67 uint8_t nNextToInnermostLayerOutliers(0);
68
69 bool allFound = true;
70 allFound =
71 allFound && tp.summaryValue(expectInnermostLayer, xAOD::expectBLayerHit);
72 allFound =
73 allFound && tp.summaryValue(nInnermostLayerHits, xAOD::numberOfBLayerHits);
74 allFound = allFound && tp.summaryValue(nInnermostLayerOutliers,
76 allFound =
77 allFound && tp.summaryValue(expectNextToInnermostLayer,
79 allFound =
80 allFound && tp.summaryValue(nNextToInnermostLayerHits,
82 allFound = allFound &&
83 tp.summaryValue(nNextToInnermostLayerOutliers,
85 if (!allFound) {
86 throw std::runtime_error(
87 "passBLayerRequirement : Failed to load variables");
88 }
89
90 // If innermost and next to innermost layer are both masked off, then the
91 // selectors should PASS the BL cut, so the default here is true
92 bool passBLReq = true;
93
94 if (expectInnermostLayer) {
95 passBLReq = (nInnermostLayerHits + nInnermostLayerOutliers > 0);
96 } else if (expectNextToInnermostLayer) {
97 passBLReq = (nNextToInnermostLayerHits + nNextToInnermostLayerOutliers > 0);
98 }
99
100 return passBLReq;
101}
@ numberOfBLayerOutliers
number of blayer outliers [unit8_t].
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
@ expectBLayerHit
Do we expect a b-layer hit for this track?
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ numberOfNextToInnermostPixelLayerOutliers
number of 1st pixel layer barrel outliers