ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaDetails.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef XAODEGAMMA_EGAMMADETAILS_H
6#define XAODEGAMMA_EGAMMADETAILS_H
7
10
11namespace xAOD
12{
13 namespace EgammaDetails
14 {
36
38
40 inline ConversionType conversionType(const bool hasTrk1, const bool hasTrk2, const std::uint8_t nSiHits1, const std::uint8_t nSiHits2) {
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 }
57
59 inline bool isConvertedPhoton (const bool excludeTRT, const float eta, const std::size_t nVertices, const ConversionType conversionType) {
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 }
69 }
70}
71
72#endif
Scalar eta() const
pseudorapidity method
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)
bool isConvertedPhoton(const bool excludeTRT, const float eta, const std::size_t nVertices, const ConversionType conversionType)
is the object a converted photon
@ singleSi
one track only, with Si hits
@ doubleTRT
two tracks, none with Si hits (TRT only)
@ unconverted
unconverted photon
@ singleTRT
one track only, no Si hits (TRT only)
@ doubleSi
two tracks, both with Si hits
@ doubleSiTRT
two tracks, only one with Si hits
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.