|
ATLAS Offline Software
|
#include <FFJetSmearingTool.h>
|
| FFJetSmearingTool (const std::string &name) |
| Proper constructor for Athena. More...
|
|
virtual | ~FFJetSmearingTool () |
|
virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. More...
|
|
virtual CP::CorrectionCode | applyCorrection (xAOD::Jet &jet_reco) const override |
| Apply a systematic variation of get a new copy. More...
|
|
virtual CP::CorrectionCode | correctedCopy (const xAOD::Jet &input, xAOD::Jet *&output) const override |
|
virtual CP::CorrectionCode | applyContainerCorrection (xAOD::JetContainer &inputs) const override |
|
StatusCode | getMatchedTruthJet (xAOD::Jet &jet_reco, xAOD::Jet &jet_truth_matched) const |
|
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 bool | isAffectedBySystematic (const CP::SystematicVariation &systematic) const override |
| Specify whether tool is affected by provided systematic. More...
|
|
virtual CP::SystematicSet | affectingSystematics () const override |
| List of all systematics affecting this tool. More...
|
|
virtual CP::SystematicSet | recommendedSystematics () const override |
| List of all systematics recommended for this tool. More...
|
|
virtual StatusCode | applySystematicVariation (const CP::SystematicSet &systematics) override |
| Configure tool to apply systematic variation. More...
|
|
|
StatusCode | readFFJetSmearingToolSimplifiedData (TEnv &settings) |
|
StatusCode | getJMSJMR (xAOD::Jet &jet_reco, double jet_mass, JetTools::FFJetAllowedMassDefEnum MassDef_of_syst, const std::string &jetTopology, double &JMS_err, double &JMR_err) const |
|
StatusCode | getJetTopology (xAOD::Jet &jet_reco, std::string &jetTopology) const |
|
double | Read3DHistogram (const TH3 *histo, double x, double y, double z) const |
|
double | Interpolate2D (const TH2 *histo, double x, double y) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 95 of file FFJetSmearingTool.h.
◆ StoreGateSvc_t
◆ FFJetSmearingTool()
CP::FFJetSmearingTool::FFJetSmearingTool |
( |
const std::string & |
name | ) |
|
◆ ~FFJetSmearingTool()
CP::FFJetSmearingTool::~FFJetSmearingTool |
( |
| ) |
|
|
virtualdefault |
◆ affectingSystematics()
◆ applyContainerCorrection()
◆ applyCorrection()
Apply a systematic variation of get a new copy.
Implements ICPJetCorrectionTool.
Definition at line 587 of file FFJetSmearingTool.cxx.
589 ATH_MSG_VERBOSE(
"//---------------------------------------------------------------//");
590 ATH_MSG_VERBOSE(
"Reco Jet to Smear: pt = " << jet_reco.
pt() <<
", mass = " << jet_reco.
m() <<
", eta = " << jet_reco.
eta());
601 ATH_MSG_DEBUG(
"This jet exceeds the maximum pt that the tool allows jet_pt <" <<
m_MaxPt <<
" MeV)");
610 ATH_MSG_VERBOSE(
"No truth jet match with this reco jet. The jet will not be smeared.");
614 ATH_MSG_VERBOSE(
"Matched truth Jet: pt = " << jet_truth_matched.
pt() <<
", mass = " << jet_truth_matched.
m() <<
", eta = " << jet_truth_matched.
eta());
617 std::string jetTopology;
623 if(jetTopology ==
"no_match"){
630 double jet_mass_CALO = 0;
631 double jet_mass_TA = 0;
632 double calo_mass_weight=1;
634 float JetTrackAssistedMassCalibrated_from_JetCalibTools;
650 jet_mass_CALO = jet_reco_CALO.mass();
651 jet_mass_TA = jet_reco_TA.mass();
652 jet_reco.
getAttribute<
float>(
"JetTrackAssistedMassCalibrated", JetTrackAssistedMassCalibrated_from_JetCalibTools);
655 jet_mass_CALO = jet_reco.
m();
656 calo_mass_weight = 1;
659 jet_mass_TA = jet_reco.
m();
660 jet_reco.
getAttribute<
float>(
"JetTrackAssistedMassCalibrated", JetTrackAssistedMassCalibrated_from_JetCalibTools);
661 calo_mass_weight = 0;
669 double avg_response_CALO=1;
670 double avg_response_TA=1;
675 if(avg_response_CALO==0) avg_response_CALO=1;
681 if(avg_response_TA==0) avg_response_TA = 1;
687 double JMS (1), JMS_err(0), JMR(1), JMR_err(0);
691 double smeared_CALO_mass = jet_mass_CALO;
692 double smeared_TA_mass = jet_mass_TA;
694 bool is_CALO_mass_smeared =
false;
695 bool is_TA_mass_smeared =
false;
703 scale = JMS + JMS_err;
707 is_CALO_mass_smeared =
true;
709 ATH_MSG_VERBOSE(
"Forward Folding CALO procedure will use scale=" <<
scale <<
", resolution=" <<
resolution <<
" and average respose=" << avg_response_CALO);
712 smeared_CALO_mass = jet_mass_CALO *
scale + (jet_mass_CALO - avg_response_CALO*jet_truth_matched.
m())*(
resolution-
scale);
722 scale = JMS + JMS_err;
727 is_TA_mass_smeared =
true;
729 ATH_MSG_VERBOSE(
"Forward Folding TA procedure will use scale=" <<
scale <<
", resolution=" <<
resolution <<
" and average respose=" << avg_response_TA);
732 smeared_TA_mass = jet_mass_TA *
scale + (jet_mass_TA - avg_response_TA*jet_truth_matched.
m())*(
resolution-
scale);
737 if(!is_CALO_mass_smeared && !is_TA_mass_smeared){
739 ATH_MSG_VERBOSE(
"This jet is not affected by the systematic. The jet won't be modified");
740 ATH_MSG_VERBOSE(
"//---------------------------------------------------------------//");
766 p4_aux =
xAOD::JetFourMom_t(jet_reco_CALO.pt(),jet_reco_CALO.eta(),jet_reco_CALO.phi(),smeared_CALO_mass);
767 jet_reco_CALO = p4_aux;
769 p4_aux =
xAOD::JetFourMom_t(jet_reco_TA.pt(),jet_reco_TA.eta(),jet_reco_TA.phi(),smeared_TA_mass);
770 jet_reco_TA = p4_aux;
786 if (caloRes == 0 ) { caloFactor = 0; TAFactor = 1;}
787 else if( TARes == 0) { caloFactor = 1; TAFactor = 0;}
789 caloFactor = 1./(caloRes*caloRes);
790 TAFactor = 1./(TARes*TARes);
793 calo_mass_weight = caloFactor /(caloFactor + TAFactor);
798 else if(JetTrackAssistedMassCalibrated_from_JetCalibTools == 0){calo_mass_weight = 1;}
799 else if(jet_mass_CALO == 0){calo_mass_weight = 0;}
801 double smeared_mass = calo_mass_weight*smeared_CALO_mass + (1 - calo_mass_weight)*smeared_TA_mass;
812 ATH_MSG_VERBOSE(
"Smeared Reco Jet: pt = " << jet_reco.
pt() <<
", mass = " << jet_reco.
m() <<
", eta = " << jet_reco.
eta());
814 ATH_MSG_VERBOSE(
"//---------------------------------------------------------------//");
◆ applySystematicVariation()
Configure tool to apply systematic variation.
Implements CP::ISystematicsTool.
Definition at line 223 of file FFJetSmearingTool.cxx.
236 filterForAffectingSystematics(
systematics, affectingSysts, filteredSysts) !=
237 StatusCode::SUCCESS )
240 return StatusCode::FAILURE;
247 if(filteredSysts.
size() > 1){
248 ATH_MSG_ERROR(
"No support for more than one JMS/JMR sys at a time: " <<
249 filteredSysts.
name());
250 return StatusCode::FAILURE;
258 myData.SysParameter =
sys.parameter();
259 myData.SysBaseName =
sys.basename();
267 return StatusCode::SUCCESS;
◆ correctedCopy()
◆ 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);
◆ 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.
◆ 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.
◆ 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
◆ getJetTopology()
StatusCode CP::FFJetSmearingTool::getJetTopology |
( |
xAOD::Jet & |
jet_reco, |
|
|
std::string & |
jetTopology |
|
) |
| const |
|
private |
Definition at line 458 of file FFJetSmearingTool.cxx.
462 if (!accTruthLabel.isAvailable(jet_reco) )
464 ATH_MSG_ERROR(
"Unable to retrieve the FatjetTruthLabel from the jet. Please call the BoostedJetTaggers decorateTruthLabel() function before calling this function.");
465 return StatusCode::FAILURE;
493 jetTopology=
"no_match";
494 ATH_MSG_DEBUG(
"No truth jet match with this reco jet. The jet will not be smeared.");
497 else jetTopology=
"QCD";
499 ATH_MSG_VERBOSE(
"The topology of this jet correspond to a " << jetTopology <<
" large-R jet");
501 return StatusCode::SUCCESS;
◆ getJMSJMR()
Definition at line 510 of file FFJetSmearingTool.cxx.
524 else{
return StatusCode::SUCCESS;}
528 return StatusCode::SUCCESS;
545 if(MassDef_of_syst==calo)
547 else if(MassDef_of_syst==ta)
564 if(MassDef_of_syst==calo)
566 else if(MassDef_of_syst==ta)
578 return StatusCode::SUCCESS;
◆ 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
124 return evtStore()->event()->getKey( ptr );
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getMatchedTruthJet()
StatusCode CP::FFJetSmearingTool::getMatchedTruthJet |
( |
xAOD::Jet & |
jet_reco, |
|
|
xAOD::Jet & |
jet_truth_matched |
|
) |
| const |
Definition at line 425 of file FFJetSmearingTool.cxx.
433 double dRmax_truthJet = 0.75;
438 for (
const auto *
const jet_truth : *jets_truth) {
439 float dR_Test = jet_reco.
p4().DeltaR(jet_truth->p4());
440 if ( dR_Test < dRmax_truthJet){
442 close_jet = jet_truth;
447 if(dRmin > 999){
return StatusCode::FAILURE;}
450 return StatusCode::SUCCESS;
◆ 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
111 return evtStore()->event()->getName( ptr );
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.
◆ initialize()
StatusCode CP::FFJetSmearingTool::initialize |
( |
| ) |
|
|
overridevirtual |
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 49 of file FFJetSmearingTool.cxx.
56 return StatusCode::FAILURE;
64 return StatusCode::FAILURE;
69 return StatusCode::FAILURE;
81 if (settings.ReadFile( configFilePath.Data(),kEnvGlobal))
83 ATH_MSG_ERROR(
"Cannot read config file: " << configFilePath.Data());
84 return StatusCode::FAILURE;
87 ATH_MSG_INFO(
"================================================");
93 m_release = settings.GetValue(
"UncertaintyRelease",
"UNKNOWN");
100 ATH_MSG_ERROR(
"Cannot find the truth jet collection to use in config");
101 return StatusCode::FAILURE;
108 ATH_MSG_ERROR(
"Cannot find the TruthLabelAccessor to use in config");
109 return StatusCode::FAILURE;
116 ATH_MSG_ERROR(
"Cannot find the EtaRange parameter in the config file");
117 return StatusCode::FAILURE;
121 m_MaxMass = settings.GetValue(
"MaxMass",0);
124 ATH_MSG_ERROR(
"Cannot find the MaxMass parameter in the config file");
125 return StatusCode::FAILURE;
129 m_MaxPt = settings.GetValue(
"MaxPt",0);
132 ATH_MSG_ERROR(
"Cannot find the MaxPt parameter in the config file");
133 return StatusCode::FAILURE;
141 ATH_MSG_ERROR(
"Cannot find uncertainty histogram file in the config file");
142 return StatusCode::FAILURE;
154 if(
registry.registerSystematics(*
this) != StatusCode::SUCCESS){
156 return StatusCode::FAILURE;
163 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.
◆ Interpolate2D()
double CP::FFJetSmearingTool::Interpolate2D |
( |
const TH2 * |
histo, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| const |
|
private |
Definition at line 889 of file FFJetSmearingTool.cxx.
892 ATH_MSG_ERROR(
"Histogram pointer is null in FFJetSmearingTool::Interpolate2D");
895 Int_t bin_x =
histo->GetXaxis()->FindFixBin(
x);
896 Int_t bin_y =
histo->GetYaxis()->FindFixBin(
y);
897 if(bin_x<1 || bin_x>
histo->GetNbinsX() || bin_y<1 || bin_y>
histo->GetNbinsY()) {
903 return interpolated_value;
◆ 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()
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, top::TopObjectSelection, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ Read3DHistogram()
double CP::FFJetSmearingTool::Read3DHistogram |
( |
const TH3 * |
histo, |
|
|
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| const |
|
private |
Definition at line 856 of file FFJetSmearingTool.cxx.
867 double xMax =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
868 double xMin =
histo->GetXaxis()->GetBinLowEdge(1);
869 double yMax =
histo->GetYaxis()->GetBinLowEdge(
histo->GetNbinsY()+1);
870 double yMin =
histo->GetYaxis()->GetBinLowEdge(1);
871 double zMax =
histo->GetZaxis()->GetBinLowEdge(
histo->GetNbinsZ()+1);
872 double zMin =
histo->GetZaxis()->GetBinLowEdge(1);
874 if(
x >= xMax) aux_x = xMax-1
e-6 ;
875 if(
x <= xMin) aux_x = xMin+1
e-6 ;
876 if ( std::isnan(
y))
return 0;
877 if(
y >= yMax) aux_y = yMax-1
e-6 ;
878 if(
y <= yMin) aux_y = yMin+1
e-6 ;
879 if(
z >= zMax) aux_z = zMax-1
e-6 ;
880 if(
z <= zMin) aux_z = zMin+1
e-6 ;
◆ readFFJetSmearingToolSimplifiedData()
StatusCode CP::FFJetSmearingTool::readFFJetSmearingToolSimplifiedData |
( |
TEnv & |
settings | ) |
|
|
private |
Definition at line 276 of file FFJetSmearingTool.cxx.
279 if(!data_file || data_file->IsZombie()){
281 return StatusCode::FAILURE;
287 TString CaloResponseMap_path = settings.GetValue(
"CaloResponseMap",
"");
289 if(CaloResponseMap_path.IsNull())
291 ATH_MSG_ERROR(
"Cannot find the CaloResponseMap in the config file");
292 return StatusCode::FAILURE;
295 m_CALO_ResponseMap = std::unique_ptr<TH2>(
dynamic_cast<TH2*
>(data_file->Get( CaloResponseMap_path )));
300 TString TAResponseMap_path = settings.GetValue(
"TAResponseMap",
"");
302 if(TAResponseMap_path.IsNull())
304 ATH_MSG_ERROR(
"Cannot find the TAResponseMap in the config file");
305 return StatusCode::FAILURE;
308 m_TA_ResponseMap = std::unique_ptr<TH2>(
dynamic_cast<TH2*
>(data_file->Get( TAResponseMap_path )));
315 for (
size_t iComp = 0; iComp < 999; ++iComp)
317 const TString
prefix = Form(
"JMSComponent.%zu.",iComp);
319 std::string Syst_Name = settings.GetValue(
prefix+
"Name",
"");
321 if( !Syst_Name.empty()){
340 for (
size_t iComp = 0; iComp < 999; ++iComp)
342 const TString
prefix = Form(
"JMRComponent.%zu.",iComp);
344 std::string Syst_Name = settings.GetValue(
prefix+
"Name",
"");
346 if( !Syst_Name.empty()){
371 TString Calo_TA_weight_file_name = settings.GetValue(
"JetUncertainties_UncertaintyRootFile",
"");
374 if (Calo_TA_weight_file_path.IsNull())
376 ATH_MSG_ERROR(
"Cannot find the file with the Calo and TA weights");
377 return StatusCode::FAILURE;
380 TString Calo_weight_hist_name = settings.GetValue(
"CombMassWeightCaloHist",
"");
381 if (Calo_weight_hist_name.IsNull())
383 ATH_MSG_ERROR(
"Cannot find the histogram name that contains the Calo weights in the config file");
384 return StatusCode::FAILURE;
387 TString TA_weight_hist_name = settings.GetValue(
"CombMassWeightTAHist",
"");
388 if (TA_weight_hist_name.IsNull())
390 ATH_MSG_ERROR(
"Cannot find the histogram name that contains the TA weights in the config file");
391 return StatusCode::FAILURE;
394 ATH_MSG_INFO(Form(
" Calo weights hist: \"%s\"",Calo_weight_hist_name.Data()));
395 ATH_MSG_INFO(Form(
" TA weights hist: \"%s\"",TA_weight_hist_name.Data()));
396 ATH_MSG_INFO(Form(
" Location: %s",Calo_TA_weight_file_path.Data()));
399 std::unique_ptr<TFile> Calo_TA_weight_file ( TFile::Open(Calo_TA_weight_file_path));
400 if(!Calo_TA_weight_file || Calo_TA_weight_file->IsZombie()){
401 ATH_MSG_FATAL(
"Could not open the first input file: " << Calo_TA_weight_file_path );
402 return StatusCode::FAILURE;
405 m_caloMassWeight = std::unique_ptr<TH3F>(
dynamic_cast<TH3F*
>(Calo_TA_weight_file->Get(Calo_weight_hist_name)));
406 m_TAMassWeight = std::unique_ptr<TH3F>(
dynamic_cast<TH3F*
>(Calo_TA_weight_file->Get(TA_weight_hist_name)));
412 Calo_TA_weight_file->Close();
414 return StatusCode::SUCCESS;
◆ recommendedSystematics()
List of all systematics recommended for this tool.
Implements CP::IReentrantSystematicsTool.
Definition at line 189 of file FFJetSmearingTool.cxx.
195 if ((*ci).basename().find(
"CALO_")!=std::string::npos)
196 filteredSysts.
insert(*ci);
198 return filteredSysts;
202 if ((*ci).basename().find(
"TA_") !=std::string::npos)
203 filteredSysts.
insert(*ci);
205 return filteredSysts;
209 if ((*ci).basename().find(
"COMB_")!=std::string::npos){
210 filteredSysts.
insert(*ci);
213 return filteredSysts;
◆ 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_calibArea
std::string CP::FFJetSmearingTool::m_calibArea |
|
private |
◆ m_CALO_ResponseMap
std::unique_ptr<TH2> CP::FFJetSmearingTool::m_CALO_ResponseMap |
|
private |
◆ m_caloMassWeight
std::unique_ptr<TH3F> CP::FFJetSmearingTool::m_caloMassWeight |
|
private |
◆ m_configFile
std::string CP::FFJetSmearingTool::m_configFile |
|
private |
◆ m_currentSysData
SysData* CP::FFJetSmearingTool::m_currentSysData {nullptr} |
|
private |
◆ m_detStore
◆ m_EtaRange
float CP::FFJetSmearingTool::m_EtaRange {} |
|
private |
◆ m_evtStore
◆ m_histFileName
std::string CP::FFJetSmearingTool::m_histFileName |
|
private |
◆ m_HistogramsFilePath
std::string CP::FFJetSmearingTool::m_HistogramsFilePath |
|
private |
◆ m_isInit
bool CP::FFJetSmearingTool::m_isInit {} |
|
private |
◆ m_MassDef
◆ m_MassDef_string
std::string CP::FFJetSmearingTool::m_MassDef_string |
|
private |
◆ m_MaxMass
float CP::FFJetSmearingTool::m_MaxMass {} |
|
private |
◆ m_MaxPt
float CP::FFJetSmearingTool::m_MaxPt {} |
|
private |
◆ m_MeVtoGeV
constexpr float CP::FFJetSmearingTool::m_MeVtoGeV = 1.e-3 |
|
staticconstexprprivate |
◆ m_path
std::string CP::FFJetSmearingTool::m_path |
|
private |
◆ m_release
std::string CP::FFJetSmearingTool::m_release |
|
private |
◆ m_sysData
◆ m_SysList
◆ m_Syst_Affects_JMSorJMR
std::map<std::string,std::string> CP::FFJetSmearingTool::m_Syst_Affects_JMSorJMR |
|
private |
◆ m_Syst_Hist_map
std::map<std::string,std::unique_ptr<TH2> > CP::FFJetSmearingTool::m_Syst_Hist_map |
|
private |
◆ m_Syst_HistPath_map
std::map<std::string,std::string> CP::FFJetSmearingTool::m_Syst_HistPath_map |
|
private |
◆ m_Syst_HistTA_map
std::map<std::string,std::unique_ptr<TH2> > CP::FFJetSmearingTool::m_Syst_HistTA_map |
|
private |
◆ m_Syst_HistTAPath_map
std::map<std::string,std::string> CP::FFJetSmearingTool::m_Syst_HistTAPath_map |
|
private |
◆ m_Syst_MassDefAffected_map
std::map<std::string,std::string> CP::FFJetSmearingTool::m_Syst_MassDefAffected_map |
|
private |
◆ m_Syst_TopologyAffected_map
std::map<std::string,std::string> CP::FFJetSmearingTool::m_Syst_TopologyAffected_map |
|
private |
◆ m_TA_ResponseMap
std::unique_ptr<TH2> CP::FFJetSmearingTool::m_TA_ResponseMap |
|
private |
◆ m_TAMassWeight
std::unique_ptr<TH3F> CP::FFJetSmearingTool::m_TAMassWeight |
|
private |
◆ m_truth_jetColl
std::string CP::FFJetSmearingTool::m_truth_jetColl |
|
private |
◆ m_truthlabelaccessor
std::string CP::FFJetSmearingTool::m_truthlabelaccessor |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
size_t size() const
returns: size of the set
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::string name() const
returns: the systematics joined into a single string.
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
virtual double phi() const
The azimuthal angle ( ) of the particle.
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
double resolution[nGasTypes][nParametersResolution]
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
virtual void setOwner(IDataHandleHolder *o)=0
void setJetP4(const JetFourMom_t &p4)
double Interpolate(const TH1 *histo, const double x)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
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 double eta() const
The pseudorapidity ( ) of the particle.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
void makePrivateStore()
Create a new (empty) private store for this object.
@ Ok
The correction was done successfully.
TString findFilePath(const TString &fileName, const TString &path="", const TString &calibArea="")
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double m() const
The invariant mass of the particle.
This module implements the central registry for handling systematic uncertainties with CP tools.
const_iterator begin() const
description: const iterator to the beginning of the set
TypeEnum intToEnum(const int type)
Return value from object correction CP tools.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const
The transverse momentum ( ) of the particle.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Jet_v1 Jet
Definition of the current "jet version".
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.