ATLAS Offline Software
Functions
xAOD::EgammaDetails Namespace Reference

Functions

ConversionType conversionType (const bool hasTrk1, const bool hasTrk2, const std::uint8_t nSiHits1, const std::uint8_t nSiHits2)
 return the photon conversion type (see EgammaEnums) More...
 
bool isConvertedPhoton (const bool excludeTRT, const float eta, const std::size_t nVertices, const ConversionType conversionType)
 is the object a converted photon More...
 

Function Documentation

◆ conversionType()

ConversionType xAOD::EgammaDetails::conversionType ( const bool  hasTrk1,
const bool  hasTrk2,
const std::uint8_t  nSiHits1,
const std::uint8_t  nSiHits2 
)
inline

return the photon conversion type (see EgammaEnums)

Definition at line 40 of file EgammaDetails.h.

40  {
41 
42  if (!hasTrk1) {return xAOD::EgammaParameters::unconverted;}
43 
44  if (!hasTrk2)
46 
47  if (nSiHits1 && nSiHits2){
49  }
50  if (nSiHits1 || nSiHits2){
52  }
53  else{
55  }
56  }

◆ isConvertedPhoton()

bool xAOD::EgammaDetails::isConvertedPhoton ( const bool  excludeTRT,
const float  eta,
const std::size_t  nVertices,
const ConversionType  conversionType 
)
inline

is the object a converted photon

Definition at line 59 of file EgammaDetails.h.

59  {
60  const bool hasVertices = nVertices > 0;
61  if (excludeTRT) {
62  // special case for Run3: consider unconv if TRT Conv in the barrel
64  const bool isTRTConv = (conversionType == singleTRT) || (conversionType == doubleTRT);
65  return hasVertices && (std::abs(eta) > 0.8 || !isTRTConv);
66  }
67  return hasVertices;
68  }
xAOD::EgammaParameters::unconverted
@ unconverted
unconverted photon
Definition: EgammaEnums.h:270
NSWL1::nVertices
int nVertices(const Polygon &p)
Definition: GeoUtils.cxx:35
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
xAOD::EgammaParameters::ConversionType
ConversionType
Definition: EgammaEnums.h:268
xAOD::EgammaDetails::conversionType
ConversionType conversionType(const bool hasTrk1, const bool hasTrk2, const std::uint8_t nSiHits1, const std::uint8_t nSiHits2)
return the photon conversion type (see EgammaEnums)
Definition: EgammaDetails.h:40
xAOD::EgammaParameters::doubleSi
@ doubleSi
two tracks, both with Si hits
Definition: EgammaEnums.h:279
xAOD::EgammaParameters::doubleSiTRT
@ doubleSiTRT
two tracks, only one with Si hits
Definition: EgammaEnums.h:285
xAOD::EgammaParameters::singleTRT
@ singleTRT
one track only, no Si hits (TRT only)
Definition: EgammaEnums.h:276
xAOD::EgammaParameters::singleSi
@ singleSi
one track only, with Si hits
Definition: EgammaEnums.h:273
xAOD::EgammaParameters::doubleTRT
@ doubleTRT
two tracks, none with Si hits (TRT only)
Definition: EgammaEnums.h:282