Coding rule violations corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Jan 2010 11:39:19 +0000 (11:39 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Jan 2010 11:39:19 +0000 (11:39 +0000)
prod/acrcaf/qa_pp/AliAnalysisTaskQASym.cxx
prod/acrcaf/qa_pp/AliAnalysisTaskQASym.h

index e13c939..07422ae 100644 (file)
@@ -1,3 +1,30 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//------------------------------
+// Analysis task for quality-assurance of central tarcking
+// mainly based on fundamental symmetries 
+//
+// contact eva.sicking@cern.ch
+// authors 
+// Authors: Jan Fiete Grosse-Oetringhaus, Christian Klein-Boesing,
+//          Andreas Morsch, Eva Sicking
+
+
 #include "TChain.h"
 #include "TTree.h"
 #include "TH1F.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)
 
 //________________________________________________________________________
@@ -64,6 +86,7 @@ AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name)
     ,fRecDPos(0)
     ,fRecDNeg(0)
 
+
     ,fRecQPtPosEta(0)
     ,fRecQPtNegEta(0)
     ,fRecPtPosEta(0)
@@ -98,15 +121,11 @@ AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name)
     ,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;
@@ -145,12 +164,10 @@ void AliAnalysisTaskQASym::UserCreateOutputObjects()
   // Create histograms
   // Called once
 
-  Double_t range = 300.;
+  Double_t range = 1.;
   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);
@@ -172,13 +189,13 @@ void AliAnalysisTaskQASym::UserCreateOutputObjects()
                       50, 0.5, 49.5);
   fVx   = new TH1F("fVx", 
                   "X of vertex",
-                  500, -500., 500.);
+                  100, -5., 5.);
   fVy   = new TH1F("fVy", 
                   "Y of vertex",
-                  500, -500., 500.);
+                  100, -5., 5.);
   fVz   = new TH1F("fVz", 
                   "Z of vertex",
-                  500, -500., 500.);
+                  500, -50., 50.);
 
   fEtaPt   = new TH1F("fEtaPt", 
                          " #eta/p_{T} ",
@@ -669,9 +686,9 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
   Printf("There are %d tracks in this event", event->GetNumberOfTracks());
 
   
-  Int_t   LeadingTrack  =   0;
-  Float_t LeadingEnergy = -20.;
-  Float_t LeadingPhi    =   0;//TMath::Pi();
+  Int_t   leadingTrack  =   0;
+  Float_t leadingEnergy = -20.;
+  Float_t leadingPhi    =   0;//TMath::Pi();
 
 
   if(event->GetNumberOfTracks()!=0) fNumber->Fill(event->GetNumberOfTracks());
@@ -690,22 +707,24 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       continue;
     }
     
-    if (!fCuts->AcceptTrack(esdtrack)) continue;
-    //const AliExternalTrackParam * tpcP = esdtrack->GetTPCInnerParam();
+    //if (!fCuts->AcceptTrack(esdtrack)) continue;
+    const AliExternalTrackParam * tpcPSO = 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->Pt() > 50. && tpcPSO) {
+      printf("High Pt %5d %5d %13.3f %13.3f \n", event->GetPeriodNumber(), event->GetOrbitNumber(),
+            tpcPSO->Pt(), esdtrack->Pt());
+      // AliFatal("Jet");
     } 
     
-    if(tpcP->E()>LeadingEnergy){
-      LeadingTrack=iTrack;
-      LeadingEnergy=tpcP->E();
-      LeadingPhi=tpcP->Phi();
+//    if (tpcPSO) fRecPt12->Fill(tpcPSO->Pt(), esdtrack->Pt());
+
+    if(tpcP->E()>leadingEnergy){
+      leadingTrack=iTrack;
+      leadingEnergy=tpcP->E();
+      leadingPhi=tpcP->Phi();
     }
    
 
@@ -726,15 +745,10 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
     sigmapt= sqrt(sigmapt);
     sigmapt= sigmapt *(tpcP->Pt()*tpcP->Pt()); 
 
-    if(sigmapt == 0.)continue;
+    if(sigmapt < 1.e-12) continue;
     fsigmaPt->Fill(TMath::Log10(sigmapt));
    
 
-   
-  
-
-    
-
     // hits in ITS layer
     Int_t cas=-1;
     if(esdtrack->HasPointOnITSLayer(0)) 
@@ -771,16 +785,13 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
    
     //------------------- 
 
-    sdca_tr = (tpcP->Py()*tpcP->Xv()
+    Double_t sdcatr = (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());
@@ -792,16 +803,17 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
 
     fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
     fQPt->Fill(tpcP->Charge()/tpcP->Pt());
-    fDca->Fill(sdca_tr);
-
+    fDca->Fill(sdcatr);
 
 
 
+    Float_t xy, z;
     esdtrack->GetImpactParameters(xy,z);
-    fDiffDcaD->Fill(sdca_tr+xy);
+    fDiffDcaD->Fill(sdcatr+xy);
    
     
     //for positive particles
+
     if(tpcP->Charge()>0){
       fRecPtPos->Fill(tpcP->Pt());
       fRecPtPosLadder[cas]->Fill(tpcP->Pt());
@@ -811,7 +823,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
      
       fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*tpcP->Phi());
       fRecPhiPosVz->Fill(TMath::RadToDeg()*tpcP->Phi(),tpcP->Zv());
-      fSignedDcaPosVz->Fill(sdca_tr,tpcP->Zv());
+      fSignedDcaPosVz->Fill(sdcatr,tpcP->Zv());
 
       fRecEtaPos->Fill(tpcP->Eta());
       fRecEtaPosLadder[cas]->Fill(tpcP->Eta());
@@ -819,12 +831,12 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       fRecEtaPosVz->Fill(tpcP->Eta(),tpcP->Zv());
       fRecEtaPtPosVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
      
-      fRecDcaPos->Fill(sdca_tr);
+      fRecDcaPos->Fill(sdcatr);
       fRecDPos->Fill(xy);
-      fSignDcaPos[cas]->Fill(sdca_tr);
+      fSignDcaPos[cas]->Fill(sdcatr);
     
      
-      fDcaSigmaPos[cas]->Fill(sdca_tr, TMath::Log10(sigmapt));
+      fDcaSigmaPos[cas]->Fill(sdcatr, TMath::Log10(sigmapt));
     
       fPtSigmaPos[cas]->Fill(TMath::Log10(sigmapt));
     }
@@ -837,7 +849,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       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());
+      fSignedDcaNegVz->Fill(sdcatr,tpcP->Zv());
       fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
 
       fRecEtaNeg->Fill(tpcP->Eta());
