ATLAS Offline Software
PrimaryTruthClassifier.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PrimaryTruthClassifier.h
7 // Header file for PrimaryTruthClassification tool
9 // (c) ATLAS Detector software
11 
12 #ifndef TRK_PRIMARYTRUTHCLASSIFICATIONTOOL_H
13 #define TRK_PRIMARYTRUTHCLASSIFICATIONTOOL_H
14 
15 
19 
20 #include "AtlasHepMC/GenParticle.h"
22 
23 namespace Trk {
24 
33  public AthAlgTool {
34  public:
35 
36  PrimaryTruthClassifier(const std::string& type, const std::string& name,
37  const IInterface* parent);
39  virtual StatusCode initialize();
40  virtual StatusCode finalize();
41 
43  virtual void initClassification(const McEventCollection&,
44  const std::vector<HepMC::ConstGenParticlePtr>*) const;
45 
46  virtual unsigned int classify(HepMC::ConstGenParticlePtr) const;
47 
48  virtual std::string nameOfClassifier() const;
49 
50  virtual std::string classificationAsString(unsigned int) const;
51 
52  virtual unsigned int numberOfClassifiers() const;
53 
54  private:
57  float m_minREndPrimary;
65 
66  };
67 
70  }
71 
72  inline std::string Trk::PrimaryTruthClassifier::nameOfClassifier() const {
73  return "reconstructableForInDet";
74  }
75 
76  inline std::string Trk::PrimaryTruthClassifier::classificationAsString(unsigned int i) const {
78  return PC.names[i];
79  }
80 
81 } // end namespace
82 #endif
Trk::PrimaryTruthClassifier::nameOfClassifier
virtual std::string nameOfClassifier() const
Definition: PrimaryTruthClassifier.h:72
Trk::PrimaryTruthClassifier::m_minREndPrimary
float m_minREndPrimary
If track has end vertex, this is min R of end vertex to be considered primary.
Definition: PrimaryTruthClassifier.h:58
Trk::PrimaryTruthClassifier::m_maxZStartSecondary
float m_maxZStartSecondary
Definition: PrimaryTruthClassifier.h:62
Trk::PrimaryTruthClassifier::finalize
virtual StatusCode finalize()
Definition: PrimaryTruthClassifier.cxx:49
Trk::PrimaryTruthClassifier::classificationAsString
virtual std::string classificationAsString(unsigned int) const
Definition: PrimaryTruthClassifier.h:76
Trk::PrimaryTruthClassifier::m_minREndSecondary
float m_minREndSecondary
Definition: PrimaryTruthClassifier.h:63
Trk::PrimaryTruthClassifier::initialize
virtual StatusCode initialize()
initialize
Definition: PrimaryTruthClassifier.cxx:44
ITrackTruthClassifier.h
Trk::PrimaryTruthClassifier::numberOfClassifiers
virtual unsigned int numberOfClassifiers() const
Definition: PrimaryTruthClassifier.h:68
Trk::PrimaryTruthClassifier::m_maxZStartPrimary
float m_maxZStartPrimary
Max Z of start vertex to be considered primary.
Definition: PrimaryTruthClassifier.h:56
GenParticle.h
Trk::PrimaryTruthClassifier::~PrimaryTruthClassifier
~PrimaryTruthClassifier()
Definition: PrimaryTruthClassifier.h:38
Trk::PrimaryTruthClassifier::PrimaryTruthClassifier
PrimaryTruthClassifier(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PrimaryTruthClassifier.cxx:17
Trk::PrimaryTruthClassifier::classify
virtual unsigned int classify(HepMC::ConstGenParticlePtr) const
Definition: PrimaryTruthClassifier.cxx:64
SimpleVector.h
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::TruthClassification::NumberOfPrimaryClassifiers
@ NumberOfPrimaryClassifiers
Definition: TruthClassificationDefs.h:28
Trk::TruthClassification::PrimaryClassifierStrings
Simple struct to access the names of the track classifiers.
Definition: TruthClassificationDefs.h:52
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::PrimaryTruthClassifier::m_maxRStartPrimary
float m_maxRStartPrimary
Max R of start vertex to be considered primary.
Definition: PrimaryTruthClassifier.h:55
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
Trk::PrimaryTruthClassifier::initClassification
virtual void initClassification(const McEventCollection &, const std::vector< HepMC::ConstGenParticlePtr > *) const
explain
Definition: PrimaryTruthClassifier.cxx:55
Trk::PrimaryTruthClassifier::m_minZEndSecondary
float m_minZEndSecondary
Definition: PrimaryTruthClassifier.h:64
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::PrimaryTruthClassifier::m_maxRStartSecondary
float m_maxRStartSecondary
Definition: PrimaryTruthClassifier.h:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
Trk::ITrackTruthClassifier
provides the interface for tools which classify gen particles
Definition: ITrackTruthClassifier.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
Trk::PrimaryTruthClassifier
modular concept to define certain categories of truth particles, this one labels primary,...
Definition: PrimaryTruthClassifier.h:33
TruthClassificationDefs.h
Trk::TruthClassification::PrimaryClassifierStrings::names
std::vector< std::string > names
The member.
Definition: TruthClassificationDefs.h:64
Trk::PrimaryTruthClassifier::m_minZEndPrimary
float m_minZEndPrimary
If track has end vertex, this is min Z of end vertex to be considered primary.
Definition: PrimaryTruthClassifier.h:60