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

#include <TrackOverlayDecisionAlg.h>

Inheritance diagram for TrackOverlayDecisionAlg::TrackOverlayDecisionAlg:
Collaboration diagram for TrackOverlayDecisionAlg::TrackOverlayDecisionAlg:

Public Member Functions

 TrackOverlayDecisionAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters. More...
 
virtual ~TrackOverlayDecisionAlg ()=default
 Destructor. More...
 
virtual StatusCode initialize () override final
 Athena algorithm's interface method initialize() More...
 
virtual StatusCode execute (const EventContext &ctx) const override final
 Athena algorithm's interface method execute() More...
 
virtual StatusCode finalize () override final
 Athena algorithm's interface method finalize() More...
 
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, V, H > &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

void markSelectedByPileupSwitch (const std::vector< const xAOD::TruthParticle * > &truthParticles) const
 
const std::vector< const xAOD::TruthParticle * > getTruthParticles () const
 
std::tuple< std::vector< int64_t >, std::vector< char * > > GetInputNodeInfo (const std::unique_ptr< Ort::Session > &session)
 
std::tuple< std::vector< int64_t >, std::vector< char * > > GetOutputNodeInfo (const std::unique_ptr< Ort::Session > &session)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< IAthSelectionToolm_truthSelectionTool {this, "TruthSelectionTool","AthTruthSelectionTool", "Truth selection tool (for efficiencies and resolutions)"}
 
SG::AuxElement::Decorator< bool > m_dec_selectedByPileupSwitch {"selectedByPileupSwitch"}
 
bool m_usingSpecialPileupSwitch {false}
 
BooleanProperty m_useTrackSelection {this, "useTrackSelection", false, "plot only tracks accepted by selection tool"}
 
StringProperty m_pileupSwitch {this, "PileupSwitch", "HardScatter", "Pileup truth strategy to use. May be \"All\", \"HardScatter\", or \"PileUp\""}
 
FloatProperty m_lowProb {this,"LowProb",0.5,"Truth match prob. cutoff for efficiency (lower bound) and fake (upper bound) classification."}
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoContainerName {this,"EventInfoContainerName", "EventInfo", ""}
 
SG::ReadHandleKey< xAOD::TruthPileupEventContainerm_truthPileUpEventName {this, "TruthPileupEvents", "TruthPileupEvents","Name of the truth pileup events container probably TruthPileupEvent(s)"}
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthParticleName {this, "TruthParticleContainerName", "TruthParticles", ""}
 
SG::ReadHandleKey< xAOD::TruthEventContainerm_truthEventName {this, "TruthEvents", "TruthEvents","Name of the truth events container probably either TruthEvent or TruthEvents"}
 
FilterReporterParams m_filterParams {this, "TrackOverlayDecisionAlg", "Decides whether events should be reconstructed in track-overlay workflow or MC-overlay."}
 
Gaudi::Property< bool > m_invertfilter {this, "InvertFilter", false, "Invert filter decision."}
 invert filter decision at the end More...
 
Gaudi::Property< float > m_MLthreshold {this, "MLThreshold", 0.74201, "ML threshold for bad/good tracks decision. ML scores larger than this threshold are considered as bad tracks."}
 
ServiceHandle< AthOnnx::IOnnxRuntimeSvcm_svc {this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "CaloMuonScoreTool ONNXRuntimeSvc"}
 
std::tuple< std::vector< int64_t >, std::vector< char * > > m_inputInfo
 
std::tuple< std::vector< int64_t >, std::vector< char * > > m_outputInfo
 
std::unique_ptr< Ort::Session > m_session
 
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 46 of file TrackOverlayDecisionAlg.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

◆ TrackOverlayDecisionAlg()

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

Constructor with parameters.

Definition at line 27 of file TrackOverlayDecisionAlg.cxx.

27  :
28  ::AthReentrantAlgorithm( name, pSvcLocator )
29  {
30  }

◆ ~TrackOverlayDecisionAlg()

virtual TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::~TrackOverlayDecisionAlg ( )
virtualdefault

