AliRoot Core  3dc7879 (3dc7879)
QAtrendingFitExample.C File Reference

Demo usage of the information from the AliExternalInfo and visualization using the TStatToolkit, AliTreePlayer and AliDrawStyle. More...

Go to the source code of this file.

Functions

void loadTree ()
 Load tree and defining derived information (TTree aliases) and metadata. More...
 
void cacheTree ()
 
void RegisterFitters ()
 
void makeMVABootstrapMI (Int_t nRegression=10)
 
void loadMVAReaders ()
 Load regression and register it for later usage. More...
 
void loadMVAReadersBootstrap ()
 
void QAtrendingFitExample ()
 

Variables

Bool_t useDNN =kFALSE
 
TTree * tree = 0
 
TTree * treeCache =0
 

Detailed Description

Demo usage of the information from the AliExternalInfo and visualization using the TStatToolkit, AliTreePlayer and AliDrawStyle.

Author
Marian Ivanov
AliDrawStyle::ApplyStyle("figTemplate");
gStyle->SetOptTitle(1);
.L $AliRoot_SRC/STAT/Macros/AliNDFunctionInterface.cxx+
.L $AliRoot_SRC/STAT/Macros/QAtrendingFitExample.C
0.) loadTree(); 1.) cacheTree(); /// needed in case friend trees or arrays - which are not supported by TMVA 3.) RegisterFitters(); 4.) makeMVAFits(); 5.) loadMVAReaders(); tree->Draw("AliNDFunctionInterface::EvalMVA(2,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP:interactionRate","run==QA.EVS.run&&meanMIP>40&&bz0<-0.3","colz");

Definition in file QAtrendingFitExample.C.

Function Documentation

void cacheTree ( )

CacheTree input variables to tree format usable by TMVA

TMVA can not work with friend trees with indices, resp. with array of the measurements, resp aliases and functions

  • input "flat tree" for MVA learning to be created with variables of interest
  • AliTreePlayer::MakeCacheTree to create flat input tree for TMVA

Definition at line 45 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

void loadMVAReaders ( )

Load regression and register it for later usage.

Definition at line 108 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

void loadMVAReadersBootstrap ( )

Load array of regression -used later in the array regression evaluation (mean, median, rms)

Definition at line 117 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

void loadTree ( )

Load tree and defining derived information (TTree aliases) and metadata.

Definition at line 26 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

void makeMVABootstrapMI ( Int_t  nRegression = 10)

Emulation of the TMVA bootstrap - training repeated several time with different subset of data TODO - Implement real bootstrap ( random sampling with replacement + other methods) in the TMVA (to check with ROOT) TODO - DNN example - TO USE DNN (Deep neural network) BLASS or CBLASS library has to be enabled in ROOT. This is not the case for the default aliBuild recipes

Definition at line 95 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

void QAtrendingFitExample ( )

QAtrendingFitExample

0.) Remove regression file

1.) Load Input data

2.) Cache tree - TMVA expect variables - not functions and aliases

3.) Register fitters

4.) Make bootstrap regression

5.) Load array of regression readers

load one of the bootstrap method

load bootstrap arrays

6.) Draw example plots

6.1 Correlation plot - mean regression of resolutionMIP vs observed resolutionMIP

1 tree->Draw("AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP:run","run==QA.EVS.run","colz");

6.2 Draw ration regression/fit as function of run

1 tree->Draw("AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP:run","run==QA.EVS.run","colz");

6.3 compare of the regression RMS for method array 0 and method array1

1 tree->Draw("AliNDFunctionInterface::EvalMVAStat(0,1,interactionRate, bz0,qmaxQASum,qmaxQASumR):resolutionMIP:run","run==QA.EVS.run","colz");

Definition at line 126 of file QAtrendingFitExample.C.

void RegisterFitters ( )

Register example methods used for regression

  • BDT and MLP example
  • DNN - for the moment not used as need BLASS library - not in default AliRoot
    • Naive adaptation of the DNN configuration from the ROOT tutorials TMVARegression.C -
    • slow 100 times smaller than MLP
    • lead to floating point exception

Definition at line 56 of file QAtrendingFitExample.C.

Referenced by QAtrendingFitExample().

Variable Documentation

TTree* tree = 0

Definition at line 23 of file QAtrendingFitExample.C.

