#include <UncertaintyGroup.h>
|
std::string | m_nm |
| Message source name. More...
|
|
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More...
|
|
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More...
|
|
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More...
|
|
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More...
|
|
Definition at line 27 of file UncertaintyGroup.h.
◆ UncertaintyGroup() [1/3]
◆ UncertaintyGroup() [2/3]
Definition at line 68 of file UncertaintyGroup.cxx.
82 for (
size_t iComp = 0; iComp < toCopy.m_components.size(); ++iComp)
83 if (toCopy.m_components.at(iComp))
84 m_components.push_back(toCopy.m_components.at(iComp)->clone());
◆ ~UncertaintyGroup()
jet::UncertaintyGroup::~UncertaintyGroup |
( |
| ) |
|
|
virtual |
◆ UncertaintyGroup() [3/3]
jet::UncertaintyGroup::UncertaintyGroup |
( |
const std::string & |
name = "" | ) |
|
|
private |
◆ addComponent()
Definition at line 105 of file UncertaintyGroup.cxx.
110 return StatusCode::FAILURE;
117 return StatusCode::FAILURE;
126 iter->second->push_back(component);
129 std::vector<UncertaintyComponent*>* newScaleVarVec =
new std::vector<UncertaintyComponent*>();
130 newScaleVarVec->push_back(component);
131 m_compScaleMap.insert(std::make_pair(component->getScaleVar(),newScaleVarVec));
134 return StatusCode::SUCCESS;
◆ addSubgroup()
Definition at line 137 of file UncertaintyGroup.cxx.
142 return StatusCode::FAILURE;
149 return StatusCode::FAILURE;
155 return StatusCode::SUCCESS;
◆ getCategory()
◆ getComponents()
◆ getCorrType()
◆ getDesc()
virtual TString jet::UncertaintyGroup::getDesc |
( |
| ) |
const |
|
inlinevirtual |
◆ getGroupNum()
virtual int jet::UncertaintyGroup::getGroupNum |
( |
| ) |
const |
|
inlinevirtual |
◆ getIsReducible()
virtual bool jet::UncertaintyGroup::getIsReducible |
( |
| ) |
const |
|
inlinevirtual |
◆ getName()
virtual TString jet::UncertaintyGroup::getName |
( |
| ) |
const |
|
inlinevirtual |
◆ getNumComponents()
size_t jet::UncertaintyGroup::getNumComponents |
( |
| ) |
const |
|
virtual |
◆ getNumRawComps()
virtual size_t jet::UncertaintyGroup::getNumRawComps |
( |
| ) |
const |
|
inlinevirtual |
◆ getNumSubgroups()
virtual size_t jet::UncertaintyGroup::getNumSubgroups |
( |
| ) |
const |
|
inlinevirtual |
◆ getScaleVars()
Definition at line 247 of file UncertaintyGroup.cxx.
249 std::set<CompScaleVar::TypeEnum> vars;
256 for (
size_t iComp = 0; iComp <
m_components.size(); ++iComp)
259 for (
size_t iSubgroup = 0; iSubgroup <
m_subgroups.size(); ++iSubgroup)
261 const std::set<CompScaleVar::TypeEnum> subVars =
m_subgroups.at(iSubgroup)->getScaleVars();
262 vars.insert(subVars.begin(),subVars.end());
◆ getSubgroupNum()
virtual int jet::UncertaintyGroup::getSubgroupNum |
( |
| ) |
const |
|
inlinevirtual |
◆ getSubgroups()
virtual std::vector<UncertaintyGroup*> jet::UncertaintyGroup::getSubgroups |
( |
| ) |
const |
|
inlinevirtual |
◆ getTopology()
Definition at line 275 of file UncertaintyGroup.cxx.
293 result = subgroup->getTopology();
294 else if (
result != subgroup->getTopology(scaleVar))
302 for (
const UncertaintyComponent* component :
m_components)
311 result = component->getTopology();
312 else if (
result != component->getTopology())
◆ getUncertainty()
Definition at line 386 of file UncertaintyGroup.cxx.
389 std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::const_iterator
iter =
m_compScaleMap.find(scaleVar);
390 const std::vector<UncertaintyComponent*>* relevantComponents = (
iter !=
m_compScaleMap.end()) ?
iter->second : NULL;
393 std::vector<UncertaintyGroup*> relevantGroups;
394 for (
size_t iSubgroup = 0; iSubgroup <
m_subgroups.size(); ++iSubgroup)
395 if (
m_subgroups.at(iSubgroup)->getScaleVars().count(scaleVar))
396 relevantGroups.push_back(
m_subgroups.at(iSubgroup));
399 if ((!relevantComponents || relevantComponents->empty()) && relevantGroups.empty())
return 0;
402 if ((relevantComponents && relevantComponents->size() == 1) && relevantGroups.empty())
403 return relevantComponents->at(0)->getUncertainty(
jet,eInfo);
406 if (relevantGroups.size() == 1 && (!relevantComponents || relevantComponents->empty()))
407 return relevantGroups.at(0)->getUncertainty(
jet,eInfo,scaleVar);
415 if (relevantComponents)
416 for (
size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
417 unc +=
pow(relevantComponents->at(iComp)->getUncertainty(
jet,eInfo),2);
418 for (
size_t iGroup = 0; iGroup < relevantGroups.size(); ++iGroup)
419 unc +=
pow(relevantGroups.at(iGroup)->getUncertainty(
jet,eInfo,scaleVar),2);
424 if (relevantComponents)
425 for (
size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
426 unc += relevantComponents->at(iComp)->getUncertainty(
jet,eInfo);
427 for (
size_t iGroup = 0; iGroup < relevantGroups.size(); ++iGroup)
428 unc += relevantGroups.at(iGroup)->getUncertainty(
jet,eInfo,scaleVar);
◆ getValidity()
Definition at line 359 of file UncertaintyGroup.cxx.
362 std::map<CompScaleVar::TypeEnum,std::vector<UncertaintyComponent*>*>::const_iterator
iter =
m_compScaleMap.find(scaleVar);
365 const std::vector<UncertaintyComponent*>* relevantComponents =
iter->second;
373 for (
size_t iComp = 0; iComp < relevantComponents->size(); ++iComp)
374 if (!relevantComponents->at(iComp)->getValidity(
jet,eInfo))
378 for (
size_t iSubgroup = 0; iSubgroup <
m_subgroups.size(); ++iSubgroup)
◆ getValidUncertainty()
◆ initialize()
StatusCode jet::UncertaintyGroup::initialize |
( |
TFile * |
histFile | ) |
|
|
virtual |
Definition at line 158 of file UncertaintyGroup.cxx.
164 return StatusCode::FAILURE;
171 return StatusCode::FAILURE;
175 for (
size_t iSubgroup = 0; iSubgroup <
m_subgroups.size(); ++iSubgroup)
176 if(
m_subgroups.at(iSubgroup)->initialize(histFile).isFailure())
177 return StatusCode::FAILURE;
183 std::set<CompScaleVar::TypeEnum> vars;
184 for (
size_t iComp = 0; iComp <
m_components.size(); ++iComp)
188 ATH_MSG_ERROR(
"Correlation type is set to UNKNOWN for multiple components scaling the same variable: " <<
getName().
Data());
189 return StatusCode::FAILURE;
193 std::set<CompScaleVar::TypeEnum> groupVars;
194 size_t numSubComps = 0;
195 for (
size_t iSubgroup = 0; iSubgroup <
m_subgroups.size(); ++iSubgroup)
197 const std::set<CompScaleVar::TypeEnum> subVars =
m_subgroups.at(iSubgroup)->getScaleVars();
198 groupVars.insert(subVars.begin(),subVars.end());
199 numSubComps +=
m_subgroups.at(iSubgroup)->getNumComponents();
201 if (groupVars.size() != numSubComps)
203 ATH_MSG_ERROR(
"Correlation type is set to UNKNOWN for multiple subgroups scaling the same variable: " <<
getName().
Data());
204 return StatusCode::FAILURE;
208 for (std::set<CompScaleVar::TypeEnum>::const_iterator
iter = vars.begin();
iter != vars.end(); ++
iter)
210 if (groupVars.count(*
iter))
212 ATH_MSG_ERROR(
"Correlation type is set to UNKNOWN for a component and subgroup scaling the same variable: " <<
getName().
Data());
213 return StatusCode::FAILURE;
220 for (
size_t iComp = 0; iComp <
m_components.size(); ++iComp)
221 if (
m_components.at(iComp)->initialize(histFile).isFailure())
222 return StatusCode::FAILURE;
228 return StatusCode::SUCCESS;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ isAlwaysZero()
bool jet::UncertaintyGroup::isAlwaysZero |
( |
| ) |
const |
|
virtual |
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_category
◆ m_components
◆ m_compScaleMap
◆ m_corrType
◆ m_desc
const TString jet::UncertaintyGroup::m_desc |
|
protected |
◆ m_groupNum
const int jet::UncertaintyGroup::m_groupNum |
|
protected |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_isInit
bool jet::UncertaintyGroup::m_isInit |
|
protected |
◆ m_isReducible
const bool jet::UncertaintyGroup::m_isReducible |
|
protected |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_name
const TString jet::UncertaintyGroup::m_name |
|
protected |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_subgroupNum
const int jet::UncertaintyGroup::m_subgroupNum |
|
protected |
◆ m_subgroups
The documentation for this class was generated from the following files: