ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
CP::MVAInputEvaluator Class Reference

#include <MVAInputEvaluator.h>

Collaboration diagram for CP::MVAInputEvaluator:

Classes

class  MiniEvaluator
 

Public Types

enum  Input {
  Pt, Eta, M, D0,
  ErrD0, Z0, ErrZ0, Phi,
  ErrPhi, Theta, ErrTheta, QOverP,
  ErrQOverP, ChiSq, RedChiSq, D0Sig,
  DZ, ErrDZ, DZSinTheta, ErrDZSinTheta,
  FitWeight, VxX, ErrVxX, VxY,
  ErrVxY, VxZ, ErrVxZ
}
 
typedef std::map< std::string, InputInputSelectionMap
 
typedef std::map< std::string, std::unique_ptr< MiniEvaluator > > InputEvaluatorMap
 

Public Member Functions

 MVAInputEvaluator ()
 
 ~MVAInputEvaluator ()
 
void add (const std::string &name, const MVAInputEvaluator::Input &type)
 
void load (const MVAInputEvaluator::InputSelectionMap &selection)
 
void eval (const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, const xAOD::EventInfo &evt, std::map< std::string, double > &input) const
 
void clear ()
 

Private Attributes

InputEvaluatorMap m_evalMap = {}
 

Detailed Description

Definition at line 19 of file MVAInputEvaluator.h.

Member Typedef Documentation

◆ InputEvaluatorMap

typedef std::map<std::string, std::unique_ptr<MiniEvaluator> > CP::MVAInputEvaluator::InputEvaluatorMap

Definition at line 67 of file MVAInputEvaluator.h.

◆ InputSelectionMap

typedef std::map<std::string, Input> CP::MVAInputEvaluator::InputSelectionMap

Definition at line 65 of file MVAInputEvaluator.h.

Member Enumeration Documentation

◆ Input

Enumerator
Pt 
Eta 
D0 
ErrD0 
Z0 
ErrZ0 
Phi 
ErrPhi 
Theta 
ErrTheta 
QOverP 
ErrQOverP 
ChiSq 
RedChiSq 
D0Sig 
DZ 
ErrDZ 
DZSinTheta 
ErrDZSinTheta 
FitWeight 
VxX 
ErrVxX 
VxY 
ErrVxY 
VxZ 
ErrVxZ 

Definition at line 33 of file MVAInputEvaluator.h.

33  {
34  Pt,
35  Eta,
36  M,
37  D0,
38  ErrD0,
39  Z0,
40  ErrZ0,
41  Phi,
42  ErrPhi,
43  Theta,
44  ErrTheta,
45  QOverP,
46  ErrQOverP,
47  ChiSq,
48  RedChiSq,
49  D0Sig,
50  DZ,
51  ErrDZ,
52  DZSinTheta,
54  FitWeight,
55  VxX,
56  ErrVxX,
57  VxY,
58  ErrVxY,
59  VxZ,
60  ErrVxZ
61  };

Constructor & Destructor Documentation

◆ MVAInputEvaluator()

CP::MVAInputEvaluator::MVAInputEvaluator ( )
inline

Definition at line 21 of file MVAInputEvaluator.h.

21 {};

◆ ~MVAInputEvaluator()

CP::MVAInputEvaluator::~MVAInputEvaluator ( )

Definition at line 302 of file MVAInputEvaluator.cxx.

302  {
303  clear();
304 }

Member Function Documentation

◆ add()

void CP::MVAInputEvaluator::add ( const std::string &  name,
const MVAInputEvaluator::Input type 
)

Definition at line 306 of file MVAInputEvaluator.cxx.

