FairRoot/PandaRoot
|
#include <PndPidMvaAssociatorTask.h>
Public Member Functions | |
PndPidMvaAssociatorTask () | |
PndPidMvaAssociatorTask (char const *name) | |
virtual | ~PndPidMvaAssociatorTask () |
virtual void | Exec (Option_t *option) |
virtual InitStatus | Init () |
void | Register () |
void | Reset () |
void | SetVerbose (Bool_t verb) |
virtual void | SetParContainers () |
virtual void | Finish () |
virtual void | SetVarNames (std::vector< std::string > const &vNames) |
void | SetClassNames (std::vector< std::string > const &clNames) |
void | SetWeightFileName (std::string const &wFileName) |
void | SetClassifier (Mva_MethodType const &methodT) |
void | SetClassifier (std::string const &methodName) |
void | SetNumNeigh (size_t val) |
void | SetKnnEventParams (float scFact, double weight) |
Private Member Functions | |
PndPidMvaAssociatorTask (PndPidMvaAssociatorTask const &other) | |
PndPidMvaAssociatorTask & | operator= (PndPidMvaAssociatorTask const &other) |
void | DoPidMatch (PndPidCandidate &pidcand, PndPidProbability &prob) |
std::vector< float > const * | PrepareEvtVect (PndPidCandidate const &pidcand) const |
void | SetDefaultWeightsPath () |
ClassDef (PndPidMvaAssociatorTask, 0) | |
Private Attributes | |
FairRootManager * | fManager |
std::vector< std::string > | fVarNames |
Variable names container. More... | |
std::vector< std::string > | fClassNames |
Class names container. More... | |
std::string | fWeightsFileName |
Path to the file holding weights (proto-types, examples, ...) More... | |
size_t | fNumNeigh |
Number of neighbors. More... | |
float | fScFact |
double | fWeight |
PndMvaClassifier * | fClassifier |
MVA classifier object. More... | |
Mva_MethodType | fMethodType |
MVA Method name. More... | |
TClonesArray * | fPidChargedCand |
TClonesArray * | fPidChargedProb |
PndPidCandidate TCA for charged particles. More... | |
TClonesArray * | fMCTrack |
PndPidProbability TCA for charged particles. More... | |
std::string | fMethodName |
Monte-Carlo Truth track TCA. More... | |
Definition at line 42 of file PndPidMvaAssociatorTask.h.
PndPidMvaAssociatorTask::PndPidMvaAssociatorTask | ( | ) |
Default Constructor.
PndPidMvaAssociatorTask::PndPidMvaAssociatorTask | ( | char const * | name | ) |
Constructor.
Definition at line 86 of file PndPidMvaAssociatorTask.cxx.
|
virtual |
Destructor.
Definition at line 125 of file PndPidMvaAssociatorTask.cxx.
References fClassifier, fManager, fMCTrack, fPidChargedCand, and fPidChargedProb.
|
private |
|
private |
|
private |
Performs the actual classification.
pidcand | Current pid candidate to be classified. |
prob | Output probabilities. |
Definition at line 387 of file PndPidMvaAssociatorTask.cxx.
References fClassifier, fClassNames, PndPidCandidate::GetDrcThetaC(), PndPidCandidate::GetEmcCalEnergy(), PndPidCandidate::GetEmcClusterE1(), PndPidCandidate::GetEmcClusterE25(), PndPidCandidate::GetEmcClusterE9(), PndPidCandidate::GetEmcClusterLat(), PndPidCandidate::GetEmcClusterZ20(), PndPidCandidate::GetEmcClusterZ53(), PndPidCandidate::GetEnergy(), PndPidCandidate::GetMomentum(), PndMvaClassifier::GetMvaValues(), PndPidCandidate::GetMvdDEDX(), PndPidCandidate::GetSttMeanDEDX(), i, name, out, PrepareEvtVect(), PndPidProbability::SetElectronPdf(), PndPidProbability::SetKaonPdf(), PndPidProbability::SetMuonPdf(), PndPidProbability::SetPionPdf(), and PndPidProbability::SetProtonPdf().
Referenced by Exec().
|
virtual |
Execute the method.
Definition at line 323 of file PndPidMvaAssociatorTask.cxx.
References DoPidMatch(), fPidChargedCand, fPidChargedProb, fVerbose, PndPidCandidate::GetLorentzVector(), and i.
|
virtual |
Definition at line 564 of file PndPidMvaAssociatorTask.cxx.
|
virtual |
Initialize the method. Called by runner.
Definition at line 156 of file PndPidMvaAssociatorTask.cxx.
References fClassifier, fClassNames, fManager, fMethodName, fMethodType, fNumNeigh, fPidChargedCand, fScFact, fVarNames, fWeight, fWeightsFileName, PndMvaClassifier::Initialize(), PndMultiClassMlpClassify::Initialize(), PndMultiClassBdtClassify::Initialize(), PndKnnClassify::Initialize(), KNN, LVQ, Register(), PndKnnClassify::SetEvtParam(), PndKnnClassify::SetKnn(), TMVA_BDT, and TMVA_MLP.
|
private |
|
private |
Definition at line 460 of file PndPidMvaAssociatorTask.cxx.
References fVarNames, PndPidCandidate::GetDrcThetaC(), PndPidCandidate::GetEmcCalEnergy(), PndPidCandidate::GetEmcClusterE1(), PndPidCandidate::GetEmcClusterE25(), PndPidCandidate::GetEmcClusterE9(), PndPidCandidate::GetEmcClusterLat(), PndPidCandidate::GetEmcClusterZ20(), PndPidCandidate::GetEmcClusterZ53(), PndPidCandidate::GetMomentum(), PndPidCandidate::GetMvdDEDX(), PndPidCandidate::GetSttMeanDEDX(), i, and mom.
Referenced by DoPidMatch().
void PndPidMvaAssociatorTask::Register | ( | ) |
Definition at line 555 of file PndPidMvaAssociatorTask.cxx.
References fMethodName, and fPidChargedProb.
Referenced by Init().
void PndPidMvaAssociatorTask::Reset | ( | ) |
Definition at line 567 of file PndPidMvaAssociatorTask.cxx.
|
inline |
Set the classifier type.
methodT | The method to be used. |
Definition at line 201 of file PndPidMvaAssociatorTask.h.
References fMethodType.
void PndPidMvaAssociatorTask::SetClassifier | ( | std::string const & | methodName | ) |
Set the classifier type.
methodName | The method to be used. |
Definition at line 294 of file PndPidMvaAssociatorTask.cxx.
References fMethodName, fMethodType, KNN, LVQ, TMVA_BDT, and TMVA_MLP.
|
inline |
clNames | Input class names. |
Definition at line 186 of file PndPidMvaAssociatorTask.h.
References fClassNames.
|
private |
Definition at line 112 of file PndPidMvaAssociatorTask.cxx.
References fWeightsFileName.
|
inline |
Set the scale factor and the event weight for KNN classifier.
scFact | Scale factor. |
weight | Events weight. |
Definition at line 206 of file PndPidMvaAssociatorTask.h.
References fScFact, and fWeight.
|
inline |
val | nNumber of neighbors to be uset for KNN classifier. |
Definition at line 196 of file PndPidMvaAssociatorTask.h.
References fNumNeigh, and val.
|
virtual |
|
inlinevirtual |
vNames | Input variable names. |
Reimplemented in PndPidEmcAssociatorTask.
Definition at line 181 of file PndPidMvaAssociatorTask.h.
References fVarNames.
Referenced by PndPidEmcAssociatorTask::SetVarNames().
|
inline |
Definition at line 176 of file PndPidMvaAssociatorTask.h.
References fVerbose.
|
inline |
wFileName | Input weight file. If not specified the standard file from the standard location is loaded. |
Definition at line 191 of file PndPidMvaAssociatorTask.h.
References fWeightsFileName.
|
private |
MVA classifier object.
Definition at line 161 of file PndPidMvaAssociatorTask.h.
Referenced by DoPidMatch(), Init(), and ~PndPidMvaAssociatorTask().
|
private |
Class names container.
Definition at line 150 of file PndPidMvaAssociatorTask.h.
Referenced by DoPidMatch(), Init(), and SetClassNames().
|
private |
Definition at line 140 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), and ~PndPidMvaAssociatorTask().
|
private |
PndPidProbability TCA for charged particles.
Definition at line 168 of file PndPidMvaAssociatorTask.h.
Referenced by ~PndPidMvaAssociatorTask().
|
private |
Monte-Carlo Truth track TCA.
Definition at line 171 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), Register(), and SetClassifier().
|
private |
MVA Method name.
Definition at line 164 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), and SetClassifier().
|
private |
Number of neighbors.
Definition at line 156 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), and SetNumNeigh().
|
private |
Definition at line 166 of file PndPidMvaAssociatorTask.h.
Referenced by Exec(), Init(), and ~PndPidMvaAssociatorTask().
|
private |
PndPidCandidate TCA for charged particles.
Definition at line 167 of file PndPidMvaAssociatorTask.h.
Referenced by Exec(), Register(), and ~PndPidMvaAssociatorTask().
|
private |
Definition at line 157 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), and SetKnnEventParams().
|
private |
Variable names container.
Definition at line 147 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), PrepareEvtVect(), and SetVarNames().
|
private |
Definition at line 158 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), and SetKnnEventParams().
|
private |
Path to the file holding weights (proto-types, examples, ...)
Definition at line 153 of file PndPidMvaAssociatorTask.h.
Referenced by Init(), SetDefaultWeightsPath(), and SetWeightFileName().