A new bunch of Global QA histogramms
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2008 15:06:57 +0000 (15:06 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Feb 2008 15:06:57 +0000 (15:06 +0000)
STEER/AliGlobalQADataMaker.cxx
STEER/AliGlobalQADataMaker.h

index 949eac0..d86529b 100644 (file)
@@ -5,11 +5,13 @@
     AliQADataMaker::fESDsQAList      (for keeping global ESD QA data)
 */
 
+#include <TPDGCode.h>
 #include <TH1F.h>
 
 #include "AliGlobalQADataMaker.h"
 #include "AliGeomManager.h"
 #include "AliESDEvent.h"
+#include "AliESDv0.h"
 
 ClassImp(AliGlobalQADataMaker)
  
@@ -62,40 +64,154 @@ void AliGlobalQADataMaker::InitESDs() {
   // This function books the ESD QA histograms
   // as a part of global QA
   //------------------------------------------------------
+
+  {// Cluster related QA
   Char_t *name[]={
     "Fraction of the assigned clusters in ITS",
     "Fraction of the assigned clusters in TPC",
     "Fraction of the assigned clusters in TRD"
   };
-  Add2ESDsList(new TH1F(name[0],name[0],100,0.,2.),0);
-  Add2ESDsList(new TH1F(name[1],name[1],100,0.,2.),1);
-  Add2ESDsList(new TH1F(name[2],name[2],100,0.,2.),2);
+  Add2ESDsList(new TH1F(name[0],name[0],100,0.,2.),kClr0);
+  Add2ESDsList(new TH1F(name[1],name[1],100,0.,2.),kClr1);
+  Add2ESDsList(new TH1F(name[2],name[2],100,0.,2.),kClr2);
+  }
+
+  {// Track related QA
+  Char_t *name[]={
+    "Track azimuthal distribution (rad)",                   // kTrk0
+    "Track pseudo-rapidity distribution",                   // kTrk1
+    "TPC: track momentum distribution (GeV/c)",             // kTrk2
+    "TPC-ITS matched: track momentum distribution (GeV/c)", // kTrk3
+    "TPC-TOF matched: track momentum distribution (GeV/c)", // kTrk4
+    "TPC-ITS track-matching probability",                   // kTrk5
+    "TPC-TOF track-matching probability"                    // kTrk6
+  };
+  Add2ESDsList(new TH1F(name[0],name[0],100,-0.02,6.30),kTrk0);
+  Add2ESDsList(new TH1F(name[1],name[1],100,-2.00,2.00),kTrk1);
+  Add2ESDsList(new TH1F(name[2],name[2],50,  0.20,5.00),kTrk2);
+  Add2ESDsList(new TH1F(name[3],name[3],50,  0.20,5.00),kTrk3);
+  Add2ESDsList(new TH1F(name[4],name[4],50,  0.20,5.00),kTrk4);
+  Add2ESDsList(new TH1F(name[5],name[5],50,  0.20,5.00),kTrk5);
+  Add2ESDsList(new TH1F(name[6],name[6],50,  0.20,5.00),kTrk6);
+  }
+
+  {// V0 related QA
+  Char_t *name[]={
+    "K0s mass (GeV)",
+    "Lambda0 + Lambda0Bar mass (GeV)"
+  };
+  Add2ESDsList(new TH1F(name[0],name[0],50,  0.4477,0.5477),kV0s0);
+  Add2ESDsList(new TH1F(name[1],name[1],50,  1.0657,1.1657),kV0s1);
+  }
+
+  {// PID related QA
+  Char_t *name[]={
+    "ITS: dE/dx (ADC) for particles with momentum 0.4 - 0.5 (GeV/c)",
+    "TPC: dE/dx (ADC) for particles with momentum 0.4 - 0.5 (GeV/c)",
+    "TOF: tracking - measured (ps)"
+  };
+  Add2ESDsList(new TH1F(name[0],name[0],50,0.00,200.),kPid0);
+  Add2ESDsList(new TH1F(name[1],name[1],50,0.00,100.),kPid1);
+  Add2ESDsList(new TH1F(name[2],name[2],50,-3500.,3500.),kPid2);
+  }
+
 }
 
-void AliGlobalQADataMaker::MakeESDs(AliESDEvent * esd) {
+void AliGlobalQADataMaker::MakeESDs(AliESDEvent * event) {
   //-----------------------------------------------------------
   // This function fills the ESD QA histograms
   // as a part of global QA
   //-----------------------------------------------------------
+  const AliESDEvent *esd=event;
+
   Int_t ntrk=esd->GetNumberOfTracks() ; 
   for (Int_t i=0; i<ntrk; i++) {
-    AliESDtrack *track=esd->GetTrack(i);
+    const AliESDtrack *track=esd->GetTrack(i);
 
+    // Cluster related QA
     if (track->IsOn(AliESDtrack::kITSrefit)) {
       Int_t n=track->GetITSclusters(0);
-      GetESDsData(0)->Fill(Float_t(n)/6.); //6 is the number of ITS layers
+      GetESDsData(kClr0)->Fill(Float_t(n)/6.); //6 is the number of ITS layers
     }
 
     if (track->IsOn(AliESDtrack::kTPCrefit)) {
       Int_t n =track->GetTPCNcls();
       Int_t nf=track->GetTPCNclsF();      // number of crossed TPC pad rows
-      GetESDsData(1)->Fill(Float_t(n)/nf);
+      GetESDsData(kClr1)->Fill(Float_t(n)/nf);
     }
 
     if (track->IsOn(AliESDtrack::kTRDrefit)) {
       Int_t n=track->GetTRDclusters(0);
-      GetESDsData(2)->Fill(Float_t(n)/120.);//120 is the number of TRD time bins
+      GetESDsData(kClr2)->Fill(Float_t(n)/120.);//120 is the number of TRD time bins
+    }
+
+    Double_t p=track->GetP();
+
+    // Track related QA
+    if (track->IsOn(AliESDtrack::kTPCrefit)) {
+      Float_t dz[2]; 
+      track->GetDZ(0.,0.,0.,esd->GetMagneticField(),dz); 
+      if ((TMath::Abs(dz[0])<3.) && (TMath::Abs(dz[1])<3.)) { // beam pipe
+        Double_t phi=track->Phi();
+       GetESDsData(kTrk0)->Fill(phi);
+       Double_t y=track->Y();
+       GetESDsData(kTrk1)->Fill(y);
+
+       GetESDsData(kTrk2)->Fill(p);
+
+       if (track->IsOn(AliESDtrack::kITSrefit)) 
+          GetESDsData(kTrk3)->Fill(p);
+
+        if (TMath::Abs(y)<0.9)
+          if (track->IsOn(AliESDtrack::kTOFout))
+             GetESDsData(kTrk4)->Fill(p);
+      }
+    }
+
+    // PID related QA
+    if ((p>0.4) && (p<0.5)) {
+      if (track->IsOn(AliESDtrack::kITSpid)) {
+       Double_t dedx=track->GetITSsignal();
+        GetESDsData(kPid0)->Fill(dedx);
+      }
+      if (track->IsOn(AliESDtrack::kTPCpid)) {
+       Double_t dedx=track->GetTPCsignal();
+        GetESDsData(kPid1)->Fill(dedx);
+      }
     }
+    if (p>1.0) {
+      if (track->IsOn(AliESDtrack::kTOFpid)) {
+        Double_t times[10];
+        track->GetIntegratedTimes(times);
+        Double_t tof=track->GetTOFsignal();
+        GetESDsData(kPid2)->Fill(times[2]-tof);
+      }
+    }
+  }
 
+  TH1 *tpc=GetESDsData(kTrk2);
+  TH1 *its=GetESDsData(kTrk3);
+  TH1 *tof=GetESDsData(kTrk4);
+  GetESDsData(kTrk5)->Divide(its,tpc,1,1.,"b");
+  GetESDsData(kTrk6)->Divide(tof,tpc,1,1.,"b");
+
+  // V0 related QA
+  Int_t nV0=esd->GetNumberOfV0s();
+  for (Int_t i=0; i<nV0; i++) {
+    Double_t mass;
+    AliESDv0 v0(*esd->GetV0(i));
+
+    v0.ChangeMassHypothesis(kK0Short);
+    mass=v0.GetEffMass();
+    GetESDsData(kV0s0)->Fill(mass);
+
+    v0.ChangeMassHypothesis(kLambda0);
+    mass=v0.GetEffMass();
+    GetESDsData(kV0s1)->Fill(mass);
+
+    v0.ChangeMassHypothesis(kLambda0Bar);
+    mass=v0.GetEffMass();
+    GetESDsData(kV0s1)->Fill(mass);
   }
+
 }
index e59732e..9a487ed 100644 (file)
@@ -14,6 +14,13 @@ class AliESDEvent;
 
 class AliGlobalQADataMaker: public AliQADataMakerRec {
 public:
+  enum {
+    kClr0,kClr1,kClr2,
+    kTrk0,kTrk1,kTrk2,kTrk3,kTrk4,kTrk5,kTrk6,
+    kV0s0,kV0s1,
+    kPid0,kPid1,kPid2,
+    kLast
+  };
   AliGlobalQADataMaker(const Char_t *name="Global", 
                        const Char_t *title="Global QA data maker"):
     AliQADataMakerRec(name,title) {;}