|
ATLAS Offline Software
|
#include <TestMacroHelpers.h>
Definition at line 18 of file TestMacroHelpers.h.
◆ DataDependency
◆ IsoCorrectionTestHelper()
Definition at line 34 of file TestMacroHelpers.cxx.
39 for (
const std::unique_ptr<IsolationWP>&
W :
WPs) {
40 for (
const auto& C :
W->conditions()) {
41 for (
unsigned int t = 0;
t <
C->num_types(); ++
t) {
44 return known.Accessor->isotype() == iso_type;
◆ addToTree()
template<class T >
bool MuonVal::MuonTesterBranch::addToTree |
( |
T & |
variable | ) |
|
|
protectedinherited |
Connects the Memory buffer with the TTree.
◆ Charge()
◆ data_dependencies()
std::vector< MuonTesterBranch::DataDependency > MuonVal::MuonTesterBranch::data_dependencies |
( |
| ) |
|
|
finaloverridevirtualinherited |
◆ declare_dependency()
template<class Key >
bool MuonVal::MuonTesterBranch::declare_dependency |
( |
Key & |
key | ) |
|
|
protectedinherited |
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
◆ eraseWhiteSpaces()
std::string MuonVal::MuonTesterBranch::eraseWhiteSpaces |
( |
const std::string & |
In | ) |
|
|
staticinherited |
◆ fill()
bool CP::IsoCorrectionTestHelper::fill |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
The fill method checks if enough information is provided such that the branch is cleared from the information of the prevoius event and in cases of that updates did no happen befure a default value is provided.
--> returns false if no update is called or the dummy value has not been defined
Implements MuonVal::IMuonTesterBranch.
Definition at line 32 of file TestMacroHelpers.cxx.
◆ Fill()
Fill the momenta of the associated tracks and clusters
Definition at line 69 of file TestMacroHelpers.cxx.
71 Error(
"IsoCorrectionTestHelper::Fill()",
"No particles given");
72 return StatusCode::FAILURE;
85 Error(
"IsoCorrectionTestHelper()",
"Failed to fill isolation");
86 return StatusCode::FAILURE;
89 if (
m_acc_passDefault != std::nullopt && !(*m_acc_passDefault).isAvailable(*
object)) {
90 Error(
"IsoCorrectionTestHelper()",
"It has not been stored whether the particle passes the default isolation");
91 return StatusCode::FAILURE;
96 Error(
"IsoCorrectionTestHelper()",
"It has not been stored whether the particle passes the corrected isolation.");
97 return StatusCode::FAILURE;
105 FlowElementPtr assoc_flow{};
108 assoc_track =
mu->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
110 assoc_cluster =
mu->cluster();
114 return xAOD::P4Helpers::deltaR2(a, mu) < xAOD::P4Helpers::deltaR2(b, mu);
120 assoc_cluster =
el->caloCluster(0);
123 assoc_flow = (*std::min_element(
m_flows.begin(),
m_flows.end(),[
object](
const FlowElementPtr&
a,
const
125 return xAOD::P4Helpers::deltaR2(a, object) < xAOD::P4Helpers::deltaR2(b, object);
130 if (acc_assocCaloIsDec.
isAvailable(*
object) && acc_assocCaloIsDec(*
object)) {
134 }
else if (assoc_cluster) {
143 if (acc_assocPflowIsDec.
isAvailable(*
object) && acc_assocPflowIsDec(*
object)) {
147 }
else if (assoc_flow) {
157 return StatusCode::SUCCESS;
◆ FillIsolationBranches()
Definition at line 167 of file TestMacroHelpers.cxx.
169 if (!Acc)
return StatusCode::SUCCESS;
171 if (Acc->getOriginalIsolation(
P, IsoValue).code() !=
CorrectionCode::Ok)
return StatusCode::FAILURE;
173 if (Acc->getIsolation(
P, IsoValue).code() !=
CorrectionCode::Ok)
return StatusCode::FAILURE;
175 return StatusCode::SUCCESS;
◆ init()
bool CP::IsoCorrectionTestHelper::init |
( |
| ) |
|
|
finaloverridevirtual |
The init method checks whether the branch name has already registered to the MuonTree and tries then to add the branch to the tree --> return false if the branch has already been defined or the inclusion of the branch to the tree failed or the name of the branch is empty.
Implements MuonVal::IMuonTesterBranch.
Definition at line 31 of file TestMacroHelpers.cxx.
◆ initialized()
bool MuonVal::MuonTesterBranch::initialized |
( |
| ) |
const |
|
inherited |
Returns whether the object has been initialized or not The outcome of the variable is bound to a successful call of the addToTree method.
Definition at line 52 of file MuonTesterBranch.cxx.
◆ 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.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ name()
std::string MuonVal::MuonTesterBranch::name |
( |
| ) |
const |
|
finaloverridevirtualinherited |
◆ parent()
MuonTesterTree & MuonVal::MuonTesterBranch::parent |
( |
| ) |
|
|
protectedinherited |
◆ SetBackupPreFix()
void CP::IsoCorrectionTestHelper::SetBackupPreFix |
( |
const std::string & |
prefix | ) |
|
Specify whether the vanilla isolation variable is backuped to another set of decorators.
Definition at line 63 of file TestMacroHelpers.cxx.
65 branch.Accessor = std::make_unique<IsoVariableHelper>(
branch.Accessor->isotype(),
prefix);
◆ SetClusters()
void CP::IsoCorrectionTestHelper::SetClusters |
( |
const ClusterSet & |
clusters | ) |
|
◆ SetFlowElements()
void CP::IsoCorrectionTestHelper::SetFlowElements |
( |
const PflowSet & |
flows | ) |
|
◆ SetIsolationDecorator()
void CP::IsoCorrectionTestHelper::SetIsolationDecorator |
( |
const std::string & |
acc | ) |
|
Pipe the name of te decorator encoding whether the object already passed the vanilla isolation.
Definition at line 57 of file TestMacroHelpers.cxx.
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ SetSelectionDecorator()
void CP::IsoCorrectionTestHelper::SetSelectionDecorator |
( |
const std::string & |
acc | ) |
|
Pipe the name of the decorator selecting the objects dumped to the TTree.
Definition at line 54 of file TestMacroHelpers.cxx.
◆ SetUpdatedIsoDecorator()
void CP::IsoCorrectionTestHelper::SetUpdatedIsoDecorator |
( |
const std::string & |
acc | ) |
|
Pipe the name of te decorator encoding whether the object already passed the corrected isolation.
Definition at line 60 of file TestMacroHelpers.cxx.
◆ tree() [1/2]
const TTree * MuonVal::MuonTesterBranch::tree |
( |
| ) |
const |
|
finaloverridevirtualinherited |
◆ tree() [2/2]
TTree * MuonVal::MuonTesterBranch::tree |
( |
| ) |
|
|
finaloverridevirtualinherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_acc_passCorrected
std::optional<CharAccessor> CP::IsoCorrectionTestHelper::m_acc_passCorrected {std::nullopt} |
|
private |
◆ m_acc_passDefault
std::optional<CharAccessor> CP::IsoCorrectionTestHelper::m_acc_passDefault {std::nullopt} |
|
private |
◆ m_acc_used_for_corr
std::optional<CharAccessor> CP::IsoCorrectionTestHelper::m_acc_used_for_corr {std::nullopt} |
|
private |
◆ m_assoc_cluster_et
◆ m_assoc_cluster_eta
◆ m_assoc_cluster_phi
◆ m_assoc_pflow_et
◆ m_assoc_pflow_eta
◆ m_assoc_pflow_phi
◆ m_assoc_track_pt
◆ m_clusters
ClusterSet CP::IsoCorrectionTestHelper::m_clusters {} |
|
private |
◆ m_cont_name
std::string CP::IsoCorrectionTestHelper::m_cont_name {} |
|
private |
◆ m_corr_passIso
◆ m_dependencies
std::vector<DataDependency> MuonVal::MuonTesterBranch::m_dependencies {} |
|
privateinherited |
◆ m_e
◆ m_eta
◆ m_flows
PflowSet CP::IsoCorrectionTestHelper::m_flows {} |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_init
bool MuonVal::MuonTesterBranch::m_init {false} |
|
privateinherited |
◆ m_iso_branches
◆ 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
std::string MuonVal::MuonTesterBranch::m_name {} |
|
privateinherited |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_orig_passIso
◆ m_parent
MuonTesterTree* MuonVal::MuonTesterBranch::m_parent {nullptr} |
|
privateinherited |
◆ m_phi
◆ m_pt
◆ m_Q
◆ m_tree
TTree* MuonVal::MuonTesterBranch::m_tree {nullptr} |
|
privateinherited |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
MuonVal::VectorBranch< float > & m_assoc_pflow_eta
Electron_v1 Electron
Definition of the current "egamma version".
StatusCode FillIsolationBranches(const xAOD::IParticle *P, const IsoHelperPtr &Acc, MuonVal::VectorBranch< float > &Original, MuonVal::VectorBranch< float > &Corrected)
MuonVal::VectorBranch< float > & m_assoc_pflow_phi
std::vector< DataDependency > m_dependencies
MuonVal::VectorBranch< int > & m_Q
MuonVal::VectorBranch< bool > & m_corr_passIso
MuonVal::VectorBranch< float > & m_assoc_track_pt
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
xAOD::Iso::IsolationType IsoType
Class providing the definition of the 4-vector interface.
SortedObjPtr< xAOD::CaloCluster > CaloClusterPtr
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
MuonTesterTree * m_parent
MuonVal::VectorBranch< float > & m_assoc_cluster_et
MuonVal::VectorBranch< float > & m_phi
float Charge(const xAOD::IParticle *P) const
MuonVal::VectorBranch< float > & m_assoc_cluster_phi
MuonVal::VectorBranch< float > & m_pt
MuonVal::VectorBranch< float > & m_assoc_pflow_et
bool add(const std::string &hname, TKey *tobj)
MuonVal::VectorBranch< float > & m_assoc_cluster_eta
MsgStream & msg() const
The standard message stream.
std::string name() const override final
Returns the name of the branch.
void push_back(const T &value)
Adds a new element at the end of the vector.
std::vector< IsolationBranches > m_iso_branches
MuonVal::VectorBranch< float > & m_e
struct TBPatternUnitContext Muon
@ Ok
The correction was done successfully.
std::optional< CharAccessor > m_acc_used_for_corr
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
MuonVal::VectorBranch< float > & m_eta
SG::AuxElement::ConstAccessor< float > FloatAccessor
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Error
The different types of error that can be flagged in the L1TopoRDO.
Class describing a TrackParticle.
std::optional< CharAccessor > m_acc_passCorrected
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
std::optional< CharAccessor > m_acc_passDefault
MuonVal::VectorBranch< bool > & m_orig_passIso