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

#include <TrigMuonEFIdtpHypoTool.h>

Inheritance diagram for TrigMuonEFIdtpHypoTool:
Collaboration diagram for TrigMuonEFIdtpHypoTool:

Classes

struct  MuonEFIdperfInfo
 

Public Member Functions

 TrigMuonEFIdtpHypoTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~TrigMuonEFIdtpHypoTool ()=default
 
virtual StatusCode initialize () override
 
StatusCode decide (std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &toolInput) 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 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
 

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

enum  { MaxNumberTools = 20 }
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool passedQualityCuts (const xAOD::Muon *muon) const
 
bool decideOnSingleObject (TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo &input, size_t cutIndex) const
 
StatusCode inclusiveSelection (std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &toolInput) const
 
StatusCode multiplicitySelection (std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &toolInput) 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

HLT::Identifier m_decisionId
 
Gaudi::Property< bool > m_muonqualityCut
 
Gaudi::Property< std::vector< std::vector< double > > > m_ptBins
 
Gaudi::Property< std::vector< std::vector< double > > > m_ptThresholds
 
Gaudi::Property< bool > m_acceptAll
 
std::vector< size_t > m_bins ={0}
 
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Monitoring tool" }
 
ToolHandle< CP::IMuonSelectionToolm_muonSelTool {this, "MuonSelectionTool", "CP::MuonSelectionTool/MuonSelectionTool", "Tool for muon quality selection"}
 
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 19 of file TrigMuonEFIdtpHypoTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MaxNumberTools 

Definition at line 20 of file TrigMuonEFIdtpHypoTool.h.

20 { MaxNumberTools = 20 };

Constructor & Destructor Documentation

◆ TrigMuonEFIdtpHypoTool()

TrigMuonEFIdtpHypoTool::TrigMuonEFIdtpHypoTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 16 of file TrigMuonEFIdtpHypoTool.cxx.

◆ ~TrigMuonEFIdtpHypoTool()

TrigMuonEFIdtpHypoTool::~TrigMuonEFIdtpHypoTool ( )
default

Member Function Documentation

◆ decide()

StatusCode TrigMuonEFIdtpHypoTool::decide ( std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &  toolInput) const

Definition at line 150 of file TrigMuonEFIdtpHypoTool.cxx.

151 {
152  size_t numTrigger = m_ptBins.size();
153  size_t numMuon=toolInput.size();
154  if(numTrigger==1){
155  ATH_MSG_DEBUG("Applying selection of single << " << m_decisionId);
156  return inclusiveSelection(toolInput);
157  }
158  else{
159  ATH_MSG_DEBUG("Applying selection of multiplicity "<< m_decisionId<<" with nMuons"<<numMuon);
160  return multiplicitySelection(toolInput);
161  }
162  return StatusCode::SUCCESS;
163 }

◆ decideOnSingleObject()

bool TrigMuonEFIdtpHypoTool::decideOnSingleObject ( TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo input,
size_t  cutIndex 
) const
private

Definition at line 66 of file TrigMuonEFIdtpHypoTool.cxx.

