|
ATLAS Offline Software
|
#include <METPhotonAssociator.h>
|
| METPhotonAssociator (const std::string &name) |
|
| ~METPhotonAssociator ()=default |
|
virtual StatusCode | initialize () override |
| Dummy implementation of the initialisation function. More...
|
|
StatusCode | finalize () |
|
virtual StatusCode | execute (xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const override |
|
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 |
|
|
StatusCode | executeTool (xAOD::MissingETContainer *metCont, xAOD::MissingETAssociationMap *metMap) const final |
|
StatusCode | extractTopoClusters (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &tclist, const met::METAssociator::ConstitHolder &constits) const final |
|
StatusCode | extractPFO (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &momenta) const final |
|
StatusCode | extractPFOsFromLinks (const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits) const |
|
StatusCode | extractPFOs (const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits) const |
|
StatusCode | extractFE (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits, std::map< const xAOD::IParticle *, MissingETBase::Types::constvec_t > &momenta) const final |
|
StatusCode | extractFEsFromLinks (const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const |
|
StatusCode | extractFEs (const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const |
|
StatusCode | extractTracks (const xAOD::IParticle *obj, std::vector< const xAOD::IParticle * > &constlist, const met::METAssociator::ConstitHolder &constits) const final |
|
StatusCode | selectEgammaClusters (const xAOD::CaloCluster *swclus, const std::vector< const xAOD::IParticle * > &inputTC, std::vector< const xAOD::IParticle * > &tclist) const |
|
StatusCode | selectEgammaTracks (const xAOD::Egamma *el, const xAOD::TrackParticleContainer *trkCont, std::set< const xAOD::TrackParticle * > &tracklist) const |
|
bool | hasUnmatchedClusters (const xAOD::Egamma *eg, const xAOD::PFO *pfo) const |
|
StatusCode | retrieveConstituents (met::METAssociator::ConstitHolder &constits) const |
|
bool | acceptTrack (const xAOD::TrackParticle *trk, const xAOD::Vertex *pv) const |
|
bool | isGoodEoverP (const xAOD::TrackParticle *trk) const |
|
virtual StatusCode | fillAssocMap (xAOD::MissingETAssociationMap *metMap, const xAOD::IParticleContainer *hardObjs) const |
|
void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution More...
|
|
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) |
|
void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. More...
|
|
|
double | m_tcMatch_dR |
|
double | m_tcMatch_maxRat |
|
unsigned short | m_tcMatch_method |
|
double | m_extraTrkMatch_dR |
|
SG::ReadDecorHandleKey< xAOD::PhotonContainer > | m_photonNeutralPFOReadDecorKey {this,"photonNeutralPFOReadDecorKey","", "Neutral PFO links key"} |
|
SG::ReadDecorHandleKey< xAOD::PhotonContainer > | m_photonChargedPFOReadDecorKey {this,"photonChargedPFOReadDecorKey","", "Charged PFO links key"} |
|
SG::ReadDecorHandleKey< xAOD::PhotonContainer > | m_photonNeutralFEReadDecorKey {this,"photonNeutralFEReadDecorKey","", "Neutral FE links key"} |
|
SG::ReadDecorHandleKey< xAOD::PhotonContainer > | m_photonChargedFEReadDecorKey {this,"photonChargedFEReadDecorKey","", "Charged FE links key"} |
|
SG::ReadDecorHandleKey< xAOD::ElectronContainer > | m_electronNeutralPFOReadDecorKey {this,"electronNeutralPFOReadDecorKey","", "Neutral PFO links key"} |
|
SG::ReadDecorHandleKey< xAOD::ElectronContainer > | m_electronChargedPFOReadDecorKey {this,"electronCargedPFOReadDecorKey","", "Charged PFO links key"} |
|
SG::ReadDecorHandleKey< xAOD::ElectronContainer > | m_electronNeutralFEReadDecorKey {this,"electronNeutralFEReadDecorKey","", "Neutral FE links key"} |
|
SG::ReadDecorHandleKey< xAOD::ElectronContainer > | m_electronChargedFEReadDecorKey {this,"electronCargedFEReadDecorKey","", "Charged FE links key"} |
|
bool | m_checkUnmatched |
|
ToolHandle< InDet::IInDetTrackSelectionTool > | m_trkseltool |
|
ToolHandle< xAOD::ITrackIsolationTool > | m_trkIsolationTool |
|
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > | m_caloIsolationTool |
|
std::string | m_neutralFELinksKey |
|
std::string | m_chargedFELinksKey |
|
std::string | m_neutralPFOLinksKey |
|
std::string | m_chargedPFOLinksKey |
|
bool | m_usePFOLinks |
|
bool | m_useFELinks |
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_pvcollKey {this,"PrimVxColl","PrimaryVertices","Primary Vertex Collection"} |
|
SG::ReadHandleKey< xAOD::IParticleContainer > | m_clcollKey {this,"ClusColl","CaloCalTopoClusters","Topo cluster Collection"} |
|
SG::ReadHandleKey< xAOD::TrackParticleContainer > | m_trkcollKey {this,"TrkColl","InDetTrackParticles","Track particle Collection"} |
|
SG::ReadHandleKey< xAOD::PFOContainer > | m_pfcollKey {this,"PFlowColl","","PFO Collection"} |
|
SG::ReadHandleKey< xAOD::FlowElementContainer > | m_fecollKey {this,"FlowElementCollection","","FlowElement Collection (overrides PFO if not empty)"} |
|
SG::ReadHandleKey< xAOD::IParticleContainer > | m_hybridContKey {this,"HybridKey","","Hybrid Collection"} |
|
bool | m_pflow |
|
bool | m_useTracks |
|
bool | m_useRapidity |
|
bool | m_useIsolationTools = false |
|
bool | m_useModifiedClus |
|
bool | m_weight_charged_pfo = false |
|
bool | m_cleanChargedPFO |
|
bool | m_skipconst |
|
std::string | m_forcoll |
|
double | m_foreta |
|
double | m_cenTrackPtThr |
|
double | m_forTrackPtThr |
|
Definition at line 26 of file METPhotonAssociator.h.
◆ StoreGateSvc_t
◆ METPhotonAssociator() [1/2]
met::METPhotonAssociator::METPhotonAssociator |
( |
const std::string & |
name | ) |
|
◆ ~METPhotonAssociator()
met::METPhotonAssociator::~METPhotonAssociator |
( |
| ) |
|
|
default |
◆ METPhotonAssociator() [2/2]
met::METPhotonAssociator::METPhotonAssociator |
( |
| ) |
|
|
private |
◆ acceptTrack()
◆ 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]
◆ execute()
Implements IMETAssocToolBase.
Definition at line 141 of file METAssociator.cxx.
145 ATH_MSG_WARNING(
"Invalid pointer to MissingETContainer supplied! Abort.");
146 return StatusCode::FAILURE;
150 ATH_MSG_WARNING(
"Invalid pointer to MissingETAssociationMap supplied! Abort.");
151 return StatusCode::FAILURE;
154 ATH_MSG_WARNING(
"Attempting to build PFlow MET without a track collection.");
155 return StatusCode::FAILURE;
◆ executeTool()
◆ extractFE()
|
finalprotectedvirtualinherited |
◆ extractFEs()
Definition at line 384 of file METEgammaAssociator.cxx.
395 std::vector<const xAOD::FlowElement*> nearbyFE;
396 nearbyFE.reserve(20);
399 ATH_MSG_ERROR(
"Attempted to extract non-PFlow FlowElements. This is not supported!");
400 return StatusCode::FAILURE;
406 if( ( !fe->
isCharged() && fe->
e() > FLT_MIN ) ||
410 nearbyFE.push_back(fe);
414 ATH_MSG_VERBOSE(
"Found " << nearbyFE.size() <<
" nearby FlowElements (PFOs)");
416 std::set<const xAOD::TrackParticle*> trackset;
421 felist.push_back(fe);
425 double eg_cl_e = swclus->
e();
432 double sumE_pfo = 0.;
440 double pfo_e = fe->
e();
443 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (pfo_e/eg_cl_e));
444 if( !bestbadmatch || (fabs(pfo_e/eg_cl_e-1.) < fabs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch = fe;
448 ATH_MSG_VERBOSE(
"E match with new nPFO: " << fabs(sumE_pfo+pfo_e - eg_cl_e) / eg_cl_e);
449 if( (doSum = fabs(sumE_pfo+pfo_e-eg_cl_e) < fabs(sumE_pfo - eg_cl_e)) ) {
450 felist.push_back(fe);
452 ATH_MSG_VERBOSE(
"Accept pfo with pt " << fe->
pt() <<
", e " << fe->
e() <<
" in sum.");
454 ATH_MSG_VERBOSE(
"E match with new PFO: " << fabs(sumE_pfo+pfo_e - eg_cl_e) / eg_cl_e);
458 if(sumE_pfo<FLT_MIN && bestbadmatch) {
459 ATH_MSG_VERBOSE(
"No better matches found -- add bad match topocluster with pt "
460 << bestbadmatch->
pt() <<
", e " << bestbadmatch->
e() <<
".");
461 felist.push_back(bestbadmatch);
464 return StatusCode::SUCCESS;
◆ extractFEsFromLinks()
Definition at line 320 of file METEgammaAssociator.cxx.
325 ATH_MSG_DEBUG(
"Extract FEs From Links for " <<
eg->type() <<
" with pT " <<
eg->pt());
327 std::vector<FELink_t> nFELinks;
328 std::vector<FELink_t> cFELinks;
333 nFELinks=neutralFEReadDecorHandle(*
eg);
334 cFELinks=chargedFEReadDecorHandle(*
eg);
339 nFELinks=neutralFEReadDecorHandle(*
eg);
340 cFELinks=chargedFEReadDecorHandle(*
eg);
345 for (
const FELink_t& feLink : cFELinks) {
346 if (!feLink.isValid())
continue;
348 for (
const auto *
const fe : *constits.
feCont){
349 if (fe->index() == fe_init->
index() && fe->isCharged()){
352 ATH_MSG_DEBUG(
"Accept cFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() );
353 felist.push_back(fe);
360 double eg_cl_e =
eg->caloCluster()->e();
363 for (
const FELink_t& feLink : nFELinks) {
364 if (!feLink.isValid())
continue;
366 for (
const auto *
const fe : *constits.
feCont){
367 if (fe->index() == fe_init->
index() && !fe->isCharged()){
368 double fe_e = fe->
e();
369 if( ( !fe->isCharged()&& fe->e() > FLT_MIN ) ){
371 ATH_MSG_DEBUG(
"E match with new nFE: " << fabs(sumE_fe+fe_e - eg_cl_e) / eg_cl_e);
372 ATH_MSG_DEBUG(
"Accept nFE with pt " << fe->pt() <<
", e " << fe->e() <<
", eta " << fe->eta() <<
", phi " << fe->phi() <<
" in sum.");
373 ATH_MSG_DEBUG(
"Energy ratio of nFE to eg: " << fe_e / eg_cl_e);
374 felist.push_back(fe);
381 return StatusCode::SUCCESS;
◆ extractPFO()
|
finalprotectedvirtualinherited |
◆ extractPFOs()
Definition at line 226 of file METEgammaAssociator.cxx.
237 std::vector<const xAOD::PFO*> nearbyPFO;
238 nearbyPFO.reserve(20);
239 for(
const auto *
const pfo : *constits.
pfoCont) {
244 if( ( !pfo->isCharged() && pfo->e() > FLT_MIN ) ||
245 ( pfo->isCharged() && PVMatchedAcc(*pfo)
248 nearbyPFO.push_back(pfo);
254 std::set<const xAOD::TrackParticle*> trackset;
256 for(
const auto&
track : trackset) {
257 for(
const auto& pfo : nearbyPFO) {
258 if(pfo->isCharged() && pfo->track(0) ==
track) {
259 pfolist.push_back(pfo);
263 double eg_cl_e = swclus->
e();
270 double sumE_pfo = 0.;
273 for(
const auto& pfo : nearbyPFO) {
277 double pfo_e = pfo->eEM();
280 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (pfo_e/eg_cl_e));
281 if( !bestbadmatch || (fabs(pfo_e/eg_cl_e-1.) < fabs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch = pfo;
285 ATH_MSG_VERBOSE(
"E match with new nPFO: " << fabs(sumE_pfo+pfo_e - eg_cl_e) / eg_cl_e);
286 if( (doSum = fabs(sumE_pfo+pfo_e-eg_cl_e) < fabs(sumE_pfo - eg_cl_e)) ) {
287 pfolist.push_back(pfo);
289 ATH_MSG_VERBOSE(
"Accept pfo with pt " << pfo->pt() <<
", e " << pfo->e() <<
" in sum.");
291 ATH_MSG_VERBOSE(
"E match with new PFO: " << fabs(sumE_pfo+pfo_e - eg_cl_e) / eg_cl_e);
295 if(sumE_pfo<FLT_MIN && bestbadmatch) {
296 ATH_MSG_VERBOSE(
"No better matches found -- add bad match topocluster with pt "
297 << bestbadmatch->
pt() <<
", e " << bestbadmatch->
e() <<
".");
298 pfolist.push_back(bestbadmatch);
301 return StatusCode::SUCCESS;
◆ extractPFOsFromLinks()
Definition at line 162 of file METEgammaAssociator.cxx.
167 ATH_MSG_DEBUG(
"Extract PFOs From Links for " <<
eg->type() <<
" with pT " <<
eg->pt());
169 std::vector<PFOLink_t> cPFOLinks;
170 std::vector<PFOLink_t> nPFOLinks;
175 nPFOLinks=neutralPFOReadDecorHandle(*
eg);
176 cPFOLinks=chargedPFOReadDecorHandle(*
eg);
181 nPFOLinks=neutralPFOReadDecorHandle(*
eg);
182 cPFOLinks=chargedPFOReadDecorHandle(*
eg);
187 for (
const PFOLink_t& pfoLink : cPFOLinks) {
188 if (!pfoLink.isValid())
continue;
190 for (
const auto *
const pfo : *constits.
pfoCont){
191 if (pfo->index() == pfo_init->
index() && pfo->isCharged()){
194 ATH_MSG_DEBUG(
"Accept cPFO with pt " << pfo->pt() <<
", e " << pfo->e() <<
", eta " << pfo->eta() <<
", phi " << pfo->phi() );
202 double eg_cl_e =
eg->caloCluster()->e();
203 double sumE_pfo = 0.;
205 for (
const PFOLink_t& pfoLink : nPFOLinks) {
206 if (!pfoLink.isValid())
continue;
208 for (
const auto *
const pfo : *constits.
pfoCont){
209 if (pfo->index() == pfo_init->
index() && !pfo->isCharged()){
210 double pfo_e = pfo->
eEM();
211 if( ( !pfo->isCharged()&& pfo->e() > FLT_MIN ) ){
213 ATH_MSG_DEBUG(
"E match with new nPFO: " << fabs(sumE_pfo+pfo_e - eg_cl_e) / eg_cl_e);
214 ATH_MSG_DEBUG(
"Accept nPFO with pt " << pfo->pt() <<
", e " << pfo->e() <<
", eta " << pfo->eta() <<
", phi " << pfo->phi() <<
" in sum.");
215 ATH_MSG_DEBUG(
"Energy ratio of nPFO to eg: " << pfo_e / eg_cl_e);
216 pfolist.push_back(pfo);
223 return StatusCode::SUCCESS;
◆ extractTopoClusters()
|
finalprotectedvirtualinherited |
Implements met::METAssociator.
Definition at line 84 of file METEgammaAssociator.cxx.
96 std::vector<const IParticle*> inputTC;
100 for(
const auto *
const cl : *constits.
tcCont) {
104 inputTC.push_back(
cl);
112 for(
const auto&
el : tcLinkAcc(*swclus)) {
114 inputTC.push_back(*
el);
116 ATH_MSG_ERROR(
"Invalid constituentClusterLinks on input electron/photon!");
117 return StatusCode::FAILURE;
123 return StatusCode::FAILURE;
128 return StatusCode::SUCCESS;
◆ extractTracks()
|
finalprotectedvirtualinherited |
◆ 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
◆ fillAssocMap()
|
protectedvirtualinherited |
Reimplemented in met::METTruthAssociator.
Definition at line 295 of file METAssociator.cxx.
298 ConstitHolder constits;
302 return StatusCode::FAILURE;
305 std::vector<const IParticle*> constlist;
306 constlist.reserve(20);
307 std::vector<const IParticle*> hardObjs_tmp;
308 for(
const auto *
const obj : *hardObjs) {
309 hardObjs_tmp.push_back(
obj);
313 for(
const auto&
obj : hardObjs_tmp) {
320 ATH_MSG_ERROR(
"Attempting to build FlowElement MET without a track collection.");
321 return StatusCode::FAILURE;
323 std::map<const IParticle*, MissingETBase::Types::constvec_t> momentumOverride;
330 ATH_MSG_DEBUG(
"Attempting to build PFlow without a track collection.");
331 return StatusCode::FAILURE;
333 std::map<const IParticle*,MissingETBase::Types::constvec_t> momentumOverride;
339 std::vector<const IParticle*> tclist;
343 for(
const auto&
cl : tclist) {
345 constlist.push_back((*constits.tcCont)[
cl->index()]);
354 return StatusCode::SUCCESS;
◆ finalize()
StatusCode met::METEgammaAssociator::finalize |
( |
| ) |
|
|
inherited |
◆ 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
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ greaterPt()
|
inlinestaticprotectedinherited |
◆ greaterPtFE()
|
inlinestaticprotectedinherited |
◆ greaterPtPFO()
|
inlinestaticprotectedinherited |
◆ hasUnmatchedClusters()
Definition at line 568 of file METEgammaAssociator.cxx.
570 bool has_unmatched=
false;
572 float unmatchedSumpt=0;
574 float unmatchedTotEMFrac=0;
585 TLorentzVector totVec(0.,0.,0.,0.), unmatchedVec(0.,0.,0.,0.);
587 std::set<const xAOD::CaloCluster*> cPFOClusters;
590 for (
int cl = 0;
cl < nCluscPFO; ++
cl) {
594 std::vector<const xAOD::CaloCluster*> unmatchedClusters;
596 TLorentzVector tmpVec;
597 tmpVec.SetPtEtaPhiE(pfoclus->pt(),pfoclus->eta(),pfoclus->phi(),pfoclus->e());
598 totSumpt+=pfoclus->pt();
600 bool inEgamma =
false;
602 if (pfoclus == phclus) {
607 unmatchedClusters.push_back(pfoclus);
608 unmatchedSumpt+=pfoclus->pt();
609 unmatchedE+=pfoclus->e();
610 unmatchedVec+=tmpVec;
612 unmatchedTotEMFrac=unmatchedTotEMFrac+emfrac*pfoclus->e();
617 ATH_MSG_DEBUG(
"PFO associated to "<<nCluscPFO<<
" cluster, of which " << unmatchedClusters.size() <<
"unmatched one and unmatched pt "<<unmatchedSumpt);
618 dec_unmatchedFrac(*pfo)=nCluscPFO>0 ?
float(unmatchedClusters.size())/
float(nCluscPFO) : -1;
619 dec_unmatchedFracPt(*pfo)= totVec.Pt()>0 ?
float(unmatchedVec.Pt()/totVec.Pt()): -1;
620 dec_unmatchedFracSumpt(*pfo)= totSumpt>0 ?
float(unmatchedSumpt/totSumpt): -1;
621 dec_unmatchedFracE(*pfo)= totVec.E()>0 ?
float(unmatchedE/totVec.E()): -1;
622 dec_unmatchedTotEMFrac(*pfo)= totVec.E()>0 ?
float(unmatchedTotEMFrac/totVec.E()): -1;
623 dec_unmatchedFracEClusterPFO(*pfo)= pfo->
e()>0 ?
float(unmatchedE/pfo->
e()): -1;
624 dec_unmatchedFracPtClusterPFO(*pfo)= pfo->
pt()>0 ?
float(unmatchedE/pfo->
pt()): -1;
626 return has_unmatched;
◆ initialize()
StatusCode met::METPhotonAssociator::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 met::METEgammaAssociator.
Definition at line 37 of file METPhotonAssociator.cxx.
57 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.
◆ isGoodEoverP()
Definition at line 367 of file METAssociator.cxx.
381 std::vector<Iso::IsolationType> trkIsoCones;
393 std::vector<Iso::IsolationType> caloIsoCones;
403 caloIsoCorr_coreCone);
404 if(!caloIsoResult.
etcones.empty()) {
408 ATH_MSG_WARNING(
"isGoodEoverP: Failed to retrieve the isolation core correction (etcone10)! Setting etcone10=0");
418 if(Rerr>0.4)
return false;
419 else if (
EoverP<0.65 && ((
EoverP>0.1 && Rerr>0.05) || Rerr>0.1))
return false;
423 if(
etcone10/trkptsum<0.6 && trk->
pt()/trkptsum>0.6)
return false;
◆ 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, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ renounce()
◆ renounceArray()
◆ retrieveConstituents()
Definition at line 161 of file METAssociator.cxx.
167 if (!topoclusterCont.isValid()) {
169 return StatusCode::FAILURE;
171 constits.
tcCont=topoclusterCont.cptr();
172 ATH_MSG_DEBUG(
"Successfully retrieved topocluster collection");
174 std::string hybridname =
"Etmiss";
180 if( hybridCont.isValid()) {
181 constits.
tcCont=hybridCont.cptr();
183 ATH_MSG_WARNING(
"Trying to do something currently unsupported- lets abort");
184 return StatusCode::FAILURE;
235 if (!vxCont.isValid()) {
238 return StatusCode::FAILURE;
241 ATH_MSG_DEBUG(
"Successfully retrieved primary vertex container");
242 ATH_MSG_DEBUG(
"Container holds " << vxCont->size() <<
" vertices");
244 for(
const auto *
const vx : *vxCont) {
247 {constits.
pv = vx;
break;}
250 ATH_MSG_DEBUG(
"Failed to find primary vertex! Reject all tracks.");
258 if (!trCont.isValid()) {
260 return StatusCode::FAILURE;
262 constits.
trkCont=trCont.cptr();
267 constits.
feCont =
nullptr;
269 if (!feCont.isValid()) {
271 return StatusCode::FAILURE;
273 constits.
feCont=feCont.cptr();
279 if (!pfCont.isValid()) {
281 return StatusCode::FAILURE;
283 constits.
pfoCont=pfCont.cptr();
288 return StatusCode::SUCCESS;
◆ selectEgammaClusters()
Definition at line 471 of file METEgammaAssociator.cxx.
475 double eg_cl_e = swclus->
e();
480 for(
const auto&
cl : inputTC) {
481 double tcl_e =
cl->e();
485 ATH_MSG_VERBOSE(
"Reject topocluster in sum. Ratio vs eg cluster: " << (tcl_e/eg_cl_e));
486 if( !bestbadmatch || (fabs(tcl_e/eg_cl_e-1.) < fabs(bestbadmatch->
e()/eg_cl_e-1.)) ) bestbadmatch =
cl;
490 ATH_MSG_VERBOSE(
"E match with new cluster: " << fabs(sumE_tc+tcl_e - eg_cl_e) / eg_cl_e);
491 if( (doSum = (fabs(sumE_tc+tcl_e - eg_cl_e) < fabs(sumE_tc - eg_cl_e))) ) {
492 ATH_MSG_VERBOSE(
"Accept topocluster with pt " <<
cl->pt() <<
", e " <<
cl->e() <<
" in sum.");
494 ATH_MSG_VERBOSE(
"E match with new cluster: " << fabs(sumE_tc+tcl_e - eg_cl_e) / eg_cl_e);
495 tclist.push_back(
cl);
499 if(sumE_tc<FLT_MIN && bestbadmatch) {
500 ATH_MSG_VERBOSE(
"No better matches found -- add bad match topocluster with pt "
501 << bestbadmatch->
pt() <<
", e " << bestbadmatch->
e() <<
".");
502 tclist.push_back(bestbadmatch);
504 return StatusCode::SUCCESS;
◆ selectEgammaTracks()
Definition at line 507 of file METEgammaAssociator.cxx.
514 for(
const auto&
track : egtracks) {
516 tracklist.insert(
track);
523 for(
const auto&
track : egtracks) {
525 tracklist.insert(
track);
530 for(
const auto *
const track : *trkCont) {
533 uint8_t expect_innermostHit(
false);
535 uint8_t expect_nextToInnermostHit(
false);
536 uint8_t N_nextToInnermostHit(
false);
539 ATH_MSG_WARNING(
"Track summary retrieval failed for 'expect(NextTo)InnermostPixelLayerHit'");
540 return StatusCode::FAILURE;
542 if(expect_innermostHit) {
544 ATH_MSG_WARNING(
"Track summary retrieval failed for 'numberOfInnermostPixelLayerHits'");
545 return StatusCode::FAILURE;
546 if(N_innermostHit==0 ) {
548 tracklist.insert(
track);
551 }
else if(expect_nextToInnermostHit) {
553 ATH_MSG_WARNING(
"Track summary retrieval failed for 'numberOfNextToInnermostPixelLayerHits'");
554 return StatusCode::FAILURE;
555 if(N_nextToInnermostHit==0 ) {
557 tracklist.insert(
track);
564 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.
◆ updateVHKA()
◆ m_caloIsolationTool
◆ m_cenTrackPtThr
double met::METAssociator::m_cenTrackPtThr |
|
protectedinherited |
◆ m_chargedFELinksKey
std::string met::METAssociator::m_chargedFELinksKey |
|
protectedinherited |
◆ m_chargedPFOLinksKey
std::string met::METAssociator::m_chargedPFOLinksKey |
|
protectedinherited |
◆ m_checkUnmatched
bool met::METEgammaAssociator::m_checkUnmatched |
|
protectedinherited |
◆ m_clcollKey
◆ m_cleanChargedPFO
bool met::METAssociator::m_cleanChargedPFO |
|
protectedinherited |
◆ m_detStore
◆ m_electronChargedFEReadDecorKey
◆ m_electronChargedPFOReadDecorKey
◆ m_electronNeutralFEReadDecorKey
◆ m_electronNeutralPFOReadDecorKey
◆ m_evtStore
◆ m_extraTrkMatch_dR
double met::METEgammaAssociator::m_extraTrkMatch_dR |
|
protectedinherited |
◆ m_fecollKey
◆ m_forcoll
std::string met::METAssociator::m_forcoll |
|
protectedinherited |
◆ m_foreta
double met::METAssociator::m_foreta |
|
protectedinherited |
◆ m_forTrackPtThr
double met::METAssociator::m_forTrackPtThr |
|
protectedinherited |
◆ m_hybridContKey
◆ m_neutralFELinksKey
std::string met::METAssociator::m_neutralFELinksKey |
|
protectedinherited |
◆ m_neutralPFOLinksKey
std::string met::METAssociator::m_neutralPFOLinksKey |
|
protectedinherited |
◆ m_pfcollKey
◆ m_pflow
bool met::METAssociator::m_pflow |
|
protectedinherited |
◆ m_phContKey
◆ m_photonChargedFEReadDecorKey
◆ m_photonChargedPFOReadDecorKey
◆ m_photonNeutralFEReadDecorKey
◆ m_photonNeutralPFOReadDecorKey
◆ m_pvcollKey
◆ m_skipconst
bool met::METAssociator::m_skipconst |
|
protectedinherited |
◆ m_tcMatch_dR
double met::METEgammaAssociator::m_tcMatch_dR |
|
protectedinherited |
◆ m_tcMatch_maxRat
double met::METEgammaAssociator::m_tcMatch_maxRat |
|
protectedinherited |
◆ m_tcMatch_method
unsigned short met::METEgammaAssociator::m_tcMatch_method |
|
protectedinherited |
◆ m_trkcollKey
◆ m_trkIsolationTool
◆ m_trkseltool
◆ m_useFELinks
bool met::METAssociator::m_useFELinks |
|
protectedinherited |
◆ m_useIsolationTools
bool met::METAssociator::m_useIsolationTools = false |
|
protectedinherited |
◆ m_useModifiedClus
bool met::METAssociator::m_useModifiedClus |
|
protectedinherited |
◆ m_usePFOLinks
bool met::METAssociator::m_usePFOLinks |
|
protectedinherited |
◆ m_useRapidity
bool met::METAssociator::m_useRapidity |
|
protectedinherited |
◆ m_useTracks
bool met::METAssociator::m_useTracks |
|
protectedinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_weight_charged_pfo
bool met::METAssociator::m_weight_charged_pfo = false |
|
protectedinherited |
The documentation for this class was generated from the following files:
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Electron_v1 Electron
Definition of the current "egamma version".
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
virtual double pt() const
The transverse momentum ( ) of the particle.
@ coreEnergy
energy stored for this correction
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ coreTrackPtr
tracks pointer
unsigned short m_tcMatch_method
Iso::IsolationTrackCorrectionBitset trackbitset
@ ptcone20
Track isolation.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
StatusCode initialize()
Dummy implementation of the initialisation function.
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Helper class to provide constant type-safe access to aux data.
virtual double pt() const override
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool isInDeltaR(const I4Momentum &p1, const I4Momentum &p2, double dR)
Check if 2 I4Momentum are in a cone.
Class providing the definition of the 4-vector interface.
virtual void setOwner(IDataHandleHolder *o)=0
METEgammaAssociator()
Default constructor:
SG::ReadHandleKey< xAOD::PhotonContainer > m_phContKey
StatusCode extractFEs(const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const
virtual double e() const
The total energy of the particle.
StatusCode selectEgammaTracks(const xAOD::Egamma *el, const xAOD::TrackParticleContainer *trkCont, std::set< const xAOD::TrackParticle * > &tracklist) const
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Description of a calorimeter cluster.
StatusCode extractFEsFromLinks(const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &felist, const met::METAssociator::ConstitHolder &constits) const
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
unsigned int nCaloCluster() const
Find out how many CaloCluster are linked.
Handle class for reading a decoration on an object.
Helper class to provide type-safe access to aux data.
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonNeutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonNeutralPFOReadDecorKey
StatusCode extractPFOsFromLinks(const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits) const
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
@ etcone20
Calorimeter isolation.
std::map< Iso::IsolationCaloCorrection, std::map< Iso::IsolationCorrectionParameter, float > > coreCorrections
signal_t signalType() const
Principal data class for CaloCell clusters.
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)
float z() const
Returns the z position.
size_t index() const
Return the index of this element within its container.
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralFEReadDecorKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralPFOReadDecorKey
virtual void renounce()=0
virtual double pt() const =0
The transverse momentum ( ) of the particle.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const xAOD::IParticle * chargedObject(std::size_t i) const
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
float qOverP() const
Returns the parameter.
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedFEReadDecorKey
virtual double eEM() const
get EM scale energy
Class describing a particle flow object.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
virtual double e() const override
The total energy of the particle.
std::vector< float > etcones
@ coreCone
core energy (in dR<0.1).
StatusCode extractPFOs(const xAOD::Egamma *eg, std::vector< const xAOD::IParticle * > &pfolist, const met::METAssociator::ConstitHolder &constits) const
Photon_v1 Photon
Definition of the current "egamma version".
std::vector< float > ptcones
struct TBPatternUnitContext Muon
bool hasUnmatchedClusters(const xAOD::Egamma *eg, const xAOD::PFO *pfo) const
double m_extraTrkMatch_dR
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const CaloCluster * cluster(unsigned int index) const
Retrieve a const pointer to a CaloCluster.
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonChargedFEReadDecorKey
Class describing a TrackParticle.
StatusCode selectEgammaClusters(const xAOD::CaloCluster *swclus, const std::vector< const xAOD::IParticle * > &inputTC, std::vector< const xAOD::IParticle * > &tclist) const
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_electronChargedPFOReadDecorKey
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual double e() const
The total energy of the particle.
Iso::IsolationCaloCorrectionBitset calobitset
virtual double e() const =0
The total energy of the particle.
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photonChargedPFOReadDecorKey
A detector object made of other lower level object(s)