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