67 {
68  // for pass through mode
69  if(m_acceptAll) {
70  ATH_MSG_DEBUG("Accept property is set: taking all the events");
71  return true;
72  }
73 
74  const xAOD::Muon* muon = input.muon;
75  if( !muon ){
76  ATH_MSG_ERROR("Retrieval of xAOD::MuonContainer failed");
77  return false;
78  }
79  if(! muon->primaryTrackParticle()) return false;
80 
81  const xAOD::TrackParticle* tr = muon->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
82  if ( !tr ) {
83  ATH_MSG_DEBUG("No TrackParticle found.");
84  return false;
85  }
86 
87  // monitored Variables
88  std::vector<float> fexPt, fexEta, fexPhi, selPt, selEta, selPhi;
89  auto muonPtMon = Monitored::Collection("SA_pt", fexPt);
90  auto muonEtaMon = Monitored::Collection("SA_eta", fexEta);
91  auto muonPhiMon = Monitored::Collection("SA_phi", fexPhi);
92  auto muonPtSelMon = Monitored::Collection("SA_pt_sel", selPt);
93  auto muonEtaSelMon = Monitored::Collection("SA_eta_sel", selEta);
94  auto muonPhiSelMon = Monitored::Collection("SA_phi_sel", selPhi);
95  auto monitorIt = Monitored::Group(m_monTool, muonPtMon, muonEtaMon, muonPhiMon, muonPtSelMon, muonEtaSelMon, muonPhiSelMon);
96 
97  //
98  bool result = false;
99 
100  ATH_MSG_VERBOSE("Retrieved track with abs pt "<< (*tr).pt()/Gaudi::Units::GeV << " GeV ");
101  fexPt.push_back(tr->pt()/Gaudi::Units::GeV);
102  fexEta.push_back(tr->eta());
103  fexPhi.push_back(tr->phi());
104 
105  // apply hypo cuts
106  float absEta = std::abs(tr->eta());
107  float threshold = 0;
108  for (std::vector<float>::size_type k=0; k<m_bins[0]; ++k) {
109  if (absEta > m_ptBins[cutIndex][k] && absEta <= m_ptBins[cutIndex][k+1]) threshold = m_ptThresholds[cutIndex][k];
110  }
111  if ( (std::abs(tr->pt())/Gaudi::Units::GeV > (threshold/Gaudi::Units::GeV)) &&
112  ( (!m_muonqualityCut) || (m_muonqualityCut && passedQualityCuts(muon)) ) ) { // selection passed
113  result = true;
114  selPt.push_back(tr->pt()/Gaudi::Units::GeV);
115  selEta.push_back(tr->eta());
116  selPhi.push_back(tr->phi());
117  }
118 
119  ATH_MSG_VERBOSE(" REGTEST muon pt is " << tr->pt()/Gaudi::Units::GeV << " GeV "
120  << " with Charge " << tr->charge()
121  << " and threshold cut is " << threshold/Gaudi::Units::GeV << " GeV"
122  << " so hypothesis is " << (result?"true":"false"));
123 
124  // hypo result
125  return result;
126 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ inclusiveSelection()

StatusCode TrigMuonEFIdtpHypoTool::inclusiveSelection ( std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &  toolInput) const
private

Definition at line 168 of file TrigMuonEFIdtpHypoTool.cxx.

169 {
170  for(auto& tool : toolInput) {
171  if(TrigCompositeUtils::passed(m_decisionId.numeric(), tool.previousDecisionIDs)){
172  if(decideOnSingleObject(tool, 0)) {
173  ATH_MSG_DEBUG("Passes selection");
175  }
176  }
177  else ATH_MSG_DEBUG("Does not pass selection");
178  }
179 
180  return StatusCode::SUCCESS;
181 }

◆ initialize()

StatusCode TrigMuonEFIdtpHypoTool::initialize ( )
overridevirtual

Definition at line 24 of file TrigMuonEFIdtpHypoTool.cxx.

25 {
26  if( m_muonqualityCut ) {
27  if(m_muonSelTool.retrieve().isFailure()) {
28  ATH_MSG_ERROR("Unable to retrieve " << m_muonSelTool);
29  return StatusCode::FAILURE;
30  }
31  } else m_muonSelTool.disable();
32 
33  if( m_acceptAll ) {
34  ATH_MSG_DEBUG("Accepting all the events!");
35  } else {
36  if(m_ptBins.size()<=0) {
37  ATH_MSG_ERROR("Trying to configure hypo with no pT bins. This is probably a configuration mistake.");
38  return StatusCode::FAILURE;
39  }
40  m_bins.resize(m_ptBins.size());
41  for(size_t j=0; j<m_ptBins.size(); j++){
42  m_bins[j] = m_ptBins[j].size() - 1;
43  if (m_bins[j] != m_ptThresholds[j].size()) {
44  ATH_MSG_ERROR("bad thresholds setup .... exiting!");
45  return StatusCode::FAILURE;
46  }
47  if (msgLvl(MSG::DEBUG)) {
48  for (std::vector<float>::size_type i=0; i<m_bins[j];++i) {
49  ATH_MSG_DEBUG( "bin " << m_ptBins[j][i] << " - " << m_ptBins[j][i+1]<<" with Pt Threshold of " << (m_ptThresholds[j][i])/Gaudi::Units::GeV<< " GeV");
50  }
51  }
52  }
53  }
54 
55  if ( not m_monTool.name().empty() ) {
56  ATH_CHECK( m_monTool.retrieve() );
57  ATH_MSG_DEBUG("MonTool name: " << m_monTool);
58  }
59 
60  return StatusCode::SUCCESS;
61 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ multiplicitySelection()

StatusCode TrigMuonEFIdtpHypoTool::multiplicitySelection ( std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &  toolInput) const
private

Definition at line 186 of file TrigMuonEFIdtpHypoTool.cxx.

187 {
188  HLT::Index2DVec passingSelection(m_ptBins.size());
189  for(size_t cutIndex=0; cutIndex < m_ptBins.size(); ++cutIndex) {
190  size_t elementIndex{0};
191  for(auto& tool : toolInput) {
192  if(TrigCompositeUtils::passed(m_decisionId.numeric(), tool.previousDecisionIDs)){
193  if(decideOnSingleObject(tool, cutIndex)){
194  ATH_MSG_DEBUG("Passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
195  passingSelection[cutIndex].push_back(elementIndex);
196  }
197  else ATH_MSG_DEBUG("Not passing selection "<<m_decisionId << " , Index["<<elementIndex<<"]");
198  }
199  else{
200  ATH_MSG_DEBUG("No match for decisionId "<<m_decisionId);
201  }
202  elementIndex++;
203  }
204  //If nothing passes, then we should stop
205  if(passingSelection[cutIndex].empty()){
206  ATH_MSG_DEBUG("No muons passed the selection "<<cutIndex<<" rejecting...");
207  return StatusCode::SUCCESS;
208  }
209  }
210  std::set<size_t> passingIndices;
211  HLT::elementsInUniqueCombinations(passingSelection, passingIndices);
212 
213  if(passingIndices.empty()) {
214  ATH_MSG_DEBUG("No muons passed selection "<<m_decisionId);
215  return StatusCode::SUCCESS;
216  }
217  for(auto i : passingIndices) {
218  ATH_MSG_DEBUG("Muon["<<i<<"] passes "<<m_decisionId<<" with pT = "<<toolInput[i].muon->pt()/Gaudi::Units::GeV << "GeV");
220  }
221 
222  //
223  return StatusCode::SUCCESS;
224 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ passedQualityCuts()

bool TrigMuonEFIdtpHypoTool::passedQualityCuts ( const xAOD::Muon muon) const
private

Definition at line 131 of file TrigMuonEFIdtpHypoTool.cxx.

132 {
133  bool passCut = false;
134 
135  const xAOD::TrackParticle* metrack = muon->trackParticle( xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle );
136  float reducedChi2 = -10;
137 
138  if( metrack ) {
139  reducedChi2 = muon->primaryTrackParticle()->chiSquared()/muon->primaryTrackParticle()->numberDoF();
140  // Selection criteria based on the requirements that are part of the muon quality working points (offline)
141  if(std::abs(reducedChi2) < 8.0 && !m_muonSelTool->isBadMuon(*muon) && muon->author()==xAOD::Muon::MuidSA) passCut = true;
142  }
143 
144  return passCut;
145 }

◆ 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< AlgTool > >::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< AlgTool > >::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  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_acceptAll

Gaudi::Property< bool > TrigMuonEFIdtpHypoTool::m_acceptAll
private
Initial value:
{
this, "AcceptAll", false, "Ignore selection" }

Definition at line 66 of file TrigMuonEFIdtpHypoTool.h.

◆ m_bins

std::vector<size_t> TrigMuonEFIdtpHypoTool::m_bins ={0}
private

Definition at line 70 of file TrigMuonEFIdtpHypoTool.h.

◆ m_decisionId

HLT::Identifier TrigMuonEFIdtpHypoTool::m_decisionId
private

Definition at line 58 of file TrigMuonEFIdtpHypoTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_monTool

ToolHandle< GenericMonitoringTool > TrigMuonEFIdtpHypoTool::m_monTool { this, "MonTool", "", "Monitoring tool" }
private

Definition at line 71 of file TrigMuonEFIdtpHypoTool.h.

◆ m_muonqualityCut

Gaudi::Property< bool > TrigMuonEFIdtpHypoTool::m_muonqualityCut
private
Initial value:
{
this, "MuonQualityCut", false, "Ignore selection" }

Definition at line 60 of file TrigMuonEFIdtpHypoTool.h.

◆ m_muonSelTool

ToolHandle<CP::IMuonSelectionTool> TrigMuonEFIdtpHypoTool::m_muonSelTool {this, "MuonSelectionTool", "CP::MuonSelectionTool/MuonSelectionTool", "Tool for muon quality selection"}
private

Definition at line 72 of file TrigMuonEFIdtpHypoTool.h.

◆ m_ptBins

Gaudi::Property< std::vector<std::vector<double> > > TrigMuonEFIdtpHypoTool::m_ptBins
private
Initial value:
{
this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" }

Definition at line 62 of file TrigMuonEFIdtpHypoTool.h.

◆ m_ptThresholds

Gaudi::Property< std::vector<std::vector<double> > > TrigMuonEFIdtpHypoTool::m_ptThresholds
private
Initial value:
{
this, "PtThresholds", { {5.49*Gaudi::Units::GeV} }, "Track pT requirement ( separate threshold for each muon )" }

Definition at line 64 of file TrigMuonEFIdtpHypoTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
get_generator_info.result
result
Definition: get_generator_info.py:21
TrigMuonEFIdtpHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigMuonEFIdtpHypoTool.h:66
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
TrigMuonEFIdtpHypoTool::m_muonSelTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Definition: TrigMuonEFIdtpHypoTool.h:72
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrigMuonEFIdtpHypoTool::multiplicitySelection
StatusCode multiplicitySelection(std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &toolInput) const
Definition: TrigMuonEFIdtpHypoTool.cxx:186
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
TrigMuonEFIdtpHypoTool::m_ptBins
Gaudi::Property< std::vector< std::vector< double > > > m_ptBins
Definition: TrigMuonEFIdtpHypoTool.h:62
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TrigMuonEFIdtpHypoTool::decideOnSingleObject
bool decideOnSingleObject(TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo &input, size_t cutIndex) const
Definition: TrigMuonEFIdtpHypoTool.cxx:66
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigMuonEFIdtpHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigMuonEFIdtpHypoTool.h:71
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
TrigMuonEFIdtpHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigMuonEFIdtpHypoTool.h:58
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigMuonEFIdtpHypoTool::m_bins
std::vector< size_t > m_bins
Definition: TrigMuonEFIdtpHypoTool.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TrigMuonEFIdtpHypoTool::m_muonqualityCut
Gaudi::Property< bool > m_muonqualityCut
Definition: TrigMuonEFIdtpHypoTool.h:60
HLT::elementsInUniqueCombinations
void elementsInUniqueCombinations(const Index2DVec &indices, std::set< size_t > &participants, std::function< bool(const Index1DVec &)> &&filter)
Definition: Combinators.cxx:154
TrigMuonEFIdtpHypoTool::m_ptThresholds
Gaudi::Property< std::vector< std::vector< double > > > m_ptThresholds
Definition: TrigMuonEFIdtpHypoTool.h:64
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
threshold
Definition: chainparser.cxx:74
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
MuonParameters::MuidSA
@ MuidSA
Definition: MuonParamDefs.h:59
TrigMuonEFIdtpHypoTool::passedQualityCuts
bool passedQualityCuts(const xAOD::Muon *muon) const
Definition: TrigMuonEFIdtpHypoTool.cxx:131
TrigMuonEFIdtpHypoTool::inclusiveSelection
StatusCode inclusiveSelection(std::vector< TrigMuonEFIdtpHypoTool::MuonEFIdperfInfo > &toolInput) const
Definition: TrigMuonEFIdtpHypoTool.cxx:168
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:234
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
HLT::Index2DVec
std::vector< Index1DVec > Index2DVec
Definition: TrigCompositeUtils/TrigCompositeUtils/Combinators.h:140
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
TrigMuonEFIdtpHypoTool::MaxNumberTools
@ MaxNumberTools
Definition: TrigMuonEFIdtpHypoTool.h:20