@@ -845,14 +857,14 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       fRecEtaPtNeg->Fill(tpcP->Eta()/tpcP->Pt());
       fRecEtaNegVz->Fill(tpcP->Eta(),tpcP->Zv());
      
-      fRecDcaNeg->Fill(sdca_tr);
-      fRecDcaNegInv->Fill(-sdca_tr);
+      fRecDcaNeg->Fill(sdcatr);
+      fRecDcaNegInv->Fill(-sdcatr);
       fRecDNeg->Fill(xy);
-      fSignDcaNeg[cas]->Fill(sdca_tr);
-      fSignDcaNegInv[cas]->Fill(-sdca_tr);
+      fSignDcaNeg[cas]->Fill(sdcatr);
+      fSignDcaNegInv[cas]->Fill(-sdcatr);
      
      
-      fDcaSigmaNeg[cas]->Fill(sdca_tr,TMath::Log10(sigmapt));
+      fDcaSigmaNeg[cas]->Fill(sdcatr,TMath::Log10(sigmapt));
    
       fPtSigmaNeg[cas]->Fill(TMath::Log10(sigmapt));
     }
@@ -865,7 +877,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       fRecPtPosEta->Fill(tpcP->Pt());
       fRecPhiPosEta->Fill(TMath::RadToDeg()*tpcP->Phi());
       fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
-      fRecDcaPosEta->Fill(sdca_tr);
+      fRecDcaPosEta->Fill(sdcatr);
       fRecDPosEta->Fill(xy);
     }
     //all particles with negative eta (and eta==0)
@@ -874,7 +886,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       fRecPtNegEta->Fill(tpcP->Pt());
       fRecPhiNegEta->Fill(TMath::RadToDeg()*tpcP->Phi());
       fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
-      fRecDcaNegEta->Fill(sdca_tr);
+      fRecDcaNegEta->Fill(sdcatr);
       fRecDNegEta->Fill(xy);
 
     }
