/* * * S.Vanniarajan V.Suyam.Jothi@kvi.nl * * This is the Mutivariate Event classification tool * designed for PANDAROOT Analysis package for * PANDA Experiments. * TMVA(Toolkit for MultiVariate Analysis) is a * two class classifier(signal and background). * available with ROOT package. mainly used for * Event Classification in High Energy Physics Experiments. * * This tool here is Designed from TMVA, for Multiclass * Classification purpose. * * S.Vanniarajan 01-08-08 */ #ifndef PNDGPIDTASK_HH #define PNDGPIDTASK_HH 1 #include "CbmTask.h" #include "PndLhePidTrack.h" #include "TVector3.h" #include #include #include #include #include "TClonesArray.h" #include "CbmRootManager.h" #include "TMVA/Reader.h" #include "PndMvdMCPoint.h" #include "PndTpcPoint.h" #include "PndPidCand.h" using namespace std; class TObjectArray; class TClonesArray; class Reader; class PndGpidTask : public CbmTask { public: // enum type for the type of classifier // task is going to use enum MVAType{ KNN = 1, BDT = 2, MLP = 3, }; /** Default constructor **/ PndGpidTask(); /** Destructor **/ virtual ~PndGpidTask(); // Data modifiers void SetAPPNAME(TString anaName) { fAPPNAME = anaName; } void SetDIR(string dir) {fDIR = dir;} void SetMVA(MVAType mode) { fMVAmode = mode; } /** Virtual method Init **/ virtual InitStatus Init(); /** Virtual method Exec **/ virtual void Exec(Option_t* opt); private: // Private fuction members called by init during Initialization void Config(); // function to configure the Classifier with proper class names and variable names void AddVar(); // function adding the variables for classification void BookingMVA(); // Book the MVA Set by the usr. // MVAType booked MVAType fMVAmode; // Name of the application for which one does the classification used to pickup // the correct configuration file and weight file. std::string fAPPNAME; // locate the directory for the weight files std::string fDIR; // string internally used to select the methed std::string fClassifier; // Array of Variable names for classification names vector fVarNameArray; // Array of Class names for classification names vector fClassNameArray; TMVA::Reader reader[10]; Int_t fNVAR; Int_t fNCLASS; float varArray[100]; // std::vector varArray; // std::vector ::iterator FlIt; // TClonesArray* fPidTrackCand; TClonesArray* fArrTpc; TClonesArray* fArrMvd; TClonesArray* fArrPid; ClassDef(PndGpidTask,1); }; #endif