Destructor.

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
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 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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 TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::execute ( const EventContext &  ctx) const
finaloverridevirtual

Athena algorithm's interface method execute()

Definition at line 122 of file TrackOverlayDecisionAlg.cxx.

123 {
124  ATH_MSG_DEBUG ("Executing ...");
125 
126  std::vector<const xAOD::TruthParticle*> truthParticlesVec = TrackOverlayDecisionAlg::getTruthParticles();
127 
128  //Access truth info for the NN input
129  float eventPxSum = 0.0;
130  float eventPySum = 0.0;
131  float eventPt = 0.0;
132  float puEvents = 0.0;
133 
134  std::vector<float> pxValues, pyValues, pzValues, eValues, etaValues, phiValues, ptValues;
135  float truthMultiplicity = 0.0;
136  const int truthParticles = truthParticlesVec.size();
137  for (int itruth = 0; itruth < truthParticles; itruth++) {
138  const xAOD::TruthParticle* thisTruth = truthParticlesVec[itruth];
139  const IAthSelectionTool::CutResult accept = m_truthSelectionTool->accept(thisTruth);
140  if(accept){
141  pxValues.push_back((thisTruth->px()*0.001-1.46988000e+03)* px_diff); //as MinMaxScaler: 1.46988000e+03 is the lowest value of px from a J7 sample; *(0.001) is used to convert unit rather than *(1/1000) to speed up.
142  pyValues.push_back((thisTruth->py()*0.001-1.35142000e+03)* py_diff); //the lowest value of py: 1.35142000e+03
143  pzValues.push_back((thisTruth->pz()*0.001-1.50464000e+03)* pz_diff); //the lowest value of pz: 1.50464000e+03
144  ptValues.push_back((thisTruth->pt()*0.001-5.00006000e-01)* pt_diff); //the lowest value of pt: 5.00006000e-01
145 
146  etaValues.push_back(thisTruth->eta());
147  phiValues.push_back(thisTruth->phi());
148  eValues.push_back((thisTruth->e()*0.001-5.08307000e-01)*e_diff); //the lowest value of energy: 5.08307000e-01
149 
150  eventPxSum += thisTruth->px();
151  eventPySum += thisTruth->py();
152  truthMultiplicity++;
153  }//accept
154  }//for itruth
155  SG::ReadHandle<xAOD::TruthPileupEventContainer> truthPileupEventContainer;
157  if (!m_truthPileUpEventName.key().empty()) {
159  }
160  puEvents = !m_truthPileUpEventName.key().empty() and truthPileupEventContainer.isValid() ? static_cast<int>( truthPileupEventContainer->size() ) : pie.isValid() ? pie->actualInteractionsPerCrossing() : 0;
161  eventPt = std::sqrt(eventPxSum*eventPxSum + eventPySum*eventPySum)*0.001;
162 
163  std::vector<float> puEventsVec(pxValues.size(), (puEvents-1.55000000e+01)*pu_diff); //min of puEvents= 15.5, max of puEvents=84.5
164  std::vector<float> truthMultiplicityVec(pxValues.size(), (truthMultiplicity-1.80000000e+01)*multi_diff);
165  std::vector<float> eventPtVec(pxValues.size(), (eventPt-3.42359395e-01)*eventPt_diff);
166  std::vector<float> predictions;
167 
168  //Compute the distances using Eigen for Eigen's optimized operations. Initialize matirces. Observed a significant improvement on computing calculation.
169  Eigen::VectorXf ptEigen = Eigen::VectorXf::Map(ptValues.data(), ptValues.size());
170  Eigen::VectorXf phiEigen = Eigen::VectorXf::Map(phiValues.data(), phiValues.size());
171  Eigen::VectorXf etaEigen = Eigen::VectorXf::Map(etaValues.data(), etaValues.size());
172  for (std::size_t i = 0; i < truthMultiplicity; ++i) {
173  float multiplicity_0p05 = 0.0, multiplicity_0p2 = 0.0;
174  float sum_0p05 = 0.0, sum_0p2 = 0.0;
175  float pt_0p05 = 0.0, pt_0p2 = 0.0;
176  float deltaEtaI = etaEigen[i];
177  float phiI = phiEigen[i];
178  for (std::size_t j = 0; j < truthMultiplicity; ++j) {
179  if (i == j) continue; // Skip the particle itself
180  float deltaEta = deltaEtaI - etaEigen[j];
181  float deltaPhi = phiI - phiEigen[j];
182  if (deltaPhi > M_PI) {
183  deltaPhi -= 2.0 * M_PI;
184  }
185  float distances = std::sqrt(deltaEta * deltaEta + deltaPhi * deltaPhi);
186  if (distances < 0.05){
187  multiplicity_0p05++;
188  sum_0p05 += distances;
189  pt_0p05 += ptEigen[j];
190  }
191  if (distances < 0.2){
192  multiplicity_0p2++;
193  sum_0p2 += distances;
194  pt_0p2 += ptEigen[j];
195  }
196  }// for j
197 
198  std::vector<float> featData;
199  featData.push_back(pxValues[i]);
200  featData.push_back(pyValues[i]);
201  featData.push_back(pzValues[i]);
202  featData.push_back(eValues[i]);
203  featData.push_back(ptValues[i]);
204  featData.push_back((multiplicity_0p2 * area0p2) * constant1);
205  featData.push_back((multiplicity_0p05 * area0p05) * constant2);
206  featData.push_back((sum_0p2 * area0p2) * constant3);
207  featData.push_back((sum_0p05 * area0p05) * constant4);
208  featData.push_back(pt_0p2 * constant5);
209  featData.push_back(pt_0p05 * constant6);
210 
211  featData.push_back(puEventsVec[i]);
212  featData.push_back(truthMultiplicityVec[i]);
213  featData.push_back(eventPtVec[i]);
214 
215  std::vector<int64_t> input_node_dims;
216  std::vector<char*> input_node_names;
217  input_node_dims = std::get<0>(m_inputInfo);
218  input_node_names = std::get<1>(m_inputInfo);
219 
220  std::vector<int64_t> output_node_dims;
221  std::vector<char*> output_node_names;
222  output_node_dims = std::get<0>(m_outputInfo);
223  output_node_names = std::get<1>(m_outputInfo);
224 
225  Ort::MemoryInfo memoryInfo = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeCPU);
226  input_node_dims[0]=1;
227  Ort::Value input_data = Ort::Value::CreateTensor(memoryInfo, featData.data(), featData.size(), input_node_dims.data(), input_node_dims.size());
228  Ort::RunOptions run_options(nullptr);
229  //Run the inference
231  auto output_values = mysession.Run(run_options, input_node_names.data(), &input_data, input_node_names.size(), output_node_names.data(), output_node_names.size());
232  float* predictionData = output_values[0].GetTensorMutableData<float>();
233  float prediction = predictionData[0];
234 
235  predictions.push_back(prediction);
236  }//for i
237  float threshold = m_MLthreshold;
238  ATH_MSG_ALWAYS("ML threshold:" << threshold);
239  int badTracks = 0;
240  for (float prediction : predictions) {
241  if (prediction > threshold) {
242  badTracks++;
243  }
244  }
245  float rouletteScore = static_cast<float>(badTracks) / static_cast<float>(truthMultiplicity);
246 
247  FilterReporter filter(m_filterParams, false, ctx);
248  bool pass = false;
249  int decision = rouletteScore == 0;
250  if (decision==0){ //if ML decision is False, it goes to the MC-overlay workflow
251  pass = true;
252  }
253  else{
254  pass = false;
255  }
256 
257  if (m_invertfilter) {
258  pass =! pass;
259  }
260  filter.setPassed(pass);
261  ATH_MSG_ALWAYS("End TrackOverlayDecisionAlg, difference in filters: "<<(pass ? "found" : "not found")<<"="<<pass<<", invert="<<m_invertfilter);
262  return StatusCode::SUCCESS;
263 }