Referenced by AddChains(), AliTPCCalPad::AddFriend(), AliTPCCalibViewer::AddReferenceTree(), AliBaseCalibViewer::AddReferenceTree(), AliBaseCalibViewer::AliBaseCalibViewer(), AliDCSSensorArray::AliDCSSensorArray(), AliEMCALSensorTempArray::AliEMCALSensorTempArray(), AliPainterTest_GenerateDoxyImages(), AliTPCCalibViewer::AliTPCCalibViewer(), AliTPCSensorTempArray::AliTPCSensorTempArray(), AliTreePlayer::AliTreePlayer(), AnalyzeESDtracks(), AliExternalInfo::Cache(), CacheMCProductionInfo(), CacheTestMCProductions(), cacheTree(), CacheTrendingProductions(), AliMUONTriggerStoreV1::CanConnect(), AliMUONTriggerTrackStoreV1::CanConnect(), AliMUONHitStoreV1::CanConnect(), AliMUONDigitStoreVImpl::CanConnect(), AliMUONTrackStoreV1::CanConnect(), AliMUONClusterStoreV2::CanConnect(), AliMUONClusterStoreV1::CanConnect(), AliMUONCheck::CheckESD(), AliXRDPROOFtoolkit::CheckTreeInFile(), AliTreeFormulaF::Compile(), AliMUONChamberCalibrationTask::ConnectInputData(), AliSegmentArray::ConnectTree(), AliStack::ConnectTree(), AliMCEvent::ConnectTreeTR(), AliAnalysisTaskESDfilter::ConvertHeader(), AliMUONDigitStoreV1::Create(), AliTPCCorrection::CreateDistortionTree(), AliTPCSpaceCharge3DDriftLine::CreateDistortionTree(), AnaEvent::CreateEvents(), drawd(), DrawDistortionMaps(), drawmerged(), DrawOccupancy(), DrawXsection(), AliOCDBtoolkit::DumpOCDBAsTxt(), AliAnalysisDataSlot::EnableBranch(), AliAnalysisTask::EnableBranch(), AliAnalysisManager::EventLoop(), AliQADataMakerSim::Exec(), AliQADataMakerRec::Exec(), ExportMCAnchorJSON(), FillVar(), Fit1(), Fit2(), Fit2I(), AliTPCEfield::FitField(), FitI1(), for(), GenerLandau(), AliAnalysisDataSlot::GetBranchAddress(), AliTPCCalPad::GetCalROC(), AliMUONTreeManager::GetClassName(), AliTPCCorrection::GetCorrScaleFactor(), AliStack::GetCurrentTrack(), AliExternalInfo::GetDefaultConfig(), AliTPCclusterFast::GetDigitsMax(), AliAnalysisDataContainer::GetEntry(), GetESDTree(), AliTMinuitToolkit::GetFitFunctionAsAlias(), AliVEventHandler::GetInputFileName(), TStatToolkit::GetMetadata(), AliTMinuitToolkit::GetStreamer(), AliAODEvent::GetTrdTrack(), AliSegmentArray::GetTree(), AliExternalInfo::GetTree(), GetTree(), AliExternalInfo::GetTreeAliVersRD(), AliMCEvent::Header(), AliDummyHandler::Init(), AliSelector::Init(), AliRecoInputHandler::Init(), Init(), AliAODInputHandler::Init(), AliESDInputHandler::Init(), AliMultiEventInputHandler::Init(), AliAnalysisManager::Init(), AliReconstruction::Init(), AliAnalysisManager::InputFileFromTree(), AliSysInfo::IsDisabled(), TTreeSRedirector::IsDisabled(), AliQAManager::IsSaveData(), AliXRDPROOFtoolkit::JoinTreesIndex(), AliESDInputHandlerRP::LoadEvent(), AliRunLoader::LoadHeader(), AliNanoAODTrackMapping::LoadInstance(), loadTree(), AliCDBStorage::LoadTreeFromFile(), AliTreePlayer::LoadTrees(), AliRunLoader::LoadTrigger(), TStatToolkit::MakeAnchorAlias(), MakeChain(), TStatToolkit::MakeCombinedAlias(), AliTPCGenDBTemp::MakeConfig(), AliDCSGenDB::MakeConfig(), AliMUONPedestal::MakeControlHistos(), AliSysInfo::MakeDUTree(), MakeFakeDigits(), AliNDLocalRegression::MakeFit(), MakeFits(), MakeFitTree(), AliRunLoader::MakeHeader(), makeHTMLPage(), MakeLaserTree(), MakePicDy(), MakePickDy(), MakeStat(), AliSysInfo::MakeTree(), AliTreeLoader::MakeTree(), AliSegmentArray::MakeTree(), MakeTree(), AliRunLoader::MakeTree(), AliTPCCalibViewer::MakeTree(), AliXRDPROOFtoolkit::MakeTreeFromList(), AliRunLoader::MakeTrigger(), MergeMuonLight(), MUONefficiency(), MUONmassPlot(), MUONTriggerEfficiency(), MUONTriggerEfficiencyPt(), AliAnalysisTaskMCParticleFilter::Notify(), AliFMDInput::operator=(), AliAnalysisManager::PackOutput(), AliTreePlayer::printSelectedTreeInfo(), AliAnalysisManager::ProcessCut(), AliAnalysisManager::ProfileTask(), QAtrendingFitExample(), ReadESD(), AliTPCGenDBTemp::ReadList(), AliTPCSensorTemp::ReadList(), AliDCSGenDB::ReadList(), AliEMCALSensorTemp::ReadList(), AliTPCGenDBTemp::ReadListTree(), AliDCSGenDB::ReadListTree(), ReadRecoCocktail(), AliEMCALBiasAPD::ReadRootBiasAPDInfo(), AliEMCALCalibAbs::ReadRootCalibAbsInfo(), AliEMCALCalibMapAPD::ReadRootCalibMapAPDInfo(), AliEMCALCalibReference::ReadRootCalibReferenceInfo(), AliEMCALCalibTempCoeff::ReadRootCalibTempCoeffInfo(), AliTPCSensorTempArray::ReadSensors(), AliEMCALSensorTempArray::ReadSensors(), ReadTree(), AliNDFunctionInterface::registerMethod(), reproduceIndexProblem(), AliESDEvent::ResetCascades(), XSection::Run(), XSections::Run(), AliReconstruction::RunSPDTrackleting(), AliReconstruction::RunTracking(), AliCentralTrigger::RunTrigger(), AliTreePlayer::selectTreeInfo(), AliTreePlayer::selectWhatWhereOrderBy(), AliAnalysisDataSlot::SetBranchAddress(), AliDetector::SetBufferSize(), AliDCSGenDB::SetConfTree(), AliDCSSensor::SetEndTime(), AliESDv0Cuts::SetHistogramsOn(), AliESDtrackCuts::SetHistogramsOn(), AliInputEventHandler::SetInputTree(), AliTPCClusterParam::SetInstance(), AliTPCSensorTemp::SetNum(), AliEMCALSensorTemp::SetNum(), AliPIDResponseInputHandler::SetRecoInfo(), AliAnalysisTaskPIDResponse::SetRecoInfo(), AliTPCcalibDButil::SetRefALTROData(), AliTreeTrending::SetTree(), AliNDLocalRegression::SetTree(), AliDetector::SetTreeAddress(), AliTPCCalibQAChecker::SetTreeChecker(), SpectraMonitor(), AliAnalysisManager::StartAnalysis(), Store(), AliAnalysisManager::Terminate(), AliSysInfo::Test(), test1(), test3(), test5(), testExportBinary(), testExportClass(), TestLTM(), testMerge(), TestProductionAccess(), testRead(), testSparse(), AliModule::TreeTR(), AliMUONDataInterface::TriggerStore(), UnitTestAliTPCCalPadTree(), AliSelector::Version(), AliAnalysisSelector::Version(), AliReconstruction::Version(), AliTreeLoader::WriteData(), WriteESD(), AliRunLoader::WriteHeader(), AliEMCALBiasAPD::WriteRootBiasAPDInfo(), AliEMCALCalibAbs::WriteRootCalibAbsInfo(), AliEMCALCalibMapAPD::WriteRootCalibMapAPDInfo(), AliEMCALCalibReference::WriteRootCalibReferenceInfo(), AliEMCALCalibTempCoeff::WriteRootCalibTempCoeffInfo(), WriteTree(), AliRunLoader::WriteTrigger(), AliAnalysisDataSlot::~AliAnalysisDataSlot(), and AliVEvent::~AliVEvent().

TTree* treeCache =0

Definition at line 24 of file QAtrendingFitExample.C.

Referenced by makeMVABootstrapMI().

Bool_t useDNN =kFALSE

Definition at line 22 of file QAtrendingFitExample.C.