|
ATLAS Offline Software
|
Go to the documentation of this file.
22 #include "GaudiKernel/EventContext.h"
54 if (convType1 != convType2) {
78 const std::string&
name,
84 declareInterface<IEMConversionBuilder>(
this);
98 return StatusCode::FAILURE;
102 return StatusCode::SUCCESS;
116 std::vector<ElementLink<xAOD::VertexContainer>> vertices;
119 return StatusCode::SUCCESS;
124 const EventContext& ctx,
129 if (!egRec || !conversions) {
131 "trackExecute: NULL pointer to egammaRec or VertexContainer");
132 return StatusCode::SUCCESS;
140 for (
unsigned int iVtx = 0; iVtx < conversions->
size(); ++iVtx) {
146 etaAtCalo = accetaAtCalo(*
vertex);
147 phiAtCalo = accphiAtCalo(*
vertex);
151 ctx,
vertex, &etaAtCalo, &phiAtCalo)) {
159 cluster,
vertex, etaAtCalo, phiAtCalo)) {
175 return StatusCode::SUCCESS;
198 ATH_MSG_DEBUG(
"Conversion failed cut on TRT tube hit fraction: "
206 (isSingle &&
EoverP > EoverPcut) ||
225 ? 1. * nTRTTube / nTRT
229 float maxTubeHitFraction = 0.;
230 for (
unsigned int i = 0;
i <
vertex.nTrackParticles(); ++
i) {
231 if (!
vertex.trackParticle(
i)) {
232 ATH_MSG_WARNING(
"NULL pointer to track particle in conversion vertex");
234 float tubeHitFraction = getTRTTubeHitFraction(
vertex.trackParticle(
i));
235 if (tubeHitFraction > maxTubeHitFraction) {
236 maxTubeHitFraction = tubeHitFraction;
240 return maxTubeHitFraction;
void pushFrontVertex(const ElementLink< xAOD::VertexContainer > &vertexElementLink)
Push front another vertex.
size_t getNumberOfVertices() const
Return the number xAOD::Vertex/vertices that match the photon candidate.
const_pointer_type cptr()
Dereference the pointer.
virtual StatusCode executeRec(const EventContext &ctx, egammaRec *egRec) const override final
execute method
Helper class to provide type-safe access to aux data.
Gaudi::Property< float > m_maxTRTTubeHitFraction
"Maximum fraction of tube hits for vertices with TRT tracks
Gaudi::Property< float > m_minSumPt_double
minimum sum pT for double track conversion vertices
Gaudi::Property< float > m_minSumPt_doubleTRT
minimum sum pT for double TRT track conversion vertices
Gaudi::Property< float > m_maxEoverP_singleTrack
maximum E/p for single track conversion vertices (E is not calibrated)
StatusCode initialize() override final
initialize method
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
float getMaxTRTTubeHitFraction(const xAOD::Vertex &vertex) const
Return the maximum fraction of TRT tube hits among the tracks.
ToolHandle< IEMExtrapolationTools > m_extrapolationTool
EMExtrapolationTools.
@ numberOfTRTHits
number of TRT hits [unit8_t].
const Amg::Vector3D & position() const
Returns the 3-pos.
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
@ numberOfTRTTubeHits
number of TRT tube hits [unit8_t].
SG::ReadHandleKey< xAOD::VertexContainer > m_conversionContainerKey
Name of conversion container.
bool passPtAndEoverP(const EventContext &ctx, const xAOD::Vertex &, const xAOD::CaloCluster &) const
Return true if vertex and cluster pass Pt and E/p cuts.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Description of a calorimeter cluster.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
void setDeltaPhiVtx(float value)
set deltaPhiVtx
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode vertexExecute(const EventContext &ctx, egammaRec *egRec, const xAOD::VertexContainer *conversions) const
actual implementation method
void pushBackVertex(const ElementLink< xAOD::VertexContainer > &vertexElementLink)
Push back another vertex.
Gaudi::Property< float > m_minPt_singleTrack
minimum pT for single-track conversion vertices
void setVertices(const std::vector< ElementLink< xAOD::VertexContainer >> &links)
set Pointer to the xAOD::vertex/vertices that match the photon candidate
@ doubleSiTRT
two tracks, only one with Si hits
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ singleTRT
one track only, no Si hits (TRT only)
void setDeltaEtaVtx(float value)
set deltaEtaVtx
ElementLink implementation for ROOT usage.
@ singleSi
one track only, with Si hits
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing a Vertex.
Gaudi::Property< float > m_minPt_singleTRT
minimum pT for TRT-only single-track conversion vertices
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
#define ATH_MSG_WARNING(x)
Gaudi::Property< float > m_maxEoverP_singleTrack_EtSf
Scale maxEoverP_singleTrack by 1+sf*Et(cluster)/GeV
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
@ doubleTRT
two tracks, none with Si hits (TRT only)
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
Handle class for reading from StoreGate.
EMConversionBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Gaudi::Property< bool > m_rejectAllTRT
Ignore all conversion vertices that contain exclusively TRT-only tracks.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double e() const
The total energy of the particle.