ATLAS Offline Software
Classes | Functions
ElectronSelectorHelpers Namespace Reference

Classes

struct  ROOT6_NamespaceAutoloadHook
 

Functions

std::size_t numberOfPixelHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of Pixel hits plus dead sensors in the track particle More...
 
std::size_t numberOfSCTHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of SCT hits plus dead sensors in the track particle More...
 
std::size_t numberOfSiliconHitsAndDeadSensors (const xAOD::TrackParticle &tp)
 return the number of Silicon hits plus dead sensors in the track particle More...
 
bool passBLayerRequirement (const xAOD::TrackParticle &tp)
 return true if effective number of BL hits + outliers is at least one More...
 
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 More...
 

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 }

◆ 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 }

◆ 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.

◆ 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 }
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
ElectronSelectorHelpers::numberOfSCTHitsAndDeadSensors
std::size_t numberOfSCTHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of SCT hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:32
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
xAOD::expectBLayerHit
@ expectBLayerHit
Do we expect a b-layer hit for this track? [unit8_t] (should be [bool])
Definition: TrackingPrimitives.h:235
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::numberOfBLayerHits
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
Definition: TrackingPrimitives.h:231
xAOD::expectNextToInnermostPixelLayerHit
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
Definition: TrackingPrimitives.h:247
xAOD::numberOfNextToInnermostPixelLayerOutliers
@ numberOfNextToInnermostPixelLayerOutliers
number of 1st pixel layer barrel outliers
Definition: TrackingPrimitives.h:249
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:248
TauGNNUtils::Variables::Track::nSCTHits
bool nSCTHits(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:549
xAOD::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:273
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:266
xAOD::numberOfBLayerOutliers
@ numberOfBLayerOutliers
number of blayer outliers [unit8_t].
Definition: TrackingPrimitives.h:232
ElectronSelectorHelpers::numberOfPixelHitsAndDeadSensors
std::size_t numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Pixel hits plus dead sensors in the track particle
Definition: ElectronSelectorHelpers.cxx:12