ATLAS Offline Software
DiphotonVertexDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // DiphotonVertexDecorator.h, (c) ATLAS Detector software
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 
20 // DerivationFramework includes
22 // xAOD header files
25 
27 
29 
30 namespace DerivationFramework {
31 
38 
39  public:
41  DiphotonVertexDecorator( const std::string& t, const std::string& n, const IInterface* p );
42 
45 
46  // Athena algtool's Hooks
49 
50  virtual StatusCode addBranches() const;
51 
52  private:
53 
56  ToolHandle<CP::IPhotonVertexSelectionTool> m_photonVertexSelectionTool{this, "PhotonVertexSelectionTool", "", ""};
57 
58  SG::ReadHandleKey<xAOD::VertexContainer> m_primaryVertexKey{this, "PrimaryVertexName", "PrimaryVertices", "" };
59  SG::ReadHandleKey<xAOD::PhotonContainer> m_photonKey { this, "PhotonKey", "Photons", "" };
60  SG::WriteHandleKey<xAOD::VertexContainer> m_diphotonVertexKey{this, "DiphotonVertexName", "HggPrimaryVertices", "" };
61  SG::ReadHandleKey<xAOD::FlowElementContainer> m_FEContainerHandleKey{this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"};
64 
65  double m_minPhotonPt;
67  double m_maxEta;
69  std::string m_pfoToolName;
70  double m_tcMatch_dR;
72 
73  bool PhotonPreselect(const xAOD::Photon *ph) const;
76  if (part1->charge()==0 && part2->charge()!=0) return false;
77  if (part1->charge()!=0 && part2->charge()==0) return true;
78  return part1->pt()>part2->pt();
79  }
80 
81  };
82 
83 }
84 
85 #endif // DERIVATIONFRAMEWORK_DiphotonVertexDecorator_H
FlowElementContainer.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
IAugmentationTool.h
DerivationFramework::DiphotonVertexDecorator::m_minPhotonPt
double m_minPhotonPt
Definition: DiphotonVertexDecorator.h:65
DerivationFramework::DiphotonVertexDecorator::m_removeCrack
bool m_removeCrack
Definition: DiphotonVertexDecorator.h:66
DerivationFramework::DiphotonVertexDecorator::m_maxEta
double m_maxEta
Definition: DiphotonVertexDecorator.h:67
DerivationFramework::DiphotonVertexDecorator::PhotonPreselect
bool PhotonPreselect(const xAOD::Photon *ph) const
Definition: DiphotonVertexDecorator.cxx:185
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::DiphotonVertexDecorator::m_tcMatch_maxRat
double m_tcMatch_maxRat
Definition: DiphotonVertexDecorator.h:71
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::IAugmentationTool
Definition: IAugmentationTool.h:24
DerivationFramework::DiphotonVertexDecorator::~DiphotonVertexDecorator
~DiphotonVertexDecorator()
Destructor.
Definition: DiphotonVertexDecorator.cxx:47
part1
Definition: part1.py:1
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::DiphotonVertexDecorator::initialize
StatusCode initialize()
Definition: DiphotonVertexDecorator.cxx:51
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::DiphotonVertexDecorator::greaterPtFlowElement
static bool greaterPtFlowElement(const xAOD::FlowElement *part1, const xAOD::FlowElement *part2)
Definition: DiphotonVertexDecorator.h:75
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:222
DerivationFramework::DiphotonVertexDecorator::m_photonVertexSelectionTool
ToolHandle< CP::IPhotonVertexSelectionTool > m_photonVertexSelectionTool
Definition: DiphotonVertexDecorator.h:56
DerivationFramework::DiphotonVertexDecorator::addBranches
virtual StatusCode addBranches() const
Pass the thinning service
Definition: DiphotonVertexDecorator.cxx:66
AthAlgTool.h
DerivationFramework::DiphotonVertexDecorator::m_FEContainerHandleKey
SG::ReadHandleKey< xAOD::FlowElementContainer > m_FEContainerHandleKey
Definition: DiphotonVertexDecorator.h:61
DerivationFramework::DiphotonVertexDecorator::m_primaryVertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
Definition: DiphotonVertexDecorator.h:58
IPhotonVertexSelectionTool.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
DerivationFramework::DiphotonVertexDecorator::DiphotonVertexDecorator
DiphotonVertexDecorator(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: DiphotonVertexDecorator.cxx:29
part2
Definition: part2.py:1
DerivationFramework::DiphotonVertexDecorator
Definition: DiphotonVertexDecorator.h:37
DerivationFramework::DiphotonVertexDecorator::finalize
StatusCode finalize()
Definition: DiphotonVertexDecorator.cxx:61
DerivationFramework::DiphotonVertexDecorator::m_diphotonVertexKey
SG::WriteHandleKey< xAOD::VertexContainer > m_diphotonVertexKey
Definition: DiphotonVertexDecorator.h:60
VertexContainer.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
DerivationFramework::DiphotonVertexDecorator::m_pfoToolName
std::string m_pfoToolName
Definition: DiphotonVertexDecorator.h:69
DerivationFramework::DiphotonVertexDecorator::m_photonKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonKey
Definition: DiphotonVertexDecorator.h:59
DerivationFramework::DiphotonVertexDecorator::m_ignoreConv
bool m_ignoreConv
Definition: DiphotonVertexDecorator.h:68
DerivationFramework::DiphotonVertexDecorator::m_tcMatch_dR
double m_tcMatch_dR
Definition: DiphotonVertexDecorator.h:70
AthAlgTool
Definition: AthAlgTool.h:26
PhotonContainer.h
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25