ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonCombinedInDetCandidateAlg Class Reference

#include <MuonCombinedInDetCandidateAlg.h>

Inheritance diagram for MuonCombinedInDetCandidateAlg:
Collaboration diagram for MuonCombinedInDetCandidateAlg:

Classes

struct  InDetCandidateCache
 

Public Member Functions

 MuonCombinedInDetCandidateAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~MuonCombinedInDetCandidateAlg ()=default
 
StatusCode initialize () override
 
StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 

Protected Member Functions

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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode create (const EventContext &ctx, InDetCandidateCache &output_cache) const
 
bool isValidTrackParticle (const Trk::ITrackSelectorTool *currentTrackSelector, const xAOD::TrackParticle *const tp) const
 
void printTrackParticleInfo (const xAOD::TrackParticle *const tp, const std::string &what) const
 
int getCount (const xAOD::TrackParticle &tp, xAOD::SummaryType type) 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...
 

Private Attributes

SG::ReadHandleKeyArray< xAOD::TrackParticleContainerm_indetTrackParticleLocation
 
SG::ReadHandleKeyArray< CaloExtensionCollectionm_caloExtensionLocation
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_indetForwardTrackParticleLocation
 
SG::ReadHandleKey< CaloExtensionCollectionm_caloFwdExtensionLocation {this, "CaloFwdExtensionLocation", ""}
 
SG::WriteHandleKey< InDetCandidateCollectionm_candidateCollectionName {this, "InDetCandidateLocation", "InDetCandidates"}
 
ToolHandle< Trk::ITrackSelectorToolm_trackSelector
 
ToolHandle< Trk::ITrackSelectorToolm_forwardTrackSelector
 
ToolHandle< Muon::IMuonSystemExtensionToolm_muonSystemExtensionTool {this, "MuonSystemExtensionTool", "", "Muon system extension tool"}
 
Gaudi::Property< bool > m_doSiliconForwardMuons {this, "DoSiliconAssocForwardMuons", false}
 
Gaudi::Property< float > m_extThreshold {this, "ExtensionPtThreshold", 2500}
 Minimum pt threshold of the IdCandidate to be extrapolated through the spectrometer. More...
 
Gaudi::Property< bool > m_extendSAF {this, "ExtendSAF", false}
 Shall SAF tracks be equiped with a muon system extension used by MuGirl later. More...
 
Gaudi::Property< bool > m_extendBulk {this, "ExtendBulk", true}
 Shall ordinary ID tracks be equiped with a muon system extension used by MuGirl later. More...
 
Gaudi::Property< bool > m_requireExtension {this, "RequireExtension", true}
 Reject muon candidates without a muon system extension – only effective if the candidate shall actually be extended. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 21 of file MuonCombinedInDetCandidateAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCombinedInDetCandidateAlg()

MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 14 of file MuonCombinedInDetCandidateAlg.cxx.

14  :
15  AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MuonCombinedInDetCandidateAlg()

MuonCombinedInDetCandidateAlg::~MuonCombinedInDetCandidateAlg ( )
default

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ create()

StatusCode MuonCombinedInDetCandidateAlg::create ( const EventContext &  ctx,
InDetCandidateCache output_cache 
) const
private

MuGirl only operates on ID tracks with pt at least this high

Definition at line 84 of file MuonCombinedInDetCandidateAlg.cxx.

