ATLAS Offline Software
Loading...
Searching...
No Matches
InDetTrackSmearingTool.h
Go to the documentation of this file.
1// -*- c++ -*-
2/*
3 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef INDETTRACKSYSTEMATICSTOOLS_INDETTRACKSMEARINGTOOL_H
7#define INDETTRACKSYSTEMATICSTOOLS_INDETTRACKSMEARINGTOOL_H
8
9// Framework include(s):
10#include "AsgTools/AsgTool.h"
14
15//EDM include(s):
17
18// Local include(s):
21
22#include <TFile.h>
23#include <TH2F.h>
24#include <TF2.h>
25
26namespace InDet {
27
29 : public virtual IInDetTrackSmearingTool
30 , public virtual InDetTrackSystematicsTool
31 , public virtual CP::CorrectionTool< xAOD::TrackParticleContainer >
32 {
33
37 public:
39 InDetTrackSmearingTool( const std::string& name );
40
42 virtual StatusCode initialize() override;
47 xAOD::TrackParticle& ID, const CP::SystematicSet& syst) const override;
48
49 // we need explicit forwarding calls because CP::CorrectionTool does not have a pure interface
50 // this isn't really elegant (ideally these would come automatically) but we'd need IInDetTrackSmearingTool
51 // to inherit from CP::CorrectionTool, which would make it not pure-virtual.
52 // at least, forwarding calls are easy enough to read and understand.
54 xAOD::TrackParticle*& out ) override;
56
58 virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
60 virtual CP::SystematicSet affectingSystematics() const override;
62 virtual CP::SystematicSet recommendedSystematics() const override;
64 virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override;
65
66 private:
67
70 const CP::SystematicSet& filtered) const;
71
74 const CP::SystematicSet& filtered) const;
76 const CP::SystematicSet& filtered) const;
77
78 // StatusCode initHistogram(TH1*& histogram, std::string rootFileName, std::string histogramName) const;
79 // StatusCode initFunction(TF2*& function, std::string rootFileName, std::string functionName) const;
80 float readHistogram( const TH2*, float pt, float eta ) const;
81
82 // float readHistogram(TH1* histogram, float pt, float eta) const;
83 // float readHistograms(std::vector<TH1 *> histogram, float pt, float eta) const;
84 // histograms for dead module smearing as a function of p
85 std::unique_ptr<TH2> m_smearD0 = nullptr;
86 std::unique_ptr<TH2> m_smearZ0 = nullptr;
87
88 // allow the user to configure which calibration files to use if desired
89 Gaudi::Property<std::string> m_calibFileIP_CTIDE{this, "calibFileIP_CTIDE", ""};
90 Gaudi::Property<int> m_seed{this, "Seed", 4,
91 "Seed offset mixed with per-track phi/eta hash for deterministic RNG"};
92 };
93
94}
95
96#endif
Scalar eta() const
pseudorapidity method
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Return value from object correction CP tools.
Helper base class for "correction tools".
Class to wrap a set of SystematicVariations.
Simple interface for calibrating/correcting tracks (inner-detector particles).
virtual CP::CorrectionCode correctedCopy(const xAOD::TrackParticle &in, xAOD::TrackParticle *&out) override
virtual ASG_TOOL_CLASS(InDetTrackSmearingTool, InDet::IInDetTrackSmearingTool) public StatusCode initialize() override
Create a proper constructor for Athena.
virtual CP::CorrectionCode applyContainerCorrection(xAOD::TrackParticleContainer &cont) override
virtual CP::CorrectionCode applyCorrection(xAOD::TrackParticle &ID) override
Smearing method.
Gaudi::Property< std::string > m_calibFileIP_CTIDE
virtual CP::SystematicSet recommendedSystematics() const override
returns: list of recommended systematics to use with this tool
virtual bool isAffectedBySystematic(const CP::SystematicVariation &) const override
returns: whether the tool is affected by the systematic
float GetSmearD0Sigma(const xAOD::TrackParticle &, const CP::SystematicSet &filtered) const
Get smearing widths to add to IPs.
float GetSmearZ0Sigma(const xAOD::TrackParticle &, const CP::SystematicSet &filtered) const
virtual CP::SystematicSet affectingSystematics() const override
returns: list of systematics this tool can be affected by
CP::CorrectionCode applyCorrectionImpl(xAOD::TrackParticle &track, const CP::SystematicSet &filtered) const
Core smearing logic; filtered is the pre-resolved systematic set.
virtual StatusCode applySystematicVariation(const CP::SystematicSet &) override
configure the tool to apply a given list of systematic variations
float readHistogram(const TH2 *, float pt, float eta) const
Primary Vertex Finder.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".