ATLAS Offline Software
IsolationTrackDecorator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // IsolationTrackDecorator.h, (c) ATLAS Detector software
8 
9 /*
10  Decorates the track isolations and calo isolations to the track container.
11  ptcone, ptvarcone, etcone, and etcluster are decorated.
12  if the etcone is selected, the etcluster is also decorated automatically.
13 
14  user specifies...
15 
16  TrackIsolationTool: track isolation tool. ex.) from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg
17  CaloIsolationTool: calo isolation tool. ex.) from IsolationAlgs.IsoToolsConfig import CaloIsolationToolCfg
18  TargetContainer: track particle container.
19  SelectionString: the selections for the tracks that are decorated. ex.) "InDetTrackParticles.pt>10*GeV".
20  iso: isolation type. ex.) isoPar = ROOT.xAOD.Iso.IsolationType; iso = [isoPar.ptcone40, isoPar.ptcone30]
21  Prefix & isoSufix: prefix and sufix for the decoration, decoraterKey = trackContainerKey + prefix + isosufix.
22 */
23 
24 #ifndef DERIVATIONFRAMEWORK_IsolationTrackDecorator_H
25 #define DERIVATIONFRAMEWORK_IsolationTrackDecorator_H
26 
27 #include<string>
28 #include<vector>
29 
30 // Gaudi & Athena basics
32 #include "GaudiKernel/ToolHandle.h"
41 
42 namespace DerivationFramework {
46  class IsolationTrackDecorator : public extends<ExpressionParserUser<AthAlgTool>, IAugmentationTool> {
47 
48  public:
50  IsolationTrackDecorator( const std::string& t, const std::string& n, const IInterface* p);
51 
53  virtual ~IsolationTrackDecorator() = default;
54 
55  // Athena algtool's Hooks
56  virtual StatusCode initialize() override;
57  virtual StatusCode finalize() override;
58 
59  virtual StatusCode addBranches() const override;
60 
61  private:
63  this, "TargetContainer", "InDetTrackParticles", "track particle container name"};
64  StringProperty m_selectionString {
65  this, "SelectionString", "", "selection string"};
66  StringProperty m_prefix {
67  this, "Prefix", "", "prefix"};
68  StringArrayProperty m_iso_suffix {
69  this, "isoSuffix", {""}, "suffix for the isolations"};
70  StringProperty m_selFlag {
71  this, "SelectionFlag", "", "selection flag"};
72  IntegerProperty m_diff_ptvarcone {
73  this, "DiffPtvarcone", xAOD::Iso::ptvarcone20 - xAOD::Iso::ptcone20, "difference between Iso::ptvarcone20 and Iso::ptcone20"};
74  IntegerProperty m_selFlagValue {
75  this, "SelectionFlagValue", 1, "selection flag value"};
76 
78  ToolHandle<xAOD::ITrackIsolationTool> m_trackIsolationTool {this, "TrackIsolationTool", ""};
79  ToolHandle<xAOD::ICaloTopoClusterIsolationTool> m_caloIsolationTool {this, "CaloIsolationTool", ""};
80 
81  std::vector<xAOD::Iso::IsolationType> m_ptconeTypes;
82  std::vector<xAOD::Iso::IsolationType> m_ptvarconeTypes;
83  std::vector<xAOD::Iso::IsolationType> m_topoetconeTypes;
84  IntegerArrayProperty m_iso {
85  this, "iso", {}, "isolation types vector<int>"};
89 
91  this, "ptconeDecoratorsKey", {}};
93  this, "ptvarconeDecoratorsKey", {}};
95  this, "topoetconeDecoratorsKey", {}};
97  this, "topoetconeNonCoreConeDecoratorsKey", {}};
99  this, "dec_trkFlagKey", ""};
100 
101  };
102 }
103 #endif //
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
DerivationFramework::IsolationTrackDecorator::m_ptvarconeTypes
std::vector< xAOD::Iso::IsolationType > m_ptvarconeTypes
Definition: IsolationTrackDecorator.h:82
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >
DerivationFramework::IsolationTrackDecorator::m_iso_suffix
StringArrayProperty m_iso_suffix
Definition: IsolationTrackDecorator.h:68
DerivationFramework::IsolationTrackDecorator::m_trackContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackContainerKey
Definition: IsolationTrackDecorator.h:62
xAOD::Iso::ptvarcone20
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
Definition: IsolationType.h:55
xAOD::TrackCorrection
Definition: IsolationCommon.h:18
DerivationFramework::IsolationTrackDecorator::m_topoclusCorrList
xAOD::CaloCorrection m_topoclusCorrList
Definition: IsolationTrackDecorator.h:88
IAugmentationTool.h
ExpressionParserUser.h
DerivationFramework::IsolationTrackDecorator::initialize
virtual StatusCode initialize() override
Definition: IsolationTrackDecorator.cxx:30
DerivationFramework::IsolationTrackDecorator::m_trackIsolationTool
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Athena configured tools.
Definition: IsolationTrackDecorator.h:78
DerivationFramework::IsolationTrackDecorator::m_topoetconeDecoratorsKey
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_topoetconeDecoratorsKey
Definition: IsolationTrackDecorator.h:94
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
DerivationFramework::IsolationTrackDecorator::m_trkCorrList
xAOD::TrackCorrection m_trkCorrList
Definition: IsolationTrackDecorator.h:86
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::TrackParticleContainer >
DerivationFramework::IsolationTrackDecorator::m_selFlag
StringProperty m_selFlag
Definition: IsolationTrackDecorator.h:70
ICaloTopoClusterIsolationTool.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework::IsolationTrackDecorator::m_topoetconeTypes
std::vector< xAOD::Iso::IsolationType > m_topoetconeTypes
Definition: IsolationTrackDecorator.h:83
DerivationFramework::IsolationTrackDecorator::m_prefix
StringProperty m_prefix
Definition: IsolationTrackDecorator.h:66
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::IsolationTrackDecorator::m_ptconeTypes
std::vector< xAOD::Iso::IsolationType > m_ptconeTypes
Definition: IsolationTrackDecorator.h:81
DerivationFramework::IsolationTrackDecorator
Definition: IsolationTrackDecorator.h:46
DerivationFramework::IsolationTrackDecorator::m_dec_trkFlagKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trkFlagKey
Definition: IsolationTrackDecorator.h:98
DerivationFramework::IsolationTrackDecorator::m_selectionString
StringProperty m_selectionString
Definition: IsolationTrackDecorator.h:64
DerivationFramework::IsolationTrackDecorator::finalize
virtual StatusCode finalize() override
Definition: IsolationTrackDecorator.cxx:95
DerivationFramework::IsolationTrackDecorator::m_ptconeDecoratorsKey
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_ptconeDecoratorsKey
Definition: IsolationTrackDecorator.h:90
DerivationFramework::IsolationTrackDecorator::m_topoconeCorrList
xAOD::CaloCorrection m_topoconeCorrList
Definition: IsolationTrackDecorator.h:87
DerivationFramework::IsolationTrackDecorator::m_topoetconeNonCoreConeDecoratorsKey
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_topoetconeNonCoreConeDecoratorsKey
Definition: IsolationTrackDecorator.h:96
ITrackIsolationTool.h
xAOD::CaloCorrection
Definition: IsolationCommon.h:14
WriteDecorHandleKeyArray.h
IsolationHelpers.h
DerivationFramework::IsolationTrackDecorator::IsolationTrackDecorator
IsolationTrackDecorator(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: IsolationTrackDecorator.cxx:24
DerivationFramework::IsolationTrackDecorator::m_ptvarconeDecoratorsKey
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_ptvarconeDecoratorsKey
Definition: IsolationTrackDecorator.h:92
DerivationFramework::IsolationTrackDecorator::m_selFlagValue
IntegerProperty m_selFlagValue
Definition: IsolationTrackDecorator.h:74
DerivationFramework::IsolationTrackDecorator::m_caloIsolationTool
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_caloIsolationTool
Definition: IsolationTrackDecorator.h:79
DerivationFramework::IsolationTrackDecorator::m_iso
IntegerArrayProperty m_iso
Definition: IsolationTrackDecorator.h:84
DerivationFramework::IsolationTrackDecorator::~IsolationTrackDecorator
virtual ~IsolationTrackDecorator()=default
Destructor.
DerivationFramework::IsolationTrackDecorator::addBranches
virtual StatusCode addBranches() const override
Definition: IsolationTrackDecorator.cxx:103
DerivationFramework::IsolationTrackDecorator::m_diff_ptvarcone
IntegerProperty m_diff_ptvarcone
Definition: IsolationTrackDecorator.h:72