]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSQADataMakerRec.cxx
Changes to obey modified coding convention RC6 (R. Shaoyan)
[u/mrichter/AliRoot.git] / ITS / AliITSQADataMakerRec.cxx
index 5cf22ebd7ea6c755582462f3c3d2ef9d0a88b6b0..48b3e774d408d99e1fa58887ce922e3bb13770cf 100644 (file)
@@ -34,7 +34,7 @@
 #include "AliITSQASDDDataMakerRec.h"
 #include "AliITSQASSDDataMakerRec.h"
 #include "AliLog.h"
-#include "AliQA.h"
+#include "AliQAv1.h"
 #include "AliQAChecker.h"
 #include "AliITSQAChecker.h"
 #include "AliRawReader.h"
@@ -47,7 +47,7 @@ ClassImp(AliITSQADataMakerRec)
 
 //____________________________________________________________________________ 
 AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) :
-AliQADataMakerRec(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"),
+AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kITS), "ITS Quality Assurance Data Maker"),
 fkOnline(kMode),
 fHLTMode(0),
 fSubDetector(subDet),
@@ -63,16 +63,16 @@ fSSDDataMaker(NULL)
 
   // Initialization for RAW data 
   if(fSubDetector == 0 || fSubDetector == 1) {
-    AliDebug(1,"AliITSQADM::Create SPD DataMakerRec\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SPD DataMakerRec\n");
        fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline);
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
-       AliDebug(1,"AliITSQADM::Create SDD DataMakerRec\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SDD DataMakerRec\n");
        fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline);
        if(fkOnline){SetHLTMode(fSDDDataMaker->GetHLTMode()); }
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
-       AliDebug(1,"AliITSQADM::Create SSD DataMakerRec\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SSD DataMakerRec\n");
        fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline);
   }
 }
@@ -114,40 +114,42 @@ AliITSQADataMakerRec& AliITSQADataMakerRec::operator = (const AliITSQADataMakerR
 void AliITSQADataMakerRec::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
-  AliDebug(1,"AliITSQADM::Start of ITS Cycle\n");
+  AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of ITS Cycle\n");
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
 }
 
 //____________________________________________________________________________ 
-void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
+void AliITSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
   // launch the QA checking
 
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
     SetEventSpecie(specie) ; 
-    AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list[specie])\n"); 
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list[specie])\n"); 
     if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
     if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
     if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
-  }
   
-  AliQAChecker *qac = AliQAChecker::Instance();
-  AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
-  Int_t subdet=GetSubDet();
-  qacb->SetSubDet(subdet);
+  
+    AliQAChecker *qac = AliQAChecker::Instance();
+    AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+    Int_t subdet=GetSubDet();
+    qacb->SetSubDet(subdet);
  
-  if(subdet== 0 ){
-    qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task), fSDDDataMaker->GetOffset(task), fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list
-  }
- else
-    if(subdet!=0){
-      Int_t offset=GetDetTaskOffset(subdet, task);
-      qacb->SetDetTaskOffset(subdet,offset);
+    if(subdet== 0 ){
+      qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task), fSDDDataMaker->GetOffset(task), fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list
     }
+    else
+      if(subdet!=0){
+       Int_t offset=GetDetTaskOffset(subdet, task);
+       qacb->SetDetTaskOffset(subdet,offset);
+      }
+
+    qac->Run( AliQAv1::kITS , task, list); 
 
-  qac->Run( AliQA::kITS , task, list);  //temporary skipping the checking
+  }
 }
 
 //____________________________________________________________________________ 
@@ -161,15 +163,15 @@ void AliITSQADataMakerRec::InitRaws()
 {  
   // Initialization for RAW data 
        if(fSubDetector == 0 || fSubDetector == 1) {
-         AliDebug(1,"AliITSQADM:: SPD InitRaws\n");
+         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRaws\n");
          fSPDDataMaker->InitRaws();
        }
        if(fSubDetector == 0 || fSubDetector == 2) {
-         AliDebug(1,"AliITSQADM:: SDD InitRaws\n");
+         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRaws\n");
          fSDDDataMaker->InitRaws();
        }
        if(fSubDetector == 0 || fSubDetector == 3) {
-         AliDebug(1,"AliITSQADM:: SSD InitRaws\n");
+         AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRaws\n");
          fSSDDataMaker->InitRaws();
        }
 }
@@ -183,20 +185,47 @@ void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
 }
 
+//____________________________________________________________________________ 
+void AliITSQADataMakerRec::InitDigits()
+{
+  // Initialization for DIGITS
+  if(fSubDetector == 0 || fSubDetector == 1) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitDigitss\n");
+    fSPDDataMaker->InitDigits();
+  }
+  if(fSubDetector == 0 || fSubDetector == 2) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitDigits\n");
+    fSDDDataMaker->InitDigits();
+  }
+  if(fSubDetector == 0 || fSubDetector == 3) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitDigits\n");
+    fSSDDataMaker->InitDigits();
+  }
+}
+
+//____________________________________________________________________________ 
+void AliITSQADataMakerRec::MakeDigits(TTree * digitsTree)
+{
+  // Fill QA for recpoints
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digitsTree);
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digitsTree);
+  if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digitsTree);
+}
+
 //____________________________________________________________________________ 
 void AliITSQADataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS
   if(fSubDetector == 0 || fSubDetector == 1) {
-       AliDebug(1,"AliITSQADM:: SPD InitRecPoints\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRecPoints\n");
     fSPDDataMaker->InitRecPoints();
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
-       AliDebug(1,"AliITSQADM:: SDD InitRecPoints\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRecPoints\n");
        fSDDDataMaker->InitRecPoints();
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
-       AliDebug(1,"AliITSQADM:: SSD InitRecPoints\n");
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRecPoints\n");
        fSSDDataMaker->InitRecPoints();
   }
 }
@@ -380,14 +409,16 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
     
     Int_t nclsITS = track->GetNcls(0);
 
-    Bool_t itsrefit=kFALSE,tpcin=kFALSE;
+    Bool_t itsrefit=kFALSE,tpcin=kFALSE,itsin=kFALSE;
     if ((track->GetStatus() & AliESDtrack::kITSrefit)) itsrefit=kTRUE;
     if ((track->GetStatus() & AliESDtrack::kTPCin)) tpcin=kTRUE;     
+    if ((track->GetStatus() & AliESDtrack::kITSin)) itsin=kTRUE;     
     if(nclsITS>=5 && itsrefit) nITSrefit5++;
 
     if(tpcin) {
       GetESDsData(0)->Fill(nclsITS);
-    } else {
+    }
+    if(itsin && !tpcin){
       GetESDsData(2)->Fill(nclsITS);
     }
 
@@ -408,7 +439,7 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
 
   // vertices
   const AliESDVertex *vtxSPD = esd->GetPrimaryVertexSPD();
-  const AliESDVertex *vtxTrk = esd->GetPrimaryVertex();
+  const AliESDVertex *vtxTrk = esd->GetPrimaryVertexTracks();
 
   Int_t mult = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfTracklets();
   if(mult>0)
@@ -458,7 +489,7 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
 }
 
 //_________________________________________________________________
-Int_t AliITSQADataMakerRec::GetDetTaskOffset(Int_t subdet,AliQA::TASKINDEX_t task)
+Int_t AliITSQADataMakerRec::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t task)
 {
   switch(subdet)
     {