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#include <TRandom3.h>
26
27namespace InDet {
28
30 : public virtual IInDetTrackSmearingTool
31 , public virtual InDetTrackSystematicsTool
32 , public virtual CP::CorrectionTool< xAOD::TrackParticleContainer >
33 {
34
38 public:
40 InDetTrackSmearingTool( const std::string& name );
41
43 virtual StatusCode initialize() override;
48 xAOD::TrackParticle& ID, const CP::SystematicSet& syst) const override;
49
50 // we need explicit forwarding calls because CP::CorrectionTool does not have a pure interface
51 // this isn't really elegant (ideally these would come automatically) but we'd need IInDetTrackSmearingTool
52 // to inherit from CP::CorrectionTool, which would make it not pure-virtual.
53 // at least, forwarding calls are easy enough to read and understand.
55 xAOD::TrackParticle*& out ) override;
57
59 virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
61 virtual CP::SystematicSet affectingSystematics() const override;
63 virtual CP::SystematicSet recommendedSystematics() const override;
65 virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override;
66
67 private:
68
71 const CP::SystematicSet& filtered) const;
72
75 const CP::SystematicSet& filtered) const;
77 const CP::SystematicSet& filtered) const;
78
79 // StatusCode initHistogram(TH1*& histogram, std::string rootFileName, std::string histogramName) const;
80 // StatusCode initFunction(TF2*& function, std::string rootFileName, std::string functionName) const;
81 float readHistogram( const TH2*, float pt, float eta ) const;
82
83 // float readHistogram(TH1* histogram, float pt, float eta) const;
84 // float readHistograms(std::vector<TH1 *> histogram, float pt, float eta) const;
85 // histograms for dead module smearing as a function of p
86 std::unique_ptr<TH2> m_smearD0 = nullptr;
87 std::unique_ptr<TH2> m_smearZ0 = nullptr;
88
89 // allow the user to configure which calibration files to use if desired
90 Gaudi::Property<std::string> m_calibFileIP_CTIDE{this, "calibFileIP_CTIDE", ""};
91 };
92
93}
94
95#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".