◆ 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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ finalize()

StatusCode TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::finalize ( )
finaloverridevirtual

Athena algorithm's interface method finalize()

Definition at line 51 of file TrackOverlayDecisionAlg.cxx.

52 {
53  ATH_MSG_VERBOSE ( "Finalizing ..." );
54  ATH_MSG_VERBOSE("-----------------------------------------------------------------");
55  ATH_MSG_VERBOSE("m_filterParams.summary()" << m_filterParams.summary());
56  ATH_MSG_VERBOSE("-----------------------------------------------------------------");
58  ATH_MSG_VERBOSE(" =====================================================================");
59 
60  return StatusCode::SUCCESS;
61 }

◆ GetInputNodeInfo()

std::tuple<std::vector<int64_t>, std::vector<char*> > TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::GetInputNodeInfo ( const std::unique_ptr< Ort::Session > &  session)
inlineprivate

Definition at line 82 of file TrackOverlayDecisionAlg.h.

82  {
83  std::vector<int64_t> input_node_dims;
84  size_t num_input_nodes = session->GetInputCount();
85  std::vector<char*> input_node_names(num_input_nodes);
86  Ort::AllocatorWithDefaultOptions allocator;
87  for( std::size_t i = 0; i < num_input_nodes; i++ ) {
88  char* input_name = session->GetInputNameAllocated(i, allocator).release();
89  input_node_names[i] = input_name;
90  Ort::TypeInfo type_info = session->GetInputTypeInfo(i);
91  auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
92  input_node_dims = tensor_info.GetShape();
93  }
94  return std::make_tuple(input_node_dims, input_node_names);
95  }

