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;
46
47 // we need explicit forwarding calls because CP::CorrectionTool does not have a pure interface
48 // this isn't really elegant (ideally these would come automatically) but we'd need IInDetTrackSmearingTool
49 // to inherit from CP::CorrectionTool, which would make it not pure-virtual.
50 // at least, forwarding calls are easy enough to read and understand.
52 xAOD::TrackParticle*& out ) override;
54
56 virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
58 virtual CP::SystematicSet affectingSystematics() const override;
60 virtual CP::SystematicSet recommendedSystematics() const override;
62 virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override;
63
64 private:
65
67 float GetSmearD0Sigma(const xAOD::TrackParticle&) const;
68 float GetSmearZ0Sigma(const xAOD::TrackParticle&) const;
69
70 // StatusCode initHistogram(TH1*& histogram, std::string rootFileName, std::string histogramName) const;
71 // StatusCode initFunction(TF2*& function, std::string rootFileName, std::string functionName) const;
72 float readHistogram( const TH2*, float pt, float eta ) const;
73
74 // float readHistogram(TH1* histogram, float pt, float eta) const;
75 // float readHistograms(std::vector<TH1 *> histogram, float pt, float eta) const;
76 // histograms for dead module smearing as a function of p
77 std::unique_ptr<TH2> m_smearD0 = nullptr;
78 std::unique_ptr<TH2> m_smearZ0 = nullptr;
79
80 // allow the user to configure which calibration files to use if desired
81 Gaudi::Property<std::string> m_calibFileIP_CTIDE{this, "calibFileIP_CTIDE", ""};
82 };
83
84}
85
86#endif
Scalar eta() const
pseudorapidity method
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
std::vector< Identifier > ID
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
float GetSmearZ0Sigma(const xAOD::TrackParticle &) const
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
virtual CP::SystematicSet affectingSystematics() const override
returns: list of systematics this tool can be affected by
float GetSmearD0Sigma(const xAOD::TrackParticle &) const
Get smearing widths to add to IPs.
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".