@@ -888,7 +900,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
     fRecEtaTpcSector[Int_t(tpcP->Phi()*
                          TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
     fSignedDcaTpcSector[Int_t(tpcP->Phi()*
-                         TMath::RadToDeg()/20)]->Fill(sdca_tr); 
+                         TMath::RadToDeg()/20)]->Fill(sdcatr); 
     fRecQPtTpcSector[Int_t(tpcP->Phi()*
                          TMath::RadToDeg()/20)]->Fill(tpcP->Charge()/tpcP->Pt());
     fRecEtaPtTpcSector[Int_t(tpcP->Phi()*
@@ -902,7 +914,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
   // another track loop
     for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
       
-      if(LeadingTrack==iTrack2) continue;
+      if(leadingTrack==iTrack2) continue;
 
       AliVParticle *track2 = event->GetTrack(iTrack2);
       AliESDtrack* esdtrack2 =  dynamic_cast<AliESDtrack*>(track2);
@@ -915,8 +927,8 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
       esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
                               event->GetMagneticField(), 10000.);
  
-      fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
-                            LeadingPhi*TMath::RadToDeg() );
+      fDeltaPhiLeading->Fill((leadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
+                            leadingPhi*TMath::RadToDeg() );
 
      
 
@@ -938,7 +950,7 @@ void AliAnalysisTaskQASym::UserExec(Option_t *)
 //________________________________________________________________________
 void AliAnalysisTaskQASym::Terminate(Option_t *) 
 {
-
+  // Terminate
 
 }  
 
index 3958df3..72bdac2 100644 (file)
@@ -1,6 +1,15 @@
-#ifndef AliAnalysisTaskQASym_cxx
-#define AliAnalysisTaskQASym_cxx
+#ifndef ALIANALYSISTASKQASYM_H
+#define ALIANALYSISTASKQASYM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id:$ */
  
+//------------------------------
+// Analysis task for quality-assurance of central tracking
+// mainly based on fundamental symmetries 
+//
+// eva.sicking@cern.ch
 
 class TH1F;
 class TH2F;
@@ -13,8 +22,6 @@ class AliESDtrackCuts;
 
 
 #include "AliAnalysisTaskSE.h"
-#include "TFile.h"
-#include "TNtuple.h"
 
 class AliAnalysisTaskQASym : public AliAnalysisTaskSE {
  public:
@@ -35,7 +42,7 @@ class AliAnalysisTaskQASym : public AliAnalysisTaskSE {
  private:
 
  
-  Bool_t      fFieldOn;
+  Bool_t      fFieldOn;         // field flag
 
   TList       *fHists;          // List of histos
 
@@ -68,80 +75,66 @@ class AliAnalysisTaskQASym : public AliAnalysisTaskSE {
   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;
+  TH1F        *fRecQPtPosEta;  // Q x Pt for pos. eta
+  TH1F        *fRecQPtNegEta;  // Q x Pt for neg. eta
+  TH1F        *fRecPtPosEta;   //     Pt for pos. eta
+  TH1F        *fRecPtNegEta;   //     Pt for neg. eta
+  TH1F        *fRecPhiPosEta;  // phi for pos. eta
+  TH1F        *fRecPhiNegEta;  // phi for neg. eta 
+  TH1F        *fRecDcaPosEta;  // dca for pos. eta 
+  TH1F        *fRecDcaNegEta;  // dca for neg. eta
+  TH1F        *fRecDPosEta;    // d   for pos. eta
+  TH1F        *fRecDNegEta;    // d   for neg. eta
 
-
   // 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];
-
+  TH1F        *fRecPtTpcSector[18];      // pt per sector
+  TH1F        *fRecEtaTpcSector[18];     // eta per sector
+  TH1F        *fRecQPtTpcSector[18];     // Qxpt per sector
+  TH1F        *fRecEtaPtTpcSector[18];   // eta x pt per sector
+  TH1F        *fSignedDcaTpcSector[18];  // dca per sector
 
   // 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];
-
+  TH1F        *fSignDcaPos[7];           // dca for pos. charge       
+  TH1F        *fSignDcaNeg[7];           // dca for neg. charge
+  TH1F        *fSignDcaNegInv[7];        // dca for neg. charge
+  TH1F        *fPtSigmaPos[7];           // sigma pt for pos. charge
+  TH1F        *fPtSigmaNeg[7];           // sigma pt for neg. charge
+  TH1F        *fRecPtPosLadder[7];       // pt for pos. charge
+  TH1F        *fRecPtNegLadder[7];       // pt for neg. charge
+  TH1F        *fRecPhiPosLadder[7];      // phi for pos. charge
+  TH1F        *fRecPhiNegLadder[7];      // phi for neg. charge
+  TH1F        *fRecEtaPosLadder[7];      // eta for pos. charge
+  TH1F        *fRecEtaNegLadder[7];      // eta for neg. charge
 
   // 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;
-
+  TH2F        *fRecPtPosVz;              // pt for pos. charge
+  TH2F        *fRecPtNegVz;              // pt for neg. charge
+  TH2F        *fRecEtaPosVz;             // eta for pos. charge
+  TH2F        *fRecEtaNegVz;             // eta for neg. charge
+  TH2F        *fRecPhiPosVz;             // phi for pos. charge
+  TH2F        *fRecPhiNegVz;             // phi for neg. charge
+  TH2F        *fSignedDcaPosVz;          // dca for pos. charge
+  TH2F        *fSignedDcaNegVz;          // dca for neg. charge
+  TH2F        *fRecQPtPosEtaVz;          // qxpt for pos. charge
+  TH2F        *fRecQPtNegEtaVz;          // qxpt for neg. charge
+  TH2F        *fRecEtaPtPosVz;           // etaxpt for pos. charge
+  TH2F        *fRecEtaPtNegVz;           // etaxpt for neg. charge
 
   //high
-  TH1F * fDeltaPhiAll;
-  TH2F * fDeltaPhiLeading;
-  TH1F * fDiffDcaD;
+  TH1F * fDeltaPhiAll;                   // dphi
+  TH2F * fDeltaPhiLeading;               // dphi rel. to leading
+  TH1F * fDiffDcaD;                      // delta dca
 
   //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
+  TH1F * fPhiRec;                        // phi
+  TH1F * fThetaRec;                      // theta
+  TH1F * fNumber;                        // n
+  TH1F * fVx;                            // vx
+  TH1F * fVy;                            // vy
+  TH1F * fVz;                            // vz
+
+  AliESDtrackCuts* fCuts;                // List of cuts
   AliAnalysisTaskQASym(const AliAnalysisTaskQASym&); // not implemented
   AliAnalysisTaskQASym& operator=(const AliAnalysisTaskQASym&); // not implemented