◆ GetOutputNodeInfo()

std::tuple<std::vector<int64_t>, std::vector<char*> > TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::GetOutputNodeInfo ( const std::unique_ptr< Ort::Session > &  session)
inlineprivate

Definition at line 97 of file TrackOverlayDecisionAlg.h.

97  {
98  std::vector<int64_t> output_node_dims;
99  size_t num_output_nodes = session->GetOutputCount();
100  std::vector<char*> output_node_names(num_output_nodes);
101  Ort::AllocatorWithDefaultOptions allocator;
102  for( std::size_t i = 0; i < num_output_nodes; i++ ) {
103  char* output_name = session->GetOutputNameAllocated(i, allocator).release();
104  output_node_names[i] = output_name;
105  Ort::TypeInfo type_info = session->GetOutputTypeInfo(i);
106  auto tensor_info = type_info.GetTensorTypeAndShapeInfo();
107  output_node_dims = tensor_info.GetShape();
108  }
109  return std::make_tuple(output_node_dims, output_node_names);
110  }

◆ getTruthParticles()

const std::vector< const xAOD::TruthParticle * > TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::getTruthParticles ( ) const
private

Definition at line 63 of file TrackOverlayDecisionAlg.cxx.

63  {
64  std::vector<const xAOD::TruthParticle*> tempVec {};
65  if (m_pileupSwitch == "All") {
66  if (m_truthParticleName.key().empty()) {
67  return tempVec;
68  }
70  if (not truthParticleContainer.isValid()) {
71  return tempVec;
72  }
73  tempVec.insert(tempVec.begin(), truthParticleContainer->begin(), truthParticleContainer->end());
74  } else {
75  if (m_pileupSwitch == "HardScatter") {
76  if (not m_truthEventName.key().empty()) {
77  ATH_MSG_VERBOSE("Getting TruthEvents container.");
79  const xAOD::TruthEvent* event = (truthEventContainer.isValid()) ? truthEventContainer->at(0) : nullptr;
80  if (not event) {
81  return tempVec;
82  }
83  const auto& links = event->truthParticleLinks();
84  tempVec.reserve(event->nTruthParticles());
85  for (const auto& link : links) {
86  if (link.isValid()){
87  tempVec.push_back(*link);
88  }
89  }
90  }
91  }else if (m_pileupSwitch == "PileUp") {
92  if (not m_truthPileUpEventName.key().empty()) {
93  ATH_MSG_VERBOSE("getting TruthPileupEvents container");
94  // get truth particles from all pileup events
96  if (truthPileupEventContainer.isValid()) {
97  const unsigned int nPileup = truthPileupEventContainer->size();
98  tempVec.reserve(nPileup * 200); // quick initial guess, will still save some time
99  for (unsigned int i(0); i != nPileup; ++i) {
100  const auto *eventPileup = truthPileupEventContainer->at(i);
101  // get truth particles from each pileup event
102  int ntruth = eventPileup->nTruthParticles();
103  ATH_MSG_VERBOSE("Adding " << ntruth << " truth particles from TruthPileupEvents container");
104  const auto& links = eventPileup->truthParticleLinks();
105  for (const auto& link : links) {
106  if (link.isValid()){
107  tempVec.push_back(*link);
108  }
109  }
110  }
111  } else {
112  ATH_MSG_ERROR("no entries in TruthPileupEvents container!");
113  }
114  }
115  } else {
116  ATH_MSG_ERROR("bad value for PileUpSwitch");
117  }
118  }
119  return tempVec;
120 }

