ATLAS Offline Software
Loading...
Searching...
No Matches
DiphotonVertexDecorator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// DiphotonVertexDecorator.h
8
9#ifndef DERIVATIONFRAMEWORK_DiphotonVertexDecorator_H
10#define DERIVATIONFRAMEWORK_DiphotonVertexDecorator_H
11
12#include <string>
13#include <vector>
14#include <algorithm>
15
16// Gaudi & Athena basics
18#include "GaudiKernel/ToolHandle.h"
19#include "GaudiKernel/SystemOfUnits.h"
20
21// DerivationFramework includes
23// xAOD header files
26
28
30
31namespace DerivationFramework {
32
38 class DiphotonVertexDecorator : public extends<AthAlgTool, IAugmentationTool> {
39
40 public:
41
42 using base_class::base_class;
43
44 // Athena algtool's Hooks
45 virtual StatusCode initialize() override final;
46
47 virtual StatusCode addBranches(const EventContext& ctx) const override final;
48
49 private:
50
53 ToolHandle<CP::IPhotonVertexSelectionTool> m_photonVertexSelectionTool{this, "PhotonVertexSelectionTool", "", ""};
54
55 SG::ReadHandleKey<xAOD::VertexContainer> m_primaryVertexKey{this, "PrimaryVertexName", "PrimaryVertices", "" };
56 SG::ReadHandleKey<xAOD::PhotonContainer> m_photonKey{this, "PhotonKey", "Photons", "" };
57 SG::WriteHandleKey<xAOD::VertexContainer> m_diphotonVertexKey{this, "DiphotonVertexName", "HggPrimaryVertices", "" };
58 SG::ReadHandleKey<xAOD::FlowElementContainer> m_FEContainerHandleKey{this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"};
61
62 Gaudi::Property<double> m_minPhotonPt{this, "MinimumPhotonPt", 20.*Gaudi::Units::GeV};
63 Gaudi::Property<bool> m_removeCrack{this, "RemoveCrack", true};
64 Gaudi::Property<double> m_maxEta{this, "MaxEta", 2.37};
65 Gaudi::Property<bool> m_ignoreConv{this, "IgnoreConvPointing", false};
66 Gaudi::Property<double> m_tcMatch_dR{this, "TCMatchDeltaR", 0.1};
67 Gaudi::Property<double> m_tcMatch_maxRat{this, "TCMatchMaxRat", 1.5};
68
69 bool PhotonPreselect(const xAOD::Photon *ph) const;
70 StatusCode matchFlowElement(const xAOD::Photon* eg,const xAOD::FlowElementContainer *pfoCont) const;
72 if (part1->charge()==0 && part2->charge()!=0) return false;
73 if (part1->charge()!=0 && part2->charge()==0) return true;
74 return part1->pt()>part2->pt();
75 }
76
77 };
78
79}
80
81#endif // DERIVATIONFRAMEWORK_DiphotonVertexDecorator_H
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonKey
static bool greaterPtFlowElement(const xAOD::FlowElement *part1, const xAOD::FlowElement *part2)
SG::ReadHandleKey< xAOD::FlowElementContainer > m_FEContainerHandleKey
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::WriteHandleKey< xAOD::VertexContainer > m_diphotonVertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
ToolHandle< CP::IPhotonVertexSelectionTool > m_photonVertexSelectionTool
StatusCode matchFlowElement(const xAOD::Photon *eg, const xAOD::FlowElementContainer *pfoCont) const
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
THE reconstruction tool.
Definition part1.py:1
Definition part2.py:1
FlowElementContainer_v1 FlowElementContainer
Definition of the current "pfo container version".
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16
Photon_v1 Photon
Definition of the current "egamma version".