ATLAS Offline Software
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 
31 namespace 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;
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
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
FlowElementContainer.h
DerivationFramework::DiphotonVertexDecorator::initialize
virtual StatusCode initialize() override final
Definition: DiphotonVertexDecorator.cxx:28
ParticleTest.eg
eg
Definition: ParticleTest.py:29
DerivationFramework::DiphotonVertexDecorator::m_removeCrack
Gaudi::Property< bool > m_removeCrack
Definition: DiphotonVertexDecorator.h:63
IAugmentationTool.h
DerivationFramework::DiphotonVertexDecorator::m_maxEta
Gaudi::Property< double > m_maxEta
Definition: DiphotonVertexDecorator.h:64
DerivationFramework::DiphotonVertexDecorator::PhotonPreselect
bool PhotonPreselect(const xAOD::Photon *ph) const
Definition: DiphotonVertexDecorator.cxx:157
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::DiphotonVertexDecorator::m_minPhotonPt
Gaudi::Property< double > m_minPhotonPt
Definition: DiphotonVertexDecorator.h:62
part1
Definition: part1.py:1
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
DerivationFramework::DiphotonVertexDecorator::greaterPtFlowElement
static bool greaterPtFlowElement(const xAOD::FlowElement *part1, const xAOD::FlowElement *part2)
Definition: DiphotonVertexDecorator.h:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::DiphotonVertexDecorator::matchFlowElement
StatusCode matchFlowElement(const xAOD::Photon *eg, const xAOD::FlowElementContainer *pfoCont) const
Definition: DiphotonVertexDecorator.cxx:194
DerivationFramework::DiphotonVertexDecorator::m_photonVertexSelectionTool
ToolHandle< CP::IPhotonVertexSelectionTool > m_photonVertexSelectionTool
Definition: DiphotonVertexDecorator.h:53
AthAlgTool.h
DerivationFramework::DiphotonVertexDecorator::m_FEContainerHandleKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_FEContainerHandleKey
Definition: DiphotonVertexDecorator.h:58
DerivationFramework::DiphotonVertexDecorator::m_primaryVertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
Definition: DiphotonVertexDecorator.h:55
IPhotonVertexSelectionTool.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
part2
Definition: part2.py:1
DerivationFramework::DiphotonVertexDecorator
Definition: DiphotonVertexDecorator.h:38
DerivationFramework::DiphotonVertexDecorator::m_ignoreConv
Gaudi::Property< bool > m_ignoreConv
Definition: DiphotonVertexDecorator.h:65
DerivationFramework::DiphotonVertexDecorator::m_diphotonVertexKey
SG::WriteHandleKey< xAOD::VertexContainer > m_diphotonVertexKey
Definition: DiphotonVertexDecorator.h:57
VertexContainer.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
DerivationFramework::DiphotonVertexDecorator::m_photonKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonKey
Definition: DiphotonVertexDecorator.h:56
DerivationFramework::DiphotonVertexDecorator::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition: DiphotonVertexDecorator.cxx:39
DerivationFramework::DiphotonVertexDecorator::m_tcMatch_dR
Gaudi::Property< double > m_tcMatch_dR
Definition: DiphotonVertexDecorator.h:66
DerivationFramework::DiphotonVertexDecorator::m_tcMatch_maxRat
Gaudi::Property< double > m_tcMatch_maxRat
Definition: DiphotonVertexDecorator.h:67
PhotonContainer.h
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25