◆ initialize()

StatusCode TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::initialize ( )
finaloverridevirtual

Athena algorithm's interface method initialize()

Definition at line 32 of file TrackOverlayDecisionAlg.cxx.

33 {
36  ATH_CHECK( m_truthParticleName.initialize( (m_pileupSwitch == "HardScatter" or m_pileupSwitch == "All") and not m_truthParticleName.key().empty() ) );
37  ATH_CHECK(m_truthSelectionTool.retrieve(EnableTool {not m_truthParticleName.key().empty()} ));
38  ATH_CHECK( m_truthEventName.initialize( (m_pileupSwitch == "HardScatter" or m_pileupSwitch == "All") and not m_truthEventName.key().empty() ) );
39  ATH_CHECK( m_truthPileUpEventName.initialize( (m_pileupSwitch == "PileUp" or m_pileupSwitch == "All") and not m_truthPileUpEventName.key().empty() ) );
40  ATH_CHECK(m_svc.retrieve());
41  std::string this_file = __FILE__;
42  const std::string model_path = PathResolverFindCalibFile("TrackOverlay/TrackOverlay_J7_model.onnx");
43  Ort::SessionOptions session_options;
44 
45  m_session = std::make_unique<Ort::Session>(m_svc->env(), model_path.c_str(), session_options);
46  m_inputInfo = TrackOverlayDecisionAlg::GetInputNodeInfo(m_session);
47  m_outputInfo = TrackOverlayDecisionAlg::GetOutputNodeInfo(m_session);
48  return StatusCode::SUCCESS;
49 }

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ markSelectedByPileupSwitch()

void TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::markSelectedByPileupSwitch ( const std::vector< const xAOD::TruthParticle * > &  truthParticles) const
private

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

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ 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_dec_selectedByPileupSwitch

SG::AuxElement::Decorator<bool> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_dec_selectedByPileupSwitch {"selectedByPileupSwitch"}
private

Definition at line 59 of file TrackOverlayDecisionAlg.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_eventInfoContainerName

SG::ReadHandleKey<xAOD::EventInfo> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_eventInfoContainerName {this,"EventInfoContainerName", "EventInfo", ""}
private

Definition at line 67 of file TrackOverlayDecisionAlg.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_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_filterParams

FilterReporterParams TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_filterParams {this, "TrackOverlayDecisionAlg", "Decides whether events should be reconstructed in track-overlay workflow or MC-overlay."}
private

Definition at line 74 of file TrackOverlayDecisionAlg.h.

◆ m_inputInfo

std::tuple<std::vector<int64_t>, std::vector<char*> > TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_inputInfo
private

Definition at line 79 of file TrackOverlayDecisionAlg.h.

◆ m_invertfilter

Gaudi::Property<bool> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_invertfilter {this, "InvertFilter", false, "Invert filter decision."}
private

invert filter decision at the end

