 |
ATLAS Offline Software
|
#include <METSystematicsTool.h>
|
| | METSystematicsTool (const std::string &name) |
| |
| StatusCode | softTrkSystInitialize () |
| |
| StatusCode | softCaloSystInitialize () |
| |
| StatusCode | jetTrkSystInitialize () |
| |
| StatusCode | initialize () |
| | Dummy implementation of the initialisation function. More...
|
| |
| CP::CorrectionCode | applyCorrection (xAOD::MissingET &inputMet, const xAOD::MissingETAssociationHelper &helper) const |
| |
| CP::CorrectionCode | correctedCopy (const xAOD::MissingET &met, xAOD::MissingET *&outputmet, const xAOD::MissingETAssociationHelper &helper) const |
| |
| bool | isAffectedBySystematic (const CP::SystematicVariation &var) const |
| | returns: whether this tool is affected by the given systematic guarantee: no-fail More...
|
| |
| CP::SystematicSet | affectingSystematics () const |
| | returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II More...
|
| |
| CP::SystematicSet | recommendedSystematics () const |
| | returns: the list of all systematics this tool can be affected by guarantee: strong failures: out of memory II More...
|
| |
| StatusCode | applySystematicVariation (const CP::SystematicSet &set) |
| | effects: configure this tool for the given list of systematic variations. More...
|
| |
| StatusCode | sysApplySystematicVariation (const CP::SystematicSet &) |
| | effects: configure this tool for the given list of systematic variations. More...
|
| |
| void | setRandomSeed (unsigned long seed) const |
| |
| 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, V, H > &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 |
| |
| const SystematicSet & | appliedSystematics () const |
| | returns: the list of systematics that have been applied to this tool. More...
|
| |
| std::string | appliedSystematicsString () const |
| | returns: a string representation of appliedSystematics() guarantee: strong failures: out of memory II rationale: this is meant to be used when printing out the applied systematics for debugging purposes (or when embedding them in a string). More...
|
| |
| void | testInvariant () const |
| | effects: test the invariance of this object guarantee: no-fail More...
|
| |
|
| | FRIEND_TEST (METSystTest, TestDefaultHistosFilled) |
| |
| | FRIEND_TEST (METSystTest, TestJetTrkHistosFilled) |
| |
| | FRIEND_TEST (METSystTest, TestAddAffectingSystematic) |
| |
| | FRIEND_TEST (METSystTest, TestProjectST) |
| |
| | FRIEND_TEST (METSystTest, TestProjectST2) |
| |
| | METSystematicsTool () |
| |
| CP::CorrectionCode | internalSoftTermApplyCorrection (xAOD::MissingET &softMet, xAOD::MissingETContainer const *METcont, xAOD::EventInfo const &eInfo) const |
| |
| CP::CorrectionCode | calcJetTrackMETWithSyst (xAOD::MissingET &jettrkmet, const xAOD::MissingETAssociationHelper &helper) const |
| |
| CP::CorrectionCode | calcJetTrackMETWithSyst (xAOD::MissingET &jettrkmet, const xAOD::MissingETAssociationHelper &helper, const xAOD::Jet *jet) const |
| |
| CP::CorrectionCode | getCorrectedJetTrackMET (xAOD::MissingET &jettrkmet, const xAOD::MissingETAssociationHelper &helper) const |
| |
| TRandom3 * | getTLSRandomGen () const |
| |
| int | getNPV () const |
| |
| xAOD::EventInfo const * | getDefaultEventInfo () const |
| |
| StatusCode | addMETAffectingSystematics () |
| |
| StatusCode | extractHistoPath (std::string &histfile, std::string &systpath, std::string &configdir, std::string &suffix, SystType const &type) |
| |
| missingEt | calcPtHard (xAOD::MissingETContainer const *const cont) const |
| |
| missingEt | variedSoftTerm (missingEt const &softTerms, missingEt const &ptHard, double varPara, double varPerp) const |
| |
| missingEt | projectST (missingEt const &softTerms, missingEt const &ptHard) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| SystApplied | m_appliedSystEnum {NONE} |
| |
| Gaudi::Property< std::string > | m_configPrefix {this, "ConfigPrefix", "METUtilities/R22_PreRecs", ""} |
| |
| Gaudi::Property< std::string > | m_configSoftTrkFile {this, "ConfigSoftTrkFile", "TrackSoftTerms-pflow_Dec24.config", ""} |
| |
| Gaudi::Property< std::string > | m_configJetTrkFile {this, "ConfigJetTrkFile", "", ""} |
| |
| Gaudi::Property< std::string > | m_configSoftCaloFile {this, "ConfigSoftCaloFile", "", ""} |
| |
| Gaudi::Property< bool > | m_useDevArea {this, "UseDevArea", false, ""} |
| |
| std::unique_ptr< TH3D > | m_trk_shiftpara_pthard_njet_mu {} |
| |
| std::unique_ptr< TH3D > | m_trk_resopara_pthard_njet_mu {} |
| |
| std::unique_ptr< TH3D > | m_trk_resoperp_pthard_njet_mu {} |
| |
| std::unique_ptr< TH3D > | m_calo_shiftpara_pthard_njet_mu {} |
| |
| std::unique_ptr< TH3D > | m_calo_resopara_pthard_njet_mu {} |
| |
| std::unique_ptr< TH3D > | m_calo_resoperp_pthard_njet_mu {} |
| |
| std::unique_ptr< TH2D > | m_jet_systRpt_pt_eta {} |
| |
| boost::thread_specific_ptr< TRandom3 > | m_rand_tls |
| |
| int | m_units {-1} |
| |
| SG::ReadHandleKey< xAOD::VertexContainer > | m_VertexContKey {this, "VertexContainer", "PrimaryVertices", ""} |
| |
| SG::ReadHandleKey< xAOD::MissingETContainer > | m_TruthContKey {this, "TruthContainer", "MET_Truth", ""} |
| |
| SG::ReadHandleKey< xAOD::EventInfo > | m_EventInfoKey {this, "EventInfo", "EventInfo", ""} |
| |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default) More...
|
| |
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default) More...
|
| |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| |
| bool | m_varHandleArraysDeclared |
| |
| SystematicSet * | m_appliedSystematics |
| | description: pointer to currenty applied systematics More...
|
| |
| std::unordered_map< SystematicSet, SystematicSet > | m_systFilterMap |
| | map of cached systematics filtering More...
|
| |
Definition at line 84 of file METSystematicsTool.h.
◆ StoreGateSvc_t
◆ METSystematicsTool() [1/2]
| met::METSystematicsTool::METSystematicsTool |
( |
const std::string & |
name | ) |
|
◆ METSystematicsTool() [2/2]
| met::METSystematicsTool::METSystematicsTool |
( |
| ) |
|
|
private |
◆ addAffectingSystematic()
effects: add a systematic to the list of registered systematics.
It will optionally also add this sytematic to the recommended set. side effects: this will add the systematic to the global list of systematics, if not already there guarantee: strong failures: out of memory II
Definition at line 111 of file SystematicsTool.cxx.
117 reg.registerSystematic( systematic );
121 return StatusCode::FAILURE;
124 return StatusCode::SUCCESS;
◆ addAffectingSystematics()
effects: add a SystematicSet to the registered systematics.
Definition at line 141 of file SystematicsTool.cxx.
◆ addMETAffectingSystematics()
| StatusCode met::METSystematicsTool::addMETAffectingSystematics |
( |
| ) |
|
|
private |
Definition at line 39 of file METSystematicsTool.cxx.
48 ATH_MSG_ERROR(
"failed to properly add softTrk affecting systematics " );
49 return StatusCode::FAILURE;
58 ATH_MSG_ERROR(
"failed to properly add softCalo affecting systematics " );
59 return StatusCode::FAILURE;
65 ATH_MSG_ERROR(
"failed to properly add jetTrk affecting systematics " );
66 return StatusCode::FAILURE;
75 ATH_MSG_DEBUG(
"These systematics are set based on your config files: " );
80 return StatusCode::SUCCESS;
◆ addRecommendedSystematic()
effects: add a systematic to the list of recommended systematics failures: unsupported systematic
Definition at line 127 of file SystematicsTool.cxx.
134 if( reg.addSystematicToRecommended( systematic ) !=
135 StatusCode::SUCCESS ) {
136 return StatusCode::FAILURE;
138 return StatusCode::SUCCESS;
◆ addRecommendedSystematics()
| StatusCode CP::SystematicsTool::addRecommendedSystematics |
( |
const SystematicSet & |
systematics | ) |
|
|
protectedinherited |
effects: add a SystematicSet to the recommended systematics.
Definition at line 151 of file SystematicsTool.cxx.
158 if( reg.addSystematicsToRecommended(
systematics ) !=
159 StatusCode::SUCCESS ) {
160 return StatusCode::FAILURE;
162 return StatusCode::SUCCESS;
◆ affectingSystematics()
◆ appliedSystematics()
| const SystematicSet & CP::SystematicsTool::appliedSystematics |
( |
| ) |
const |
|
inherited |
returns: the list of systematics that have been applied to this tool.
this is not including systematics that were applied, but do not affect this tool guarantee: no-fail
Definition at line 54 of file SystematicsTool.cxx.
58 std::cerr <<
"SystematicsTool::appliedSystematics WARNING: "
59 <<
"no systematic configuration has been applied yet. "
60 <<
"Returning NULL" << std::endl;
61 static const SystematicSet
dummy;
◆ appliedSystematicsString()
| std::string CP::SystematicsTool::appliedSystematicsString |
( |
| ) |
const |
|
inherited |
returns: a string representation of appliedSystematics() guarantee: strong failures: out of memory II rationale: this is meant to be used when printing out the applied systematics for debugging purposes (or when embedding them in a string).
Definition at line 67 of file SystematicsTool.cxx.
◆ applyCorrection()
Implements IMETSystematicsTool.
Definition at line 236 of file METSystematicsTool.cxx.
244 ATH_MSG_WARNING(
"event info is empty, returning without applying correction");
249 ATH_MSG_WARNING(
"This tool should be applied to MC only. Return without changing the input MET object");
256 if(METcont ==
nullptr){
257 ATH_MSG_WARNING(
"MissingET object not owned by a container. Returning without applying correction" );
266 if(
helper.map() ==
nullptr) {
267 ATH_MSG_WARNING(
"The MissingETAssociationMap for the given MissingETAssociationHelper is null. Returning without applying correction ");
274 ATH_MSG_WARNING(
"METSystematicsTool received a MissingET object it can't correct. You should only pass soft MET terms or jet track MET terms.");
◆ applySystematicVariation()
effects: configure this tool for the given list of systematic variations.
any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). guarantee: basic failures: out of memory II failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors
Reimplemented from CP::SystematicsTool.
Definition at line 127 of file METSystematicsTool.h.
◆ calcJetTrackMETWithSyst() [1/2]
Definition at line 500 of file METSystematicsTool.cxx.
505 ATH_MSG_ERROR(
"jet track systematics histogram not initialized properly.") ;
515 std::vector<const xAOD::Jet*>
jets;
516 for(
const iplink_t& jetlink : acc_constitObjLinks(jettrkmet)) {
518 ATH_MSG_ERROR(
"Invalid object of type " << (*jetlink)->type() <<
" in jet term");
523 bool originalInputs =
jets.empty() ? false : !acc_originalObject.isAvailable(*
jets.front());
534 if(std::abs(
jet->eta())<=2.5){
545 uncert = std::sqrt(uncert*uncert+uncert_frac*uncert_frac);
555 jettrkmet.
setMpx ( jettrkmet.
mpx()*(1 + uncert/(std::abs(jettrkmet.
mpx())*std::sqrt(2))));
556 jettrkmet.
setMpy ( jettrkmet.
mpy()*(1 + uncert/(std::abs(jettrkmet.
mpy())*std::sqrt(2))));
◆ calcJetTrackMETWithSyst() [2/2]
◆ calcPtHard()
Definition at line 606 of file METSystematicsTool.cxx.
612 if (!truthCont.isValid()) {
619 if(truthiter == truthCont->end()){
626 ptHard.mpx = truthmet.
mpx();
627 ptHard.mpy = truthmet.
mpy();
628 ptHard.sumet = truthmet.
sumet();
629 ptHard.name = truthmet.
name();
630 ptHard.source = truthmet.
source();
636 ptHard.mpx -= (*iMET)->mpx();
637 ptHard.mpy -= (*iMET)->mpy();
638 ptHard.sumet += (*iMET)->sumet();
642 if( ptHard.sumet < 0 ) {
643 ATH_MSG_ERROR(
"PtHard has a negative sumet, returning ptHart = 0");
652 if(ptHard.sumet<1.0e-6){
◆ correctedCopy()
Implements IMETSystematicsTool.
Definition at line 279 of file METSystematicsTool.cxx.
284 if(outputmet !=
nullptr ){
285 ATH_MSG_WARNING(
"Please pass a nullptr to the 2nd argument of correctedCopy to fill the output pointer");
297 ATH_MSG_WARNING(
"This tool should be applied to MC only. Return without changing the input MET object");
304 if(METcont ==
nullptr){
305 ATH_MSG_WARNING(
"MissingET object not owned by a container. Unable to apply correction, returning output MET object as null" );
312 outputmet =
nullptr;
delete copy;
318 if(
helper.map() ==
nullptr) {
319 ATH_MSG_WARNING(
"MissingETAssociationHelper contained a null MissingETAssociationMap pointer");
320 outputmet =
nullptr;
delete copy;
326 outputmet =
nullptr;
delete copy;
◆ 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]
◆ extractHistoPath()
| StatusCode met::METSystematicsTool::extractHistoPath |
( |
std::string & |
histfile, |
|
|
std::string & |
systpath, |
|
|
std::string & |
configdir, |
|
|
std::string & |
suffix, |
|
|
SystType const & |
type |
|
) |
| |
|
private |
Definition at line 661 of file METSystematicsTool.cxx.
670 std::string configpath =
"";
671 std::string configfile =
"";
687 ATH_MSG_INFO(
"Searching for configFile: " << configfile);
689 ATH_MSG_DEBUG(
"CALIBPATH: " << gSystem->Getenv(
"CALIBPATH") );
691 if(configpath.empty() || configfile.empty() ){
693 return StatusCode::FAILURE;
696 if(
reader.ReadFile(configpath.c_str(),EEnvLevel(0)) < 0) {
698 return StatusCode::FAILURE;
701 ATH_MSG_INFO(
"Configuring from file : " << configpath );
707 systpath =
reader.GetValue(
"GlobalSyst.sourcedir" ,
"" );
711 systpath =
reader.GetValue(
"PtHardSyst.sourcedir" ,
"" );
724 std::string
const units_string =
reader.GetValue(
"Units",
"" );
728 if(units_string !=
"GeV"){
729 ATH_MSG_ERROR(
"initialized the different systematics using two config files that conflict on units");
730 return StatusCode::FAILURE;
734 if( (!units_string.empty()) && (units_string !=
"MeV")){
735 ATH_MSG_ERROR(
"initialized the different systematics using two config files that conflict on units");
736 return StatusCode::FAILURE;
741 if( (units_string.empty()) || (units_string ==
"MeV") ){
743 }
else if(units_string ==
"GeV"){
746 ATH_MSG_ERROR(
"You specified an incorrect 'Units' value. Please specify MeV , GeV , or leave it blank for MeV");
747 return StatusCode::FAILURE;
756 ATH_MSG_ERROR(
"Failed to correctly set histfile path, or path to histograms inside of the histfile" );
757 return StatusCode::FAILURE;
762 ATH_MSG_ERROR(
"Something is wrong with your units initialization. Please contact the developers (you should never get here).");
763 return StatusCode::FAILURE;
766 return StatusCode::SUCCESS;
◆ 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
◆ FRIEND_TEST() [1/5]
| met::METSystematicsTool::FRIEND_TEST |
( |
METSystTest |
, |
|
|
TestAddAffectingSystematic |
|
|
) |
| |
|
private |
◆ FRIEND_TEST() [2/5]
| met::METSystematicsTool::FRIEND_TEST |
( |
METSystTest |
, |
|
|
TestDefaultHistosFilled |
|
|
) |
| |
|
private |
◆ FRIEND_TEST() [3/5]
| met::METSystematicsTool::FRIEND_TEST |
( |
METSystTest |
, |
|
|
TestJetTrkHistosFilled |
|
|
) |
| |
|
private |
◆ FRIEND_TEST() [4/5]
| met::METSystematicsTool::FRIEND_TEST |
( |
METSystTest |
, |
|
|
TestProjectST |
|
|
) |
| |
|
private |
◆ FRIEND_TEST() [5/5]
| met::METSystematicsTool::FRIEND_TEST |
( |
METSystTest |
, |
|
|
TestProjectST2 |
|
|
) |
| |
|
private |
◆ getCorrectedJetTrackMET()
◆ getDefaultEventInfo()
◆ 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
◆ getNPV()
| int met::METSystematicsTool::getNPV |
( |
| ) |
const |
|
private |
Definition at line 782 of file METSystematicsTool.cxx.
785 if (!vertices.isValid()) {
787 ATH_MSG_ERROR(
"Failed to retrieve default NPV value from PrimaryVertices");
793 for (itr = vertices->begin(); itr != vertices->end(); ++itr)
◆ getProperty()
template<class T >
| const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ getTLSRandomGen()
| TRandom3 * met::METSystematicsTool::getTLSRandomGen |
( |
| ) |
const |
|
private |
◆ initialize()
| StatusCode met::METSystematicsTool::initialize |
( |
| ) |
|
|
virtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from asg::AsgTool.
Definition at line 83 of file METSystematicsTool.cxx.
93 if (lastchar !=
'/') {
99 m_configJetTrkFile.empty() )
ATH_MSG_WARNING(
"you have initialized the METSystematicsTool with no configuration file. The tool will do nothing. Please set the configuration file properties.");
◆ 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.
◆ internalSoftTermApplyCorrection()
Definition at line 335 of file METSystematicsTool.cxx.
344 ATH_MSG_ERROR(
"not soft met, cannot apply soft term correction to this MET");
352 <<
", met = " << softMet.
met()
354 <<
", do syst? " << doSyst);
358 <<
", met = " << softMet.
met()
360 <<
", do syst? " << doSyst);
370 missingEt softMetStruct;
371 softMetStruct.mpx = softMet.
mpx();
372 softMetStruct.mpy = softMet.
mpy();
373 softMetStruct.sumet = softMet.
sumet();
374 softMetStruct.name = softMet.
name();
375 softMetStruct.source = softMet.
source();
377 if(METcont ==
nullptr){
378 ATH_MSG_WARNING(
"failed to retrieve MET container from passed object");
383 double const ptHardMet = std::sqrt( ptHard.mpx * ptHard.mpx +
384 ptHard.mpy * ptHard.mpy ) ;
387 size_t njet = (jetterm==
nullptr) ? 0 : acc_constitObjLinks(*jetterm ).size();
391 int phbin = std::as_const(*shiftHist)->GetXaxis()->FindBin( ptHardMet ) ;
392 if(phbin>(*shiftHist)->GetNbinsX()) phbin = (*shiftHist)->GetNbinsX();
394 int const jetbin = std::as_const(*shiftHist)->GetYaxis()->FindBin(njet);
395 int const mubin = std::as_const(*shiftHist)->GetZaxis()->FindBin(eInfo.actualInteractionsPerCrossing() );
396 double const scalePara = (*shiftHist)->GetBinContent(phbin,jetbin,mubin);
399 double smearPara(0), smearPerp(0);
408 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, scalePara, 0.);
412 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, -1.*scalePara, 0.);
416 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, smearPara, 0.);
420 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, 0., smearPerp);
425 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, smearPara, smearPerp);
429 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, smearPara, 0.);
433 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, 0., smearPerp);
438 softMetStruct =
variedSoftTerm(softMetStruct, ptHard, smearPara, smearPerp);
441 ATH_MSG_DEBUG(
"No systematic applied, returning nominal MET term");
445 softMet.
setMpx( softMetStruct.mpx);
446 softMet.
setMpy( softMetStruct.mpy);
447 softMet.
setSumet( softMetStruct.sumet);
448 softMet.
setName( softMetStruct.name);
449 softMet.
setSource( softMetStruct.source);
452 <<
", met = " << softMet.
met() );
◆ isAffectedBySystematic()
◆ jetTrkSystInitialize()
| StatusCode met::METSystematicsTool::jetTrkSystInitialize |
( |
| ) |
|
Definition at line 141 of file METSystematicsTool.cxx.
146 std::string gsystpath =
"";
147 std::string configdir =
"";
148 std::string blank =
"";
152 TFile
infile((configdir).c_str());
158 return StatusCode::FAILURE;
164 return StatusCode::SUCCESS;
◆ 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, LundVariablesTool, 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, LundVariablesTool, asg::AsgTool, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
◆ projectST()
Definition at line 591 of file METSystematicsTool.cxx.
593 double const ptHardMet = std::sqrt( ptHard.mpx * ptHard.mpx +
594 ptHard.mpy * ptHard.mpy );
596 double const ux = ptHard.mpx/ptHardMet;
597 double const uy = ptHard.mpy/ptHardMet;
598 double const projL = ux*softTerms.mpx + uy*softTerms.mpy;
599 double const projT = uy*softTerms.mpx - ux*softTerms.mpy;
600 missingEt
proj(projL,projT,softTerms.sumet,
601 softTerms.name,softTerms.source);
◆ recommendedSystematics()
◆ renounce()
◆ renounceArray()
◆ setRandomSeed()
| void met::METSystematicsTool::setRandomSeed |
( |
unsigned long |
seed | ) |
const |
|
virtual |
◆ softCaloSystInitialize()
| StatusCode met::METSystematicsTool::softCaloSystInitialize |
( |
| ) |
|
Definition at line 108 of file METSystematicsTool.cxx.
110 ATH_MSG_INFO(
"Doing SoftCalo systematics initialization. THIS IS FOR SOFTWARE DEVELOPMENT ONLY.");
111 ATH_MSG_INFO(
"CST IS NOT YET RECOMMENDED OR SUPPORTED BY THE MET GROUP.");
114 std::string systpath =
"";
129 return StatusCode::FAILURE;
137 return StatusCode::SUCCESS;
◆ softTrkSystInitialize()
| StatusCode met::METSystematicsTool::softTrkSystInitialize |
( |
| ) |
|
Definition at line 168 of file METSystematicsTool.cxx.
172 std::string psystpath =
"";
188 return StatusCode::FAILURE;
196 return StatusCode::SUCCESS;
◆ sysApplySystematicVariation()
effects: configure this tool for the given list of systematic variations.
systConfig is guaranteed to contain only supported systematics. guarantee: basic failures: out of memory II failures: unsupported combination of supported systematics failures: other tool specific errors
Implements CP::SystematicsTool.
Definition at line 199 of file METSystematicsTool.cxx.
205 if( systSet.empty() ) {
207 return StatusCode::SUCCESS;
208 }
else if( systSet.size() > 1 ) {
209 ATH_MSG_WARNING(
"Tool does not support multiple systematics, returning unsupported" );
210 return StatusCode::FAILURE;
228 return StatusCode::FAILURE;
233 return StatusCode::SUCCESS;
◆ 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.
◆ testInvariant()
| void CP::SystematicsTool::testInvariant |
( |
| ) |
const |
|
inherited |
effects: test the invariance of this object guarantee: no-fail
Definition at line 165 of file SystematicsTool.cxx.
◆ updateVHKA()
◆ variedSoftTerm()
Definition at line 579 of file METSystematicsTool.cxx.
584 missingEt projection =
projectST(softTerms,ptHard);
585 projection.mpx += varPara;
586 projection.mpy += varPerp;
◆ m_affectingSystematics
| SystematicSet CP::SystematicsTool::m_affectingSystematics |
|
protectedinherited |
description: members directly corresponding to accessors
Definition at line 146 of file SystematicsTool.h.
◆ m_appliedSystematics
| SystematicSet* CP::SystematicsTool::m_appliedSystematics |
|
privateinherited |
description: pointer to currenty applied systematics
Definition at line 151 of file SystematicsTool.h.
◆ m_appliedSystEnum
◆ m_calo_resopara_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_calo_resopara_pthard_njet_mu {} |
|
private |
◆ m_calo_resoperp_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_calo_resoperp_pthard_njet_mu {} |
|
private |
◆ m_calo_shiftpara_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_calo_shiftpara_pthard_njet_mu {} |
|
private |
◆ m_configJetTrkFile
| Gaudi::Property<std::string> met::METSystematicsTool::m_configJetTrkFile {this, "ConfigJetTrkFile", "", ""} |
|
private |
◆ m_configPrefix
| Gaudi::Property<std::string> met::METSystematicsTool::m_configPrefix {this, "ConfigPrefix", "METUtilities/R22_PreRecs", ""} |
|
private |
◆ m_configSoftCaloFile
| Gaudi::Property<std::string> met::METSystematicsTool::m_configSoftCaloFile {this, "ConfigSoftCaloFile", "", ""} |
|
private |
◆ m_configSoftTrkFile
| Gaudi::Property<std::string> met::METSystematicsTool::m_configSoftTrkFile {this, "ConfigSoftTrkFile", "TrackSoftTerms-pflow_Dec24.config", ""} |
|
private |
◆ m_detStore
◆ m_EventInfoKey
◆ m_evtStore
◆ m_jet_systRpt_pt_eta
| std::unique_ptr<TH2D> met::METSystematicsTool::m_jet_systRpt_pt_eta {} |
|
private |
◆ m_rand_tls
| boost::thread_specific_ptr<TRandom3> met::METSystematicsTool::m_rand_tls |
|
mutableprivate |
◆ m_recommendedSystematics
| SystematicSet CP::SystematicsTool::m_recommendedSystematics |
|
protectedinherited |
◆ m_systFilterMap
| std::unordered_map<SystematicSet, SystematicSet> CP::SystematicsTool::m_systFilterMap |
|
privateinherited |
◆ m_trk_resopara_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_trk_resopara_pthard_njet_mu {} |
|
private |
◆ m_trk_resoperp_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_trk_resoperp_pthard_njet_mu {} |
|
private |
◆ m_trk_shiftpara_pthard_njet_mu
| std::unique_ptr<TH3D> met::METSystematicsTool::m_trk_shiftpara_pthard_njet_mu {} |
|
private |
◆ m_TruthContKey
◆ m_units
| int met::METSystematicsTool::m_units {-1} |
|
private |
◆ m_useDevArea
| Gaudi::Property<bool> met::METSystematicsTool::m_useDevArea {this, "UseDevArea", false, ""} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_VertexContKey
◆ m_vhka
The documentation for this class was generated from the following files:
Const iterator class for DataVector/DataList.
void setSumet(float value)
Set .
MET association descriptor contains object links and corresponding parameters.
float sumet() const
Returns.
void setMpy(float value)
Set the component.
static bool isTotalTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
MissingET_v1 MissingET
Version control by type defintion.
std::string name() const
returns: the systematics joined into a single string.
#define ATH_MSG_VERBOSE(x)
bool const RAWDATA *ch2 const
Class providing the definition of the 4-vector interface.
static bool isTrackTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
@ IS_SIMULATION
true: simulation, false: data
void setSource(MissingETBase::Types::bitmask_t src)
Set the source of the MET object.
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
static bool isJetTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
Vector sum of constituents for subtractive overlap removal.
virtual void setOwner(IDataHandleHolder *o)=0
void setName(const std::string &name)
Set the name of the MET object.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
@ Error
Some error happened during the object correction.
static Types::bitmask_t jet(Region reg=Region::FullAcceptance)
Standard MET term from reconstructed jets.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
float cpy() const
Returns .
float sumpt() const
Returns sum of component pt.
Principal data object for Missing ET.
float mpx() const
Returns .
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)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const std::string & name() const
Identifier getters.
void setMpx(float value)
Set the component.
ConstVec jetTrkVec() const
Get track constituent vector for the reference jet.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Container for xAOD::MissingET_v1 objects.
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
MissingETBase::Types::bitmask_t source() const
MET object source tag.
static const MissingETAssociation * getAssociation(const MissingETAssociationMap *pMap, const Jet *pJet)
ConstVec overlapTrkVec(const MissingETAssociationHelper &helper) const
Retrieve total track-based vector to be subtracted from the jet.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
@ Ok
The correction was done successfully.
static Types::bitmask_t truthNonInt()
Standard bit pattern indicating genuine true MET.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const SG::AuxVectorData * container() const
Return the container holding this element.
float cpx() const
Returns .
reader
read the goodrunslist xml file(s)
float mpy() const
Returns .
static bool isSoftTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
#define RCU_READ_INVARIANT(x)
Jet_v1 Jet
Definition of the current "jet version".
float met() const
Returns .
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.