]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
QA for pp data
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Dec 2009 03:05:52 +0000 (03:05 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Dec 2009 03:05:52 +0000 (03:05 +0000)
42 files changed:
prod/acrcaf/qa_pp/AddTaskCalorimeterQA.C [new file with mode: 0644]
prod/acrcaf/qa_pp/AddTaskQAsym.C [new file with mode: 0644]
prod/acrcaf/qa_pp/AddTaskVZEROQA.C [new file with mode: 0644]
prod/acrcaf/qa_pp/AliAnaVZEROQA.cxx [new file with mode: 0644]
prod/acrcaf/qa_pp/AliAnaVZEROQA.h [new file with mode: 0644]
prod/acrcaf/qa_pp/AliAnalysisTaskQASym.cxx [new file with mode: 0644]
prod/acrcaf/qa_pp/AliAnalysisTaskQASym.h [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plot.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotD.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotDca.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotDcaVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotDeltaPhi.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotEta-over-pt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotEta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotEtaPtVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotEtaVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotLadderDca.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotLadderEta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotLadderPhi.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotLadderPt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotLadderSigma.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPhi.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPhiVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPhi_Eta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPtVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotPt_Eta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotQPtVz.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotQPt_Eta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorDca.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorDcaRatio.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorEta.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPtRatio.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorEtaRatio.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorPt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorPtRatio.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorQPt.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/plotSectorQPtRatio.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/pos-NegInv.C [new file with mode: 0644]
prod/acrcaf/qa_pp/plot_macros/sigma.C [new file with mode: 0644]
prod/acrcaf/qa_pp/qa_pp.C [new file with mode: 0644]

diff --git a/prod/acrcaf/qa_pp/AddTaskCalorimeterQA.C b/prod/acrcaf/qa_pp/AddTaskCalorimeterQA.C
new file mode 100644 (file)
index 0000000..ac70c8c
--- /dev/null
@@ -0,0 +1,113 @@
+AliAnalysisTaskParticleCorrelation *AddTaskCalorimeterQA(TString data, Bool_t kUseKinematics = kFALSE, Bool_t kPrintSettings = kFALSE)\r
+{\r
+  // Creates a PartCorr task for calorimeters performance studies, configures it and adds it to the analysis manager.\r
+  \r
+  // Get the pointer to the existing analysis manager via the static access method.\r
+  //==============================================================================\r
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+  if (!mgr) {\r
+    ::Error("AddTaskPartCorr", "No analysis manager to connect to.");\r
+    return NULL;\r
+  }  \r
+  \r
+  // Check the analysis type using the event handlers connected to the analysis manager.\r
+  //==============================================================================\r
+  if (!mgr->GetInputEventHandler()) {\r
+    ::Error("AddTaskPartCorr", "This task requires an input event handler");\r
+    return NULL;\r
+  }\r
+   TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"\r
+  \r
+   // Configure analysis\r
+   //===========================================================================\r
+  \r
+  //Reader\r
+  //For this particular analysis few things done by the reader.\r
+  //Nothing else needs to be set.\r
+  AliCaloTrackReader * reader = 0x0;\r
+  if(data=="AOD")      reader = new AliCaloTrackAODReader();\r
+  else if(data=="ESD") reader = new AliCaloTrackESDReader();\r
+  //reader->SetDebug(10);//10 for lots of messages\r
+   if(kPrintSettings) reader->Print("");\r
+  \r
+  if(kUseKinematics){\r
+               if(inputDataType == "ESD"){\r
+                       reader->SwitchOnStack();          \r
+                       reader->SwitchOffAODMCParticles(); \r
+               }\r
+               else if(inputDataType == "AOD"){\r
+                       reader->SwitchOffStack();          \r
+                       reader->SwitchOnAODMCParticles(); \r
+               }\r
+   }\r
+       \r
+   reader->SetDeltaAODFileName(""); //Do not create deltaAOD file, this analysis do not create branches.\r
+\r
+       \r
+  // ##### Analysis algorithm settings ####\r
+   //Only needed now for MC data\r
+   //AliFiducialCut * fidCut = new AliFiducialCut();\r
+   //fidCut->DoCTSFiducialCut(kFALSE) ;\r
+   //fidCut->DoEMCALFiducialCut(kTRUE) ;\r
+   //fidCut->DoPHOSFiducialCut(kTRUE) ;\r
+               \r
+  AliAnaCalorimeterQA *emcalQA = new AliAnaCalorimeterQA();\r
+  //emcalQA->SetDebug(2); //10 for lots of messages\r
+  emcalQA->SetCalorimeter("EMCAL");\r
+  if(kUseKinematics) emcalQA->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.\r
+  else  emcalQA->SwitchOffDataMC() ;\r
+  emcalQA->AddToHistogramsName("EMCAL_"); //Begining of histograms name\r
+  //emcalQA->SetFiducialCut(fidCut);\r
+  emcalQA->SwitchOffFidutialCut();\r
+  if(kPrintSettings) emcalQA->Print("");       \r
+  //emcalQA->SwithOnPlotsMaking();\r
+  //emcalQA->GetMCAnalysisUtils()->SetDebug(10);\r
+       \r
+   AliAnaCalorimeterQA *phosQA = new AliAnaCalorimeterQA();\r
+   //phosQA->SetDebug(2); //10 for lots of messages\r
+   phosQA->SetCalorimeter("PHOS");\r
+   if(kUseKinematics) phosQA->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.\r
+   else  phosQA->SwitchOffDataMC() ;  \r
+   phosQA->AddToHistogramsName("PHOS_");//Begining of histograms name\r
+   //phosQA->SetFiducialCut(fidCut);\r
+   phosQA->SwitchOffFidutialCut();\r
+   if(kPrintSettings)phosQA->Print("");        \r
+   //phosQA->GetMCAnalysisUtils()->SetDebug(10);\r
+   //phosQA->SwithOnPlotsMaking();\r
+  \r
+  // #### Configure Maker ####\r
+  AliAnaPartCorrMaker * maker = new AliAnaPartCorrMaker();\r
+  maker->SetReader(reader);//pointer to reader\r
+  maker->AddAnalysis(emcalQA,0);\r
+  maker->AddAnalysis(phosQA,1);\r
+  maker->SetAnaDebug(0)  ;\r
+  maker->SwitchOnHistogramsMaker()  ;\r
+  maker->SwitchOffAODsMaker()  ;\r
+  if(kPrintSettings) maker->Print("");\r
\r
+\r
+  printf("======================== \n");\r
+  printf(" End Configuration of Calorimeter QA \n");\r
+  printf("======================== \n");\r
+  \r
+   // Create task\r
+   //===========================================================================\r
+  AliAnalysisTaskParticleCorrelation * task = new AliAnalysisTaskParticleCorrelation ("CalorimeterPerformance");\r
+  task->SetConfigFileName(""); //Don't configure the analysis via configuration file.\r
+  task->SetDebugLevel(0);\r
+  task->SetAnalysisMaker(maker);                               \r
+  mgr->AddTask(task);\r
+  \r
+  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer("Calo.Performance",TList::Class(),\r
+                                                          AliAnalysisManager::kOutputContainer, "Calo.Performance.root");\r
+  \r
+  // Create ONLY the output containers for the data produced by the task.\r
+  // Get and connect other common input/output containers via the manager as below\r
+  //==============================================================================\r
+  mgr->ConnectInput  (task, 0, mgr->GetCommonInputContainer());\r
+  mgr->ConnectOutput (task, 1, cout_pc);\r
+  \r
+  return task;\r
+}\r
+\r
+\r
diff --git a/prod/acrcaf/qa_pp/AddTaskQAsym.C b/prod/acrcaf/qa_pp/AddTaskQAsym.C
new file mode 100644 (file)
index 0000000..ba3d30b
--- /dev/null
@@ -0,0 +1,46 @@
+void AddTaskQAsym(Int_t runNumber)\r
+{\r
+  // Creates a QA task exploiting simple symmetries phi, eta +/-, charge ...\r
+  \r
+  // Get the pointer to the existing analysis manager via the static access method.\r
+  //==============================================================================\r
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+  if (!mgr) {\r
+    ::Error("AddTaskQAsym", "No analysis manager to connect to.");\r
+    return NULL;\r
+  }  \r
+  \r
+  // Check the analysis type using the event handlers connected to the analysis manager.\r
+  //==============================================================================\r
+  if (!mgr->GetInputEventHandler()) {\r
+    ::Error("AddTasQAsym", "This task requires an input event handler");\r
+    return NULL;\r
+  }\r
+   TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"\r
+  \r
+   // Configure analysis\r
+   //===========================================================================\r
+   \r
\r
\r
+   AliAnalysisTaskQASym *task = new AliAnalysisTaskQASym("AliAnalysisTaskQASym");\r
+   AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts","Standard");\r
+   esdTrackCutsL->SetMinNClustersTPC(50);\r
+   esdTrackCutsL->SetRequireTPCRefit(kTRUE);\r
+   esdTrackCutsL->SetMaxDCAToVertexXY(3.);\r
+   esdTrackCutsL->SetMaxDCAToVertexZ(3.);\r
+   esdTrackCutsL->SetAcceptKinkDaughters(kFALSE);\r
+   \r
+   task->SetCuts(esdTrackCutsL);\r
+\r
+   mgr->AddTask(task);\r
+  \r
+   AliAnalysisDataContainer *cout  = mgr->CreateContainer("QAsymHists",TList::Class(),\r
+                                                       AliAnalysisManager::kOutputContainer, Form("run%d.root",runNumber));\r
+\r
+   mgr->ConnectInput  (task, 0, mgr->GetCommonInputContainer());\r
+   mgr->ConnectOutput (task, 1, cout);\r
+  \r
+}\r
+\r
+\r
diff --git a/prod/acrcaf/qa_pp/AddTaskVZEROQA.C b/prod/acrcaf/qa_pp/AddTaskVZEROQA.C
new file mode 100644 (file)
index 0000000..6922bc9
--- /dev/null
@@ -0,0 +1,37 @@
+void AddTaskVZEROQA(Int_t runNumber)\r
+{\r
+  // Creates a QA task exploiting simple symmetries phi, eta +/-, charge ...\r
+  \r
+  // Get the pointer to the existing analysis manager via the static access method.\r
+  //==============================================================================\r
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+  if (!mgr) {\r
+    ::Error("AddTaskQAsym", "No analysis manager to connect to.");\r
+    return NULL;\r
+  }  \r
+  \r
+  // Check the analysis type using the event handlers connected to the analysis manager.\r
+  //==============================================================================\r
+  if (!mgr->GetInputEventHandler()) {\r
+    ::Error("AddTasQAsym", "This task requires an input event handler");\r
+    return NULL;\r
+  }\r
+   TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"\r
+  \r
+   // Configure analysis\r
+   //===========================================================================\r
+   \r
\r
\r
+   AliAnaVZEROQA* task = new AliAnaVZEROQA("AliAnaVZEROQA");\r
+   mgr->AddTask(task);\r
+  \r
+   AliAnalysisDataContainer *cout  = mgr->CreateContainer("QAVZEROHists",TList::Class(),\r
+                                                       AliAnalysisManager::kOutputContainer, Form("run%d_VZEROQA.root",runNumber));\r
+\r
+   mgr->ConnectInput  (task, 0, mgr->GetCommonInputContainer());\r
+   mgr->ConnectOutput (task, 1, cout);\r
+  \r
+}\r
+\r
+\r
diff --git a/prod/acrcaf/qa_pp/AliAnaVZEROQA.cxx b/prod/acrcaf/qa_pp/AliAnaVZEROQA.cxx
new file mode 100644 (file)
index 0000000..98e4492
--- /dev/null
@@ -0,0 +1,460 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//------------------------------
+// Analysis task for quality-assurance
+// of VZERO ESD
+//
+// 05/12/2009 cvetan.cheshkov@cern.ch
+//------------------------------
+
+#include "TChain.h"
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TF1.h"
+#include "TCanvas.h"
+#include "AliLog.h"
+#include "AliESDEvent.h"
+#include "AliESDVZERO.h"
+
+#include "AliAnaVZEROQA.h"
+
+ClassImp(AliAnaVZEROQA)
+
+AliAnaVZEROQA::AliAnaVZEROQA():
+AliAnalysisTaskSE("AliAnaVZEROQA"),
+  fListOfHistos(0),
+
+  fhAdcNoTimeA(0),
+  fhAdcWithTimeA(0),
+  fhAdcNoTimeC(0),
+  fhAdcWithTimeC(0),
+
+  fhAdcPMTNoTime(0),
+  fhAdcPMTWithTime(0),
+  fhTimeA(0),
+  fhTimeC(0),
+
+  fhWidthA(0),
+  fhWidthC(0),
+
+  fhTimePMT(0),
+  fhWidthPMT(0),
+
+  fhAdcWidthA(0),
+  fhAdcWidthC(0),
+
+  fhTimeCorr(0),
+
+  fhAdcTimeA(0),
+  fhAdcTimeC(0),
+
+  fV0a(0),
+  fV0c(0),
+  fV0multA(0),
+  fV0multC(0),
+  fV0ampl(0)
+{
+  // Default constructor
+  // Define input and output slots here
+  // Input slot #0 works with a TChain
+  DefineInput(0, TChain::Class());
+  // Output slot #1 TList
+  DefineOutput(1, TList::Class());
+}
+
+AliAnaVZEROQA::AliAnaVZEROQA(const char* name):
+AliAnalysisTaskSE(name),
+  fListOfHistos(0),
+  fhAdcNoTimeA(0),
+  fhAdcWithTimeA(0),
+  fhAdcNoTimeC(0),
+  fhAdcWithTimeC(0),
+
+  fhAdcPMTNoTime(0),
+  fhAdcPMTWithTime(0),
+  fhTimeA(0),
+  fhTimeC(0),
+
+  fhWidthA(0),
+  fhWidthC(0),
+
+  fhTimePMT(0),
+  fhWidthPMT(0),
+
+  fhAdcWidthA(0),
+  fhAdcWidthC(0),
+
+  fhTimeCorr(0),
+
+  fhAdcTimeA(0),
+  fhAdcTimeC(0),
+
+  fV0a(0),
+  fV0c(0),
+  fV0multA(0),
+  fV0multC(0),
+  fV0ampl(0)
+{
+  // Constructor
+  AliInfo("Constructor AliAnaVZEROQA");
+  // Define input and output slots here
+  // Input slot #0 works with a TChain
+  DefineInput(0, TChain::Class());
+  // Output slot #1 TList
+  DefineOutput(1, TList::Class());
+}
+
+TH1F * AliAnaVZEROQA::CreateHisto1D(const char* name, const char* title,Int_t nBins, 
+                                   Double_t xMin, Double_t xMax,
+                                   const char* xLabel, const char* yLabel)
+{
+  // create a histogram
+  TH1F* result = new TH1F(name, title, nBins, xMin, xMax);
+  result->SetOption("E");
+  if (xLabel) result->GetXaxis()->SetTitle(xLabel);
+  if (yLabel) result->GetYaxis()->SetTitle(yLabel);
+  result->SetMarkerStyle(kFullCircle);
+  return result;
+}
+
+TH2F * AliAnaVZEROQA::CreateHisto2D(const char* name, const char* title,Int_t nBinsX, 
+                                   Double_t xMin, Double_t xMax,
+                                   Int_t nBinsY,
+                                   Double_t yMin, Double_t yMax,
+                                   const char* xLabel, const char* yLabel)
+{
+  // create a histogram
+  TH2F* result = new TH2F(name, title, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
+  if (xLabel) result->GetXaxis()->SetTitle(xLabel);
+  if (yLabel) result->GetYaxis()->SetTitle(yLabel);
+  return result;
+}
+
+void AliAnaVZEROQA::UserCreateOutputObjects()
+{
+  // Create histograms
+  AliInfo("AliAnaVZEROQA::UserCreateOutputObjects");
+  // Create output container
+  fListOfHistos = new TList();
+
+  fhAdcNoTimeA = CreateHisto1D("hAdcNoTimeA","ADC (no Leading Time) V0A",200,0,200,"ADC charge","Entries");
+  fhAdcWithTimeA = CreateHisto1D("hAdcWithTimeA","ADC ( with Leading Time) V0A",200,0,200,"ADC charge","Entries");
+  fhAdcNoTimeC = CreateHisto1D("hAdcNoTimeC","ADC (no Leading Time) V0C",200,0,200,"ADC charge","Entries");
+  fhAdcWithTimeC = CreateHisto1D("hAdcWithTimeC","ADC ( with Leading Time) V0C",200,0,200,"ADC charge","Entries");
+  
+  fhAdcPMTNoTime = CreateHisto2D("hadcpmtnotime","ADC vs PMT index (no leading time)",64,-0.5,63.5,200,0,200,"PMT index","ADC charge");
+  fhAdcPMTWithTime = CreateHisto2D("hadcpmtwithtime","ADC vs PMT index (with leading time)",64,-0.5,63.5,200,0,200,"PMT index","ADC charge");
+
+  fhTimeA = CreateHisto1D("htimepmtA","Time measured by TDC V0A",400,-100,100,"Leading time (ns)","Entries");
+  fhTimeC = CreateHisto1D("htimepmtC","Time measured by TDC V0C",400,-100,100,"Leading time (ns)","Entries");
+
+  fhWidthA = CreateHisto1D("hwidthA","Signal width measured by TDC V0A",200,0,100,"Signal width (ns)","Entries");
+  fhWidthC = CreateHisto1D("hwidthC","Signal width measured by TDC V0C",200,0,100,"Signal width (ns)","Entries");
+
+  fhTimePMT = CreateHisto2D("htimepmt","Time measured by TDC vs PMT index",64,-0.5,63.5,200,0,100,"PMT Index","Leading time (ns)");
+  fhWidthPMT = CreateHisto2D("hwidthpmt","Time width vs PMT index",64,-0.5,63.5,200,0,100,"PMT Index","Signal width (ns)");
+
+  fhAdcWidthA = CreateHisto2D("hadcwidthA","Time width vs ADC V0A",200,0,200,200,0,100,"ADC charge","Width (ns)");
+  fhAdcWidthC = CreateHisto2D("hadcwidthC","Time width vs ADC V0C",200,0,200,200,0,100,"ADC charge","Width (ns)");
+
+  fhTimeCorr = CreateHisto2D("htimecorr","Average time C side vs. A side",200,0,100,200,0,100,"Time V0A (ns)","Time V0C (ns");
+
+  fhAdcTimeA = CreateHisto2D("hAdcTimeA","ADC vs Time V0A",1000,-100,100,200,0,200,"Time (ns)","ADC charge");
+  fhAdcTimeC = CreateHisto2D("hAdcTimeC","ADC vs Time V0C",1000,-100,100,200,0,200,"Time (ns)","ADC charge");
+
+  fV0a = CreateHisto1D("hV0a","Number of fired PMTs (V0A)",65,-0.5,64.5);
+  fV0c = CreateHisto1D("hV0c","Number of fired PMTs (V0C)",65,-0.5,64.5);
+  fV0multA = CreateHisto1D("hV0multA","Total reconstructed multiplicity (V0A)",100,0.,1000.);
+  fV0multC = CreateHisto1D("hV0multC","Total reconstructed multiplicity (V0C)",100,0.,1000.);
+  fV0ampl  = CreateHisto1D("hV0ampl","V0 multiplicity in single channel (all V0 channels)",400,-0.5,99.5);
+
+  fListOfHistos->Add(fhAdcNoTimeA);
+  fListOfHistos->Add(fhAdcWithTimeA);
+  fListOfHistos->Add(fhAdcNoTimeC);
+  fListOfHistos->Add(fhAdcWithTimeC);
+
+  fListOfHistos->Add(fhAdcPMTNoTime);
+  fListOfHistos->Add(fhAdcPMTWithTime);
+  fListOfHistos->Add(fhTimeA);
+  fListOfHistos->Add(fhTimeC);
+
+  fListOfHistos->Add(fhWidthA);
+  fListOfHistos->Add(fhWidthC);
+
+  fListOfHistos->Add(fhTimePMT);
+  fListOfHistos->Add(fhWidthPMT);
+
+  fListOfHistos->Add(fhAdcWidthA);
+  fListOfHistos->Add(fhAdcWidthC);
+
+  fListOfHistos->Add(fhTimeCorr);
+
+  fListOfHistos->Add(fhAdcTimeA);
+  fListOfHistos->Add(fhAdcTimeC);
+
+  fListOfHistos->Add(fV0a);
+  fListOfHistos->Add(fV0c);
+  fListOfHistos->Add(fV0multA);
+  fListOfHistos->Add(fV0multC);
+  fListOfHistos->Add(fV0ampl);
+}
+
+void AliAnaVZEROQA::UserExec(Option_t */*option*/)
+{
+  AliVEvent* event = InputEvent();
+  if (!event) {
+    Printf("ERROR: Could not retrieve event");
+    return;
+  }
+
+  AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
+  AliESDVZERO* esdV0 = esd->GetVZEROData();
+
+  Float_t timeA = 0,timeC = 0;
+  Int_t ntimeA = 0, ntimeC = 0;
+  for (Int_t i=0; i<64; ++i) {
+      if (esdV0->GetTime(i) < 1e-6) {
+       if (i >= 32) {
+         fhAdcNoTimeA->Fill(esdV0->GetAdc(i));
+       }
+       else {
+         fhAdcNoTimeC->Fill(esdV0->GetAdc(i));
+       }
+       fhAdcPMTNoTime->Fill(i,esdV0->GetAdc(i));
+      }
+      else {
+       if (i >= 32) {
+         fhAdcWithTimeA->Fill(esdV0->GetAdc(i));
+       }
+       else {
+         fhAdcWithTimeC->Fill(esdV0->GetAdc(i));
+       }
+       fhAdcPMTWithTime->Fill(i,esdV0->GetAdc(i));
+      }
+
+      if (i >= 32) {
+       fhTimeA->Fill(esdV0->GetTime(i));
+       fhWidthA->Fill(esdV0->GetWidth(i));
+       fhAdcWidthA->Fill(esdV0->GetAdc(i),esdV0->GetTime(i));
+       fhAdcTimeA->Fill(esdV0->GetTime(i),esdV0->GetAdc(i));
+      }
+      else {
+       fhTimeC->Fill(esdV0->GetTime(i));
+       fhWidthC->Fill(esdV0->GetWidth(i));
+       fhAdcWidthC->Fill(esdV0->GetAdc(i),esdV0->GetTime(i));
+       fhAdcTimeC->Fill(esdV0->GetTime(i),esdV0->GetAdc(i));
+       }
+      fhTimePMT->Fill(i,esdV0->GetTime(i));
+      fhWidthPMT->Fill(i,esdV0->GetWidth(i));
+
+      if (esdV0->GetTime(i) > 1e-6) {
+       if (i >= 32) {
+         timeA += esdV0->GetTime(i);
+         ntimeA++;
+       }
+       else {
+         timeC += esdV0->GetTime(i);
+         ntimeC++;
+       }
+      }
+  }
+
+  if (ntimeA > 0) timeA = timeA/ntimeA;
+  if (ntimeC > 0) timeC = timeC/ntimeC;
+
+  fhTimeCorr->Fill(timeA,timeC);
+
+  fV0a->Fill(esdV0->GetNbPMV0A());
+  fV0c->Fill(esdV0->GetNbPMV0C());
+  fV0multA->Fill(esdV0->GetMTotV0A());
+  fV0multC->Fill(esdV0->GetMTotV0C());
+  for(Int_t i = 0; i < 64; i++) {
+    fV0ampl->Fill(esdV0->GetMultiplicity(i));
+  }
+
+  // Post output data.
+  PostData(1, fListOfHistos);
+}
+
+void AliAnaVZEROQA::Terminate(Option_t *)
+{
+  fListOfHistos = dynamic_cast<TList*>(GetOutputData(1));
+  if (!fListOfHistos) {
+    Printf("ERROR: fListOfHistos not available");
+    return;
+  }
+       
+  fhAdcNoTimeA = dynamic_cast<TH1F*>(fListOfHistos->At(0));
+  fhAdcWithTimeA = dynamic_cast<TH1F*>(fListOfHistos->At(1));
+  fhAdcNoTimeC = dynamic_cast<TH1F*>(fListOfHistos->At(2));
+  fhAdcWithTimeC = dynamic_cast<TH1F*>(fListOfHistos->At(3));
+
+  fhAdcPMTNoTime = dynamic_cast<TH2F*>(fListOfHistos->At(4));
+  fhAdcPMTWithTime = dynamic_cast<TH2F*>(fListOfHistos->At(5));
+
+  fhTimeA = dynamic_cast<TH1F*>(fListOfHistos->At(6));
+  fhTimeC = dynamic_cast<TH1F*>(fListOfHistos->At(7));
+
+  fhWidthA = dynamic_cast<TH1F*>(fListOfHistos->At(8));
+  fhWidthC = dynamic_cast<TH1F*>(fListOfHistos->At(9));
+
+  fhTimePMT = dynamic_cast<TH2F*>(fListOfHistos->At(10));
+  fhWidthPMT = dynamic_cast<TH2F*>(fListOfHistos->At(11));
+
+  fhAdcWidthA = dynamic_cast<TH2F*>(fListOfHistos->At(12));
+  fhAdcWidthC = dynamic_cast<TH2F*>(fListOfHistos->At(13));
+
+  fhTimeCorr = dynamic_cast<TH2F*>(fListOfHistos->At(14));
+
+  fhAdcTimeA = dynamic_cast<TH2F*>(fListOfHistos->At(15));
+  fhAdcTimeC = dynamic_cast<TH2F*>(fListOfHistos->At(16));
+
+  fV0a = dynamic_cast<TH1F*>(fListOfHistos->At(17));
+  fV0c = dynamic_cast<TH1F*>(fListOfHistos->At(18));
+  fV0multA = dynamic_cast<TH1F*>(fListOfHistos->At(19));
+  fV0multC = dynamic_cast<TH1F*>(fListOfHistos->At(20));
+  fV0ampl  = dynamic_cast<TH1F*>(fListOfHistos->At(21));
+
+  // draw the histograms if not in batch mode
+  if (!gROOT->IsBatch()) {
+    new TCanvas;
+    fhTimePMT->DrawCopy();
+    new TCanvas;
+    fhAdcTimeA->DrawCopy();
+    new TCanvas;
+    fhAdcTimeC->DrawCopy();
+    new TCanvas;
+    fhAdcPMTNoTime->DrawCopy();
+    new TCanvas;
+    fhAdcPMTWithTime->DrawCopy();
+    new TCanvas;
+    fhTimeCorr->DrawCopy("E");
+    new TCanvas;
+    fV0ampl->DrawCopy("E");
+  }
+
+  // write the output histograms to a file
+  TFile* outputFile = TFile::Open("VZEROQA.root", "recreate");
+  if (!outputFile || !outputFile->IsOpen())
+    {
+      Error("AliAnaVZEROQA", "opening output file VZEROQA.root failed");
+      return;
+    }
+
+  fhAdcNoTimeA->Write();
+  fhAdcWithTimeA->Write();
+  fhAdcNoTimeC->Write();
+  fhAdcWithTimeC->Write();
+
+  fhAdcPMTNoTime->Write();
+  fhAdcPMTWithTime->Write();
+  fhTimeA->Write();
+  fhTimeC->Write();
+
+  fhWidthA->Write();
+  fhWidthC->Write();
+
+  fhTimePMT->Write();
+  fhWidthPMT->Write();
+
+  fhAdcWidthA->Write();
+  fhAdcWidthC->Write();
+
+  fhTimeCorr->Write();
+
+  fhAdcTimeA->Write();
+  fhAdcTimeC->Write();
+
+  fV0a->Write();
+  fV0c->Write();
+  fV0multA->Write();
+  fV0multC->Write();
+  fV0ampl->Write();
+
+  outputFile->Close();
+  delete outputFile;
+
+  //delete esd;
+  Info("AliAnaVZEROQA", "Successfully finished");
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/prod/acrcaf/qa_pp/AliAnaVZEROQA.h b/prod/acrcaf/qa_pp/AliAnaVZEROQA.h
new file mode 100644 (file)
index 0000000..b9f4449
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef ALIANAVZEROQA_H
+#define ALIANAVZEROQA_H
+
+//------------------------------
+// Analysis task for quality-assurance
+// of VZERO ESD
+//
+// 05/12/2009 cvetan.cheshkov@cern.ch
+//------------------------------
+
+#include "AliAnalysisTaskSE.h"
+
+class AliAnaVZEROQA : public AliAnalysisTaskSE
+{
+ public:        
+  AliAnaVZEROQA();
+  AliAnaVZEROQA(const char *name);
+  virtual ~AliAnaVZEROQA() {}
+
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
+  virtual void   Terminate(Option_t *);
+
+  TH1F* CreateHisto1D(const char* name, const char* title, Int_t nBins, Double_t xMin, Double_t xMax,
+                     const char* xLabel = NULL, const char* yLabel = NULL);
+  TH2F* CreateHisto2D(const char* name, const char* title, Int_t nBinsX, Double_t xMin, Double_t xMax,
+                     Int_t nBinsY, Double_t yMin, Double_t yMax,
+                     const char* xLabel = NULL, const char* yLabel = NULL);
+  
+ private:
+
+  TList* fListOfHistos;
+
+  TH1F *fhAdcNoTimeA;
+  TH1F *fhAdcWithTimeA;
+  TH1F *fhAdcNoTimeC;
+  TH1F *fhAdcWithTimeC;
+
+  TH2F *fhAdcPMTNoTime;
+  TH2F *fhAdcPMTWithTime;
+  TH1F *fhTimeA;
+  TH1F *fhTimeC;
+
+  TH1F *fhWidthA;
+  TH1F *fhWidthC;
+
+  TH2F *fhTimePMT;
+  TH2F *fhWidthPMT;
+
+  TH2F *fhAdcWidthA;
+  TH2F *fhAdcWidthC;
+
+  TH2F *fhTimeCorr;
+
+  TH2F *fhAdcTimeA;
+  TH2F *fhAdcTimeC;
+
+  TH1F *fV0a;
+  TH1F *fV0c;
+  TH1F *fV0multA;
+  TH1F *fV0multC;
+  TH1F *fV0ampl;
+
+  AliAnaVZEROQA(const AliAnaVZEROQA&); // not implemented
+  AliAnaVZEROQA& operator=(const AliAnaVZEROQA&); // not implemented
+
+  ClassDef(AliAnaVZEROQA, 1) // VZERO QA task
+};
+
+#endif
diff --git a/prod/acrcaf/qa_pp/AliAnalysisTaskQASym.cxx b/prod/acrcaf/qa_pp/AliAnalysisTaskQASym.cxx
new file mode 100644 (file)
index 0000000..e13c939
--- /dev/null
@@ -0,0 +1,948 @@
+#include "TChain.h"
+#include "TTree.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TCanvas.h"
+#include "TList.h"
+#include "TParticle.h"
+#include "TParticlePDG.h"
+#include "TProfile.h"
+#include "TNtuple.h"
+#include "TFile.h"
+
+#include "AliAnalysisTask.h"
+#include "AliAnalysisManager.h"
+
+#include "AliESDEvent.h"
+#include "AliLog.h"
+#include "AliESDVertex.h"
+#include "AliESDInputHandler.h"
+#include "AliESDtrackCuts.h"
+#include "AliMultiplicity.h"
+
+
+#include "AliAnalysisTaskQASym.h"
+#include "AliExternalTrackParam.h"
+#include "AliTrackReference.h"
+
+#include "AliHeader.h"
+#include "AliGenEventHeader.h"
+#include "AliGenDPMjetEventHeader.h"
+
+// Analysis Task for basic QA on the ESD
+
+// Authors: Jan Fiete Grosse-Oetringhaus, Christian Klein-Boesing,
+//          Andreas Morsch, Eva Sicking
+
+ClassImp(AliAnalysisTaskQASym)
+
+//________________________________________________________________________
+AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name) 
+  : AliAnalysisTaskSE(name) 
+    ,fFieldOn(kTRUE)
+    ,fHists(0)
+    ,fHistRECpt(0)
+    ,fEta(0)
+    ,fEtaPhi(0)
+    ,fEtaPt(0)
+    ,fQPt(0)
+    ,fDca(0)
+    ,fqRec(0)
+    ,fsigmaPt(0)
+  
+    ,fRecPtPos(0)
+    ,fRecPtNeg(0)
+    ,fRecPhiPos(0)
+    ,fRecPhiNeg(0)
+    ,fRecEtaPos(0)
+    ,fRecEtaNeg(0)
+    ,fRecEtaPtPos(0)
+    ,fRecEtaPtNeg(0)
+    ,fRecDcaPos(0)
+    ,fRecDcaNeg(0)
+    ,fRecDcaNegInv(0)
+    ,fRecDPos(0)
+    ,fRecDNeg(0)
+
+    ,fRecQPtPosEta(0)
+    ,fRecQPtNegEta(0)
+    ,fRecPtPosEta(0)
+    ,fRecPtNegEta(0)
+    ,fRecPhiPosEta(0)
+    ,fRecPhiNegEta(0)
+    ,fRecDcaPosEta(0)
+    ,fRecDcaNegEta(0)
+    ,fRecDPosEta(0)
+    ,fRecDNegEta(0)
+
+    ,fRecPtPosVz(0)
+    ,fRecPtNegVz(0)
+    ,fRecEtaPosVz(0)
+    ,fRecEtaNegVz(0)
+    ,fRecPhiPosVz(0)
+    ,fRecPhiNegVz(0)
+    ,fSignedDcaPosVz(0)
+    ,fSignedDcaNegVz(0)
+    ,fRecQPtPosEtaVz(0)
+    ,fRecQPtNegEtaVz(0)
+    ,fRecEtaPtPosVz(0)
+    ,fRecEtaPtNegVz(0)
+
+
+    ,fDeltaPhiAll(0)
+    ,fDeltaPhiLeading(0) 
+    ,fDiffDcaD(0)
+    ,fPhiRec(0)
+    ,fThetaRec(0)
+    ,fNumber(0)
+    ,fVx(0)
+    ,fVy(0)
+    ,fVz(0)
+    ,test(0)
+
+
+    ,fCuts(0)
+
+   
+  
+{
+    // Constructor
+  for(Int_t i = 0;i<18;++i){
+    fRecPtTpcSector[i] = 0;
+    fRecEtaTpcSector[i] = 0;
+    fSignedDcaTpcSector[i] = 0;
+    fRecQPtTpcSector[i] = 0;
+    fRecEtaPtTpcSector[i] = 0;
+  }
+
+  for(Int_t i = 0;i< 7;++i){
+    fRecPtPosLadder[i] = 0;
+    fRecPtNegLadder[i] = 0;
+    fRecPhiPosLadder[i] = 0;
+    fRecPhiNegLadder[i] = 0;
+    fRecEtaPosLadder[i] = 0;
+    fRecEtaNegLadder[i] = 0;
+    fSignDcaPos[i] = 0;
+    fSignDcaNeg[i] = 0;
+    fSignDcaNegInv[i] = 0;
+    fPtSigmaPos[i] =0;
+    fPtSigmaNeg[i] =0;
+    fqPtRec[i] =0;
+    fDcaSigmaPos[i] =0;
+    fDcaSigmaNeg[i] =0;
+  }
+
+  DefineOutput(1,  TList::Class()); 
+
+  
+  
+}
+
+
+//________________________________________________________________________
+void AliAnalysisTaskQASym::UserCreateOutputObjects()
+{
+  // Create histograms
+  // Called once
+
+  Double_t range = 300.;
+  Double_t pt = 20.;
+
+  fHists = new TList();
+  //  test   = new TNtuple("test","test",  
+  //                     "pt:phi:theta:x:y:z:charge");
+  fHistRECpt   = new TH1F("fHistRECpt", 
+                         " p_{T}",
+                         100, 0., pt);
+  fEta   = new TH1F("fEta", 
+                         " #eta",
+                         200, -2., 2.);
+  fEtaPhi   = new TH2F("fEtaPhi", 
+                         " #eta - #phi",
+                         200, -2., 2., 128, 0., 2. * TMath::Pi());
+  
+  fThetaRec   = new TH1F("fThetaRec", 
+                         " #theta",
+                         180, 0., TMath::Pi());
+  fPhiRec   = new TH1F("fPhiRec", 
+                         " #phi",
+                         180, 0., 2*TMath::Pi());
+  fNumber   = new TH1F("fNumber", 
+                      "number of tracks per event",
+                      50, 0.5, 49.5);
+  fVx   = new TH1F("fVx", 
+                  "X of vertex",
+                  500, -500., 500.);
+  fVy   = new TH1F("fVy", 
+                  "Y of vertex",
+                  500, -500., 500.);
+  fVz   = new TH1F("fVz", 
+                  "Z of vertex",
+                  500, -500., 500.);
+
+  fEtaPt   = new TH1F("fEtaPt", 
+                         " #eta/p_{T} ",
+                         100, -1., 1.);
+
+  fQPt   = new TH1F("fQPt", 
+                         " charge/p_{T} ",
+                         100, -1., 1.);
+
+  fDca   = new TH1F("fDca", 
+                         " dca ",
+                         200, -range, range);
+
+
+  fqRec    = new TH1F("fqRec",   
+                         " charge all reconstructed particle",
+                         21, -9.5, 10.5);
+  
+  fsigmaPt    = new TH1F("fsigmaPt",   
+                         "Log_{10}(#sigma_{p_{T}})",
+                         200, -2., 8.);
+
+
+
+
+  //------------
+  for(Int_t ITSlayer_case=0;ITSlayer_case<7;ITSlayer_case++){
+
+    fSignDcaPos[ITSlayer_case]   = new TH1F(Form("fSignDcaPos%d", ITSlayer_case),  
+                                  " Signed dca", 
+                                  200, -range, range);
+    fSignDcaPos[ITSlayer_case]->GetXaxis()->SetTitle("dca");
+    fSignDcaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
+   
+    fSignDcaNeg[ITSlayer_case]   = new TH1F(Form("fSignDcaNeg%d", ITSlayer_case),  
+                                  " Signed dcas",
+                                  200, -range, range);
+    fSignDcaNeg[ITSlayer_case]->GetXaxis()->SetTitle("dca");
+    fSignDcaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
+
+    fSignDcaNegInv[ITSlayer_case]   = new TH1F(Form("fSignDcaNegInv%d", ITSlayer_case),  
+                                  " inverse Signed dca ",
+                                  200, -range, range);
+    fSignDcaNegInv[ITSlayer_case]->GetXaxis()->SetTitle("-dca");
+    fSignDcaNegInv[ITSlayer_case]->GetYaxis()->SetTitle("");
+
+
+
+
+    fPtSigmaPos[ITSlayer_case]   = new TH1F(Form("fPtSigmaPos%d", ITSlayer_case),  
+                                  " #sigma_{pT} ",
+                                  208, -2., 8.);
+    fPtSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
+    fPtSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
+    
+    
+    fPtSigmaNeg[ITSlayer_case]   = new TH1F(Form("fPtSigmaNeg%d",ITSlayer_case),  
+                                 " #sigma_{pT}",
+                                  208, -2., 8.);
+    fPtSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
+    fPtSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
+
+
+
+
+
+    fqPtRec[ITSlayer_case]   = new TH1F(Form("fqPtRec%d",ITSlayer_case),  
+                                 "q/ p_{T}",
+                                  200, -100., 100.);
+    fqPtRec[ITSlayer_case]->GetXaxis()->SetTitle("q_{tr}/p_{T, tr} (GeV/c)");
+    fqPtRec[ITSlayer_case]->GetYaxis()->SetTitle("");
+
+  
+   
+
+
+    fDcaSigmaPos[ITSlayer_case]   = new TH2F(Form("fDcaSigmaPos%d", ITSlayer_case),  
+                                  " p_{T} shift vs #sigma_{pT} ",
+                                  200, -range, range,200, -4., 4. );
+    fDcaSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA)");
+    fDcaSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
+    
+    
+    fDcaSigmaNeg[ITSlayer_case]   = new TH2F(Form("fDcaSigmaNeg%d", ITSlayer_case),  
+                                  " p_{T} shift vs #sigma_{pT} ",
+                                  200, -range, range,200, -4., 4. );
+    fDcaSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA");
+    fDcaSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
+
+
+    
+    
+    
+    // YIELDs---------- positive and negative particles
+    
+    fRecPtPos   = new TH1F("fRecPtPos", 
+                          " p_{T}",
+                          100, 0.,pt);
+    fRecPtPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+    fRecPtNeg   = new TH1F("fRecPtNeg", 
+                          " p_{T} ",
+                          100, 0., pt);
+    fRecPtNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+
+    
+    fRecPhiPos   = new TH1F("fRecPhiPos", 
+                           "#phi",
+                           361, 0., 360.);
+    fRecPhiPos->GetXaxis()->SetTitle("#phi (deg)");
+  
+    fRecPhiNeg   = new TH1F("fRecPhiNeg", 
+                           "#phi ",
+                           361, 0., 360.);
+    fRecPhiNeg->GetXaxis()->SetTitle("#phi (deg)");
+    
+    fRecEtaPos   = new TH1F("fRecEtaPos", 
+                           "#eta",
+                           200, -2., 2.);
+    fRecEtaPos->GetXaxis()->SetTitle("#eta");
+
+    fRecEtaNeg   = new TH1F("fRecEtaNeg", 
+                           "#eta",
+                           200, -2., 2.);
+    fRecEtaNeg->GetXaxis()->SetTitle("#eta");
+    
+    fRecEtaPtPos   = new TH1F("fRecEtaPtPos", 
+                             "#eta/p_{T}",
+                             200, -0.1, .1);
+    fRecEtaPtPos->GetXaxis()->SetTitle("#eta/p_{T}");
+
+    fRecEtaPtNeg   = new TH1F("fRecEtaPtNeg", 
+                             "#eta/p_{T}",
+                             200, -.1, .1);
+    fRecEtaPtNeg->GetXaxis()->SetTitle("#eta/p_{T}");
+
+    fRecDcaPos   = new TH1F("fRecDcaPos", 
+                        " dca",
+                          100, -range, range);
+    fRecDcaPos->GetXaxis()->SetTitle("dca (cm)");
+    fRecDcaNeg   = new TH1F("fRecDcaNeg", 
+                          " dca",
+                          100, -range, range);
+    fRecDcaNeg->GetXaxis()->SetTitle("dca (cm)");
+
+    fRecDcaNegInv   = new TH1F("fRecDcaNegInv", 
+                          " dca",
+                          100, -range, range);
+    fRecDcaNegInv->GetXaxis()->SetTitle("dca (cm)");
+
+
+    fRecDPos   = new TH1F("fRecDPos", 
+                        " d",
+                          100, -range, range);
+    fRecDPos->GetXaxis()->SetTitle("d (cm)");
+    fRecDNeg   = new TH1F("fRecDNeg", 
+                          "d",
+                          100, -range, range);
+    fRecDNeg->GetXaxis()->SetTitle("d (cm)");
+
+
+    //  YIELDs ---------------- positive and negative eta
+    
+    
+    fRecQPtPosEta   = new TH1F("fRecQPtPosEta", 
+                              "q/p_{T}",
+                              200, -0.5, 0.5);
+    fRecQPtPosEta->GetXaxis()->SetTitle("q/p_{T} ");
+
+    fRecQPtNegEta   = new TH1F("fRecQPtNegEta", 
+                              "q/p_{T}",
+                              200, -0.5, 0.5);
+    fRecQPtNegEta->GetXaxis()->SetTitle("q/p_{T}");
+    
+    fRecPtPosEta   = new TH1F("fRecPtPosEta", 
+                             " p_{T} ",
+                             100, 0., pt);
+    fRecPtPosEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+
+    fRecPtNegEta   = new TH1F("fRecPtNegEta", 
+                             " p_{T}",
+                             100, 0., pt);
+    fRecPtNegEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+    
+    fRecPhiPosEta   = new TH1F("fRecPhiPosEta", 
+                           "#phi",
+                           361, 0., 360);
+    fRecPhiPosEta->GetXaxis()->SetTitle("#phi (deg)");
+
+    fRecPhiNegEta   = new TH1F("fRecPhiNegEta", 
+                           "#phi ",
+                           361, 0, 360);
+    fRecPhiNegEta->GetXaxis()->SetTitle("#phi (deg)");
+
+    fRecDcaPosEta   = new TH1F("fRecDcaPosEta", 
+                        " dca ",
+                          100, -range, range);
+    fRecDcaPosEta->GetXaxis()->SetTitle("dca (cm)");
+    fRecDcaNegEta   = new TH1F("fRecDcaNegEta", 
+                          " dca",
+                          100, -range, range);
+    fRecDcaNegEta->GetXaxis()->SetTitle("dca (cm)");
+
+    fRecDPosEta   = new TH1F("fRecDPosEta", 
+                        " d",
+                          100, -range, range);
+    fRecDPosEta->GetXaxis()->SetTitle("d (cm)");
+    fRecDNegEta   = new TH1F("fRecDNegEta", 
+                          "d",
+                          100, -5., 5.);
+    fRecDNegEta->GetXaxis()->SetTitle("d (cm)");
+
+
+    
+    //  YIELDs ---------------- for TPC sectors
+    for(Int_t sector=0; sector<18;sector++){
+      
+
+      fRecPtTpcSector[sector]   = new TH1F(Form("fRecPtTpcSector%02d",sector), 
+                                          Form("p_{T} distribution: TPC sector %d",
+                                               sector),100, 0., pt);
+      fRecPtTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+
+      fRecEtaTpcSector[sector]   = new TH1F(Form("fRecEtaTpcSector%02d",sector), 
+                                          Form("#eta distribution: TPC sector %d",
+                                               sector),200, -2., 2.);
+      fRecEtaTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+     
+
+      fSignedDcaTpcSector[sector]   = new TH1F(Form("fSignedDcaTpcSector%02d",sector), 
+                                          Form("dca distribution: TPC sector %d",
+                                               sector),200, -range, range );
+      fSignedDcaTpcSector[sector]->GetXaxis()->SetTitle("dca");
+
+      fRecQPtTpcSector[sector]   = new TH1F(Form("fRecQPtTpcSector%02d",sector), 
+                                          Form("Q/ p_{T} distribution: TPC sector %d",
+                                               sector),100, -1., 1.);
+      fRecQPtTpcSector[sector]->GetXaxis()->SetTitle("Q/p_{T} (GeV/c)");
+
+      fRecEtaPtTpcSector[sector]   = new TH1F(Form("fRecEtaPtTpcSector%02d",sector), 
+                                          Form("#eta/ p_{T} distribution: TPC sector %d",
+                                               sector),100, -1., 1.);
+      fRecEtaPtTpcSector[sector]->GetXaxis()->SetTitle("#eta/p_{T} (GeV/c)");
+    }
+    // YIELDS ITS ladder
+    for(Int_t i=0;i<7;i++){
+      fRecPtPosLadder[i]   = new TH1F(Form("fRecPtPosLadder%d", i), 
+                            " p_{T} distribution",
+                            100, 0., pt);
+      fRecPtPosLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+      fRecPtNegLadder[i]   = new TH1F(Form("fRecPtNegLadder%d",i), 
+                            " p_{T} distribution ",
+                            100, 0., pt);
+      fRecPtNegLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
+
+
+      fRecPhiPosLadder[i]   = new TH1F(Form("fRecPhiPosLadder%d",i), 
+                                "#phi distribution: all pos eta",
+                                361, 0., 360);
+      fRecPhiPosLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
+      
+      fRecPhiNegLadder[i]   = new TH1F(Form("fRecPhiNegLadder%d", i),
+                                "#phi distribution: all neg eta",
+                                361, 0, 360);
+      fRecPhiNegLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
+
+
+
+      fRecEtaPosLadder[i]   = new TH1F(Form("fRecEtaPosLadder%d",i), 
+                                      "#eta distribution",
+                                200, -2., 2.);
+      fRecEtaPosLadder[i]->GetXaxis()->SetTitle("#eta)");
+      
+      fRecEtaNegLadder[i]   = new TH1F(Form("fRecEtaNegLadder%d", i),
+                                "#eta distribution",
+                                200, -2., 2.);
+      fRecEtaNegLadder[i]->GetXaxis()->SetTitle("#eta");
+    }
+
+    Double_t vzmax = 30;
+
+    fRecPtPosVz = new TH2F("fRecPtPosVz", 
+                          "p_{T} distribution vs Vz()",
+                          100, -1., 2., 200,-vzmax,vzmax);
+    fRecPtPosVz->GetXaxis()->SetTitle("log_{10}(p_{T})");
+    
+    fRecPtNegVz = new TH2F("fRecPtNegVz",
+                          "p_{T} distribution vs Vz()",
+                          100, -1., 2.,200,-vzmax,vzmax);
+    fRecPtNegVz->GetXaxis()->SetTitle("Log_{10}(p_{T})");
+    
+   
+    fRecEtaPosVz= new TH2F("fRecEtaPosVz", 
+                         "#eta distribution vs Vz()",
+                         100, -2., 2., 200,-vzmax,vzmax);
+    fRecEtaPosVz->GetXaxis()->SetTitle("#eta");
+    fRecEtaNegVz = new TH2F("fRecEtaNegVz",
+                          "#eta distribution vs Vz()",
+                          100, -2., 2.,200,-vzmax,vzmax);
+    fRecEtaNegVz->GetXaxis()->SetTitle("#eta");
+
+    fRecPhiPosVz= new TH2F("fRecPhiPosVz", 
+                         "#eta distribution vs Vz()",
+                         361, 0., 360., 200,-vzmax,vzmax);
+    fRecPhiPosVz->GetXaxis()->SetTitle("#phi (deg)");
+    fRecPhiNegVz = new TH2F("fRecPhiNegVz",
+                          "dca vs Vz()",
+                          361, 0., 360.,200,-vzmax,vzmax);
+    fRecPhiNegVz->GetXaxis()->SetTitle("#phi (deg)");
+
+    fSignedDcaPosVz= new TH2F("fSignedDcaPosVz", 
+                         "#eta distribution vs Vz()",
+                         200, -range, range, 200,-vzmax,vzmax);
+    fSignedDcaPosVz->GetXaxis()->SetTitle("dca (cm)");
+    fSignedDcaNegVz = new TH2F("fSignedDcaNegVz",
+                          "dca vs Vz()",
+                          200, -range, range,200,-vzmax,vzmax);
+    fSignedDcaNegVz->GetXaxis()->SetTitle("dca (cm)");
+
+    fRecQPtPosEtaVz= new TH2F("fRecQPtPosEtaVz",
+                          " Q/p_{T} distribution vs Vz()",
+                          100, -1., 1., 200,-vzmax,vzmax);
+    fRecQPtPosEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
+    fRecQPtNegEtaVz = new TH2F("fRecQPtNegEtaVz",
+                           " Q/p_{T} distribution vs Vz()",
+                           100, -1., 1.,200,-vzmax,vzmax);
+    fRecQPtNegEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
+
+    fRecEtaPtPosVz= new TH2F("fRecEtaPtPosVz",
+                          " #eta/p_{T} distribution vs Vz()",
+                          100, -1., 1., 200,-vzmax,vzmax);
+    fRecEtaPtPosVz->GetXaxis()->SetTitle("#eta/p_{T");
+    fRecEtaPtNegVz = new TH2F("fRecEtaPtNegVz",
+                           " #eta/p_{T} distribution vs Vz()",
+                           100, -1., 1.,200,-vzmax,vzmax);
+    fRecEtaPtNegVz->GetXaxis()->SetTitle("#eta/p_{T}");
+
+    //new
+    fDeltaPhiAll = new TH1F("fDeltaPhiAll",
+                           " #Delta #phi",200,-360,360);
+    fDeltaPhiAll->GetXaxis()->SetTitle("#Delta #phi");
+
+
+    fDeltaPhiLeading = new TH2F("fDeltaPhiLeading",
+                           " #Delta #phi",361,-360,360, 361,0, 360);
+    fDeltaPhiLeading->GetXaxis()->SetTitle("#Delta #phi (deg.)");
+    fDeltaPhiLeading->GetYaxis()->SetTitle("#phi_{leading particle} (deg.)");
+
+    fDiffDcaD    = new TH1F("fDiffDcaD",   
+                           "dca-d",
+                           200, -5., 5.);
+    
+  }
+
+  fHists->SetOwner();
+
+  fHists->Add(fHistRECpt);
+  fHists->Add(fEta);
+  fHists->Add(fEtaPhi);
+  fHists->Add(fThetaRec);
+  fHists->Add(fPhiRec);
+  fHists->Add(fNumber);
+  fHists->Add(fVx);
+  fHists->Add(fVy);
+  fHists->Add(fVz);
+
+  fHists->Add(fEtaPt);
+  fHists->Add(fQPt);
+  fHists->Add(fDca);
+
+  fHists->Add(fDeltaPhiAll);
+  fHists->Add(fDeltaPhiLeading);
+  fHists->Add(fDiffDcaD);
+
+  fHists->Add(fqRec);
+  fHists->Add(fsigmaPt);
+
+  fHists->Add(fRecPtPos);
+  fHists->Add(fRecPtNeg);
+  fHists->Add(fRecPhiPos);
+  fHists->Add(fRecPhiNeg);
+  fHists->Add(fRecEtaPos);
+  fHists->Add(fRecEtaNeg);
+  fHists->Add(fRecEtaPtPos);
+  fHists->Add(fRecEtaPtNeg);
+  fHists->Add(fRecDcaPos);
+  fHists->Add(fRecDcaNeg);
+  fHists->Add(fRecDcaNegInv);
+  fHists->Add(fRecDPos);
+  fHists->Add(fRecDNeg);
+
+
+  fHists->Add(fRecQPtPosEta);
+  fHists->Add(fRecQPtNegEta);
+  fHists->Add(fRecPtPosEta);
+  fHists->Add(fRecPtNegEta);
+  fHists->Add(fRecPhiPosEta);
+  fHists->Add(fRecPhiNegEta);
+  fHists->Add(fRecDcaPosEta);
+  fHists->Add(fRecDcaNegEta);
+  fHists->Add(fRecDPosEta);
+  fHists->Add(fRecDNegEta);
+
+
+  for(Int_t i=0;i<18;i++){
+    fHists->Add(fRecPtTpcSector[i]);
+    fHists->Add(fRecEtaTpcSector[i]);
+    fHists->Add(fSignedDcaTpcSector[i]);
+    fHists->Add(fRecQPtTpcSector[i]);
+    fHists->Add(fRecEtaPtTpcSector[i]);
+  }
+
+  for(Int_t i=0;i<7;i++){
+    fHists->Add(fRecPtPosLadder[i]);
+    fHists->Add(fRecPtNegLadder[i]);
+    fHists->Add(fRecPhiPosLadder[i]);
+    fHists->Add(fRecPhiNegLadder[i]);
+    fHists->Add(fRecEtaPosLadder[i]);
+    fHists->Add(fRecEtaNegLadder[i]);
+  }
+
+  fHists->Add(fRecPtPosVz);
+  fHists->Add(fRecPtNegVz);
+  fHists->Add(fRecEtaPosVz);
+  fHists->Add(fRecEtaNegVz);
+  fHists->Add(fRecPhiPosVz);
+  fHists->Add(fRecPhiNegVz);
+  fHists->Add(fSignedDcaPosVz);
+  fHists->Add(fSignedDcaNegVz);
+  fHists->Add(fRecQPtPosEtaVz);
+  fHists->Add(fRecQPtNegEtaVz);
+  fHists->Add(fRecEtaPtPosVz);
+  fHists->Add(fRecEtaPtNegVz);
+
+
+  for(Int_t i=0;i<7;i++){
+    fHists->Add(fSignDcaPos[i]);
+    fHists->Add(fSignDcaNeg[i]);
+    fHists->Add(fSignDcaNegInv[i]);
+    fHists->Add(fPtSigmaPos[i]);
+    fHists->Add(fPtSigmaNeg[i]);
+    fHists->Add(fqPtRec[i]);
+  
+    fHists->Add(fDcaSigmaPos[i]);
+    fHists->Add(fDcaSigmaNeg[i]);
+
+  } 
+  
+    
+    
+  for (Int_t i=0; i<fHists->GetEntries(); ++i) {
+    TH1 *h1 = dynamic_cast<TH1*>(fHists->At(i));
+    if (h1){
+      // Printf("%s ",h1->GetName());
+      h1->Sumw2();
+    }
+  }
+    // BKC
+
+
+}
+
+//__________________________________________________________
+
+void AliAnalysisTaskQASym::UserExec(Option_t *) 
+{
+  printf("I'm here \n");
+  AliVEvent *event = InputEvent();
+  if (!event) {
+     Printf("ERROR: Could not retrieve event");
+     return;
+  }
+
+
+  if(Entry()==0){
+    AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
+    if(esd){
+      Printf("We are reading from ESD");
+    }
+   
+  }
+
+  Printf("There are %d tracks in this event", event->GetNumberOfTracks());
+
+  
+  Int_t   LeadingTrack  =   0;
+  Float_t LeadingEnergy = -20.;
+  Float_t LeadingPhi    =   0;//TMath::Pi();
+
+
+  if(event->GetNumberOfTracks()!=0) fNumber->Fill(event->GetNumberOfTracks());
+
+  const AliVVertex* vertex = event->GetPrimaryVertex();
+  Float_t vz = vertex->GetZ();
+  if (TMath::Abs(vz) > 10.) return;
+
+  for (Int_t iTrack = 0; iTrack < event->GetNumberOfTracks(); iTrack++) {
+    
+
+    AliVParticle *track = event->GetTrack(iTrack);
+    AliESDtrack *esdtrack =  dynamic_cast<AliESDtrack*>(track);
+    if (!track) {
+      Printf("ERROR: Could not receive track %d", iTrack);
+      continue;
+    }
+    
+    if (!fCuts->AcceptTrack(esdtrack)) continue;
+    //const AliExternalTrackParam * tpcP = esdtrack->GetTPCInnerParam();
+    const AliExternalTrackParam *  tpcP = esdtrack;
+    if (!tpcP) continue;
+   
+
+    if (tpcP->Pt() > 50.) {
+      printf("%5d %5d %13.3f %13.3f \n", event->GetPeriodNumber(), event->GetOrbitNumber(),
+            tpcP->Pt(), esdtrack->Pt());
+      //      AliFatal("Jet");
+    } 
+    
+    if(tpcP->E()>LeadingEnergy){
+      LeadingTrack=iTrack;
+      LeadingEnergy=tpcP->E();
+      LeadingPhi=tpcP->Phi();
+    }
+   
+
+
+    
+    //propagate to dca
+    esdtrack->PropagateToDCA(event->GetPrimaryVertex(),
+                            event->GetMagneticField(), 10000.);
+    
+    
+    // if(tpcP->Pt()<2.)continue;
+
+
+    fqRec->Fill(tpcP->Charge());
+  
+
+    Double_t sigmapt = tpcP->GetSigma1Pt2();
+    sigmapt= sqrt(sigmapt);
+    sigmapt= sigmapt *(tpcP->Pt()*tpcP->Pt()); 
+
+    if(sigmapt == 0.)continue;
+    fsigmaPt->Fill(TMath::Log10(sigmapt));
+   
+
+   
+  
+
+    
+
+    // hits in ITS layer
+    Int_t cas=-1;
+    if(esdtrack->HasPointOnITSLayer(0)) 
+      cas=0;
+    else if(!esdtrack->HasPointOnITSLayer(0)
+           &&  esdtrack->HasPointOnITSLayer(1)) 
+      cas=1;
+    else if(!esdtrack->HasPointOnITSLayer(0)
+           && !esdtrack->HasPointOnITSLayer(1) 
+           &&  esdtrack->HasPointOnITSLayer(2)) 
+      cas=2;
+    else if(!esdtrack->HasPointOnITSLayer(0)
+           && !esdtrack->HasPointOnITSLayer(1) 
+           && !esdtrack->HasPointOnITSLayer(2)
+           &&  esdtrack->HasPointOnITSLayer(3)) 
+      cas=3;
+    else if(!esdtrack->HasPointOnITSLayer(0)
+           && !esdtrack->HasPointOnITSLayer(1) 
+           && !esdtrack->HasPointOnITSLayer(2)
+           && !esdtrack->HasPointOnITSLayer(3)
+           &&  esdtrack->HasPointOnITSLayer(4)) 
+      cas=4;
+    else if(   !esdtrack->HasPointOnITSLayer(0)
+           && !esdtrack->HasPointOnITSLayer(1)
+           && !esdtrack->HasPointOnITSLayer(2)
+           && !esdtrack->HasPointOnITSLayer(3)
+           && !esdtrack->HasPointOnITSLayer(4) 
+           &&  esdtrack->HasPointOnITSLayer(5)) 
+      cas=5;
+    else 
+      cas=6;
+  
+   
+   
+    //------------------- 
+
+    sdca_tr = (tpcP->Py()*tpcP->Xv()
+              - tpcP->Px()*tpcP->Yv())/tpcP->Pt();
+  
+
+
+    fqPtRec[cas]->Fill(tpcP->Charge()/tpcP->Pt());
+    
+    
+    //    test->Fill(tpcP->Pt(),tpcP->Phi(), tpcP->Theta(), 
+    //        tpcP->Xv(),tpcP->Yv(), tpcP->Zv(), tpcP->Charge());
+    fHistRECpt->Fill(tpcP->Pt());
+    fEta->Fill(tpcP->Eta());
+    fThetaRec->Fill(tpcP->Theta());
+    fPhiRec->Fill(tpcP->Phi());
+    fVx->Fill(tpcP->Xv());
+    fVy->Fill(tpcP->Yv());
+    fVz->Fill(tpcP->Zv());
+  
+
+    fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
+    fQPt->Fill(tpcP->Charge()/tpcP->Pt());
+    fDca->Fill(sdca_tr);
+
+
+
+
+    esdtrack->GetImpactParameters(xy,z);
+    fDiffDcaD->Fill(sdca_tr+xy);
+   
+    
+    //for positive particles
+    if(tpcP->Charge()>0){
+      fRecPtPos->Fill(tpcP->Pt());
+      fRecPtPosLadder[cas]->Fill(tpcP->Pt());
+      fRecPtPosVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
+      fRecPhiPos->Fill(TMath::RadToDeg()*tpcP->Phi());
+    
+     
+      fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*tpcP->Phi());
+      fRecPhiPosVz->Fill(TMath::RadToDeg()*tpcP->Phi(),tpcP->Zv());
+      fSignedDcaPosVz->Fill(sdca_tr,tpcP->Zv());
+
+      fRecEtaPos->Fill(tpcP->Eta());
+      fRecEtaPosLadder[cas]->Fill(tpcP->Eta());
+      fRecEtaPtPos->Fill(tpcP->Eta()/tpcP->Pt());
+      fRecEtaPosVz->Fill(tpcP->Eta(),tpcP->Zv());
+      fRecEtaPtPosVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
+     
+      fRecDcaPos->Fill(sdca_tr);
+      fRecDPos->Fill(xy);
+      fSignDcaPos[cas]->Fill(sdca_tr);
+    
+     
+      fDcaSigmaPos[cas]->Fill(sdca_tr, TMath::Log10(sigmapt));
+    
+      fPtSigmaPos[cas]->Fill(TMath::Log10(sigmapt));
+    }
+    //and negative particles
+    else {
+      fRecPtNeg->Fill(tpcP->Pt());
+      fRecPtNegLadder[cas]->Fill(tpcP->Pt());
+      fRecPtNegVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
+           
+      fRecPhiNeg->Fill(TMath::RadToDeg()*tpcP->Phi());
+      fRecPhiNegLadder[cas]->Fill(TMath::RadToDeg()*tpcP->Phi());
+      fRecPhiNegVz->Fill(TMath::RadToDeg()*tpcP->Phi(),tpcP->Zv());
+      fSignedDcaNegVz->Fill(sdca_tr,tpcP->Zv());
+      fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
+
+      fRecEtaNeg->Fill(tpcP->Eta());
+      fRecEtaNegLadder[cas]->Fill(tpcP->Eta());
+      fRecEtaPtNeg->Fill(tpcP->Eta()/tpcP->Pt());
+      fRecEtaNegVz->Fill(tpcP->Eta(),tpcP->Zv());
+     
+      fRecDcaNeg->Fill(sdca_tr);
+      fRecDcaNegInv->Fill(-sdca_tr);
+      fRecDNeg->Fill(xy);
+      fSignDcaNeg[cas]->Fill(sdca_tr);
+      fSignDcaNegInv[cas]->Fill(-sdca_tr);
+     
+     
+      fDcaSigmaNeg[cas]->Fill(sdca_tr,TMath::Log10(sigmapt));
+   
+      fPtSigmaNeg[cas]->Fill(TMath::Log10(sigmapt));
+    }
+    
+
+
+    //all particles with positive eta
+    if(tpcP->Eta()>0){
+      fRecQPtPosEta->Fill(tpcP->Charge()/tpcP->Pt());
+      fRecPtPosEta->Fill(tpcP->Pt());
+      fRecPhiPosEta->Fill(TMath::RadToDeg()*tpcP->Phi());
+      fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
+      fRecDcaPosEta->Fill(sdca_tr);
+      fRecDPosEta->Fill(xy);
+    }
+    //all particles with negative eta (and eta==0)
+    else{
+      fRecQPtNegEta->Fill(tpcP->Charge()/tpcP->Pt());
+      fRecPtNegEta->Fill(tpcP->Pt());
+      fRecPhiNegEta->Fill(TMath::RadToDeg()*tpcP->Phi());
+      fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
+      fRecDcaNegEta->Fill(sdca_tr);
+      fRecDNegEta->Fill(xy);
+
+    }
+     
+
+    //spectren detected by TPC sectors
+    //pt cut on 1 GeV/c ?!
+    // if(tpcP->Pt()<1.) continue;
+    fRecPtTpcSector[Int_t(tpcP->Phi()*
+                         TMath::RadToDeg()/20)]->Fill(tpcP->Pt());
+    fRecEtaTpcSector[Int_t(tpcP->Phi()*
+                         TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
+    fSignedDcaTpcSector[Int_t(tpcP->Phi()*
+                         TMath::RadToDeg()/20)]->Fill(sdca_tr); 
+    fRecQPtTpcSector[Int_t(tpcP->Phi()*
+                         TMath::RadToDeg()/20)]->Fill(tpcP->Charge()/tpcP->Pt());
+    fRecEtaPtTpcSector[Int_t(tpcP->Phi()*
+                         TMath::RadToDeg()/20)]->Fill(tpcP->Eta()/tpcP->Pt());
+     
+
+
+
+
+
+  // another track loop
+    for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
+      
+      if(LeadingTrack==iTrack2) continue;
+
+      AliVParticle *track2 = event->GetTrack(iTrack2);
+      AliESDtrack* esdtrack2 =  dynamic_cast<AliESDtrack*>(track2);
+      if (!track2) {
+       Printf("ERROR: Could not receive track %d", iTrack);
+       continue;
+      }
+      if (!fCuts->AcceptTrack(esdtrack2)) continue;
+      //propagate to dca
+      esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
+                              event->GetMagneticField(), 10000.);
+      fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
+                            LeadingPhi*TMath::RadToDeg() );
+
+     
+
+    }//second track loop
+  }//first track loop
+
+  
+
+  // Post output data.
+  // PostData(1, fHistPt);
+  PostData(1, fHists);
+}      
+
+
+
+
+
+//________________________________________________________________________
+void AliAnalysisTaskQASym::Terminate(Option_t *) 
+{
+
+
+}  
+
+
+
+
+
diff --git a/prod/acrcaf/qa_pp/AliAnalysisTaskQASym.h b/prod/acrcaf/qa_pp/AliAnalysisTaskQASym.h
new file mode 100644 (file)
index 0000000..3958df3
--- /dev/null
@@ -0,0 +1,151 @@
+#ifndef AliAnalysisTaskQASym_cxx
+#define AliAnalysisTaskQASym_cxx
+
+class TH1F;
+class TH2F;
+class TList;
+class TNtuple;
+
+class AliESDEvent;
+class AliESDtrack;
+class AliESDtrackCuts;
+
+
+#include "AliAnalysisTaskSE.h"
+#include "TFile.h"
+#include "TNtuple.h"
+
+class AliAnalysisTaskQASym : public AliAnalysisTaskSE {
+ public:
+  AliAnalysisTaskQASym(const char *name = "AliAnalysisTaskQASym");
+  virtual ~AliAnalysisTaskQASym() {}
+  
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
+  virtual void   Terminate(Option_t *);
+
+  
+  
+  virtual void   SetCuts(AliESDtrackCuts* cuts)
+     {fCuts = cuts;}
+
+  virtual void   SetFieldOn(Bool_t b = kTRUE){fFieldOn = b;} 
+  
+ private:
+
+  Bool_t      fFieldOn;
+
+  TList       *fHists;          // List of histos
+
+  //old
+  TH1F        *fHistRECpt;      // pt 
+  TH1F        *fEta;            // eta
+  TH2F        *fEtaPhi;         // eta-phi
+  TH1F        *fEtaPt;          // eta over pt 
+  TH1F        *fQPt;            // charge over pt 
+  TH1F        *fDca;            // distance of closest approach
+  TH1F        *fqPtRec[7];      // charge over pt divided for ITS layer cases
+  TH1F        *fqRec;           // reconstrcuted charge
+  TH1F        *fsigmaPt;        // sigma_pT
+  TH2F        *fDcaSigmaPos[7]; // distance of closest approach against sigma_pT
+  TH2F        *fDcaSigmaNeg[7]; // distance of closest approach against sigma_pT
+
+
+  //positive und negative particles
+  TH1F        *fRecPtPos;      // pt of pos partice
+  TH1F        *fRecPtNeg;      // pt of neg particle
+  TH1F        *fRecPhiPos;     // phi of pos. particle
+  TH1F        *fRecPhiNeg;     // phi of neg. particle
+  TH1F        *fRecEtaPos;     // eta of neg. particle
+  TH1F        *fRecEtaNeg;     // eta of neg. particle
+  TH1F        *fRecEtaPtPos;   // eta over pt of neg. particle
+  TH1F        *fRecEtaPtNeg;   // eta over pt of neg. particle
+  TH1F        *fRecDcaPos;     // distance of closest approach of neg. particle
+  TH1F        *fRecDcaNeg;     // distance of closest of neg. particle
+  TH1F        *fRecDcaNegInv;  // invers dca of neg. particle
+  TH1F        *fRecDPos;       // impact parameter of neg. particle
+  TH1F        *fRecDNeg;       // impact parameter of neg. particle
+
+
+
+
+  // two sides of TPC -> Eta/Theta
+  TH1F        *fRecQPtPosEta; 
+  TH1F        *fRecQPtNegEta;
+  TH1F        *fRecPtPosEta;  
+  TH1F        *fRecPtNegEta; 
+  TH1F        *fRecPhiPosEta;
+  TH1F        *fRecPhiNegEta;
+  TH1F        *fRecDcaPosEta;
+  TH1F        *fRecDcaNegEta;
+  TH1F        *fRecDPosEta;
+  TH1F        *fRecDNegEta;
+
+
+  // sectors of TPC (with pt>xGeV?), TODO: extent to TPC standalone tracks
+  TH1F        *fRecPtTpcSector[18];
+  TH1F        *fRecEtaTpcSector[18];
+  TH1F        *fRecQPtTpcSector[18];
+  TH1F        *fRecEtaPtTpcSector[18];
+  TH1F        *fSignedDcaTpcSector[18];
+
+
+  // 7 different case of hit in ITS ladders
+  TH1F        *fSignDcaPos[7];
+  TH1F        *fSignDcaNeg[7];
+  TH1F        *fSignDcaNegInv[7];
+  TH1F        *fPtSigmaPos[7];
+  TH1F        *fPtSigmaNeg[7];
+  TH1F        *fRecPtPosLadder[7];
+  TH1F        *fRecPtNegLadder[7];
+  TH1F        *fRecPhiPosLadder[7];
+  TH1F        *fRecPhiNegLadder[7];
+  TH1F        *fRecEtaPosLadder[7];
+  TH1F        *fRecEtaNegLadder[7];
+
+
+  // 2D: all measures as function of z of vertex
+  TH2F        *fRecPtPosVz;
+  TH2F        *fRecPtNegVz;
+  TH2F        *fRecEtaPosVz;
+  TH2F        *fRecEtaNegVz;
+  TH2F        *fRecPhiPosVz;
+  TH2F        *fRecPhiNegVz;
+  TH2F        *fSignedDcaPosVz;
+  TH2F        *fSignedDcaNegVz;
+  TH2F        *fRecQPtPosEtaVz;
+  TH2F        *fRecQPtNegEtaVz;
+  TH2F        *fRecEtaPtPosVz;
+  TH2F        *fRecEtaPtNegVz;
+
+
+  //high
+  TH1F * fDeltaPhiAll;
+  TH2F * fDeltaPhiLeading;
+  TH1F * fDiffDcaD;
+
+  //sim
+  TH1F * fPhiRec;
+  TH1F * fThetaRec;
+  TH1F * fNumber;
+  TH1F * fVx;
+  TH1F * fVy;
+  TH1F * fVz;
+  TNtuple * test;
+
+
+
+  Double_t  sdca_tr;
+  Float_t xy, z;
+
+  AliESDtrackCuts* fCuts;                      // List of cuts
+  AliAnalysisTaskQASym(const AliAnalysisTaskQASym&); // not implemented
+  AliAnalysisTaskQASym& operator=(const AliAnalysisTaskQASym&); // not implemented
+  
+  ClassDef(AliAnalysisTaskQASym, 1); // Basic QA exploiting symmetries
+};
+
+#endif
diff --git a/prod/acrcaf/qa_pp/plot_macros/plot.C b/prod/acrcaf/qa_pp/plot_macros/plot.C
new file mode 100644 (file)
index 0000000..eaf3caa
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[7];
+TH1F* fHneg[7];
+
+
+fHpos[0]=  (TH1F*) l->FindObject("fRecPtPos");
+fHneg[0]=  (TH1F*) l->FindObject("fRecPtNeg");
+fHpos[1]=  (TH1F*) l->FindObject("fRecPhiPos");
+fHneg[1]=  (TH1F*) l->FindObject("fRecPhiNeg");
+fHpos[2]=  (TH1F*) l->FindObject("fRecEtaPos");
+fHneg[2]=  (TH1F*) l->FindObject("fRecEtaNeg");
+fHpos[3]=  (TH1F*) l->FindObject("fRecEtaPtPos");
+fHneg[3]=  (TH1F*) l->FindObject("fRecEtaPtNeg");
+
+fHpos[4]=  (TH1F*) l->FindObject("fRecPtPosEta");
+fHneg[4]=  (TH1F*) l->FindObject("fRecPtNegEta");
+fHpos[5]=  (TH1F*) l->FindObject("fRecPhiPosEta");
+fHneg[5]=  (TH1F*) l->FindObject("fRecPhiNegEta");
+fHpos[6]=  (TH1F*) l->FindObject("fRecQPtPosEta");
+fHneg[6]=  (TH1F*) l->FindObject("fRecQPtNegEta");
+
+
+TLegend *legp1;
+legp1= new TLegend(0.9,0.65,0.65,0.9);
+legp1->SetFillColor(kWhite);
+
+TLegend *legp2;
+legp2= new TLegend(0.9,0.65,0.65,0.9);
+legp2->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp1->AddEntry(fun0,"pos. charge","l");
+legp1->AddEntry(fun1,"neg. charge","l");
+
+legp2->AddEntry(fun0,"pos. #eta","l");
+legp2->AddEntry(fun1,"neg. #eta","l");
+
+
+
+for(Int_t i=0; i<7;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(3,3);
+for(Int_t i=0; i<7;i++){
+  dca->cd(i+1);
+  fHpos[i]->Draw();
+  fHneg[i]->Draw("same");
+  if(i==0||i==4)gPad->SetLogy();
+  if (i < 4) 
+    legp1->Draw();
+  else
+    legp2->Draw();
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotD.C b/prod/acrcaf/qa_pp/plot_macros/plotD.C
new file mode 100644 (file)
index 0000000..4a94302
--- /dev/null
@@ -0,0 +1,73 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecDcaPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecDcaNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TH1F* fHposD;
+TH1F* fHnegD;
+
+fHposD=  (TH1F*) l->FindObject("fRecDPos");
+fHposD->SetLineWidth(2);
+
+fHnegD=  (TH1F*) l->FindObject("fRecDNeg");
+fHnegD->SetLineColor(kRed);
+fHnegD->SetLineWidth(2);
+
+
+fH=  (TH2F*) l->FindObject("fDiffDcaD");
+
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,2);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+
+dca->cd(2);
+fHposD->DrawClone();
+fHnegD->DrawClone("same");
+legp->Draw();
+gPad->SetLogy();
+
+
+dca->cd(3);
+fH->Draw("colz");
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotDca.C b/prod/acrcaf/qa_pp/plot_macros/plotDca.C
new file mode 100644 (file)
index 0000000..e5fcba2
--- /dev/null
@@ -0,0 +1,61 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHneg;
+TH1F* fHnegInv;
+
+fHpos=  (TH1F*) l->FindObject("fRecDcaPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecDcaNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+fHnegInv=  (TH1F*) l->FindObject("fRecDcaNegInv");
+fHnegInv->SetLineColor(kRed);
+fHnegInv->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHnegInv);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive}/Inverse Yield_{negative}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotDcaVz.C b/prod/acrcaf/qa_pp/plot_macros/plotDcaVz.C
new file mode 100644 (file)
index 0000000..e0bd0cf
--- /dev/null
@@ -0,0 +1,42 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+TH2F* fHpneg;
+
+fHpos=  (TH2F*) l->FindObject("fSignedDcaPosVz");
+fHneg=  (TH2F*) l->FindObject("fSignedDcaNegVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->Draw("colz");
+fHpos->SetTitle("positive tracks");
+fHpos->SetYTitle("esdtrack->Zv()");
+
+dca->cd(2);
+fHneg->Draw("colz");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative tracks");
+fHneg->SetYTitle("esdtrack->Zv()");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotDeltaPhi.C b/prod/acrcaf/qa_pp/plot_macros/plotDeltaPhi.C
new file mode 100644 (file)
index 0000000..e3c9bed
--- /dev/null
@@ -0,0 +1,47 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+fHpos=  (TH2F*) l->FindObject("fDeltaPhiLeading");
+
+TH1D* px;
+TH1D* py;
+
+//pgood= fHpos->ProjectionY();
+//pgood->Draw();
+
+TCanvas * c1 = new TCanvas("c1", "c1", 100, 100, 1020, 480);
+c1->Divide(2,1);
+// c1->cd(1);
+// fHpos->Draw("colz");
+
+
+c1->cd(1);
+px= fHpos->ProjectionX();
+px->Draw();
+px->SetTitle("");
+
+c1->cd(2);
+py= fHpos->ProjectionY();
+py->Draw();
+py->SetMinimum(0);
+py->SetTitle("");
+
+TCanvas * c2 = new TCanvas("c2", "c2", 100, 100, 620, 480);
+c2->cd();
+gPad->SetLeftMargin(0.13);
+fHpos->SetTitleOffset(1.2, "Y");
+fHpos->Draw("colz");
+fHpos->SetTitle("");
+
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotEta-over-pt.C b/prod/acrcaf/qa_pp/plot_macros/plotEta-over-pt.C
new file mode 100644 (file)
index 0000000..64eabc9
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecEtaPtPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecEtaPtNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+//gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive}/Yield_{negative}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotEta.C b/prod/acrcaf/qa_pp/plot_macros/plotEta.C
new file mode 100644 (file)
index 0000000..8a67c8b
--- /dev/null
@@ -0,0 +1,57 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecEtaPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecEtaNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("Hallo");
+fHneg->SetTitle("Hallo");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive}/Yield_{negative}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotEtaPtVz.C b/prod/acrcaf/qa_pp/plot_macros/plotEtaPtVz.C
new file mode 100644 (file)
index 0000000..4870656
--- /dev/null
@@ -0,0 +1,47 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+TH2F* fHpneg;
+
+fHpos=  (TH2F*) l->FindObject("fRecEtaPtPosVz");
+fHneg=  (TH2F*) l->FindObject("fRecEtaPtNegVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+gPad->SetRightMargin(0.15);
+fHpos->Draw("colz");
+fHpos->SetTitle("positive tracks");
+fHpos->SetYTitle("esdtrack->Zv()");
+fHpos->SetXTitle("#eta/p_{T}");
+
+
+dca->cd(2);
+gPad->SetRightMargin(0.15);
+fHneg->Draw("colz");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative tracks");
+fHneg->SetYTitle("esdtrack->Zv()");
+fHneg->SetXTitle("#eta/p_{T}");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotEtaVz.C b/prod/acrcaf/qa_pp/plot_macros/plotEtaVz.C
new file mode 100644 (file)
index 0000000..116fd8b
--- /dev/null
@@ -0,0 +1,42 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecEtaPosVz");
+fHneg=  (TH1F*) l->FindObject("fRecEtaNegVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->Draw("colz");
+fHpos->SetTitle("positive tracks");
+fHpos->SetYTitle("esdtrack->Zv()");
+
+dca->cd(2);
+fHneg->Draw("colz");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative tracks");
+fHneg->SetYTitle("esdtrack->Zv()");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotLadderDca.C b/prod/acrcaf/qa_pp/plot_macros/plotLadderDca.C
new file mode 100644 (file)
index 0000000..efa6845
--- /dev/null
@@ -0,0 +1,81 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[7];
+TH1F* fHneg[7];
+
+for(Int_t sector=0;sector<7;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fSignDcaPos%d", sector));
+ fHneg[sector]=  (TH1F*) l->FindObject(Form("fSignDcaNegInv%d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<7;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
+dca->Divide(3,3);
+for(Int_t i=0; i<7;i++){
+  //fHpos[i]->Divide(fHneg[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+ //  if(i!=1){
+//     fHpos[i]->SetMaximum(fHpos[0]->GetMaximum()*2.5);
+//     fHpos[i]->SetMinimum(fHpos[0]->GetMinimum()-1);
+//   }
+  fHpos[i]->SetMaximum(500);
+  fHpos[i]->SetMinimum(1);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("p_{T} case %2d",i));
+
+//   gPad->SetLeftMargin(0.15);
+//   gPad->SetBottomMargin(0.15);
+  fHneg[i]->Draw("same");
+  legp->Draw();
+  //gPad->SetGridy();
+  //gPad->SetGridx();
+//   fHpos[i]->SetTitleOffset(1., "X");
+//   fHpos[i]->SetTitleOffset(1., "Y");
+//   fHpos[i]->SetTitleSize(0.08, "X");
+//   fHpos[i]->SetTitleSize(0.05, "Y");
+//   fHpos[i]->SetLabelSize(0.1, "X");
+//   fHpos[i]->SetLabelSize(0.1, "Y");
+//   //fHpos[i]->GetXaxis()->SetNdivision(5);
+//   fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotLadderEta.C b/prod/acrcaf/qa_pp/plot_macros/plotLadderEta.C
new file mode 100644 (file)
index 0000000..3340bfe
--- /dev/null
@@ -0,0 +1,76 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[7];
+TH1F* fHneg[7];
+
+for(Int_t sector=0;sector<7;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecEtaPosLadder%d", sector));
+ fHneg[sector]=  (TH1F*) l->FindObject(Form("fRecEtaNegLadder%d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.78,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<7;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
+dca->Divide(3,3);
+for(Int_t i=0; i<7;i++){
+  //  fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  fHpos[i]->SetMaximum(100);
+  fHpos[i]->SetMinimum(0.1);
+
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("#eta for case %02d",i));
+
+//   gPad->SetLeftMargin(0.15);
+//   gPad->SetBottomMargin(0.15);
+  fHneg[i]->Draw("same");
+
+//   fHpos[i]->SetTitleOffset(1., "X");
+//   fHpos[i]->SetTitleOffset(1., "Y");
+//   fHpos[i]->SetTitleSize(0.08, "X");
+//   fHpos[i]->SetTitleSize(0.05, "Y");
+//   fHpos[i]->SetLabelSize(0.1, "X");
+//   fHpos[i]->SetLabelSize(0.1, "Y");
+//   //fHpos[i]->GetXaxis()->SetNdivision(5);
+//   fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+  legp->Draw();
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotLadderPhi.C b/prod/acrcaf/qa_pp/plot_macros/plotLadderPhi.C
new file mode 100644 (file)
index 0000000..a8eca3f
--- /dev/null
@@ -0,0 +1,77 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[6];
+TH1F* fHneg[6];
+
+for(Int_t sector=0;sector<6;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecPhiPosLadder%d", sector));
+ fHneg[sector]=  (TH1F*) l->FindObject(Form("fRecPhiNegLadder%d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<6;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
+dca->Divide(3,2);
+for(Int_t i=0; i<6;i++){
+  //  fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  fHpos[i]->SetMaximum(10000);
+  fHpos[i]->SetMinimum(0.1);
+
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("#phi of case %d",i));
+
+//   gPad->SetLeftMargin(0.15);
+//   gPad->SetBottomMargin(0.15);
+  fHneg[i]->Draw("same");
+
+//   fHpos[i]->SetTitleOffset(1., "X");
+//   fHpos[i]->SetTitleOffset(1., "Y");
+//   fHpos[i]->SetTitleSize(0.08, "X");
+//   fHpos[i]->SetTitleSize(0.05, "Y");
+//   fHpos[i]->SetLabelSize(0.1, "X");
+//   fHpos[i]->SetLabelSize(0.1, "Y");
+//   //fHpos[i]->GetXaxis()->SetNdivision(5);
+//   fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotLadderPt.C b/prod/acrcaf/qa_pp/plot_macros/plotLadderPt.C
new file mode 100644 (file)
index 0000000..9a44c3c
--- /dev/null
@@ -0,0 +1,79 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[7];
+TH1F* fHneg[7];
+
+for(Int_t sector=0;sector<7;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecPtPosLadder%d", sector));
+ fHneg[sector]=  (TH1F*) l->FindObject(Form("fRecPtNegLadder%d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<7;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
+dca->Divide(3,3);
+for(Int_t i=0; i<7;i++){
+  //fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+ //  if(i!=1){
+//     fHpos[i]->SetMaximum(fHpos[0]->GetMaximum()*2.5);
+//     fHpos[i]->SetMinimum(fHpos[0]->GetMinimum()-1);
+//   }
+  fHpos[i]->SetMaximum(1000000);
+  fHpos[i]->SetMinimum(0.1);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("p_{T} case %2d",i));
+
+//   gPad->SetLeftMargin(0.15);
+//   gPad->SetBottomMargin(0.15);
+  fHneg[i]->Draw("same");
+  legp->Draw();
+//   fHpos[i]->SetTitleOffset(1., "X");
+//   fHpos[i]->SetTitleOffset(1., "Y");
+//   fHpos[i]->SetTitleSize(0.08, "X");
+//   fHpos[i]->SetTitleSize(0.05, "Y");
+//   fHpos[i]->SetLabelSize(0.1, "X");
+//   fHpos[i]->SetLabelSize(0.1, "Y");
+//   //fHpos[i]->GetXaxis()->SetNdivision(5);
+//   fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotLadderSigma.C b/prod/acrcaf/qa_pp/plot_macros/plotLadderSigma.C
new file mode 100644 (file)
index 0000000..38cded4
--- /dev/null
@@ -0,0 +1,80 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[7];
+TH1F* fHneg[7];
+
+for(Int_t sector=0;sector<7;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fPtSigmaPos%d", sector));
+ fHneg[sector]=  (TH1F*) l->FindObject(Form("fPtSigmaNeg%d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.75,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<7;i++){
+  fHpos[i]->SetLineColor(kBlack);
+  fHpos[i]->SetLineWidth(2);
+  fHneg[i]->SetLineColor(kRed);
+  fHneg[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
+dca->Divide(3,3);
+for(Int_t i=0; i<7;i++){
+  //fHpos[i]->Divide(fHneg[i]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+ //  if(i!=1){
+//     fHpos[i]->SetMaximum(fHpos[0]->GetMaximum()*2.5);
+//     fHpos[i]->SetMinimum(fHpos[0]->GetMinimum()-1);
+//   }
+  fHpos[i]->SetMaximum(1000000);
+  fHpos[i]->SetMinimum(0.1);
+  // fHpos[i]->GetXaxis()->SetRangeUser(-2.5,0.5);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("#sigma_{p_{T}} case %2d",i));
+
+//   gPad->SetLeftMargin(0.15);
+//   gPad->SetBottomMargin(0.15);
+  fHneg[i]->Draw("same");
+  legp->Draw();
+//   fHpos[i]->SetTitleOffset(1., "X");
+//   fHpos[i]->SetTitleOffset(1., "Y");
+//   fHpos[i]->SetTitleSize(0.08, "X");
+//   fHpos[i]->SetTitleSize(0.05, "Y");
+//   fHpos[i]->SetLabelSize(0.1, "X");
+//   fHpos[i]->SetLabelSize(0.1, "Y");
+//   //fHpos[i]->GetXaxis()->SetNdivision(5);
+//   fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPhi.C b/prod/acrcaf/qa_pp/plot_macros/plotPhi.C
new file mode 100644 (file)
index 0000000..bec8014
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecPhiPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecPhiNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+//gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive}/Yield_{negative}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPhiVz.C b/prod/acrcaf/qa_pp/plot_macros/plotPhiVz.C
new file mode 100644 (file)
index 0000000..6f89453
--- /dev/null
@@ -0,0 +1,42 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+TH2F* fHpneg;
+
+fHpos=  (TH2F*) l->FindObject("fRecPhiPosVz");
+fHneg=  (TH2F*) l->FindObject("fRecPhiNegVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->Draw("colz");
+fHpos->SetTitle("positive tracks");
+fHpos->SetYTitle("esdtrack->Zv()");
+
+dca->cd(2);
+fHneg->Draw("colz");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative tracks");
+fHneg->SetYTitle("esdtrack->Zv()");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPhi_Eta.C b/prod/acrcaf/qa_pp/plot_macros/plotPhi_Eta.C
new file mode 100644 (file)
index 0000000..d1bb7c5
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecPhiPosEta");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecPhiNegEta");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive #eta","l");
+legp->AddEntry(fun1,"negative #eta","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+//gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive #eta}/Yield_{negative #eta}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPt.C b/prod/acrcaf/qa_pp/plot_macros/plotPt.C
new file mode 100644 (file)
index 0000000..989091c
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecPtPos");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecPtNeg");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive}/Yield_{negative}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPtVz.C b/prod/acrcaf/qa_pp/plot_macros/plotPtVz.C
new file mode 100644 (file)
index 0000000..6a5d9b4
--- /dev/null
@@ -0,0 +1,42 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+TH2F* fHpneg;
+
+fHpos=  (TH2F*) l->FindObject("fRecPtPosVz");
+fHneg=  (TH2F*) l->FindObject("fRecPtNegVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->Draw("colz");
+fHpos->SetTitle("positive tracks");
+fHpos->SetYTitle("esdtrack->Zv()");
+
+dca->cd(2);
+fHneg->Draw("colz");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative tracks");
+fHneg->SetYTitle("esdtrack->Zv()");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotPt_Eta.C b/prod/acrcaf/qa_pp/plot_macros/plotPt_Eta.C
new file mode 100644 (file)
index 0000000..a7f3b7f
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecPtPosEta");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecPtNegEta");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive #eta","l");
+legp->AddEntry(fun1,"negative #eta","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive #eta}/Yield_{negative #eta}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotQPtVz.C b/prod/acrcaf/qa_pp/plot_macros/plotQPtVz.C
new file mode 100644 (file)
index 0000000..ca7dc63
--- /dev/null
@@ -0,0 +1,52 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH2F* fHpos;
+TH2F* fHpneg;
+
+fHpos=  (TH2F*) l->FindObject("fRecQPtPosEtaVz");
+fHneg=  (TH2F*) l->FindObject("fRecQPtNegEtaVz");
+
+
+
+
+
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 520);
+dca->Divide(2,1);
+dca->cd(1);
+//fHpos->Divide(fHneg);
+gPad->SetRightMargin(0.15);
+gPad->SetLeftMargin(0.15);
+fHpos->SetTitleOffset(1.8,"Y");
+//fHpos->SetXTitle("(Charge/p_{T})_{pos} / (Charge/p_{T})_{neg}");
+fHpos->SetXTitle("Charge/p_{T}");
+fHpos->Draw("colz");
+fHpos->SetTitle("positive #eta");
+fHpos->SetYTitle("esdtrack->Zv()");
+
+dca->cd(2);
+fHneg->Draw("colz");
+gPad->SetRightMargin(0.15);
+gPad->SetLeftMargin(0.15);
+fHneg->SetTitleOffset(1.8,"Y");
+fHneg->SetXTitle("Charge/p_{T}");
+fHneg->SetMaximum(fHpos->GetMaximum());
+fHneg->SetTitle("negative #eta");
+fHneg->SetYTitle("esdtrack->Zv()");
+
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotQPt_Eta.C b/prod/acrcaf/qa_pp/plot_macros/plotQPt_Eta.C
new file mode 100644 (file)
index 0000000..cb9d8e8
--- /dev/null
@@ -0,0 +1,56 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos;
+TH1F* fHpneg;
+
+fHpos=  (TH1F*) l->FindObject("fRecQPtPosEta");
+fHpos->SetLineWidth(2);
+
+fHneg=  (TH1F*) l->FindObject("fRecQPtNegEta");
+fHneg->SetLineColor(kRed);
+fHneg->SetLineWidth(2);
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive #eta","l");
+legp->AddEntry(fun1,"negative #eta","l");
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480);
+dca->Divide(2,1);
+dca->cd(1);
+fHpos->DrawClone("");
+fHpos->SetTitle("");
+fHpos->SetYTitle("");
+fHneg->DrawClone("same");
+gPad->SetLogy();
+legp->Draw();
+dca->cd(2);
+fHpos->Divide(fHneg);
+fHpos->Draw("");
+fHpos->SetLineColor(kBlue);
+fHpos->SetTitle("Yield_{positive #eta}/Yield_{negative #eta}");
+fHpos->SetYTitle("");
+
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorDca.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorDca.C
new file mode 100644 (file)
index 0000000..37ca2de
--- /dev/null
@@ -0,0 +1,76 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+  fHpos[sector]=  (TH1F*) l->FindObject(Form("fSignedDcaTpcSector%02d", sector));
+
+}
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  //  fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+ //  if(i!=1){
+//   fHpos[i]->SetMaximum(5);
+//   fHpos[i]->SetMinimum(-3);
+  fHpos[i]->SetMaximum(100);
+  fHpos[i]->SetMinimum(1);
+//   }
+  // fHpos[i]->GetXaxis()->SetRangeUser(-.5,.5);
+  fHpos[i]->SetTitle("");
+  //  fHpos[i]->SetXTitle(Form("dca%d / dca0",i));
+  fHpos[i]->SetXTitle(Form("dca%d",i));
+
+  gPad->SetLeftMargin(0.15);
+  gPad->SetBottomMargin(0.15);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(1., "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorDcaRatio.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorDcaRatio.C
new file mode 100644 (file)
index 0000000..ff3b955
--- /dev/null
@@ -0,0 +1,77 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+  fHpos[sector]=  (TH1F*) l->FindObject(Form("fSignedDcaTpcSector%02d", sector));
+}
+TH1F* fHposref =(TH1F*) l->FindObject("fDca");
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+ //  if(i!=1){
+  fHpos[i]->SetMaximum(0.3);
+  fHpos[i]->SetMinimum(-0.1);
+//   fHpos[i]->SetMaximum(100000);
+//   fHpos[i]->SetMinimum(1)
+    ;
+//   }
+  fHpos[i]->GetXaxis()->SetRangeUser(-1,1);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("dca_{%d} / dca_{all}",i));
+  //fHpos[i]->SetXTitle(Form("dca%d",i));
+
+  gPad->SetLeftMargin(0.20);
+  gPad->SetBottomMargin(0.15);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(1., "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  fHpos[i]->GetYaxis()->SetNdivisions(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+  //  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorEta.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorEta.C
new file mode 100644 (file)
index 0000000..d4ab688
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+  fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecEtaTpcSector%02d", sector));
+
+}
+//TH1F* fHposref =(TH1F*) l->FindObject("")
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  // fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+
+  fHpos[i]->SetMaximum(5000);
+  fHpos[i]->SetMinimum(0.1);
+//   fHpos[i]->SetMaximum(3);
+//   fHpos[i]->SetMinimum(-1);
+
+  fHpos[i]->GetXaxis()->SetRangeUser(-1.5,1.5);
+  fHpos[i]->SetTitle("");
+  //fHpos[i]->SetXTitle(Form("#eta_{%d} / #eta_{0} ",i));
+  fHpos[i]->SetXTitle(Form("#eta TPC sector %d ",i));
+
+  gPad->SetLeftMargin(0.15);
+  gPad->SetBottomMargin(0.2);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(1., "Y");
+  fHpos[i]->SetTitleSize(0.1, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+  fHpos[i]->GetYaxis()->SetNdivisions(7);
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPt.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPt.C
new file mode 100644 (file)
index 0000000..b08fe24
--- /dev/null
@@ -0,0 +1,74 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecEtaPtTpcSector%02d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  //fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  // fHpos[i]->GetXaxis()->SetRangeUser(-2,2);
+  fHpos[i]->SetMaximum(1400);
+  fHpos[i]->SetMinimum(200);
+//  fHpos[i]->SetMaximum(5);
+//   fHpos[i]->SetMinimum(-2);
+  fHpos[i]->SetTitle("");
+  //  fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} / (#eta/p_{T})_{0} ",i));
+  fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} ",i));
+  gPad->SetLeftMargin(0.21);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  //gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPtRatio.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaPtRatio.C
new file mode 100644 (file)
index 0000000..4fd0dd5
--- /dev/null
@@ -0,0 +1,77 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecEtaPtTpcSector%02d", sector));
+} 
+
+TH1F* fHposref =(TH1F*) l->FindObject("fEtaPt");
+
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  // fHpos[i]->GetXaxis()->SetRangeUser(-2,2);
+//   fHpos[i]->SetMaximum(2000);
+//   fHpos[i]->SetMinimum(1);
+ fHpos[i]->SetMaximum(0.2);
+  fHpos[i]->SetMinimum(-0.05);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} / (#eta/p_{T})_{all} ",i));
+  //fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} ",i));
+  gPad->SetLeftMargin(0.20);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  // gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaRatio.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorEtaRatio.C
new file mode 100644 (file)
index 0000000..604be1c
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+  fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecEtaTpcSector%02d", sector));
+
+}
+TH1F* fHposref =(TH1F*) l->FindObject("fEta");
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+
+  // fHpos[i]->SetMaximum(1000);
+  //fHpos[i]->SetMinimum(0.1);
+  fHpos[i]->SetMaximum(0.3);
+  fHpos[i]->SetMinimum(-0.1);
+
+  // fHpos[i]->GetXaxis()->SetRangeUser(-1.5,1.5);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("#eta_{%d} / #eta_{all} ",i));
+  //fHpos[i]->SetXTitle(Form("#eta TPC sector %d ",i));
+
+  gPad->SetLeftMargin(0.15);
+  gPad->SetBottomMargin(0.2);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(1., "Y");
+  fHpos[i]->SetTitleSize(0.1, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+  fHpos[i]->GetYaxis()->SetNdivisions(7);
+
+  // gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorPt.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorPt.C
new file mode 100644 (file)
index 0000000..c0a8fad
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecPtTpcSector%02d", sector));
+} 
+
+TH1F* fHposref =  (TH1F*) l->FindObject("fHistRECpt");
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  // fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  fHpos[i]->SetMaximum(100);
+  fHpos[i]->SetMinimum(1);
+  // fHpos[i]->GetXaxis()->SetRangeUser(0,3);
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("p_{T} sector %2d",i));
+  //fHpos[i]->SetXTitle(Form("p_{T,%d}/p_{T,all}",i));
+
+  gPad->SetLeftMargin(0.2);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+  fHpos[i]->GetYaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorPtRatio.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorPtRatio.C
new file mode 100644 (file)
index 0000000..7c61ad9
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecPtTpcSector%02d", sector));
+} 
+
+TH1F* fHposref =  (TH1F*) l->FindObject("fHistRECpt");
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  fHpos[i]->SetMaximum(0.1);
+  fHpos[i]->SetMinimum(0);
+  fHpos[i]->GetXaxis()->SetRangeUser(0,5);
+  fHpos[i]->SetTitle("");
+  //fHpos[i]->SetXTitle(Form("p_{T} sector %2d",i));
+  fHpos[i]->SetXTitle(Form("p_{T,%d}/p_{T,all}",i));
+
+  gPad->SetLeftMargin(0.2);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+  fHpos[i]->GetYaxis()->SetNdivisions(5);
+
+
+  //gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorQPt.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorQPt.C
new file mode 100644 (file)
index 0000000..e9b231b
--- /dev/null
@@ -0,0 +1,75 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecQPtTpcSector%02d", sector));
+} 
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  // fHpos[i]->Divide(fHpos[0]);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  // fHpos[i]->SetMaximum(2);
+//   fHpos[i]->SetMinimum(0.);
+  fHpos[i]->SetMaximum(1000);
+  fHpos[i]->SetMinimum(0.1);
+  fHpos[i]->SetTitle("");
+  //fHpos[i]->SetXTitle(Form("(Q/p_{T})_{%d}/(Q/p_{T})_{0}",i));
+  fHpos[i]->SetXTitle(Form("Q/p_{T} sector %2d",i));
+
+  gPad->SetLeftMargin(0.15);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  //fHpos[i]->GetXaxis()->SetNdivision(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/plotSectorQPtRatio.C b/prod/acrcaf/qa_pp/plot_macros/plotSectorQPtRatio.C
new file mode 100644 (file)
index 0000000..1c8b823
--- /dev/null
@@ -0,0 +1,78 @@
+{
+gROOT->SetStyle("Plain");
+gStyle->SetOptStat(0);
+gStyle->SetPalette(1);
+
+//open files and get lists
+TList *l;
+TFile f0("QAsym.proof.root");
+l = (TList *)f0.Get("QAsymHists");
+
+
+TH1F* fHpos[18];
+
+for(Int_t sector=0;sector<18;sector++){
+ fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecQPtTpcSector%02d", sector));
+} 
+
+TH1F* fHposref =(TH1F*) l->FindObject("fQPt");
+
+TLegend *legp;
+legp= new TLegend(0.9,0.65,0.65,0.9);
+legp->SetFillColor(kWhite);
+
+TF1 *fun0, *fun1;
+fun0= new TF1("fun0","gaus",-5.0,5.0);
+fun1= new TF1("fun1","gaus",-5.0,5.0);
+fun0->SetLineColor(kBlack);
+fun1->SetLineColor(kRed);
+
+legp->AddEntry(fun0,"positive","l");
+legp->AddEntry(fun1,"negative","l");
+
+
+
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->SetLineColor(kRed);
+  // fHpos[i]->SetLineWidth(2);
+}
+      
+
+TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820);
+dca->Divide(6,3);
+for(Int_t i=0; i<18;i++){
+  fHpos[i]->Divide(fHposref);
+  dca->cd(i+1);
+
+  fHpos[i]->Draw();
+  fHpos[i]->SetMaximum(0.3);
+  fHpos[i]->SetMinimum(-0.1);
+//   fHpos[i]->SetMaximum(100);
+//   fHpos[i]->SetMinimum(1)
+    ;
+  fHpos[i]->SetTitle("");
+  fHpos[i]->SetXTitle(Form("(Q/p_{T})_{%d}/(Q/p_{T})_{all}",i));
+  //fHpos[i]->SetXTitle(Form("Q/p_{T} sector %2d",i));
+
+  gPad->SetLeftMargin(0.20);
+  gPad->SetBottomMargin(0.17);
+
+  fHpos[i]->SetTitleOffset(1., "X");
+  fHpos[i]->SetTitleOffset(.8, "Y");
+  fHpos[i]->SetTitleSize(0.08, "X");
+  fHpos[i]->SetTitleSize(0.05, "Y");
+  fHpos[i]->SetLabelSize(0.1, "X");
+  fHpos[i]->SetLabelSize(0.1, "Y");
+  fHpos[i]->GetYaxis()->SetNdivisions(5);
+  fHpos[i]->GetXaxis()->SetNdivisions(5);
+
+
+  //gPad->SetLogy();
+
+}
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/plot_macros/pos-NegInv.C b/prod/acrcaf/qa_pp/plot_macros/pos-NegInv.C
new file mode 100644 (file)
index 0000000..d92089b
--- /dev/null
@@ -0,0 +1,74 @@
+//void posNegInv(TString fname)
+{
+
+  gROOT->SetStyle("Plain");
+  gStyle->SetOptStat(0);
+  gStyle->SetPalette(1);
+  
+  //open files and get lists
+  TList *l0;
+  // TFile f0(fname);
+  TFile f0("QAsym.proof.root");
+  l0 = (TList *)f0.Get("QAsymHists");
+
+  // TList *l1;
+  // TFile f1("QAsym.proof.fp.all.ITSrefit.root");
+  // l1 = (TList *)f1.Get("QAsymHists");
+
+  TH1F* fHpos[6];
+  TH1F* fHneg[6];
+
+  for(int i=0;i<6;i++){
+    fHpos[i]=  (TH1F*) l0->FindObject(Form("fSignDcaPos%d", i));
+    fHpos[i]->SetLineColor(kBlack);
+    fHpos[i]->SetLineWidth(2);
+    fHneg[i]=  (TH1F*) l0->FindObject(Form("fSignDcaNegInv%d", i));
+    fHneg[i]->SetLineColor(kRed);
+    fHneg[i]->SetLineWidth(2);
+  }
+
+
+     
+  TLegend *legp[6];
+  for(int i=0;i<6;i++){
+    legp[i]= new TLegend(0.9,0.65,0.55,0.9);
+    legp[i]->SetFillColor(kWhite);
+    TF1 *fun[2];
+    fun[0]= new TF1(Form("fun%d", i),"gaus",-5.0,5.0);
+    fun[0]->SetLineColor(kBlack);
+    fun[1]= new TF1(Form("fun%d", i),"gaus",-5.0,5.0);
+    fun[1]->SetLineColor(kRed);
+    legp[i]->AddEntry(fun[0],"Positive Particles  f( x)","l");  
+    legp[i]->AddEntry(fun[1],"Negative partivcles f(-x)","l");  
+  }
+
+
+
+
+  Double_t range= 4.;
+
+  TCanvas * dca = new TCanvas("dca", "dca", 100, 100, 880, 680);
+  dca->Divide(2,3);
+  for(Int_t i=0;i<6;i++){
+
+    dca->cd(i+1);
+    fHpos[i]->SetTitle(Form("Case %d",i));
+    fHpos[i]->SetMaximum(1000000);
+    fHpos[i]->SetMinimum(0.1);
+    fHpos[i]->Draw();
+    fHneg[i]->Draw("same");
+    gPad->SetLogy();
+    legp[i]->Draw();
+    gPad->SetGridx();
+    gPad->SetGridy();
+    // fHpos[i]->GetXaxis()->SetRangeUser(-range,range);
+  }
+
+
+}
+  
+
+
diff --git a/prod/acrcaf/qa_pp/plot_macros/sigma.C b/prod/acrcaf/qa_pp/plot_macros/sigma.C
new file mode 100644 (file)
index 0000000..82b4ab8
--- /dev/null
@@ -0,0 +1,95 @@
+//void sigma( TString fname)
+{
+  gROOT->SetStyle("Plain");
+  gStyle->SetOptStat(0);
+  gStyle->SetPalette(1);
+  
+  //open files and get lists
+  TList *l;
+  
+  //TFile f0(fname);
+  TFile f0("QAsym.proof.root");
+  l = (TList *)f0.Get("QAsymHists");
+  
+  
+  TH1F* fHpos[7];
+  TH1F* fHneg[7];
+  
+  for(int i=0;i<7;i++){
+    fHpos[i]=  (TH1F*) l->FindObject(Form("fPtSigmaPos%d", i));
+    fHpos[i]->SetLineColor(i+1);
+    fHpos[i]->SetLineWidth(2);
+    fHpos[i]->GetXaxis()->SetLabelSize(0.06);
+    fHpos[i]->GetYaxis()->SetLabelSize(0.06);
+    fHpos[i]->GetXaxis()->SetTitleSize(0.06);
+    fHpos[i]->GetYaxis()->SetTitleSize(0.06);
+  
+    fHneg[i]=  (TH1F*) l->FindObject(Form("fPtSigmaNeg%d", i));
+    fHneg[i]->SetLineColor(i+1);
+    fHneg[i]->SetLineWidth(2);
+    fHneg[i]->GetXaxis()->SetLabelSize(0.06);
+    fHneg[i]->GetYaxis()->SetLabelSize(0.06);
+    fHneg[i]->GetXaxis()->SetTitleSize(0.06);
+    fHneg[i]->GetYaxis()->SetTitleSize(0.06);
+  }
+      
+  TLegend *legp;
+  legp= new TLegend(0.9,0.45,0.83,0.9);
+  legp->SetFillColor(kWhite);
+  TF1 *fun[7];
+  for(int i=0;i<7;i++){
+    fun[i]= new TF1(Form("fun%d", i),"gaus",-5.0,5.0);
+    fun[i]->SetLineColor(i+1);
+    legp->AddEntry(fun[i],Form("case %d",i),"l");  
+  }
+
+
+
+
+
+
+  TCanvas * dca = new TCanvas("sigma", "sigma", 100, 100, 1020, 720);
+  dca->Divide(1,2);
+
+  for(int i=0;i<7;i++){
+
+    dca->cd(1);
+    gPad->SetBottomMargin(0.18);
+    // fHpos[i]->GetXaxis()->SetRangeUser(-3.,3.);
+    fHpos[i]->SetTitle("positive particles");
+    fHpos[i]->SetMaximum(1000);
+    fHpos[i]->SetMinimum(0.1);
+    if(i==0)fHpos[i]->Draw();
+    else fHpos[i]->Draw("same");
+    gPad->SetLogy();
+    //gPad->SetLogx();
+    legp->Draw();
+    gPad->SetGridx();
+    gPad->SetGridy();
+    //fHpos[i]->GetXaxis()->SetRangeUser(-4,0);
+
+    dca->cd(2);
+    gPad->SetBottomMargin(0.18);
+    // fHneg[i]->GetXaxis()->SetRangeUser(-3.,3.);
+    fHneg[i]->SetTitle("negative particles");
+    fHneg[i]->SetMaximum(1000);
+    fHneg[i]->SetMinimum(0.1);
+    if(i==0)fHneg[i]->Draw();
+    else fHneg[i]->Draw("same");
+
+    gPad->SetLogy();
+    //gPad->SetLogx();
+    legp->Draw();
+    gPad->SetGridx();
+    gPad->SetGridy();
+    //fHneg[i]->GetXaxis()->SetRangeUser(-4,0);
+
+
+  }
+  
+
+
+}
diff --git a/prod/acrcaf/qa_pp/qa_pp.C b/prod/acrcaf/qa_pp/qa_pp.C
new file mode 100644 (file)
index 0000000..488fa64
--- /dev/null
@@ -0,0 +1,69 @@
+
+void AddTaskQAsym  (Int_t runNumber);
+void AddTaskVZEROQA(Int_t runNumber);
+
+void qa_pp(Int_t runNumber) {
+  TStopwatch timer;
+  timer.Start();
+
+  gEnv->SetValue("XSec.GSI.DelegProxy","2");
+  /// Select ROOT version
+  TProof::Mgr("proof02@alicecaf:31093")->SetROOTVersion("v5-24-00a");
+  // Login to CAF
+  TProof::Open("proof02@alicecaf:31093");
+
+  // Enable AliRoot
+  gProof->UploadPackage("/afs/cern.ch/alice/caf/sw/ALICE/PARs/v4-18-12-AN/AF-v4-18-12-AN.par");
+  gProof->EnablePackage("AF-v4-18-12-AN.par");
+
+  
+  // Enable analysis libs
+  gSystem->Load("libANALYSIS.so");
+  gSystem->Load("libANALYSISalice.so");
+  gSystem->Load("libPHOSUtils.so");
+  gSystem->Load("libEMCALUtils.so");
+  //  gSystem->Load("libPWG4PartCorrBase.so");
+  //  gSystem->Load("libPWG4PartCorrDep.so");
+
+  gProof->Exec("gSystem->Load(\"libANALYSIS.so\");",        kTRUE);
+  gProof->Exec("gSystem->Load(\"libANALYSISalice.so\");",   kTRUE);
+  gProof->Exec("gSystem->Load(\"libPHOSUtils.so\");",       kTRUE);
+  gProof->Exec("gSystem->Load(\"libEMCALUtils.so\");",      kTRUE);
+  // gProof->Exec("gSystem->Load(\"libPWG4PartCorrBase.so\");",kTRUE);
+  // gProof->Exec("gSystem->Load(\"libPWG4PartCorrDep.so\");", kTRUE);
+
+  gProof->Load("AliAnalysisTaskQASym.cxx++g");
+  gProof->Load("AliAnaVZEROQA.cxx++g");
+
+  gProof->UploadPackage("PWG4PartCorrBase.par");
+  gProof->EnablePackage("PWG4PartCorrBase");
+
+  gProof->UploadPackage("PWG4PartCorrDep.par");
+  gProof->EnablePackage("PWG4PartCorrDep");
+
+  //____________________________________________//
+  // Make the analysis manager
+  AliAnalysisManager *mgr = new AliAnalysisManager("AnalysisQAManager");
+  AliESDInputHandler* esdH = new AliESDInputHandler();
+  mgr->SetInputEventHandler(esdH);  
+  mgr->SetDebugLevel(10);
+
+  // Wagons
+  gROOT->LoadMacro("AddTaskQAsym.C");
+  AddTaskQAsym(runNumber);
+
+  gROOT->LoadMacro("AddTaskVZEROQA.C");
+  AddTaskVZEROQA(runNumber);
+
+  gROOT->LoadMacro("AddTaskCalorimeterQA.C");
+  AliAnalysisTaskParticleCorrelation *taskQAcalo = AddTaskCalorimeterQA("ESD", kFALSE, kTRUE);
+
+  
+  if (!mgr->InitAnalysis()) return;
+  mgr->PrintStatus();
+  mgr->StartAnalysis("proof",
+                    Form("/ALIREC/aliprod/run%d",runNumber));
+
+  timer.Stop();
+  timer.Print();
+}