|
ATLAS Offline Software
|
#include <InDetTrackSmearingTool.h>
|
virtual void | print () const =0 |
| Print the state of the tool. More...
|
|
virtual void | print () const |
| Print the state of the tool. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
virtual CorrectionCode | applyCorrection (xAODObjectType &inputObject)=0 |
| effects: apply the correction and store the output in the object returns: success More...
|
|
CorrectionCode | correctedCopy (const xAODObjectType &inputObject, xAODObjectType *&outputObject) |
| effects: make a clone of the input object, apply the correction to it and store the output in the object returns: success rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency More...
|
|
CorrectionCode | applyContainerCorrection (xAODContainerType &inputContainer) |
| effects: apply the correction to all the members of the container returns: overall success rationale: this will apply the correction to every single member (even if some members fail) rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency More...
|
|
Definition at line 28 of file InDetTrackSmearingTool.h.
◆ StoreGateSvc_t
◆ xAODContainerType
◆ xAODObjectType
◆ affectingSystematics()
◆ applyContainerCorrection() [1/2]
◆ applyContainerCorrection() [2/2]
effects: apply the correction to all the members of the container returns: overall success rationale: this will apply the correction to every single member (even if some members fail) rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency
◆ applyCorrection() [1/2]
◆ applyCorrection() [2/2]
effects: apply the correction and store the output in the object returns: success
◆ applySystematicVariation()
◆ correctedCopy() [1/2]
◆ correctedCopy() [2/2]
effects: make a clone of the input object, apply the correction to it and store the output in the object returns: success rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ firstCall()
StatusCode InDet::InDetTrackSmearingTool::firstCall |
( |
| ) |
|
|
private |
Definition at line 332 of file InDetTrackSmearingTool.cxx.
336 auto sc =
evtStore()->retrieve( ei,
"EventInfo" );
337 if ( !
sc.isSuccess() ) {
339 ATH_MSG_ERROR(
"Unable to retrieve from event store. Manually set run number." );
340 return StatusCode::FAILURE;
348 ") does not match that from the event store (" <<
runNumber <<
")." );
349 ATH_MSG_WARNING(
"Will use the manually set run number, but you must make sure this is the desired behaviour!" );
◆ getFile()
std::unique_ptr< TFile > InDet::InDetTrackSystematicsTool::getFile |
( |
const std::string & |
filename | ) |
const |
|
protectedinherited |
open and return a file with the given name.
Definition at line 108 of file InDetTrackSystematicsTool.cxx.
115 return std::unique_ptr<TFile>(TFile::Open(filenameWithFullPath.data(),
"READ"));;
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ GetSmearD0Sigma()
Get smearing widths to add to IPs.
Definition at line 119 of file InDetTrackSmearingTool.cxx.
122 float sigma_D0 = 0.f;
126 sigma_D0 += d0Smear*d0Smear;
133 if (isActiveD0Meas + isActiveD0MeasUp + isActiveD0MeasDown > 1) {
135 throw std::runtime_error(
"Multiple incompatible D0 systematics are activated." );
136 }
else if (isActiveD0Meas + isActiveD0MeasUp + isActiveD0MeasDown == 0) {
138 return std::sqrt(sigma_D0);
141 TH2* d0hist_lowpt =
nullptr;
142 TH2* d0hist_highpt =
nullptr;
147 }
else if(isActiveD0MeasUp) {
150 }
else if(isActiveD0MeasDown) {
155 if (d0hist_lowpt ==
nullptr)
ATH_MSG_ERROR(
"d0 lowpt histogram is null!" );
156 if (d0hist_highpt ==
nullptr)
ATH_MSG_ERROR(
"d0 highpt histogram is null!" );
171 sigma_D0 += d0Smear*d0Smear;
173 return std::sqrt(sigma_D0);
◆ GetSmearZ0Sigma()
Definition at line 177 of file InDetTrackSmearingTool.cxx.
180 float sigma_Z0 = 0.f;
185 sigma_Z0 += z0Smear*z0Smear;
193 if (isActiveZ0Meas + isActiveZ0MeasUp + isActiveZ0MeasDown > 1) {
195 throw std::runtime_error(
"Multiple incompatible Z0 systematics are activated." );
196 }
else if (isActiveZ0Meas + isActiveZ0MeasUp + isActiveZ0MeasDown == 0) {
198 return std::sqrt(sigma_Z0);
201 TH2* z0hist_lowpt =
nullptr;
202 TH2* z0hist_highpt =
nullptr;
207 }
else if(isActiveZ0MeasUp) {
210 }
else if(isActiveZ0MeasDown) {
215 if (z0hist_lowpt ==
nullptr)
ATH_MSG_ERROR(
"z0 lowpt histogram is null!" );
216 if (z0hist_highpt ==
nullptr)
ATH_MSG_ERROR(
"z0 highpt histogram is null!" );
231 sigma_Z0 += z0Smear*z0Smear;
233 return std::sqrt(sigma_Z0);
◆ initHistograms()
StatusCode InDet::InDetTrackSmearingTool::initHistograms |
( |
int |
runNumber | ) |
|
|
private |
Definition at line 258 of file InDetTrackSmearingTool.cxx.
266 bool useData17Maps =
false;
271 ATH_MSG_INFO(
"runNumber corresponds to 2017/2018 - using the Data17 smearing maps where appropriate" );
272 useData17Maps =
true;
274 ATH_MSG_INFO(
"using the Data16 smearing maps where appropriate" );
277 std::string rootfileName_lowpt;
278 std::string rootfileName_highpt;
329 return StatusCode::SUCCESS;
◆ initialize()
StatusCode InDet::InDetTrackSmearingTool::initialize |
( |
| ) |
|
|
overrideprivatevirtual |
◆ initObject()
template<class T >
StatusCode InDet::InDetTrackSystematicsTool::initObject |
( |
T *& |
obj, |
|
|
const std::string & |
rootFileName, |
|
|
const std::string & |
objName |
|
) |
| const |
|
protectedinherited |
a function to initialize an object from a root file
Definition at line 63 of file InDetTrackSystematicsTool.h.
65 if (
obj !=
nullptr)
ATH_MSG_WARNING(
obj->GetName() <<
" is not null, yet we are now attempting to initialize from " << rootFileName );
66 std::unique_ptr<TFile>
F =
getFile(rootFileName);
67 if(!
F ||
F->IsZombie()) {
69 return StatusCode::FAILURE;
72 F->GetObject(objName.data(), tempObj);
73 if(tempObj==
nullptr) {
74 ATH_MSG_ERROR(
"Could not retrieve " << objName <<
" from file " << rootFileName );
75 return StatusCode::FAILURE;
77 obj =
static_cast<T*
>(tempObj->Clone());
81 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isActive()
bool InDet::InDetTrackSystematicsTool::isActive |
( |
TrackSystematic |
syst | ) |
const |
|
protectedinherited |
◆ isAffectedBySystematic()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print() [1/2]
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ print() [2/2]
virtual void asg::IAsgTool::print |
( |
| ) |
const |
|
pure virtualinherited |
Print the state of the tool.
Implemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ readHistogram()
float InDet::InDetTrackSmearingTool::readHistogram |
( |
TH2 * |
histogram, |
|
|
float |
pt, |
|
|
float |
eta |
|
) |
| const |
|
private |
◆ recommendedSystematics()
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_activeSysts
◆ m_calibFileD0Dead
std::string InDet::InDetTrackSmearingTool::m_calibFileD0Dead |
|
private |
◆ m_calibFileIP_CTIDE
std::string InDet::InDetTrackSmearingTool::m_calibFileIP_CTIDE |
|
private |
◆ m_calibFileIP_highpt_Data16
std::string InDet::InDetTrackSmearingTool::m_calibFileIP_highpt_Data16 |
|
private |
◆ m_calibFileIP_highpt_Data17
std::string InDet::InDetTrackSmearingTool::m_calibFileIP_highpt_Data17 |
|
private |
◆ m_calibFileIP_lowpt
std::string InDet::InDetTrackSmearingTool::m_calibFileIP_lowpt |
|
private |
◆ m_calibFileZ0Dead
std::string InDet::InDetTrackSmearingTool::m_calibFileZ0Dead |
|
private |
◆ m_detStore
◆ m_doCTIDE
bool InDet::InDetTrackSmearingTool::m_doCTIDE = false |
|
private |
◆ m_evtStore
◆ m_rnd
std::unique_ptr<TRandom3> InDet::InDetTrackSmearingTool::m_rnd |
|
private |
◆ m_runNumber
uint32_t InDet::InDetTrackSmearingTool::m_runNumber = 0 |
|
private |
◆ m_seed
int InDet::InDetTrackSmearingTool::m_seed = 0 |
|
private |
◆ m_smearD0_highpt
TH2* InDet::InDetTrackSmearingTool::m_smearD0_highpt = nullptr |
|
private |
◆ m_smearD0_highpt_sys_dw
TH2* InDet::InDetTrackSmearingTool::m_smearD0_highpt_sys_dw = nullptr |
|
private |
◆ m_smearD0_highpt_sys_up
TH2* InDet::InDetTrackSmearingTool::m_smearD0_highpt_sys_up = nullptr |
|
private |
◆ m_smearD0_lowpt
TH2* InDet::InDetTrackSmearingTool::m_smearD0_lowpt = nullptr |
|
private |
◆ m_smearD0_lowpt_sys_dw
TH2* InDet::InDetTrackSmearingTool::m_smearD0_lowpt_sys_dw = nullptr |
|
private |
◆ m_smearD0_lowpt_sys_up
TH2* InDet::InDetTrackSmearingTool::m_smearD0_lowpt_sys_up = nullptr |
|
private |
◆ m_smearD0Dead
TH1* InDet::InDetTrackSmearingTool::m_smearD0Dead = nullptr |
|
private |
◆ m_smearZ0_highpt
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_highpt = nullptr |
|
private |
◆ m_smearZ0_highpt_sys_dw
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_highpt_sys_dw = nullptr |
|
private |
◆ m_smearZ0_highpt_sys_up
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_highpt_sys_up = nullptr |
|
private |
◆ m_smearZ0_lowpt
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_lowpt = nullptr |
|
private |
◆ m_smearZ0_lowpt_sys_dw
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_lowpt_sys_dw = nullptr |
|
private |
◆ m_smearZ0_lowpt_sys_up
TH2* InDet::InDetTrackSmearingTool::m_smearZ0_lowpt_sys_up = nullptr |
|
private |
◆ m_smearZ0Dead
TH1* InDet::InDetTrackSmearingTool::m_smearZ0Dead = nullptr |
|
private |
◆ m_sysFilterMap
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Helper class to provide type-safe access to aux data.
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Int_t FindBin(const TAxis *axis, const double x)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
uint32_t runNumber() const
The current event's run number.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
static const std::unordered_map< InDet::TrackSystematic, CP::SystematicVariation, std::hash< int > > TrackSystematicMap
const_iterator end() const
description: const iterator to the end of the set
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
static const CP::SystematicSet RecommendedSystematics
Class describing the basic event information.
static const CP::SystematicSet SmearingSystematics
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
iterator find(const SystematicVariation &sys) const
description: find an element in the set
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>