ATLAS Offline Software
EFTrackingSmearingAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef EFTRACKING_SMEARINGALG_H
5 #define EFTRACKING_SMEARINGALG_H
6 
7 #include "FakeTrackSmearer.h"
14 
17 
18 
20  public:
21  EFTrackingSmearingAlg( const std::string& name, ISvcLocator* pSvcLocator );
22  virtual ~EFTrackingSmearingAlg();
23 
24  virtual StatusCode initialize() override;
25  virtual StatusCode execute() override;
26 
27  private:
28 
29  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_inputTrackParticleKey { this, "InputTrackParticleContainer", "InDetTrackParticles_tosmear",
30  "key for retrieval of input TrackParticles" };
31 
32  SG::WriteHandleKey<xAOD::TrackParticleContainer> m_outputTrackParticleKey { this, "OutputTrackParticleContainer", "InDetTrackParticles_smeared",
33  "key for retrieval of output TrackParticles" };
34 
35  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_inputTruthParticleKey{this,"InputTruthParticleContainer","TruthParticles_tosmear",
36  "key for retrieval of input Truth particle"};
37 
38  SG::WriteHandleKey<xAOD::TruthParticleContainer> m_outputTruthParticleKey{this,"OutputTruthParticleContainer","TruthParticles_smeared",
39  "key for retrieval of output Truth particle"};
40 
41 
42  SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> m_d0DecoratorKey {this, "d0", "TruthParticles.d0", "Particle d0 decoration, set at initialisation"};
43  SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> m_z0DecoratorKey {this, "z0", "TruthParticles.z0", "Particle z0 decoration, set at initialisation"};
44  SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> m_ptDecoratorKey {this, "pt", "TruthParticles.pt", "Particle pt decoration, set at initialisation"};
45 
46 
47  // to configure the smearer
48  DoubleProperty m_SigmaScaleFactor {this, "SmearingScaleFactor", 1, "Set the smearing SF value for the sigmas"};
49  BooleanProperty m_UseResolutionPtCutOff {this, "UseResolutionPtCutOff", false, "Apply ptCutoff on smearing"};
50  DoubleProperty m_SetResolutionPtCutOff {this, "SetResolutionPtCutOff", 0., "Set ptCutoff off for semaring"};
51  DoubleProperty m_inputTracksPtCut {this, "InputTracksPtCutGeV", 0.0, "Set input track pT cut"};
52  DoubleProperty m_outputTracksPtCut {this, "OutputTracksPtCutGeV", 1.0, "Set the output track pT cut"};
53  DoubleProperty m_smearedTrackEfficiency{this, "SmearedTrackEfficiency", 1.0, "Set track efficiency for smearing"};
54  BooleanProperty m_parameterizedTrackEfficiency{this, "ParameterizedTrackEfficiency", false, "Enable parameterized efficiency for smearing"};
55  BooleanProperty m_enableMonitoring {this, "EnableMonitoring", false, "Enable debugging monitoring of the algorithm"};
56  BooleanProperty m_smearTruthParticle {this, "SmearTruthParticle", false, "Enable smearing on truth particles, disabling the track smearing"};
57  // this is for LRT
58  BooleanProperty m_parameterizedTrackEfficiency_LRT{this, "ParameterizedTrackEfficiency_LRT", false, "Enable parameterized efficiency for LRT smearing"};
59  DoubleProperty m_smearedTrackEfficiency_d0high_LRT{this, "SmearedTrackEfficiency_d0high_LRT", 1.0, "Set high d0 value for smeared track efficiency LRT"};
60  DoubleProperty m_smearedTrackEfficiency_d0low_LRT{this, "SmearedTrackEfficiency_d0low_LRT", 1.0, "Set low d0 value for smeared track efficiency LRT"};
61 
62  // these are for fake emulations
63  BooleanProperty m_EnableFakes {this,"IncludeDuplicatesAndFakes",false,"Enable fake track production"};
64  BooleanProperty m_FakeKillerEnable {this,"FakeKillerEnable",false, "disable inclusion of broad fakes"};
65  BooleanProperty m_IncludeFakesInResolutionCalculation{this,"IncludeFakesInResolutionCalculation",false,
66  "modify calculation of covariance parameters to include weighted combination of core and broad RMS"};
67  BooleanProperty m_UseCoinToss {this,"UseCoinToss",false,
68  "if True, fakes are generated with flat inefficiency, else use poissonian criteria"};
69 
70  LongLongProperty m_RandomSeed{this,"RandomSeed",0};
71 
72  std::unique_ptr<FakeTrackSmearer> m_mySmearer;
74  StatusCode smearTruthParticles(const EventContext& ctx);
75 };
76 
77 #endif //> !EFTRACKING_SMEARINGALG_H
EFTrackingSmearingAlg::smearTruthParticles
StatusCode smearTruthParticles(const EventContext &ctx)
Definition: EFTrackingSmearingAlg.cxx:204
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
EFTrackingSmearingAlg::m_smearedTrackEfficiency_d0low_LRT
DoubleProperty m_smearedTrackEfficiency_d0low_LRT
Definition: EFTrackingSmearingAlg.h:60
EFTrackingSmearingAlg::m_outputTracksPtCut
DoubleProperty m_outputTracksPtCut
Definition: EFTrackingSmearingAlg.h:52
EFTrackingSmearingAlg::m_EnableFakes
BooleanProperty m_EnableFakes
Definition: EFTrackingSmearingAlg.h:63
EFTrackingSmearingAlg::m_z0DecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_z0DecoratorKey
Definition: EFTrackingSmearingAlg.h:43
EFTrackingSmearingAlg::book_histograms
StatusCode book_histograms()
Definition: EFTrackingSmearingAlg.cxx:545
EFTrackingSmearingAlg::m_IncludeFakesInResolutionCalculation
BooleanProperty m_IncludeFakesInResolutionCalculation
Definition: EFTrackingSmearingAlg.h:65
EFTrackingSmearingAlg::m_smearTruthParticle
BooleanProperty m_smearTruthParticle
Definition: EFTrackingSmearingAlg.h:56
EFTrackingSmearingAlg::m_ptDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_ptDecoratorKey
Definition: EFTrackingSmearingAlg.h:44
TruthParticleContainer.h
EFTrackingSmearingAlg
Definition: EFTrackingSmearingAlg.h:19
EFTrackingSmearingAlg::m_mySmearer
std::unique_ptr< FakeTrackSmearer > m_mySmearer
Definition: EFTrackingSmearingAlg.h:72
EFTrackingSmearingAlg::m_outputTruthParticleKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outputTruthParticleKey
Definition: EFTrackingSmearingAlg.h:38
SG::ReadHandleKey< xAOD::TrackParticleContainer >
AthHistogramAlgorithm.h
EFTrackingSmearingAlg::m_d0DecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_d0DecoratorKey
Definition: EFTrackingSmearingAlg.h:42
TruthParticleAuxContainer.h
EFTrackingSmearingAlg::m_UseResolutionPtCutOff
BooleanProperty m_UseResolutionPtCutOff
Definition: EFTrackingSmearingAlg.h:49
EFTrackingSmearingAlg::m_inputTrackParticleKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTrackParticleKey
Definition: EFTrackingSmearingAlg.h:29
SG::WriteHandleKey< xAOD::TrackParticleContainer >
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
TrackParticleAuxContainer.h
EFTrackingSmearingAlg::m_inputTruthParticleKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleKey
Definition: EFTrackingSmearingAlg.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
WriteDecorHandle.h
Handle class for adding a decoration to an object.
EFTrackingSmearingAlg::m_outputTrackParticleKey
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_outputTrackParticleKey
Definition: EFTrackingSmearingAlg.h:32
AthHistogramAlgorithm
Definition: AthHistogramAlgorithm.h:32
FakeTrackSmearer.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EFTrackingSmearingAlg::m_parameterizedTrackEfficiency
BooleanProperty m_parameterizedTrackEfficiency
Definition: EFTrackingSmearingAlg.h:54
EFTrackingSmearingAlg::m_inputTracksPtCut
DoubleProperty m_inputTracksPtCut
Definition: EFTrackingSmearingAlg.h:51
EFTrackingSmearingAlg::initialize
virtual StatusCode initialize() override
Definition: EFTrackingSmearingAlg.cxx:101
EFTrackingSmearingAlg::m_smearedTrackEfficiency
DoubleProperty m_smearedTrackEfficiency
Definition: EFTrackingSmearingAlg.h:53
EFTrackingSmearingAlg::m_RandomSeed
LongLongProperty m_RandomSeed
Definition: EFTrackingSmearingAlg.h:70
TrackParticle.h
EFTrackingSmearingAlg::m_UseCoinToss
BooleanProperty m_UseCoinToss
Definition: EFTrackingSmearingAlg.h:67
EFTrackingSmearingAlg::~EFTrackingSmearingAlg
virtual ~EFTrackingSmearingAlg()
Definition: EFTrackingSmearingAlg.cxx:98
EFTrackingSmearingAlg::execute
virtual StatusCode execute() override
Definition: EFTrackingSmearingAlg.cxx:342
EFTrackingSmearingAlg::m_smearedTrackEfficiency_d0high_LRT
DoubleProperty m_smearedTrackEfficiency_d0high_LRT
Definition: EFTrackingSmearingAlg.h:59
EFTrackingSmearingAlg::m_enableMonitoring
BooleanProperty m_enableMonitoring
Definition: EFTrackingSmearingAlg.h:55
EFTrackingSmearingAlg::m_SigmaScaleFactor
DoubleProperty m_SigmaScaleFactor
Definition: EFTrackingSmearingAlg.h:48
EFTrackingSmearingAlg::EFTrackingSmearingAlg
EFTrackingSmearingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: EFTrackingSmearingAlg.cxx:94
EFTrackingSmearingAlg::m_parameterizedTrackEfficiency_LRT
BooleanProperty m_parameterizedTrackEfficiency_LRT
Definition: EFTrackingSmearingAlg.h:58
EFTrackingSmearingAlg::m_FakeKillerEnable
BooleanProperty m_FakeKillerEnable
Definition: EFTrackingSmearingAlg.h:64
EFTrackingSmearingAlg::m_SetResolutionPtCutOff
DoubleProperty m_SetResolutionPtCutOff
Definition: EFTrackingSmearingAlg.h:50
TrackParticleContainer.h