Definition at line 75 of file TrackOverlayDecisionAlg.h.

◆ m_lowProb

FloatProperty TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_lowProb {this,"LowProb",0.5,"Truth match prob. cutoff for efficiency (lower bound) and fake (upper bound) classification."}
private

Definition at line 65 of file TrackOverlayDecisionAlg.h.

◆ m_MLthreshold

Gaudi::Property<float> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_MLthreshold {this, "MLThreshold", 0.74201, "ML threshold for bad/good tracks decision. ML scores larger than this threshold are considered as bad tracks."}
private

Definition at line 76 of file TrackOverlayDecisionAlg.h.

◆ m_outputInfo

std::tuple<std::vector<int64_t>, std::vector<char*> > TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_outputInfo
private

Definition at line 80 of file TrackOverlayDecisionAlg.h.

◆ m_pileupSwitch

StringProperty TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_pileupSwitch {this, "PileupSwitch", "HardScatter", "Pileup truth strategy to use. May be \"All\", \"HardScatter\", or \"PileUp\""}
private

Definition at line 64 of file TrackOverlayDecisionAlg.h.

◆ m_session

std::unique_ptr<Ort::Session> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_session
private

Definition at line 81 of file TrackOverlayDecisionAlg.h.

◆ m_svc

ServiceHandle<AthOnnx::IOnnxRuntimeSvc> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_svc {this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "CaloMuonScoreTool ONNXRuntimeSvc"}
private

Definition at line 78 of file TrackOverlayDecisionAlg.h.

◆ m_truthEventName

SG::ReadHandleKey<xAOD::TruthEventContainer> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthEventName {this, "TruthEvents", "TruthEvents","Name of the truth events container probably either TruthEvent or TruthEvents"}
private

Definition at line 71 of file TrackOverlayDecisionAlg.h.

◆ m_truthParticleName

SG::ReadHandleKey<xAOD::TruthParticleContainer> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthParticleName {this, "TruthParticleContainerName", "TruthParticles", ""}
private

Definition at line 70 of file TrackOverlayDecisionAlg.h.

◆ m_truthPileUpEventName

SG::ReadHandleKey<xAOD::TruthPileupEventContainer> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthPileUpEventName {this, "TruthPileupEvents", "TruthPileupEvents","Name of the truth pileup events container probably TruthPileupEvent(s)"}
private

Definition at line 69 of file TrackOverlayDecisionAlg.h.

◆ m_truthSelectionTool

ToolHandle<IAthSelectionTool> TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthSelectionTool {this, "TruthSelectionTool","AthTruthSelectionTool", "Truth selection tool (for efficiencies and resolutions)"}
private

Definition at line 58 of file TrackOverlayDecisionAlg.h.

◆ m_useTrackSelection

BooleanProperty TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_useTrackSelection {this, "useTrackSelection", false, "plot only tracks accepted by selection tool"}
private

Definition at line 63 of file TrackOverlayDecisionAlg.h.

◆ m_usingSpecialPileupSwitch

bool TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_usingSpecialPileupSwitch {false}
private