84  {
85  ATH_MSG_DEBUG("Producing InDetCandidates for " << output_cache.inDetContainer->size());
86  for (const xAOD::TrackParticle* tp : *output_cache.inDetContainer) {
87  if (!isValidTrackParticle(output_cache.trackSelector, tp)) continue;
88 
89  ElementLink<xAOD::TrackParticleContainer> link(*output_cache.inDetContainer, tp->index());
90  if (!link.isValid()) {
91  ATH_MSG_WARNING("Bad element link ");
92  continue;
93  } else if (*link != tp) {
94  ATH_MSG_WARNING("Dereferenced Link not equal to TrackParticle, skipping track ");
95  continue;
96  }
97  link.toPersistent();
98  printTrackParticleInfo(tp, "Creating");
99 
100  if (msgLvl(MSG::VERBOSE)) {
102  if (truth_part) {
103  static const SG::ConstAccessor<int> truthTypeAcc("truthType");
104  static const SG::ConstAccessor<int> truthOriginAcc("truthOrigin");
105  ATH_MSG_VERBOSE(" Truth particle: pdgId " << truth_part->pdgId() << " type " << truthTypeAcc(*tp) << " origin "
106  << truthOriginAcc(*tp) << " pt " << truth_part->pt() << " eta "
107  << truth_part->eta() << " phi " << truth_part->phi());
108  }
109  }
111  cache.extensionContainer = output_cache.extensionContainer;
112  cache.candidate = std::make_unique<InDetCandidate>(link);
113  cache.candidate->setSiliconAssociated(output_cache.flagAsSAF); // Si-associated candidates don't need these
114  cache.useHitSectors = false;
116  cache.createSystemExtension = (tp->pt() >= m_extThreshold) && ((m_extendSAF && cache.candidate->isSiliconAssociated()) ||
117  (m_extendBulk && !cache.candidate->isSiliconAssociated()));
119  if (!m_muonSystemExtensionTool->muonSystemExtension(ctx, cache)) continue;
120  output_cache.outputContainer->push_back(std::move(cache.candidate));
121  }
122  ATH_MSG_DEBUG("InDetCandidates selected " << output_cache.outputContainer->size());
123  return StatusCode::SUCCESS;
124 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode MuonCombinedInDetCandidateAlg::execute ( const EventContext &  ctx) const
override

Definition at line 34 of file MuonCombinedInDetCandidateAlg.cxx.

34  {
35  InDetCandidateCache output_cache{};
36  unsigned int counter{0};
38  if (!readHandle.isValid()) {
39  ATH_MSG_FATAL("Failed to retrieve " << readHandle.key());
40  return StatusCode::FAILURE;
41  }
42  output_cache.inDetContainer = readHandle.cptr();
43  output_cache.trackSelector = !m_trackSelector.empty() ? m_trackSelector.get() : nullptr;
44  if (counter < m_caloExtensionLocation.size()) {
46  if (!caloExtension.isValid()) {
47  ATH_MSG_FATAL("Failed to retrieve " << m_caloExtensionLocation[counter].fullKey());
48  return StatusCode::FAILURE;
49  }
50  output_cache.extensionContainer = caloExtension.cptr();
51  } else
52  output_cache.extensionContainer = nullptr;
53  ++counter;
54  ATH_CHECK(create(ctx, output_cache));
55  }
58  if (!readHandle.isValid()) {
59  ATH_MSG_FATAL("Failed to retrieve " << readHandle.key());
60  return StatusCode::FAILURE;
61  }
62  if (!m_caloFwdExtensionLocation.empty()) {
64  if (!caloExtension.isValid()) {
65  ATH_MSG_FATAL("Failed to retrieve " << m_caloFwdExtensionLocation.fullKey());
66  return StatusCode::FAILURE;
67  }
68  output_cache.extensionContainer = caloExtension.cptr();
69  } else
70  output_cache.extensionContainer = nullptr;
71 
72  output_cache.inDetContainer = readHandle.cptr();
73  output_cache.trackSelector = !m_forwardTrackSelector.empty() ? m_forwardTrackSelector.get() : nullptr;
74  output_cache.flagAsSAF = true;
75  ATH_CHECK(create(ctx, output_cache));
76  }
77 
79  ATH_CHECK(indetCandidateCollection.record(std::move(output_cache.outputContainer)));
80 
81  return StatusCode::SUCCESS;
82 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ getCount()

int MuonCombinedInDetCandidateAlg::getCount ( const xAOD::TrackParticle tp,
xAOD::SummaryType  type 
) const
private

Definition at line 149 of file MuonCombinedInDetCandidateAlg.cxx.

149  {
150  uint8_t val{0};
151  if (!tp.summaryValue(val, type)) return 0;
152  return static_cast<int>(val);
153 }

◆ initialize()