306  {
308  for (const auto& kv : m_evalMap) {
309  if (name == kv.first) {
310  throw std::runtime_error("ERROR in CP::MVAInputEvaluator::add : input name is already present in map: " + name);
311  }
312  }
313  switch (type) {
314  case Input::Pt: {
315  m_evalMap[name] = std::make_unique<::Pt>(::Pt());
316  break;
317  }
318  case Input::Eta: {
319  m_evalMap[name] = std::make_unique<::Eta>(::Eta());
320  break;
321  }
322  case Input::M: {
323  m_evalMap[name] = std::make_unique<::M>(::M());
324  break;
325  }
326  case Input::D0: {
327  m_evalMap[name] = std::make_unique<::D0>(::D0());
328  break;
329  }
330  case Input::ErrD0: {
331  m_evalMap[name] = std::make_unique<::ErrD0>(::ErrD0());
332  break;
333  }
334  case Input::Z0: {
335  m_evalMap[name] = std::make_unique<::Z0>(::Z0());
336  break;
337  }
338  case Input::ErrZ0: {
339  m_evalMap[name] = std::make_unique<::ErrZ0>(::ErrZ0());
340  break;
341  }
342  case Input::Phi: {
343  m_evalMap[name] = std::make_unique<::Phi>(::Phi());
344  break;
345  }
346  case Input::ErrPhi: {
347  m_evalMap[name] = std::make_unique<::ErrPhi>(::ErrPhi());
348  break;
349  }
350  case Input::Theta: {
351  m_evalMap[name] = std::make_unique<::Theta>(::Theta());
352  break;
353  }
354  case Input::ErrTheta: {
355  m_evalMap[name] = std::make_unique<::ErrTheta>(::ErrTheta());
356  break;
357  }
358  case Input::QOverP: {
359  m_evalMap[name] = std::make_unique<::QOverP>(::QOverP());
360  break;
361  }
362  case Input::ErrQOverP: {
363  m_evalMap[name] = std::make_unique<::ErrQOverP>(::ErrQOverP());
364  break;
365  }
366  case Input::ChiSq: {
367  m_evalMap[name] = std::make_unique<::ChiSq>(::ChiSq());
368  break;
369  }
370  case Input::RedChiSq: {
371  m_evalMap[name] = std::make_unique<::RedChiSq>(::RedChiSq());
372  break;
373  }
374  case Input::D0Sig: {
375  m_evalMap[name] = std::make_unique<::D0Sig>(::D0Sig());
376  break;
377  }
378  case Input::DZ: {
379  m_evalMap[name] = std::make_unique<::DZ>(::DZ());
380  break;
381  }
382  case Input::ErrDZ: {
383  m_evalMap[name] = std::make_unique<::ErrDZ>(::ErrDZ());
384  break;
385  }
386  case Input::DZSinTheta: {
387  m_evalMap[name] = std::make_unique<::DZSinTheta>(::DZSinTheta());
388  break;
389  }
390  case Input::ErrDZSinTheta: {
391  m_evalMap[name] = std::make_unique<::ErrDZSinTheta>(::ErrDZSinTheta());
392  break;
393  }
394  case Input::FitWeight: {
395  m_evalMap[name] = std::make_unique<::FitWeight>(::FitWeight());
396  break;
397  }
398  case Input::VxX: {
399  m_evalMap[name] = std::make_unique<::VxX>(::VxX());
400  break;
401  }
402  case Input::ErrVxX: {
403  m_evalMap[name] = std::make_unique<::ErrVxX>(::ErrVxX());
404  break;
405  }
406  case Input::VxY: {
407  m_evalMap[name] = std::make_unique<::VxY>(::VxY());
408  break;
409  }
410  case Input::ErrVxY: {
411  m_evalMap[name] = std::make_unique<::ErrVxY>(::ErrVxY());
412  break;
413  }
414  case Input::VxZ: {
415  m_evalMap[name] = std::make_unique<::VxZ>(::VxZ());
416  break;
417  }
418  case Input::ErrVxZ: {
419  m_evalMap[name] = std::make_unique<::ErrVxZ>(::ErrVxZ());
420  break;
421  }
422  default: {
423  throw std::runtime_error("ERROR in CP::MVAInputEvaluator::add : unknown input enum: " + std::to_string(type));
424  }
425  }
426  }

◆ clear()

void CP::MVAInputEvaluator::clear ( )

Definition at line 442 of file MVAInputEvaluator.cxx.

442  {
443  m_evalMap.clear();
444 }

◆ eval()

void CP::MVAInputEvaluator::eval ( const xAOD::TrackParticle trk,
const xAOD::Vertex vx,
const xAOD::EventInfo evt,
std::map< std::string, double > &  input 
) const

Definition at line 435 of file MVAInputEvaluator.cxx.

435  {
436  input.clear();
437  for (const auto& kv : m_evalMap) {
438  input[kv.first] = kv.second->eval(trk, vx, evt);
439  }
440  }

◆ load()

void CP::MVAInputEvaluator::load ( const MVAInputEvaluator::InputSelectionMap selection)

Definition at line 428 of file MVAInputEvaluator.cxx.

428  {
429  clear();
430  for (const auto& kv : selection) {
431  add(kv.first, kv.second);
432  }
433  }

Member Data Documentation

◆ m_evalMap

