CbmRoot
|
#include <CbmTrdElectronsTrainAnn.h>
Public Member Functions | |
CbmTrdElectronsTrainAnn (int nofTrdLayers) | |
Default constructor. More... | |
virtual | ~CbmTrdElectronsTrainAnn () |
Destructor. More... | |
virtual InitStatus | Init () |
Inherited from FairTask. More... | |
virtual void | Exec (Option_t *opt) |
Inherited from FairTask. More... | |
virtual void | Finish () |
Inherited from FairTask. More... | |
void | Draw (Option_t *="") |
Draw results. More... | |
void | SetIsDoTrain (Bool_t doTrain) |
void | SetTransformType (Int_t type) |
void | SetIdMethod (IdMethod idMethod) |
void | SetOutputDir (const std::string &outputDir) |
void | SetNofAnnEpochs (Int_t nofAnnEpochs) |
void | SetNofTrainSamples (Int_t nofTr) |
void | SetSigmaError (Double_t sigma) |
void | SetBeamDataFile (std::string beamDataFile) |
void | SetBeamDataPiHist (std::string beamDataPiHist) |
void | SetBeamDataElHist (std::string beamDataElHist) |
void | RunBeamData () |
Private Member Functions | |
void | FillElossVectorSim () |
Fill vector with energy loss information for simulated data. More... | |
void | FillElossVectorReal () |
Fill vector with energy loss information simulated from real data spectra. More... | |
void | FillElossHist () |
Fill histograms with energy loss information. More... | |
void | SortElossAndFillHist () |
Sort energy losses and fill histograms. More... | |
void | Run () |
void | DoTrain () |
void | DoTest () |
void | DoPreTest () |
TTree * | CreateTree () |
std::string | CreateAnnString () |
TMVA::Factory * | CreateFactory (TTree *simu) |
TMVA::Reader * | CreateTmvaReader () |
void | Transform () |
void | Transform1 () |
void | Transform2 () |
Double_t | FindOptimalCut () |
void | CreateCumProbOutputHist () |
TGraph * | CreateRocDiagramm () |
Double_t | Likelihood () |
Double_t | Median () |
Double_t | MeanCut () |
Double_t | Eval (Bool_t isEl) |
void | FillAnnInputHist (Bool_t isEl) |
CbmTrdElectronsTrainAnn (const CbmTrdElectronsTrainAnn &) | |
CbmTrdElectronsTrainAnn & | operator= (const CbmTrdElectronsTrainAnn &) |
ClassDef (CbmTrdElectronsTrainAnn, 1) | |
Private Attributes | |
TClonesArray * | fMCTracks |
TClonesArray * | fTrdPoints |
TClonesArray * | fTrdTracks |
TClonesArray * | fTrdTrackMatches |
TClonesArray * | fTrdHits |
std::vector< std::vector< std::vector< TrdEloss > > > | fEloss |
std::vector< TH1 * > | fHists |
TH1 * | fhResults |
std::vector< TH1 * > | fhMeanEloss |
std::vector< TH1 * > | fhEloss |
std::vector< std::vector< TH1 * > > | fhElossSort |
Int_t | fEventNum |
std::string | fOutputDir |
Double_t | fSigmaError |
Bool_t | fIsDoTrain |
Int_t | fTransformType |
std::string | fBeamDataFile |
std::string | fBeamDataPiHist |
std::string | fBeamDataElHist |
std::vector< Float_t > | fAnnInput |
Float_t | fXOut |
Int_t | fNofTrdLayers |
Double_t | fMaxEval |
Double_t | fMinEval |
TMultiLayerPerceptron * | fNN |
TMVA::Reader * | fReader |
IdMethod | fIdMethod |
Int_t | fNofAnnEpochs |
Int_t | fNofTrainSamples |
double | fElIdEfficiency |
std::vector< TH1 * > | fhOutput |
std::vector< TH1 * > | fhCumProbOutput |
std::vector< std::vector< TH1 * > > | fhInput |
Definition at line 54 of file CbmTrdElectronsTrainAnn.h.
CbmTrdElectronsTrainAnn::CbmTrdElectronsTrainAnn | ( | int | nofTrdLayers | ) |
Default constructor.
|
virtual |
Destructor.
Definition at line 144 of file CbmTrdElectronsTrainAnn.cxx.
|
private |
|
private |
|
private |
Definition at line 676 of file CbmTrdElectronsTrainAnn.cxx.
References fNofTrdLayers, and i.
Referenced by DoPreTest(), DoTest(), and DoTrain().
|
private |
Definition at line 620 of file CbmTrdElectronsTrainAnn.cxx.
References fhCumProbOutput, fhOutput, and i.
Referenced by DoPreTest().
|
private |
Definition at line 690 of file CbmTrdElectronsTrainAnn.cxx.
References fNofTrdLayers, fOutputDir, and i.
Referenced by DoTrain().
|
private |
Definition at line 632 of file CbmTrdElectronsTrainAnn.cxx.
References fhCumProbOutput, i, x, and y.
Referenced by Draw().
|
private |
Definition at line 711 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, fNofTrdLayers, fReader, and i.
Referenced by DoPreTest(), and DoTest().
|
private |
Definition at line 661 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, fNofTrdLayers, fXOut, and i.
Referenced by DoPreTest(), DoTest(), and DoTrain().
|
private |
Definition at line 489 of file CbmTrdElectronsTrainAnn.cxx.
References CreateAnnString(), CreateCumProbOutputHist(), CreateTmvaReader(), CreateTree(), Eval(), fAnnInput, fEloss, fhOutput, fIdMethod, FillAnnInputHist(), fMaxEval, fMinEval, fNN, fNofTrainSamples, fNofTrdLayers, fOutputDir, fReader, fSigmaError, i, kANN, kBDT, kLIKELIHOOD, kMEDIAN, and Transform().
Referenced by DoTest().
|
private |
Definition at line 545 of file CbmTrdElectronsTrainAnn.cxx.
References CreateAnnString(), CreateTmvaReader(), CreateTree(), DoPreTest(), Eval(), fAnnInput, fElIdEfficiency, fEloss, fhResults, fIdMethod, FindOptimalCut(), fMaxEval, fMinEval, fNN, fNofTrainSamples, fNofTrdLayers, fOutputDir, fReader, i, kANN, kBDT, and Transform().
Referenced by Run().
|
private |
Definition at line 444 of file CbmTrdElectronsTrainAnn.cxx.
References CreateAnnString(), CreateFactory(), CreateTree(), fAnnInput, fEloss, fIdMethod, fNN, fNofAnnEpochs, fNofTrainSamples, fNofTrdLayers, fOutputDir, fXOut, i, kANN, kBDT, and Transform().
Referenced by Run().
void CbmTrdElectronsTrainAnn::Draw | ( | Option_t * | = "" | ) |
Draw results.
Definition at line 737 of file CbmTrdElectronsTrainAnn.cxx.
References CreateRocDiagramm(), DrawGraph(), DrawH1(), fhCumProbOutput, fhEloss, fhElossSort, fhInput, fhMeanEloss, fhOutput, fNofTrdLayers, i, kLinear, kLog, and SetDefaultDrawStyle().
Referenced by Finish().
|
private |
Definition at line 425 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, fIdMethod, fNN, fNofTrdLayers, fReader, i, kANN, kBDT, kLIKELIHOOD, kMeanCut, kMEDIAN, Likelihood(), MeanCut(), and Median().
Referenced by DoPreTest(), and DoTest().
|
virtual |
Inherited from FairTask.
Definition at line 180 of file CbmTrdElectronsTrainAnn.cxx.
References fEloss, fEventNum, FillElossHist(), FillElossVectorSim(), and SortElossAndFillHist().
|
private |
Definition at line 727 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, and fhInput.
Referenced by DoPreTest().
|
private |
Fill histograms with energy loss information.
Definition at line 288 of file CbmTrdElectronsTrainAnn.cxx.
References fEloss, fhEloss, fhMeanEloss, and i.
Referenced by Exec(), and RunBeamData().
|
private |
Fill vector with energy loss information simulated from real data spectra.
Definition at line 218 of file CbmTrdElectronsTrainAnn.cxx.
References fBeamDataElHist, fBeamDataFile, fBeamDataPiHist, fEloss, fhEloss, and fNofTrdLayers.
Referenced by RunBeamData().
|
private |
Fill vector with energy loss information for simulated data.
only primary tracks generated by BoxGenerator
Definition at line 249 of file CbmTrdElectronsTrainAnn.cxx.
References fEloss, fMCTracks, fNofTrdLayers, fTrdHits, fTrdTrackMatches, fTrdTracks, CbmTrdHit::GetELoss(), CbmTrack::GetHitIndex(), CbmLink::GetIndex(), CbmMatch::GetMatchedLink(), CbmMCTrack::GetMotherId(), CbmTrack::GetNofHits(), CbmMCTrack::GetPdgCode(), and v.
Referenced by Exec().
|
private |
Definition at line 650 of file CbmTrdElectronsTrainAnn.cxx.
References fElIdEfficiency, fhCumProbOutput, and i.
Referenced by DoTest().
|
virtual |
Inherited from FairTask.
Definition at line 194 of file CbmTrdElectronsTrainAnn.cxx.
References Draw(), f, fHists, fOutputDir, i, and Run().
Referenced by RunBeamData().
|
virtual |
Inherited from FairTask.
Definition at line 146 of file CbmTrdElectronsTrainAnn.cxx.
References fMCTracks, fTrdHits, fTrdPoints, fTrdTrackMatches, and fTrdTracks.
|
private |
Definition at line 382 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, and fhEloss.
Referenced by Eval().
|
private |
Definition at line 414 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, fhEloss, fNofTrdLayers, and i.
Referenced by Eval().
|
private |
Definition at line 400 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, fhEloss, and fNofTrdLayers.
Referenced by Eval().
|
private |
|
private |
Definition at line 323 of file CbmTrdElectronsTrainAnn.cxx.
References DoTest(), DoTrain(), fIdMethod, fIsDoTrain, kANN, kBDT, kLIKELIHOOD, kMeanCut, and kMEDIAN.
Referenced by Finish().
void CbmTrdElectronsTrainAnn::RunBeamData | ( | ) |
Definition at line 207 of file CbmTrdElectronsTrainAnn.cxx.
References fEloss, FillElossHist(), FillElossVectorReal(), Finish(), and SortElossAndFillHist().
|
inline |
Definition at line 164 of file CbmTrdElectronsTrainAnn.h.
References fBeamDataElHist.
|
inline |
Definition at line 158 of file CbmTrdElectronsTrainAnn.h.
References fBeamDataFile.
|
inline |
Definition at line 161 of file CbmTrdElectronsTrainAnn.h.
References fBeamDataPiHist.
|
inline |
Definition at line 148 of file CbmTrdElectronsTrainAnn.h.
References fIdMethod.
|
inline |
Definition at line 144 of file CbmTrdElectronsTrainAnn.h.
References fIsDoTrain.
|
inline |
Definition at line 152 of file CbmTrdElectronsTrainAnn.h.
References fNofAnnEpochs.
|
inline |
Definition at line 154 of file CbmTrdElectronsTrainAnn.h.
References fNofTrainSamples.
|
inline |
Definition at line 150 of file CbmTrdElectronsTrainAnn.h.
References fOutputDir.
|
inline |
Definition at line 156 of file CbmTrdElectronsTrainAnn.h.
References fSigmaError.
|
inline |
Definition at line 146 of file CbmTrdElectronsTrainAnn.h.
References fTransformType.
|
private |
Sort energy losses and fill histograms.
Definition at line 303 of file CbmTrdElectronsTrainAnn.cxx.
References fEloss, fhElossSort, fNofTrdLayers, and v.
Referenced by Exec(), and RunBeamData().
|
private |
Definition at line 333 of file CbmTrdElectronsTrainAnn.cxx.
References fIdMethod, fTransformType, kANN, kBDT, Transform1(), and Transform2().
Referenced by DoPreTest(), DoTest(), and DoTrain().
|
private |
Definition at line 344 of file CbmTrdElectronsTrainAnn.cxx.
Referenced by Transform().
|
private |
Definition at line 359 of file CbmTrdElectronsTrainAnn.cxx.
References fAnnInput, and fhElossSort.
Referenced by Transform().
|
private |
Definition at line 213 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateTmvaReader(), CreateTree(), DoPreTest(), DoTest(), DoTrain(), Eval(), FillAnnInputHist(), Likelihood(), MeanCut(), Median(), Transform1(), and Transform2().
|
private |
Definition at line 211 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorReal(), and SetBeamDataElHist().
|
private |
Definition at line 208 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorReal(), and SetBeamDataFile().
|
private |
Definition at line 209 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorReal(), and SetBeamDataPiHist().
|
private |
Definition at line 226 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoTest(), and FindOptimalCut().
|
private |
Definition at line 184 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), DoTest(), DoTrain(), Exec(), FillElossHist(), FillElossVectorReal(), FillElossVectorSim(), RunBeamData(), and SortElossAndFillHist().
|
private |
Definition at line 201 of file CbmTrdElectronsTrainAnn.h.
Referenced by Exec().
|
private |
Definition at line 232 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateCumProbOutputHist(), CreateRocDiagramm(), Draw(), and FindOptimalCut().
|
private |
Definition at line 194 of file CbmTrdElectronsTrainAnn.h.
Referenced by Draw(), FillElossHist(), FillElossVectorReal(), Likelihood(), MeanCut(), and Median().
|
private |
Definition at line 199 of file CbmTrdElectronsTrainAnn.h.
Referenced by Draw(), SortElossAndFillHist(), and Transform2().
|
private |
Definition at line 234 of file CbmTrdElectronsTrainAnn.h.
Referenced by Draw(), and FillAnnInputHist().
|
private |
Definition at line 186 of file CbmTrdElectronsTrainAnn.h.
Referenced by Finish().
|
private |
Definition at line 193 of file CbmTrdElectronsTrainAnn.h.
Referenced by Draw(), and FillElossHist().
|
private |
Definition at line 230 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateCumProbOutputHist(), DoPreTest(), and Draw().
|
private |
Definition at line 189 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoTest().
|
private |
Definition at line 223 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), DoTest(), DoTrain(), Eval(), Run(), SetIdMethod(), and Transform().
|
private |
Definition at line 204 of file CbmTrdElectronsTrainAnn.h.
Referenced by Run(), and SetIsDoTrain().
|
private |
Definition at line 218 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), and DoTest().
|
private |
Definition at line 174 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorSim(), and Init().
|
private |
Definition at line 219 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), and DoTest().
|
private |
Definition at line 221 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), DoTest(), DoTrain(), and Eval().
|
private |
Definition at line 224 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoTrain(), and SetNofAnnEpochs().
|
private |
Definition at line 225 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), DoTest(), DoTrain(), and SetNofTrainSamples().
|
private |
Definition at line 216 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateAnnString(), CreateFactory(), CreateTmvaReader(), CreateTree(), DoPreTest(), DoTest(), DoTrain(), Draw(), Eval(), FillElossVectorReal(), FillElossVectorSim(), MeanCut(), Median(), and SortElossAndFillHist().
|
private |
Definition at line 202 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateFactory(), DoPreTest(), DoTest(), DoTrain(), Finish(), and SetOutputDir().
|
private |
Definition at line 222 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateTmvaReader(), DoPreTest(), DoTest(), and Eval().
|
private |
Definition at line 203 of file CbmTrdElectronsTrainAnn.h.
Referenced by DoPreTest(), and SetSigmaError().
|
private |
Definition at line 205 of file CbmTrdElectronsTrainAnn.h.
Referenced by SetTransformType(), and Transform().
|
private |
Definition at line 178 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorSim(), and Init().
|
private |
Definition at line 175 of file CbmTrdElectronsTrainAnn.h.
Referenced by Init().
|
private |
Definition at line 177 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorSim(), and Init().
|
private |
Definition at line 176 of file CbmTrdElectronsTrainAnn.h.
Referenced by FillElossVectorSim(), and Init().
|
private |
Definition at line 214 of file CbmTrdElectronsTrainAnn.h.
Referenced by CreateTree(), and DoTrain().