Definition at line 60 of file TrackOverlayDecisionAlg.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:
FilterReporter
a guard class for use with ref FilterReporterParams
Definition: FilterReporter.h:35
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_session
std::unique_ptr< Ort::Session > m_session
Definition: TrackOverlayDecisionAlg.h:81
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrackOverlayDecisionAlg::px_diff
const float px_diff
Definition: TrackOverlayDecisionAlg.h:29
TrackOverlayDecisionAlg::area0p05
const float area0p05
Definition: TrackOverlayDecisionAlg.h:38
xAOD::TruthParticle_v1::pz
float pz() const
The z component of the particle's momentum.
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthSelectionTool
ToolHandle< IAthSelectionTool > m_truthSelectionTool
Definition: TrackOverlayDecisionAlg.h:58
IAthSelectionTool::CutResult
Definition: IAthSelectionTool.h:30
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:161
python.PyParticleTools.getTruthParticles
def getTruthParticles(aKey)
Definition: PyParticleTools.py:102
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
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
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_inputInfo
std::tuple< std::vector< int64_t >, std::vector< char * > > m_inputInfo
Definition: TrackOverlayDecisionAlg.h:79
TrackOverlayDecisionAlg::constant3
const float constant3
Definition: TrackOverlayDecisionAlg.h:41
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
python.oracle.Session
Session
Definition: oracle.py:78
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
covarianceTool.filter
filter
Definition: covarianceTool.py:514
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthPileUpEventName
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > m_truthPileUpEventName
Definition: TrackOverlayDecisionAlg.h:69
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_MLthreshold
Gaudi::Property< float > m_MLthreshold
Definition: TrackOverlayDecisionAlg.h:76
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_eventInfoContainerName
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoContainerName
Definition: TrackOverlayDecisionAlg.h:67
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DMTest::links
links
Definition: CLinks_v1.cxx:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrackOverlayDecisionAlg::constant1
const float constant1
Definition: TrackOverlayDecisionAlg.h:39
FilterReporterParams::initialize
StatusCode initialize(bool enabled=true)
do anything we need to do in initialize
Definition: FilterReporterParams.cxx:24
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrackOverlayDecisionAlg::py_diff
const float py_diff
Definition: TrackOverlayDecisionAlg.h:30
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
TrackOverlayDecisionAlg::pt_diff
const float pt_diff
Definition: TrackOverlayDecisionAlg.h:32
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TrackOverlayDecisionAlg::constant5
const float constant5
Definition: TrackOverlayDecisionAlg.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
threshold
Definition: chainparser.cxx:74
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_invertfilter
Gaudi::Property< bool > m_invertfilter
invert filter decision at the end
Definition: TrackOverlayDecisionAlg.h:75
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:169
TrackOverlayDecisionAlg::area0p2
const float area0p2
Definition: TrackOverlayDecisionAlg.h:37
TrackOverlayDecisionAlg::eventPt_diff
const float eventPt_diff
Definition: TrackOverlayDecisionAlg.h:36
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:283
TrackOverlayDecisionAlg::pz_diff
const float pz_diff
Definition: TrackOverlayDecisionAlg.h:31
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_filterParams
FilterReporterParams m_filterParams
Definition: TrackOverlayDecisionAlg.h:74
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_pileupSwitch
StringProperty m_pileupSwitch
Definition: TrackOverlayDecisionAlg.h:64
TrackOverlayDecisionAlg::constant2
const float constant2
Definition: TrackOverlayDecisionAlg.h:40
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:176
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TrackOverlayDecisionAlg::constant6
const float constant6
Definition: TrackOverlayDecisionAlg.h:44
TrackOverlayDecisionAlg::multi_diff
const float multi_diff
Definition: TrackOverlayDecisionAlg.h:35
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_svc
ServiceHandle< AthOnnx::IOnnxRuntimeSvc > m_svc
Definition: TrackOverlayDecisionAlg.h:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthEventName
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventName
Definition: TrackOverlayDecisionAlg.h:71
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
TrackOverlayDecisionAlg::pu_diff
const float pu_diff
Definition: TrackOverlayDecisionAlg.h:34
TrackOverlayDecisionAlg::constant4
const float constant4
Definition: TrackOverlayDecisionAlg.h:42
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_truthParticleName
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleName
Definition: TrackOverlayDecisionAlg.h:70
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrackOverlayDecisionAlg::TrackOverlayDecisionAlg::m_outputInfo
std::tuple< std::vector< int64_t >, std::vector< char * > > m_outputInfo
Definition: TrackOverlayDecisionAlg.h:80
fitman.k
k
Definition: fitman.py:528
xAOD::EventInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
Definition: EventInfo_v1.cxx:380
ServiceHandle< ICondSvc >
FilterReporterParams::summary
std::string summary()
report the status of filtering
Definition: FilterReporterParams.cxx:60
TrackOverlayDecisionAlg::e_diff
const float e_diff
Definition: TrackOverlayDecisionAlg.h:33