StatusCode MuonCombinedInDetCandidateAlg::initialize ( )
override

Definition at line 17 of file MuonCombinedInDetCandidateAlg.cxx.

17  {
18  ATH_CHECK(m_trackSelector.retrieve(DisableTool{m_trackSelector.empty()}));
21  ATH_CHECK(m_caloExtensionLocation.initialize());
25  ATH_CHECK(m_forwardTrackSelector.retrieve(DisableTool{!m_doSiliconForwardMuons}));
26  ATH_MSG_INFO("Successfully initialized using the following configuration -- SAF: "
27  << (m_doSiliconForwardMuons ? "si" : "no") << ", "
28  << "MS extension bulk: " << (m_extendBulk ? "si" : "no")
29  << ", MS extension SAF: " << (m_doSiliconForwardMuons && m_extendSAF ? "si" : "no")
30  << ", Require MS estension: " << (m_requireExtension ? "si" : "no") << " min pT for extension " << m_extThreshold);
31  return StatusCode::SUCCESS;
32 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isValidTrackParticle()

bool MuonCombinedInDetCandidateAlg::isValidTrackParticle ( const Trk::ITrackSelectorTool currentTrackSelector,
const xAOD::TrackParticle *const  tp 
) const
private

Definition at line 126 of file MuonCombinedInDetCandidateAlg.cxx.

127  {
128  if (!tp->perigeeParameters().covariance()) {
129  ATH_MSG_WARNING("InDet TrackParticle without perigee! ");
130  return false;
131  }
132  if (!tp->track()) {
133  ATH_MSG_WARNING("The track particle has not an associated track");
134  return false;
135  }
136  if (currentTrackSelector && !currentTrackSelector->decision(*tp)) {
137  if (msgLvl(MSG::VERBOSE) && tp->pt() > 5000.) printTrackParticleInfo(tp, "Discarding");
138  return false;
139  }
140  return true;
141 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ printTrackParticleInfo()

void MuonCombinedInDetCandidateAlg::printTrackParticleInfo ( const xAOD::TrackParticle *const  tp,
const std::string &  what 
) const
private

Definition at line 143 of file MuonCombinedInDetCandidateAlg.cxx.

143  {
144  ATH_MSG_DEBUG(what << " InDet TrackParticle: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() << " Pixel "
147 }

◆ renounce()

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> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_caloExtensionLocation

SG::ReadHandleKeyArray<CaloExtensionCollection> MuonCombinedInDetCandidateAlg::m_caloExtensionLocation
private
Initial value:
{
this,
"CaloExtensionLocation",
{},
}

Definition at line 32 of file MuonCombinedInDetCandidateAlg.h.

◆ m_caloFwdExtensionLocation

SG::ReadHandleKey<CaloExtensionCollection> MuonCombinedInDetCandidateAlg::m_caloFwdExtensionLocation {this, "CaloFwdExtensionLocation", ""}
private

Definition at line 40 of file MuonCombinedInDetCandidateAlg.h.

◆ m_candidateCollectionName

SG::WriteHandleKey<InDetCandidateCollection> MuonCombinedInDetCandidateAlg::m_candidateCollectionName {this, "InDetCandidateLocation", "InDetCandidates"}
private

Definition at line 42 of file MuonCombinedInDetCandidateAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doSiliconForwardMuons

Gaudi::Property<bool> MuonCombinedInDetCandidateAlg::m_doSiliconForwardMuons {this, "DoSiliconAssocForwardMuons", false}
private

Definition at line 71 of file MuonCombinedInDetCandidateAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendBulk

Gaudi::Property<bool> MuonCombinedInDetCandidateAlg::m_extendBulk {this, "ExtendBulk", true}
private

Shall ordinary ID tracks be equiped with a muon system extension used by MuGirl later.

Definition at line 77 of file MuonCombinedInDetCandidateAlg.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_extendSAF

Gaudi::Property<bool> MuonCombinedInDetCandidateAlg::m_extendSAF {this, "ExtendSAF", false}
private

Shall SAF tracks be equiped with a muon system extension used by MuGirl later.

Definition at line 75 of file MuonCombinedInDetCandidateAlg.h.

◆ m_extThreshold

Gaudi::Property<float> MuonCombinedInDetCandidateAlg::m_extThreshold {this, "ExtensionPtThreshold", 2500}
private

Minimum pt threshold of the IdCandidate to be extrapolated through the spectrometer.

Definition at line 73 of file MuonCombinedInDetCandidateAlg.h.

◆ m_forwardTrackSelector

ToolHandle<Trk::ITrackSelectorTool> MuonCombinedInDetCandidateAlg::m_forwardTrackSelector
private
Initial value:
{
this, "InDetForwardTrackSelector", "InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedForwardTrackSelectorTool",
"Forward track selector tool"}

Definition at line 46 of file MuonCombinedInDetCandidateAlg.h.

◆ m_indetForwardTrackParticleLocation

SG::ReadHandleKey<xAOD::TrackParticleContainer> MuonCombinedInDetCandidateAlg::m_indetForwardTrackParticleLocation
private
Initial value:
{this, "ForwardParticleLocation",
"InDetForwardTrackParticles"}

Definition at line 37 of file MuonCombinedInDetCandidateAlg.h.

◆ m_indetTrackParticleLocation

SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> MuonCombinedInDetCandidateAlg::m_indetTrackParticleLocation
private
Initial value:
{
this, "TrackParticleLocation", {"InDetTrackParticles"}}

Definition at line 30 of file MuonCombinedInDetCandidateAlg.h.

◆ m_muonSystemExtensionTool

ToolHandle<Muon::IMuonSystemExtensionTool> MuonCombinedInDetCandidateAlg::m_muonSystemExtensionTool {this, "MuonSystemExtensionTool", "", "Muon system extension tool"}
private

Definition at line 49 of file MuonCombinedInDetCandidateAlg.h.

◆ m_requireExtension

Gaudi::Property<bool> MuonCombinedInDetCandidateAlg::m_requireExtension {this, "RequireExtension", true}
private

Reject muon candidates without a muon system extension – only effective if the candidate shall actually be extended.

Definition at line 79 of file MuonCombinedInDetCandidateAlg.h.

◆ m_trackSelector

ToolHandle<Trk::ITrackSelectorTool> MuonCombinedInDetCandidateAlg::m_trackSelector
private
Initial value:
{
this, "TrackSelector", "InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool", "Track selector tool"}

Definition at line 44 of file MuonCombinedInDetCandidateAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
MuonCombinedInDetCandidateAlg::isValidTrackParticle
bool isValidTrackParticle(const Trk::ITrackSelectorTool *currentTrackSelector, const xAOD::TrackParticle *const tp) const
Definition: MuonCombinedInDetCandidateAlg.cxx:126
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonCombinedInDetCandidateAlg::m_caloFwdExtensionLocation
SG::ReadHandleKey< CaloExtensionCollection > m_caloFwdExtensionLocation
Definition: MuonCombinedInDetCandidateAlg.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
MuonCombinedInDetCandidateAlg::create
StatusCode create(const EventContext &ctx, InDetCandidateCache &output_cache) const
Definition: MuonCombinedInDetCandidateAlg.cxx:84
MuonCombinedInDetCandidateAlg::m_trackSelector
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Definition: MuonCombinedInDetCandidateAlg.h:44
MuonCombinedInDetCandidateAlg::m_requireExtension
Gaudi::Property< bool > m_requireExtension
Reject muon candidates without a muon system extension – only effective if the candidate shall actual...
Definition: MuonCombinedInDetCandidateAlg.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Muon::IMuonSystemExtensionTool::SystemExtensionCache::candidate
std::unique_ptr< MuonCombined::InDetCandidate > candidate
Inner detector candidate.
Definition: IMuonSystemExtensionTool.h:44
AthCommonDataStore::renounce
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)
Definition: AthCommonDataStore.h:380
Muon::IMuonSystemExtensionTool::SystemExtensionCache::requireSystemExtension
bool requireSystemExtension
Require that the muon system extension was successful.
Definition: IMuonSystemExtensionTool.h:56
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
SG::ConstAccessor< int >
Muon::IMuonSystemExtensionTool::SystemExtensionCache::extensionContainer
const CaloExtensionCollection * extensionContainer
Cache of the CaloExtensions.
Definition: IMuonSystemExtensionTool.h:49
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonCombinedInDetCandidateAlg::m_doSiliconForwardMuons
Gaudi::Property< bool > m_doSiliconForwardMuons
Definition: MuonCombinedInDetCandidateAlg.h:71
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
MuonCombinedInDetCandidateAlg::m_indetTrackParticleLocation
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_indetTrackParticleLocation
Definition: MuonCombinedInDetCandidateAlg.h:30
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::IMuonSystemExtensionTool::SystemExtensionCache::createSystemExtension
bool createSystemExtension
Try to create the muon system extension.
Definition: IMuonSystemExtensionTool.h:54
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
Trk::ITrackSelectorTool::decision
virtual bool decision(const Trk::Track &track, const Vertex *vertex=0) const =0
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCombinedInDetCandidateAlg::m_extThreshold
Gaudi::Property< float > m_extThreshold
Minimum pt threshold of the IdCandidate to be extrapolated through the spectrometer.
Definition: MuonCombinedInDetCandidateAlg.h:73
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonCombinedInDetCandidateAlg::m_extendSAF
Gaudi::Property< bool > m_extendSAF
Shall SAF tracks be equiped with a muon system extension used by MuGirl later.
Definition: MuonCombinedInDetCandidateAlg.h:75
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonCombinedInDetCandidateAlg::getCount
int getCount(const xAOD::TrackParticle &tp, xAOD::SummaryType type) const
Definition: MuonCombinedInDetCandidateAlg.cxx:149
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
python.ExitCodes.what
def what(code)
Definition: ExitCodes.py:73
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MuonCombinedInDetCandidateAlg::m_muonSystemExtensionTool
ToolHandle< Muon::IMuonSystemExtensionTool > m_muonSystemExtensionTool
Definition: MuonCombinedInDetCandidateAlg.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
MuonCombinedInDetCandidateAlg::m_caloExtensionLocation
SG::ReadHandleKeyArray< CaloExtensionCollection > m_caloExtensionLocation
Definition: MuonCombinedInDetCandidateAlg.h:32
Muon::IMuonSystemExtensionTool::SystemExtensionCache
Helper struct to pipe all data needed by the tool to equip the Id track with a MuonSystemExtension.
Definition: IMuonSystemExtensionTool.h:41
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MuonCombinedInDetCandidateAlg::printTrackParticleInfo
void printTrackParticleInfo(const xAOD::TrackParticle *const tp, const std::string &what) const
Definition: MuonCombinedInDetCandidateAlg.cxx:143
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
MuonCombinedInDetCandidateAlg::m_candidateCollectionName
SG::WriteHandleKey< InDetCandidateCollection > m_candidateCollectionName
Definition: MuonCombinedInDetCandidateAlg.h:42
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Muon::IMuonSystemExtensionTool::SystemExtensionCache::useHitSectors
bool useHitSectors
Switch to restrict the intersection search only to the sectors with hits.
Definition: IMuonSystemExtensionTool.h:52
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
MuonCombinedInDetCandidateAlg::m_forwardTrackSelector
ToolHandle< Trk::ITrackSelectorTool > m_forwardTrackSelector
Definition: MuonCombinedInDetCandidateAlg.h:46
MuonCombinedInDetCandidateAlg::m_extendBulk
Gaudi::Property< bool > m_extendBulk
Shall ordinary ID tracks be equiped with a muon system extension used by MuGirl later.
Definition: MuonCombinedInDetCandidateAlg.h:77
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
test_pyathena.counter
counter
Definition: test_pyathena.py:15
MuonCombinedInDetCandidateAlg::m_indetForwardTrackParticleLocation
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_indetForwardTrackParticleLocation
Definition: MuonCombinedInDetCandidateAlg.h:37
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
ServiceHandle< ICondSvc >