new macro and small corrections
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Dec 2009 16:22:25 +0000 (16:22 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Dec 2009 16:22:25 +0000 (16:22 +0000)
PWG1/TPC/macros/LoadMyLibs.C
PWG1/TPC/macros/MakeFinalSpectra.C [new file with mode: 0644]
PWG1/TPC/macros/RunPerformanceTask.C

index dd01d4b..22e457c 100644 (file)
@@ -35,6 +35,7 @@ void LoadMyLibs() {
   CheckLoadLibrary("libANALYSIS");
   CheckLoadLibrary("libAOD");
   CheckLoadLibrary("libANALYSISalice");
+  CheckLoadLibrary("libTENDER");
   CheckLoadLibrary("libTPCcalib");
   CheckLoadLibrary("libPWG1");
 }
diff --git a/PWG1/TPC/macros/MakeFinalSpectra.C b/PWG1/TPC/macros/MakeFinalSpectra.C
new file mode 100644 (file)
index 0000000..76fd87d
--- /dev/null
@@ -0,0 +1,251 @@
+void MakeFinalSpectra(const char *file,  const char* comp) 
+{
+  // open proper input file
+  TFile *inFile = TFile::Open(file);
+  inFile->cd();
+
+  TList *coutput = gFile->Get("TPC");
+
+  // Performance object 
+  TString str(comp);
+
+  if(str.CompareTo("ALL") == 0) 
+  {
+    AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
+    compObjTPC->Analyse();
+    compObjTPC->GetAnalysisFolder()->ls("*");
+    compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
+    TFile fout("PerformanceTPCQA.root","recreate");
+    compObjTPC->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceEff * compObjEff = (AliPerformanceEff*)coutput->FindObject("AliPerformanceEff");
+    compObjEff->Analyse();
+    compObjEff->GetAnalysisFolder()->ls("*");
+    compObjEff->PrintHisto(kTRUE,"PerformanceEffQA.ps");
+    TFile fout("PerformanceEffQA.root","recreate");
+    compObjEff->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
+    compObjDCA->Analyse();
+    compObjDCA->GetAnalysisFolder()->ls("*");
+    compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
+    TFile fout("PerformanceDCAQA.root","recreate");
+    compObjDCA->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceRes");
+    compObjRes->Analyse();
+    compObjRes->GetAnalysisFolder()->ls("*");
+    compObjRes->PrintHisto(kTRUE,"PerformanceResQA.ps");
+    TFile fout("PerformanceResQA.root","recreate");
+    compObjRes->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCInner");
+    compObjRes->Analyse();
+    compObjRes->GetAnalysisFolder()->ls("*");
+    compObjRes->PrintHisto(kTRUE,"PerformanceResTPCInnerQA.ps");
+    TFile fout("PerformanceResTPCInnerQA.root","recreate");
+    compObjRes->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCOuter");
+    compObjRes->Analyse();
+    compObjRes->GetAnalysisFolder()->ls("*");
+    compObjRes->PrintHisto(kTRUE,"PerformanceResTPCOuterQA.ps");
+    TFile fout("PerformanceResTPCOuterQA.root","recreate");
+    compObjRes->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
+    compObjDEdx->Analyse();
+    compObjDEdx->GetAnalysisFolder()->ls("*");
+    compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
+    TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
+    compObjDEdx->GetAnalysisFolder()->Write();
+    fout.Close();
+
+ inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
+    compObjMatchTPCITS->Analyse();
+    compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
+    TFile fout("PerformanceMatchTPCITSQA.root","recreate");
+    compObjMatchTPCITS->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
+    compObjMatchTPCTRD->Analyse();
+    compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
+    TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
+    compObjMatchTPCTRD->GetAnalysisFolder()->Write();
+    fout.Close();
+
+inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
+    compObjMatchTPCEFF->Analyse();
+    compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
+    TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
+    compObjMatchTPCEFF->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("NO_MC") == 0) 
+  {
+    AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
+    compObjTPC->Analyse();
+    compObjTPC->GetAnalysisFolder()->ls("*");
+    compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
+    TFile fout("PerformanceTPCQA.root","recreate");
+    compObjTPC->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
+    compObjDCA->Analyse();
+    compObjDCA->GetAnalysisFolder()->ls("*");
+    compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
+    TFile fout("PerformanceDCAQA.root","recreate");
+    compObjDCA->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
+    compObjDEdx->Analyse();
+    compObjDEdx->GetAnalysisFolder()->ls("*");
+    compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
+    TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
+    compObjDEdx->GetAnalysisFolder()->Write();
+    fout.Close();
+    
+  inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
+    compObjMatchTPCITS->Analyse();
+    compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
+    TFile fout("PerformanceMatchTPCITSQA.root","recreate");
+    compObjMatchTPCITS->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
+    compObjMatchTPCTRD->Analyse();
+    compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
+    TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
+    compObjMatchTPCTRD->GetAnalysisFolder()->Write();
+    fout.Close();
+   
+inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
+    compObjMatchTPCEFF->Analyse();
+    compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
+    TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
+    compObjMatchTPCEFF->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("TPC") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
+    compObjTPC->Analyse();
+    compObjTPC->GetAnalysisFolder()->ls("*");
+    compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
+    TFile fout("PerformanceTPCQA.root","recreate");
+    compObjTPC->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("EFF") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceEff * compObjEff = (AliPerformanceEff*)coutput->FindObject("AliPerformanceEff");
+    compObjEff->Analyse();
+    compObjEff->GetAnalysisFolder()->ls("*");
+    compObjEff->PrintHisto(kTRUE,"PerformanceEffQA.ps");
+    TFile fout("PerformanceEffQA.root","recreate");
+    compObjEff->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("RES") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceRes");
+    compObjRes->Analyse();
+    compObjRes->GetAnalysisFolder()->ls("*");
+    compObjRes->PrintHisto(kTRUE,"PerformanceResQA.ps");
+    TFile fout("PerformanceResQA.root","recreate");
+    compObjRes->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCInner");
+    compObjRes->Analyse();
+    compObjRes->GetAnalysisFolder()->ls("*");
+    compObjRes->PrintHisto(kTRUE,"PerformanceResTPCInnerQA.ps");
+    TFile fout("PerformanceResTPCInnerQA.root","recreate");
+    compObjRes->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("DEDX") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
+    compObjDEdx->Analyse();
+    compObjDEdx->GetAnalysisFolder()->ls("*");
+    compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
+    TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
+    compObjDEdx->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("DCA") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
+    compObjDCA->Analyse();
+    compObjDCA->GetAnalysisFolder()->ls("*");
+    compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
+    TFile fout("PerformanceDCAQA.root","recreate");
+    compObjDCA->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+  else if(str.CompareTo("MATCH") == 0) 
+  {
+  inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
+    compObjMatchTPCITS->Analyse();
+    compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
+    TFile fout("PerformanceMatchTPCITSQA.root","recreate");
+    compObjMatchTPCITS->GetAnalysisFolder()->Write();
+    fout.Close();
+
+  inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
+    compObjMatchTPCTRD->Analyse();
+    compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
+    TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
+    compObjMatchTPCTRD->GetAnalysisFolder()->Write();
+    fout.Close();
+
+inFile->cd();
+    AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
+    compObjMatchTPCEFF->Analyse();
+    compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
+    compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
+    TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
+    compObjMatchTPCEFF->GetAnalysisFolder()->Write();
+    fout.Close();
+  }
+}
index f65acd0..3d61fd5 100644 (file)
   RunPerformanceTask(chain, kTRUE, kTRUE, kTRUE);
 
 
-  //3. Run only on static PROOF at GSI e.g.
-
-  TProof::Reset("jacek@lxgrid5.gsi.de");
-  TProofMgr * proofmgr = TProof::Mgr("jacek@lxgrid5.gsi.de");
-  //proofmgr->SetROOTVersion("523-04");
+  //3. Run only on PoD at GSI e.g.
+  TProofMgr * proofmgr = TProof::Mgr("lxialpod2.gsi.de:21001");
   TProof * proof = proofmgr->CreateSession();
   proof->SetParameter("PROOF_MaxSlavesPerNode", (Long_t)10000);
 
   gROOT->LoadMacro("$ALICE_ROOT/PWG1/TPC/macros/ProofEnableAliRoot.C");
-  ProofEnableAliRoot("/u/jacek/alice/AliRoot/HEAD/");
+  ProofEnableAliRoot("/d/alice11/jacek/alice/x86_64/AliRoot/trunk");
 
   gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
-  TChain* chain = CreateESDChain("esd_v4-16-Rev-08-grid.txt", 200, 0);
+  TChain* chain = CreateESDChain("../input/ffprod_v4-17-Rev-19_900kPythia6D6T.list", 200, 0);
   chain->Lookup();
 
-  gROOT->LoadMacro("$ALICE_ROOT/PWG1/TPC/macros/RunPerformanceTask.C");
-  RunPerformanceTask(chain, kTRUE, kTRUE, kTRUE); 
+  //gROOT->LoadMacro("$ALICE_ROOT/PWG1/TPC/macros/RunPerformanceTask.C");
+  gROOT->LoadMacro("/d/alice11/jacek/alice/TPC/macros/RunPerformanceTask.C");
+  RunPerformanceTask(chain, kFALSE, kTRUE, kTRUE); 
 
   //4. Make final spectra and store them in the
   // output folder and generate control pictures e.g.