InputEvaluatorMap CP::MVAInputEvaluator::m_evalMap = {}
private

Definition at line 76 of file MVAInputEvaluator.h.


The documentation for this class was generated from the following files:
CP::MVAInputEvaluator::Pt
@ Pt
Definition: MVAInputEvaluator.h:34
CP::MVAInputEvaluator::M
@ M
Definition: MVAInputEvaluator.h:36
CP::MVAInputEvaluator::D0Sig
@ D0Sig
Definition: MVAInputEvaluator.h:49
CP::MVAInputEvaluator::ErrTheta
@ ErrTheta
Definition: MVAInputEvaluator.h:44
CP::MVAInputEvaluator::ErrD0
@ ErrD0
Definition: MVAInputEvaluator.h:38
Phi
@ Phi
Definition: RPCdef.h:8
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
CP::MVAInputEvaluator::RedChiSq
@ RedChiSq
Definition: MVAInputEvaluator.h:48
CP::MVAInputEvaluator::DZSinTheta
@ DZSinTheta
Definition: MVAInputEvaluator.h:52
CP::MVAInputEvaluator::DZ
@ DZ
Definition: MVAInputEvaluator.h:50
Trk::Z0
@ Z0
Definition: ParameterType.h:18
CP::MVAInputEvaluator::FitWeight
@ FitWeight
Definition: MVAInputEvaluator.h:54
CP::MVAInputEvaluator::VxX
@ VxX
Definition: MVAInputEvaluator.h:55
CP::MVAInputEvaluator::ErrQOverP
@ ErrQOverP
Definition: MVAInputEvaluator.h:46
CP::MVAInputEvaluator::D0
@ D0
Definition: MVAInputEvaluator.h:37
CP::MVAInputEvaluator::m_evalMap
InputEvaluatorMap m_evalMap
Definition: MVAInputEvaluator.h:76
CP::MVAInputEvaluator::QOverP
@ QOverP
Definition: MVAInputEvaluator.h:45
CP::MVAInputEvaluator::ChiSq
@ ChiSq
Definition: MVAInputEvaluator.h:47
Prompt::Def::D0Sig
@ D0Sig
Definition: VarHolder.h:87
CP::MVAInputEvaluator::ErrVxZ
@ ErrVxZ
Definition: MVAInputEvaluator.h:60
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
CP::MVAInputEvaluator::clear
void clear()
Definition: MVAInputEvaluator.cxx:442
CP::MVAInputEvaluator::Phi
@ Phi
Definition: MVAInputEvaluator.h:41
CP::MVAInputEvaluator::ErrVxX
@ ErrVxX
Definition: MVAInputEvaluator.h:56
CP::MVAInputEvaluator::VxZ
@ VxZ
Definition: MVAInputEvaluator.h:59
selection
std::string selection
Definition: fbtTestBasics.cxx:75
CP::MVAInputEvaluator::ErrDZSinTheta
@ ErrDZSinTheta
Definition: MVAInputEvaluator.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
CP::MVAInputEvaluator::ErrVxY
@ ErrVxY
Definition: MVAInputEvaluator.h:58
CP::MVAInputEvaluator::Z0
@ Z0
Definition: MVAInputEvaluator.h:39
Prompt::Def::Pt
@ Pt
Definition: VarHolder.h:76
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CP::MVAInputEvaluator::Eta
@ Eta
Definition: MVAInputEvaluator.h:35
CP::MVAInputEvaluator::Input
Input
Definition: MVAInputEvaluator.h:33
CP::MVAInputEvaluator::Theta
@ Theta
Definition: MVAInputEvaluator.h:43
CP::MVAInputEvaluator::ErrPhi
@ ErrPhi
Definition: MVAInputEvaluator.h:42
CP::MVAInputEvaluator::add
void add(const std::string &name, const MVAInputEvaluator::Input &type)
Definition: MVAInputEvaluator.cxx:306
NswErrorCalibData::Input
Helper struct to be parsed to the object to derive the specific error of the cluster.
Definition: NswErrorCalibData.h:25
CP::MVAInputEvaluator::ErrZ0
@ ErrZ0
Definition: MVAInputEvaluator.h:40
CP::MVAInputEvaluator::VxY
@ VxY
Definition: MVAInputEvaluator.h:57
CP::MVAInputEvaluator::ErrDZ
@ ErrDZ
Definition: MVAInputEvaluator.h:51
Eta
@ Eta
Definition: RPCdef.h:8