ATLAS Offline Software
InclusiveTrackFilterTool.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*
3  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #ifndef INDETTRACKSYSTEMATICSTOOLS_INCLUSIVETRACKFILTERTOOL_H
7 #define INDETTRACKSYSTEMATICSTOOLS_INCLUSIVETRACKFILTERTOOL_H
8 
10 #include "AsgTools/AsgTool.h"
11 #include "AsgTools/ToolHandle.h"
17 
18 #include <string>
19 #include <TH2.h>
20 #include <TRandom3.h>
21 
22 namespace InDet {
23 
31 
33  : public virtual IInclusiveTrackFilterTool
35  {
36 
37  // create constructor for Athena
40 
41  public:
42  // create constructor for standalone Root
43  InclusiveTrackFilterTool( const std::string& name );
44 
45  virtual ~InclusiveTrackFilterTool();
46 
47  // static const InterfaceID& interfaceID();
48  virtual StatusCode initialize() override;
49 
50  // right now this returns a bool; if we want to implement the ASG selection tool interface then this will need to change to a TAccept
51  virtual bool accept( const xAOD::TrackParticle* ) const override;
52 
54  virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
56  virtual CP::SystematicSet affectingSystematics() const override;
58  virtual CP::SystematicSet recommendedSystematics() const override;
60  virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override;
61 
63  float getTrackUncertainty(const xAOD::TrackParticle*) const;
64 
65  private:
66 
67  // Property: random seed
68  Gaudi::Property<int> m_seed{this, "Seed", 42, "Seed used to initialize the RNG"};
69 
70  // Property: parameter to artificially scale up/down the effect of the tool
71  Gaudi::Property<float> m_trkEffSystScale{this, "trkEffSystScale", 1.0, "Option to scale the effect of the systematic (default 1)"};
72 
73  // Property: path to the root file containing the LRT efficiency histogram (note: uses PathResolver)
74  Gaudi::Property<std::string> m_calibFileLRTEff{this, "calibFileLRTEff", "InDetTrackSystematicsTools/CalibData_24.0_2023-v00/LargeD0TrackingRecommendations_20230824.root", "File containing the efficiency histogram (expert only)"};
75 
76  // Property: name of the efficiency histogram in m_calibFileLRTEff
77  Gaudi::Property<std::string> m_calibHistLRTEff{this, "calibHistLRTEff", "OneMinusRatioEfficiencyVSRadiusOfFirstHitEta_Nominal", "Name of the efficiency histogram (expert only)"};
78 
79 
80  std::unique_ptr<TRandom3> m_rnd = nullptr;
81  std::unique_ptr<TH2> m_trkLRTEff = nullptr;
82 
83  }; // class InclusiveTrackFilterTool
84 
85 } // namespace InDet
86 
87 #endif
InDet::InDetTrackSystematicsTool
Definition: InDetTrackSystematicsTool.h:22
PropertyWrapper.h
InDet::InclusiveTrackFilterTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const override
returns: list of systematics this tool can be affected by
Definition: InclusiveTrackFilterTool.cxx:87
InDet::InclusiveTrackFilterTool
Definition: InclusiveTrackFilterTool.h:35
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
SystematicSet.h
InDet::InclusiveTrackFilterTool::m_seed
Gaudi::Property< int > m_seed
Definition: InclusiveTrackFilterTool.h:68
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::SystematicVariation
Definition: SystematicVariation.h:47
InDet::InclusiveTrackFilterTool::isAffectedBySystematic
virtual bool isAffectedBySystematic(const CP::SystematicVariation &) const override
returns: whether the tool is affected by the systematic
Definition: InclusiveTrackFilterTool.cxx:82
InDet::InclusiveTrackFilterTool::m_trkLRTEff
std::unique_ptr< TH2 > m_trkLRTEff
Definition: InclusiveTrackFilterTool.h:81
InDet::InclusiveTrackFilterTool::accept
virtual bool accept(const xAOD::TrackParticle *) const override
Definition: InclusiveTrackFilterTool.cxx:46
InDet::InclusiveTrackFilterTool::recommendedSystematics
virtual CP::SystematicSet recommendedSystematics() const override
returns: list of recommended systematics to use with this tool
Definition: InclusiveTrackFilterTool.cxx:92
InDet::IInclusiveTrackFilterTool
Definition: IInclusiveTrackFilterTool.h:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InclusiveTrackFilterTool::m_calibFileLRTEff
Gaudi::Property< std::string > m_calibFileLRTEff
Definition: InclusiveTrackFilterTool.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDetTrackSystematicsTool.h
IInclusiveTrackFilterTool.h
InDet::InclusiveTrackFilterTool::m_rnd
std::unique_ptr< TRandom3 > m_rnd
Definition: InclusiveTrackFilterTool.h:80
InDet::InclusiveTrackFilterTool::getTrackUncertainty
float getTrackUncertainty(const xAOD::TrackParticle *) const
returns: the per-track uncertainty from the 2D histogram
Definition: InclusiveTrackFilterTool.cxx:73
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
TrackParticleFwd.h
InDet::InclusiveTrackFilterTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: InclusiveTrackFilterTool.cxx:24
InDet::InclusiveTrackFilterTool::m_calibHistLRTEff
Gaudi::Property< std::string > m_calibHistLRTEff
Definition: InclusiveTrackFilterTool.h:77
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ToolHandle.h
InDet::InclusiveTrackFilterTool::m_trkEffSystScale
Gaudi::Property< float > m_trkEffSystScale
Definition: InclusiveTrackFilterTool.h:71
AsgTool.h
InDet::InclusiveTrackFilterTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &) override
configure the tool to apply a given list of systematic variations
Definition: InclusiveTrackFilterTool.cxx:97
SystematicVariation.h