#include <METAssocTestAlg.h>
Definition at line 13 of file METAssocTestAlg.h.
◆ StoreGateSvc_t
◆ METAssocTestAlg()
| met::METAssocTestAlg::METAssocTestAlg |
( |
const std::string & | name, |
|
|
ISvcLocator * | pSvcLocator ) |
Definition at line 16 of file METAssocTestAlg.cxx.
16 :
20
22 }
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ ~METAssocTestAlg()
| met::METAssocTestAlg::~METAssocTestAlg |
( |
| ) |
|
|
inline |
◆ checkAssoc()
Definition at line 143 of file METAssocTestAlg.cxx.
144 {
145 const auto& jet = *assoc.
refJet();
148
149
150
151 for(
size_t ikey=0; ikey<assoc.
calkey().size(); ++ikey) {
155
158 for(
size_t iobj=0; iobj<assoc.
objects().size(); ++iobj) {
159 if( ((1<<iobj)&assoc.
calkey()[ikey]) == 0 ) {
161 if(!obj) continue;
163 }
164 }
166 }
167 }
168
169
170
171 for(
size_t ikey=0; ikey<assoc.
trkkey().size(); ++ikey) {
175
178 for(
size_t iobj=0; iobj<assoc.
objects().size(); ++iobj) {
179 if( ((1<<iobj)&assoc.
trkkey()[ikey]) == 0 ) {
181 if(!obj) continue;
183 }
184 }
186 }
187 }
188
189 return StatusCode::SUCCESS;
190 }
#define ATH_MSG_VERBOSE(x)
JetFourMom_t jetP4() const
The full 4-momentum of the particle : internal jet type.
float ce() const
Returns .
float cpt() const
Returns .
const Jet * refJet() const
Access reference jet.
const std::vector< MissingETBase::Types::bitmask_t > & calkey() const
Get the vector of cal keys.
ConstVec trkVec(const IParticle *pPart) const
Get track constituent vector for a given object.
std::vector< const IParticle * > objects() const
Access contributing objects.
const std::vector< MissingETBase::Types::bitmask_t > & trkkey() const
Get the vector of trk keys.
ConstVec jetTrkVec() const
Get track constituent vector for the reference jet.
ConstVec calVec(const IParticle *pPart) const
Get calo constituent vector for a given object.
xAOD::MissingETAssociation_v1::ConstVec constvec_t
Type for constituent vector.
@ JetConstitScaleMomentum
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
◆ checkJet()
Definition at line 69 of file METAssocTestAlg.cxx.
70 {
71 const auto& jet = *assoc.
refJet();
74
75 xAOD::MissingETAssociationHelper
helper;
76
77
78 for(
size_t iobj=0; iobj<assoc.
objects().size(); ++iobj) {
79 helper.setObjSelectionFlag(&assoc,iobj,
true);
80 }
81
84
85 ATH_MSG_VERBOSE(
" Jet constituent-scale pt: " << jetconstp4.pt() <<
", E: " << jetconstp4.e() );
86 ATH_MSG_VERBOSE(
" Max constituent overlap pt: " << overlapcalvec.
cpt() <<
", E: " << overlapcalvec.
ce() );
87
89 ATH_MSG_VERBOSE(
" Max track overlap pt: " << overlaptrkvec.
cpt() <<
", E: " << overlaptrkvec.
ce() );
90
91
95 }
99 }
100
101 return StatusCode::SUCCESS;
102 }
ConstVec overlapTrkVec(const MissingETAssociationHelper &helper) const
Retrieve total track-based vector to be subtracted from the jet.
ConstVec overlapCalVec(const MissingETAssociationHelper &helper) const
Retrieve total cluster-based vector to be subtracted from the jet.
◆ checkMiscAssoc()
Definition at line 192 of file METAssocTestAlg.cxx.
193 {
194
195 for(
size_t ikey=0; ikey<assoc.
calkey().size(); ++ikey) {
199 }
200
201
202 for(
size_t ikey=0; ikey<assoc.
trkkey().size(); ++ikey) {
206 }
207
208 return StatusCode::SUCCESS;
209 }
◆ checkObjects()
Definition at line 104 of file METAssocTestAlg.cxx.
105 {
106 const auto& jet = *assoc.
refJet();
109
110 xAOD::MissingETAssociationHelper
helper;
111
112
113
114 for(
size_t iobj=0; iobj<assoc.
objects().size(); ++iobj) {
117 if(!obj) continue;
118 helper.resetObjSelectionFlags();
119 helper.setObjSelectionFlag(&assoc,iobj,
true);
122
126
127
132 }
137 }
138 }
139
140 return StatusCode::SUCCESS;
141 }
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ execute()
| StatusCode met::METAssocTestAlg::execute |
( |
| ) |
|
Definition at line 41 of file METAssocTestAlg.cxx.
42 {
43
44
45 SG::ReadHandle<MissingETAssociationMap> map(
m_mapname);
46 if (!map.isValid()) {
48 return StatusCode::FAILURE;
49 }
50
51 for(const auto *const assoc : *map) {
52 if(assoc->isMisc()) {
55 } else {
56 ATH_MSG_VERBOSE(
" Now on MET association for jet " << assoc->refJet()->index() );
57
59
61
63 }
64 }
65
66 return StatusCode::SUCCESS;
67 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
◆ 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
◆ extraOutputDeps()
| const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
51{
52
53
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects
◆ finalize()
| StatusCode met::METAssocTestAlg::finalize |
( |
| ) |
|
◆ initialize()
| StatusCode met::METAssocTestAlg::initialize |
( |
| ) |
|
Definition at line 24 of file METAssocTestAlg.cxx.
25 {
27 ATH_MSG_FATAL(
"METMapSuffix (e.g. AntiKt4EMTopo) must be set!" );
28 return StatusCode::FAILURE;
29 }
32
35
36 return StatusCode::SUCCESS;
37 }
◆ 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.
◆ msg()
◆ 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.
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
◆ renounceArray()
◆ sysInitialize()
| StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.
Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.
Definition at line 66 of file AthAlgorithm.cxx.
66 {
68
71 }
72 ServiceHandle<ICondSvc> cs(
"CondSvc",
name());
74 if (
h->isCondition() &&
h->mode() == Gaudi::DataHandle::Writer) {
75
76 if ( cs.retrieve().isFailure() ) {
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
88}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.
◆ 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()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
| DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_failOnInconsistency
| bool met::METAssocTestAlg::m_failOnInconsistency = false |
|
private |
◆ m_jetname
| std::string met::METAssocTestAlg::m_jetname = "" |
|
private |
◆ m_mapname
| std::string met::METAssocTestAlg::m_mapname = "" |
|
private |
◆ m_mapsuffix
| std::string met::METAssocTestAlg::m_mapsuffix = "" |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: