28 tree = info.
GetChain(
"QA.TPC",
"LHC17*",
"cpass1_pass1",
"QA.EVS;QA.rawTPC");
29 tree->SetAlias(
"interactionRate",
"QA.EVS.interactionRate");
31 tree->SetAlias(
"qmaxQASum",
"Sum$(qmaxQA.fElements*((abs(qmaxQA.fElements-40)<20)))/Sum$((abs(qmaxQA.fElements-40)<20))");
32 tree->SetAlias(
"qmaxQASumIn",
"Sum$(qmaxQA.fElements*((Iteration$<36&&abs(qmaxQA.fElements-40)<20)))/Sum$((Iteration$<36&&abs(qmaxQA.fElements-40)<20))");
33 tree->SetAlias(
"qmaxQASumOut",
"Sum$(qmaxQA.fElements*((Iteration$>=36&&abs(qmaxQA.fElements-40)<20)))/Sum$((Iteration$>=36&&abs(qmaxQA.fElements-40)<20))");
34 tree->SetAlias(
"qmaxQASumR",
"qmaxQASumIn/qmaxQASum");
35 tree->SetAlias(
"meanMIPeleR",
"meanMIPele/meanMIP");
36 tree->SetAlias(
"bz0",
"bz+rndm*0.0001");
37 tree->SetMarkerStyle(21);
tree->SetMarkerSize(0.5);
46 AliTreePlayer::MakeCacheTree(
tree,
"resolutionMIP:meanMIPeleR:tpcItsMatchA:bz0:interactionRate:qmaxQASum:qmaxQASumIn:qmaxQASumOut:qmaxQASumR:run:time",
"TMVAInput.root",
"MVAInput",
"meanMIP>30&&run==QA.EVS.run");
57 TString layoutString(
"Layout=TANH|20,LINEAR");
58 TString training0(
"LearningRate=1e-5,Momentum=0.5,Repetitions=1,ConvergenceSteps=500,BatchSize=50," 59 "TestRepetitions=7,WeightDecay=0.01,Regularization=L1,DropConfig=0.5+0.5+0.5+0.5," 61 TString training1(
"LearningRate=1e-5,Momentum=0.9,Repetitions=1,ConvergenceSteps=170,BatchSize=30," 62 "TestRepetitions=7,WeightDecay=0.01,Regularization=L1,DropConfig=0.1+0.1+0.1,DropRepetitions=" 64 TString trainingStrategyString(
"TrainingStrategy=");
65 trainingStrategyString += training0 +
"|" + training1;
66 TString dnnOptions(
"!H:V:ErrorStrategy=SUMOFSQUARES:VarTransform=G:WeightInitialization=XAVIERUNIFORM:Architecture=CPU");
67 dnnOptions.Append(
":");
68 dnnOptions.Append(layoutString);
69 dnnOptions.Append(
":");
70 dnnOptions.Append(trainingStrategyString);
75 AliNDFunctionInterface::registerMethod(
"MLP",
"!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=N+20:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator",TMVA::Types::kMLP);
98 gSystem->Unlink(
"TMVA_RegressionOutput.root");
99 TString output=
"TMVA_RegressionOutput.root#";
100 for (Long_t iBoot=0; iBoot<nRegression; iBoot++) {
128 gSystem->Unlink(
"TMVA_RegressionOutput.root");
140 tree->Draw(
"AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR):AliNDFunctionInterface::EvalMVA(0,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP",
"run==QA.EVS.run",
"colz");
147 tree->Draw(
"AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP:run",
"run==QA.EVS.run",
"colz");
148 gPad->SaveAs(
"resolutionMIPvsfit.png");
152 tree->Draw(
"AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR)/resolutionMIP:run:interactionRate",
"run==QA.EVS.run",
"colz");
153 gPad->SaveAs(
"resolutionMIPFitRatiovsRun.png");
157 tree->Draw(
"AliNDFunctionInterface::EvalMVAStat(0,2,interactionRate, bz0,qmaxQASum,qmaxQASumR):AliNDFunctionInterface::EvalMVAStat(1,2,interactionRate, bz0,qmaxQASum,qmaxQASumR)",
"run==QA.EVS.run",
"colz");
TFile * Open(const char *filename, Long64_t &nevents)
Int_t FitMVARegression(const char *output, TTree *tree, const char *varFit, TCut cut, const char *variables, const char *methods, const char *factoryString="")
MVA Classification.
void loadTree()
Load tree and defining derived information (TTree aliases) and metadata.
void loadMVAReadersBootstrap()
Int_t LoadMVAReaderArray(Int_t id, const char *inputFile, const char *methodMask, const char *dirMask)
void loadMVAReaders()
Load regression and register it for later usage.
TMVA::MethodBase * LoadMVAReader(Int_t id, const char *inputFile, const char *method, const char *dir)
new MVA Regression
This class gives you an interface to different trees of information spread throughout ALICE...
TChain * GetChain(TString type, TString period, TString pass, Int_t buildIndex=1)
void registerMethod(std::string method, std::string content, TMVA::Types::EMVA id)
static void MakeCacheTree(TTree *tree, TString varList, TString outFile, TString outTree, TCut selection, Int_t nEntries=-1, Int_t firstEntry=0)
Fill tree with information specified in varList of TTreeFormulas Used to cache CPU consuming formulas...
void makeMVABootstrapMI(Int_t nRegression=10)
void QAtrendingFitExample()