/* gSystem->Load("libANALYSIS"); gSystem->Load("libANALYSISalice"); gSystem->Load("libTPCcalib"); //.. // // //Example usage TFile f("KrHisto.root"); AliTPCCalibKr *kr = f.Get("AliTPCCalibKr"); kr->ProjectHisto(kr->GetHistoKr(71),"aaa",30,36,30,40)->Draw() // // // MakeTree(); //default cuts TCut cutKr("cutKr","entries.fElements<5000&&fitNormChi2.fElements<3&&fitNormChi2.fElements>0.2&&abs(fitRMS.fElements/fitMean.fElements-0.06)<0.025"); TObjArray * array = AliTPCCalibViewerGUI::ShowGUI("kryptonTree.root"); AliTPCCalibViewerGUI * viewer = (AliTPCCalibViewerGUI*)array->At(0); TTree * tree = viewer->GetViewer()->GetTree(); tree->SetAlias("cutAll","abs(fitNormChi2.fElements-2.)<1.8&&entries.fElements/entries_Median.fElements<4&&entries.fElements/entries_Median.fElements>0.4&&fitRMS.fElements/fitMean.fElements<0.09&&fitRMS.fElements/fitMean.fElements>0.02") */ void RunAliTPCCalibKrTask(const char* list="KrClusters_250508.txt",Bool_t bProof = kFALSE) { if(bProof) { TProof *proof = TProof::Open("jacek@gsiaf.gsi.de"); gProof->GetManager()->SetROOTVersion("5.18/00a"); // Proof Enable Libraries gROOT->LoadMacro("ProofEnableAliRoot.C"); ProofEnableAliRoot("/d/alice11/jacek/alice/x86_64/AliRoot/HEAD"); } // // Create chain of input files // gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx++"); AliXRDPROOFtoolkit tool; // -- Make chain of files TChain * chain = tool.MakeChain(list,"Kr","",2,0); chain->SetBranchStatus("Cl.fCluster",kFALSE); // // Create the analysis manager // AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis"); // Calibration component AliTPCCalibKr *calibObj = new AliTPCCalibKr; //calibObj->SetASide(kFALSE); // Add task AliTPCCalibKrTask *task = new AliTPCCalibKrTask; task->SetInputChain(chain); task->SetTPCCalibKr(calibObj); mgr->AddTask(task); // Attach input cInput = mgr->CreateContainer("cInput", TChain::Class(), AliAnalysisManager::kInputContainer); mgr->ConnectInput(task, 0, cInput); // Attach output cOutput = mgr->CreateContainer("cOutput", TList::Class(), AliAnalysisManager::kOutputContainer,"outHistFile.root"); mgr->ConnectOutput(task, 0, cOutput); // Run analysis mgr->InitAnalysis(); mgr->PrintStatus(); if(bProof) mgr->StartAnalysis("proof", chain); else mgr->StartAnalysis("local", chain); } void MakeTree(){ TFile fpad("calibKr.root"); AliTPCPreprocessorOnline * preprocesor = new AliTPCPreprocessorOnline; preprocesor->AddComponent(spectrMean->Clone()); preprocesor->AddComponent(spectrRMS->Clone()); preprocesor->AddComponent(fitMean->Clone()); preprocesor->AddComponent(fitRMS->Clone()); preprocesor->AddComponent(fitNormChi2->Clone()); preprocesor->AddComponent(entries->Clone()); preprocesor->DumpToFile("kryptonTree.root"); }