// --- AliRoot header files ---
#include "AliITSQASDDDataMakerRec.h"
#include "AliLog.h"
-#include "AliQA.h"
+#include "AliQAv1.h"
#include "AliQAChecker.h"
#include "AliRawReader.h"
#include "AliITSRawStream.h"
#include "AliITSRawStreamSDD.h"
#include "AliITSRawStreamSDDCompressed.h"
#include "AliITSDetTypeRec.h"
+#include "AliITSDigit.h"
#include "AliITSRecPoint.h"
#include "AliITSgeomTGeo.h"
#include "AliITSHLTforSDD.h"
fkOnline(kMode),
fLDC(ldc),
fSDDhRawsTask(0),
+fSDDhDigitsTask(0),
fSDDhRecPointsTask(0),
-//fGenOffset(0),
fGenRawsOffset(0),
+fGenDigitsOffset(0),
fGenRecPointsOffset(0),
fTimeBinSize(1),
fDDLModuleMap(0),
fkOnline(qadm.fkOnline),
fLDC(qadm.fLDC),
fSDDhRawsTask(qadm.fSDDhRawsTask),
+fSDDhDigitsTask(qadm.fSDDhDigitsTask),
fSDDhRecPointsTask(qadm.fSDDhRecPointsTask),
-//fGenOffset(qadm.fGenOffset),
fGenRawsOffset(qadm.fGenRawsOffset),
+fGenDigitsOffset(qadm.fGenDigitsOffset),
fGenRecPointsOffset(qadm.fGenRecPointsOffset),
fTimeBinSize(1),
fDDLModuleMap(0),
//__________________________________________________________________
AliITSQASDDDataMakerRec& AliITSQASDDDataMakerRec::operator = (const AliITSQASDDDataMakerRec& qac )
{
- // Assignment operator.
+ // Equal operator.
this->~AliITSQASDDDataMakerRec();
new(this) AliITSQASDDDataMakerRec(qac);
return *this;
void AliITSQASDDDataMakerRec::StartOfDetectorCycle()
{
//Detector specific actions at start of cycle
- AliDebug(1,"AliITSQADM::Start of SDD Cycle\n");
+ AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SDD Cycle\n");
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/)
+void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/)
{
// launch the QA checking
- AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
+ AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n");
}
//____________________________________________________________________________
void AliITSQASDDDataMakerRec::InitRaws()
{
// Initialization for RAW data - SDD -
- // fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+ const Bool_t expert = kTRUE ;
+ const Bool_t saveCorr = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");
Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
if(!ddlMapSDD)
{
delete ddlMapSDD;
}
-
+
if(fkOnline==kFALSE){
AliInfo("Offline mode: HLTforSDDobject used \n");
AliCDBEntry *hltforSDD = AliCDBManager::Instance()->Get("ITS/Calib/HLTforSDD");
}
}
Int_t lay, lad, det;
- Int_t LAY = -1; //, LAD = -1;
- char hname0[50];
Int_t indexlast = 0;
Int_t index1 = 0;
- if(fLDC == 1 || fLDC == 2) LAY = 2;
- if(fLDC == 3 || fLDC == 4) LAY = 3;
-
- if(fkOnline) {
- AliInfo("Book Online Histograms for SDD\n");
- }
- else {
- AliInfo("Book Offline Histograms for SDD\n ");
- }
- TH1D *h0 = new TH1D("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5);
+ if(fkOnline)
+ {
+ AliInfo("Book Online Histograms for SDD\n");
+ }
+ else
+ {
+ AliInfo("Book Offline Histograms for SDD\n ");
+ }
+ TH1D *h0 = new TH1D("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5); //0
h0->GetXaxis()->SetTitle("Module Number");
h0->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fGenRawsOffset,kTRUE,kFALSE);
+ fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fGenRawsOffset, expert, !image, !saveCorr);
delete h0;
fSDDhRawsTask++;
- if(fLDC==0 || fLDC==1 || fLDC==2){
- TH1D *h1 = new TH1D("SDDLadPatternL3","Ladder pattern L3",14,0.5,14.5);
- h1->GetXaxis()->SetTitle("Ladder Number on Lay3");
- h1->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h1)),1+fGenRawsOffset, kTRUE,kFALSE);
- delete h1;
- fSDDhRawsTask++;
- }
- if(fLDC==0 || fLDC==3 || fLDC==4){
- TH1D *h2 = new TH1D("SDDLadPatternL4","Ladder pattern L4",22,0.5,22.5);
- h2->GetXaxis()->SetTitle("Ladder Number on Lay4");
- h2->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h2)),2+fGenRawsOffset, kTRUE,kFALSE);
- delete h2;
- fSDDhRawsTask++;
- }
- if(fLDC==0 || fLDC==1 || fLDC==2){
- for(Int_t i=1; i<=fgkLADDonLAY3; i++) {
- sprintf(hname0,"SDDModPattern_L3_%d",i);
- TH1D *h3 = new TH1D(hname0,hname0,6,0.5,6.5);
- h3->GetXaxis()->SetTitle("Module Number");
- h3->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h3)),i-1+3+fGenRawsOffset, kTRUE, kFALSE);
- delete h3;
- fSDDhRawsTask++;
- }
- }
- if(fLDC==0 || fLDC==3 || fLDC==4){
- for(Int_t i=1; i<=fgkLADDonLAY4; i++) {
- sprintf(hname0,"SDDModPattern_L4_%d",i);
- TH1D *h4 = new TH1D(hname0,hname0,8,0.5,8.5);
- h4->GetXaxis()->SetTitle("Module Number");
- h4->GetYaxis()->SetTitle("Counts");
- fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h4)),i-1+17+fGenRawsOffset, kTRUE,kFALSE);
- delete h4;
- fSDDhRawsTask++;
- }
- }
+
+ //zPhi distribution using ladder and modules numbers
+ TH2D *hphil3 = new TH2D("SDDphizL3","SDD #varphiz Layer3 ",6,0.5,6.5,14,0.5,14.5);
+ hphil3->GetXaxis()->SetTitle("z[#Module L3 ]");
+ hphil3->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
+ fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil3)),1+fGenRawsOffset, !expert, image, saveCorr);
+ delete hphil3;
+ fSDDhRawsTask++;
+
+ TH2D *hphil4 = new TH2D("SDDphizL4","SDD #varphiz Layer4 ",8,0.5,8.5,22,0.5,22.5);
+ hphil4->GetXaxis()->SetTitle("z[#Module L4]");
+ hphil4->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
+ fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil4)),2+fGenRawsOffset, !expert, image, saveCorr);
+ delete hphil4;
+ fSDDhRawsTask++;
+
+
+ if(fkOnline)
+ {
- //DDL Pattern
- TH2D *hddl = new TH2D("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,23.5,24,-0.5,23.5);
+ //DDL Pattern
+ TH2D *hddl = new TH2D("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,23.5,24,-0.5,23.5);
hddl->GetXaxis()->SetTitle("Channel");
hddl->GetYaxis()->SetTitle("#DDL");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hddl)),39+fGenRawsOffset, kTRUE,kFALSE);
+ fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hddl)),3+fGenRawsOffset, expert, !image, !saveCorr);
delete hddl;
fSDDhRawsTask++;
-
- //zPhi distribution using ladder and modules numbers
- TH2D *hphil3 = new TH2D("SDDphizL3","SDD #varphiz Layer3 ",6,0.5,6.5,14,0.5,14.5);
- hphil3->GetXaxis()->SetTitle("z[#Module L3 ]");
- hphil3->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil3)),40+fGenRawsOffset, kFALSE,kTRUE);
- delete hphil3;
- fSDDhRawsTask++;
-
- TH2D *hphil4 = new TH2D("SDDphizL4","SDD #varphiz Layer4 ",8,0.5,8.5,22,0.5,22.5);
- hphil4->GetXaxis()->SetTitle("z[#Module L4]");
- hphil4->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
- fAliITSQADataMakerRec->Add2RawsList((new TH2D(*hphil4)),41+fGenRawsOffset, kFALSE,kTRUE);
- delete hphil4;
- fSDDhRawsTask++;
-
-
- Int_t indexlast1 = 0;
- Int_t indexlast2 = 0;
-
- if(fkOnline) {
- fTimeBinSize = 4;
- indexlast = 0;
- index1 = 0;
- indexlast1 = fSDDhRawsTask;
- indexlast2 = 0;
- char *hname[3];
- for(Int_t i=0; i<3; i++) hname[i]= new char[50];
- for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
- for(Int_t iside=0;iside<fgknSide;iside++){
- AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
- sprintf(hname[0],"SDDchargeMapFSE_L%d_%d_%d_%d",lay,lad,det,iside);
- sprintf(hname[1],"SDDChargeMapForSingleEvent_L%d_%d_%d_%d",lay,lad,det,iside);
- sprintf(hname[2],"SDDhmonoDMap_L%d_%d_%d_%d",lay,lad,det,iside);
- TProfile2D *fModuleChargeMapFSE = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
- fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");
- fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");
- fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fGenRawsOffset,kTRUE,kFALSE);
- delete fModuleChargeMapFSE;
-
- fSDDhRawsTask++;
- index1++;
- indexlast2 = indexlast1 + index1;
- }
+ Int_t indexlast1 = 0;
+
+ fTimeBinSize = 4;
+ indexlast = 0;
+ index1 = 0;
+ indexlast1 = fSDDhRawsTask;
+ char *hname[3];
+ for(Int_t i=0; i<3; i++) hname[i]= new char[50];
+ for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
+ for(Int_t iside=0;iside<fgknSide;iside++){
+ AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
+ sprintf(hname[0],"SDDchargeMapFSE_L%d_%d_%d_%d",lay,lad,det,iside);
+ sprintf(hname[1],"SDDChargeMapForSingleEvent_L%d_%d_%d_%d",lay,lad,det,iside);
+ sprintf(hname[2],"SDDhmonoDMap_L%d_%d_%d_%d",lay,lad,det,iside);
+ TProfile2D *fModuleChargeMapFSE = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
+ fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");
+ fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");
+ fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
+ delete fModuleChargeMapFSE;
+
+ fSDDhRawsTask++;
+ index1++;
}
-
- for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
- for(Int_t iside=0;iside<fgknSide;iside++){
- AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
- sprintf(hname[0],"SDDchargeMap_L%d_%d_%d_%d",lay,lad,det,iside);
- sprintf(hname[1],"SDDChargeMap_L%d_%d_%d_%d",lay,lad,det,iside);
- TProfile2D *fModuleChargeMap = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
- fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");
- fModuleChargeMap->GetYaxis()->SetTitle("Anode");
- fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fGenRawsOffset,kTRUE,kFALSE);
- delete fModuleChargeMap;
-
- fSDDhRawsTask++;
- index1++;
- indexlast2 = indexlast1 + index1;
- }
+ }
+
+ for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
+ for(Int_t iside=0;iside<fgknSide;iside++){
+ AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
+ sprintf(hname[0],"SDDchargeMap_L%d_%d_%d_%d",lay,lad,det,iside);
+ sprintf(hname[1],"SDDChargeMap_L%d_%d_%d_%d",lay,lad,det,iside);
+ TProfile2D *fModuleChargeMap = new TProfile2D(hname[0],hname[1],256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
+ fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");
+ fModuleChargeMap->GetYaxis()->SetTitle("Anode");
+ fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fGenRawsOffset, expert, !image, !saveCorr);
+ delete fModuleChargeMap;
+
+ fSDDhRawsTask++;
+ index1++;
}
+ }
+
+ } // kONLINE
-} // kONLINE
-
- AliDebug(1,Form("%d SDD Raws histograms booked\n",fSDDhRawsTask));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Raws histograms booked\n",fSDDhRawsTask));
}
void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
{
// Fill QA for RAW - SDD -
-
+
if(!fDDLModuleMap){
AliError("SDD DDL module map not available - skipping SDD QA");
return;
}
if(rawReader->GetType() != 7) return; // skips non physical triggers
- AliDebug(1,"entering MakeRaws\n");
-
+ AliDebug(AliQAv1::GetQADebugLevel(),"entering MakeRaws\n");
+
rawReader->Reset();
AliITSRawStream *stream;
}else
{
//AliInfo("Offline mode: HLT A mode used for SDD\n");
- stream = new AliITSRawStreamSDD(rawReader);
- }
+ stream = new AliITSRawStreamSDD(rawReader);
+ }
}
//ckeck on HLT mode
-
-
-
+
// AliITSRawStreamSDD s(rawReader);
stream->SetDDLModuleMap(fDDLModuleMap);
Int_t lay, lad, det;
-
+
Int_t index=0;
if(fkOnline) {
for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
- for(Int_t iside=0;iside<fgknSide;iside++) {
- if(fSDDhRawsTask > 42 + index) fAliITSQADataMakerRec->GetRawsData(42 + index +fGenRawsOffset)->Reset();
- index++;
- }
+ for(Int_t iside=0;iside<fgknSide;iside++) {
+ if(fSDDhRawsTask > 4 + index) fAliITSQADataMakerRec->GetRawsData(4 + index +fGenRawsOffset)->Reset();
+ // 4 because the 2D histos for single events start after the fourth position
+ index++;
+ }
}
}
Int_t ildcID = -1;
Int_t iddl = -1;
Int_t isddmod = -1;
- Int_t coord1, coord2, signal, moduleSDD, ioffset, iorder, activeModule, index1;
+ Int_t coord1, coord2, signal, moduleSDD, activeModule, index1;
while(stream->Next()) {
ildcID = rawReader->GetLDCId();
iddl = rawReader->GetDDLID() - fgkDDLIDshift;
-
+
isddmod = fDDLModuleMap->GetModuleNumber(iddl,stream->GetCarlosId());
if(isddmod==-1){
- AliDebug(1,Form("Found module with iddl: %d, stream->GetCarlosId: %d \n",iddl,stream->GetCarlosId()));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("Found module with iddl: %d, stream->GetCarlosId: %d \n",iddl,stream->GetCarlosId()));
continue;
}
if(stream->IsCompletedModule()) {
- AliDebug(1,Form("IsCompletedModule == KTRUE\n"));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("IsCompletedModule == KTRUE\n"));
continue;
}
if(stream->IsCompletedDDL()) {
- AliDebug(1,Form("IsCompletedDDL == KTRUE\n"));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("IsCompletedDDL == KTRUE\n"));
continue;
}
coord2 = stream->GetCoord2();
signal = stream->GetSignal();
- moduleSDD = isddmod - fgkmodoffset;
-
+ moduleSDD = isddmod - fgkmodoffset;
+
if(isddmod <fgkmodoffset|| isddmod>fgknSDDmodules+fgkmodoffset-1) {
- AliDebug(1,Form( "Module SDD = %d, resetting it to 1 \n",isddmod));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form( "Module SDD = %d, resetting it to 1 \n",isddmod));
isddmod = 1;
}
-
+
AliITSgeomTGeo::GetModuleId(isddmod, lay, lad, det);
- ioffset = 3;
- iorder = 1;
- if(lay==4) {
- ioffset += 14;
- iorder = 2;
- }
+
fAliITSQADataMakerRec->GetRawsData( 0 + fGenRawsOffset )->Fill(isddmod);
-
- fAliITSQADataMakerRec->GetRawsData( iorder + fGenRawsOffset )->Fill(lad);
-
- fAliITSQADataMakerRec->GetRawsData( ioffset+lad-1 +fGenRawsOffset )->Fill(det); //-1 because ladder# starts from 1
-
-
-
- if(lay==3) fAliITSQADataMakerRec->GetRawsData(40+fGenRawsOffset)->Fill(det,lad);
+
+ if(lay==3) fAliITSQADataMakerRec->GetRawsData(1+fGenRawsOffset)->Fill(det,lad);
if(lay==4) {
- fAliITSQADataMakerRec->GetRawsData(41+fGenRawsOffset)->Fill(det,lad);}
-
+ fAliITSQADataMakerRec->GetRawsData(2+fGenRawsOffset)->Fill(det,lad);}
+
Short_t iside = stream->GetChannel();
-
- fAliITSQADataMakerRec->GetRawsData(39+fGenRawsOffset)->Fill(2*(stream->GetCarlosId())+iside,iddl);
-
- activeModule = moduleSDD;
- index1 = activeModule * 2 + iside;
- if(index1<0){
- AliDebug(1,Form("Wrong index number %d - patched to 0\n",index1));
- index1 = 0;
- }
+ fAliITSQADataMakerRec->GetRawsData(3+fGenRawsOffset)->Fill(2*(stream->GetCarlosId())+iside,iddl);
+
if(fkOnline) {
- if(fSDDhRawsTask > 42 + index1) {
- ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(42 + index1 +fGenRawsOffset)))->Fill(coord2, coord1, signal);
- ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(42 + index1 + 260*2 +fGenRawsOffset)))->Fill(coord2, coord1, signal);
+
+ activeModule = moduleSDD;
+ index1 = activeModule * 2 + iside;
+
+ if(index1<0){
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("Wrong index number %d - patched to 0\n",index1));
+ index1 = 0;
+ }
+ fAliITSQADataMakerRec->GetRawsData(3+fGenRawsOffset)->Fill(2*(stream->GetCarlosId())+iside,iddl);
+ if(fSDDhRawsTask > 4 + index1) {
+ ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(4 + index1 +fGenRawsOffset)))->Fill(coord2, coord1, signal);
+ ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(4 + index1 + 260*2 +fGenRawsOffset)))->Fill(coord2, coord1, signal);
}
}
- cnt++;
- if(!(cnt%10000)) AliDebug(1,Form(" %d raw digits read",cnt));
+ cnt++;
+ if(!(cnt%10000)) AliDebug(AliQAv1::GetQADebugLevel(),Form(" %d raw digits read",cnt));
}
- AliDebug(1,Form("Event completed, %d raw digits read",cnt));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",cnt));
delete stream;
stream = NULL;
- }
+}
+
+//____________________________________________________________________________
+void AliITSQASDDDataMakerRec::InitDigits()
+{
+ // Initialization for DIGIT data - SDD -
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
+ //fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List
+ TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5); //hmod
+ h0->GetXaxis()->SetTitle("SDD Module Number");
+ h0->GetYaxis()->SetTitle("# DIGITS");
+ fAliITSQADataMakerRec->Add2DigitsList(h0,fGenDigitsOffset, !expert, image);
+ fSDDhDigitsTask ++;
+ TH1F* h1=new TH1F("SDD Anode Distribution","DIGITS Anode Distribution",512,-0.5,511.5); //hanocc
+ h1->GetXaxis()->SetTitle("Anode Number");
+ h1->GetYaxis()->SetTitle("# DIGITS");
+ fAliITSQADataMakerRec->Add2DigitsList(h1,1+fGenDigitsOffset, !expert, image);
+ fSDDhDigitsTask ++;
+ TH1F* h2=new TH1F("SDD Tbin Distribution","DIGITS Tbin Distribution",256,-0.5,255.5); //htbocc
+ h2->GetXaxis()->SetTitle("Tbin Number");
+ h2->GetYaxis()->SetTitle("# DIGITS");
+ fAliITSQADataMakerRec->Add2DigitsList(h2,2+fGenDigitsOffset, !expert, image);
+ fSDDhDigitsTask ++;
+ TH1F* h3=new TH1F("SDD ADC Counts Distribution","DIGITS ADC Counts Distribution",200,0.,1024.); //hsig
+ h3->GetXaxis()->SetTitle("ADC Value");
+ h3->GetYaxis()->SetTitle("# DIGITS");
+ fAliITSQADataMakerRec->Add2DigitsList(h3,3+fGenDigitsOffset, !expert, image);
+ fSDDhDigitsTask ++;
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Digits histograms booked\n",fSDDhDigitsTask));
+}
+
+//____________________________________________________________________________
+void AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
+{
+
+ // Fill QA for DIGIT - SDD -
+// AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
+// fITS->SetTreeAddress();
+// TClonesArray *iITSdigits = fITS->DigitsAddress(1);
+ TBranch *branchD = digits->GetBranch("ITS");
+ if (!branchD) {
+ AliError("can't get the branch with the ITS digits !");
+ return;
+ }
+ static TClonesArray statDigits("AliITSDigit");
+ TClonesArray *iITSdigits = &statDigits;
+ branchD->SetAddress(&iITSdigits);
+ for(Int_t i=0; i<260; i++){
+ Int_t nmod=i+240;
+ digits->GetEvent(nmod);
+ Int_t ndigits = iITSdigits->GetEntries();
+ fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset)->Fill(nmod,ndigits);
+ for (Int_t idig=0; idig<ndigits; idig++) {
+ AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
+ Int_t iz=dig->GetCoord1(); // cell number z
+ Int_t ix=dig->GetCoord2(); // cell number x
+ Int_t sig=dig->GetSignal();
+ fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset)->Fill(iz);
+ fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset)->Fill(ix);
+ fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset)->Fill(sig);
+ }
+ }
+}
//____________________________________________________________________________
void AliITSQASDDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SDD -
-
- // fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
+ fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
Int_t nOnline=1;
Int_t nOnline2=1;
Int_t nOnline4=1;
if(fkOnline)
{
- // cout<<"konline"<<endl;
nOnline=4;
nOnline2=28;
nOnline3=64;
TH1F *h0 = new TH1F("SDDLay3TotCh","Layer 3 total charge",1000/nOnline,-0.5, 499.5); //position number 0
h0->GetXaxis()->SetTitle("ADC value");
h0->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fGenRecPointsOffset,kFALSE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fGenRecPointsOffset, !expert, image);
delete h0;
fSDDhRecPointsTask++;
TH1F *h1 = new TH1F("SDDLay4TotCh","Layer 4 total charge",1000/nOnline,-0.5, 499.5);//position number 1
h1->GetXaxis()->SetTitle("ADC value");
h1->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fGenRecPointsOffset,kFALSE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fGenRecPointsOffset, !expert, image);
delete h1;
fSDDhRecPointsTask++;
TH2F *h2 = new TH2F("SDDGlobalCoordDistribYX","YX Global Coord Distrib",5600/nOnline2,-28,28,5600/nOnline2,-28,28);//position number 2
h2->GetYaxis()->SetTitle("Y[cm]");
h2->GetXaxis()->SetTitle("X[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h2)),2+fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h2)),2+fGenRecPointsOffset, expert, !image);
delete h2;
fSDDhRecPointsTask++;
TH2F *h3 = new TH2F("SDDGlobalCoordDistribRZ","RZ Global Coord Distrib",6400/nOnline3,-32,32,1400/nOnline4,12,26);//position number 3
h3->GetYaxis()->SetTitle("R[cm]");
h3->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h3)),3+fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h3)),3+fGenRecPointsOffset, expert, !image);
delete h3;
fSDDhRecPointsTask++;
TH2F *h4 = new TH2F("SDDGlobalCoordDistribL3PHIZ","#varphi Z Global Coord Distrib L3",6400/nOnline3,-32,32,360/nOnline,-TMath::Pi(),TMath::Pi());//position number 4
h4->GetYaxis()->SetTitle("#phi[rad]");
h4->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h4)),4+fGenRecPointsOffset,kFALSE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h4)),4+fGenRecPointsOffset, !expert, image);
delete h4;
fSDDhRecPointsTask++;
TH2F *h5 = new TH2F("SDDGlobalCoordDistribL4PHIZ","#varphi Z Global Coord Distrib L4",6400/nOnline3,-32,32,360/nOnline,-TMath::Pi(),TMath::Pi());//position number 5
h5->GetYaxis()->SetTitle("#phi[rad]");
h5->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h5)),5+fGenRecPointsOffset,kFALSE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h5)),5+fGenRecPointsOffset, !expert, image);
delete h5;
fSDDhRecPointsTask++;
TH1F *h6 = new TH1F("SDDModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); //position number 6
h6->GetXaxis()->SetTitle("Module number"); //spd offset = 240
h6->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),6 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),6 +fGenRecPointsOffset, expert, !image);
delete h6;
fSDDhRecPointsTask++;
TH1F *h7 = new TH1F("SDDLadPatternL3RP","Ladder pattern L3 RP",14,0.5,14.5); //position number 7
h7->GetXaxis()->SetTitle("Ladder #, Layer 3");
h7->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h7)),7 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h7)),7 +fGenRecPointsOffset, expert, !image);
delete h7;
fSDDhRecPointsTask++;
TH1F *h8 = new TH1F("SDDLadPatternL4RP","Ladder pattern L4 RP",22,0.5,22.5); //position number 8
h8->GetXaxis()->SetTitle("Ladder #, Layer 4");
h8->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h8)),8 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h8)),8 +fGenRecPointsOffset, expert, !image);
delete h8;
fSDDhRecPointsTask++;
TH2F *h9 = new TH2F("SDDLocalCoordDistrib","Local Coord Distrib",1000/nOnline,-4,4,1000/nOnline,-4,4);//position number 9
h9->GetXaxis()->SetTitle("X local coord, drift, cm");
h9->GetYaxis()->SetTitle("Z local coord, anode, cm");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h9)),9 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h9)),9 +fGenRecPointsOffset, expert, !image);
delete h9;
fSDDhRecPointsTask++;
h10->GetXaxis()->SetTitle("r[cm]");
h10->GetXaxis()->CenterTitle();
h10->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),10 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),10 +fGenRecPointsOffset, expert, !image);
delete h10;
fSDDhRecPointsTask++;
h11->GetXaxis()->SetTitle("r[cm]");
h11->GetXaxis()->CenterTitle();
h11->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h11)),11 +fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h11)),11 +fGenRecPointsOffset, expert, !image);
delete h11;
fSDDhRecPointsTask++;
h12->GetXaxis()->SetTitle("#varphi[rad]");
h12->GetXaxis()->CenterTitle();
h12->GetYaxis()->SetTitle("Entries");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h12)),iLay+12+fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h12)),iLay+12+fGenRecPointsOffset, expert, !image);
delete h12;
fSDDhRecPointsTask++;
}
TH2F *h14 = new TH2F("SDDGlobalCoordDistribYXFSE","YX Global Coord Distrib FSE",5600/nOnline2,-28,28,5600/nOnline2,-28,28);//position number 14
h14->GetYaxis()->SetTitle("Y[cm]");
h14->GetXaxis()->SetTitle("X[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h14)),14+fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h14)),14+fGenRecPointsOffset, expert, !image);
delete h14;
fSDDhRecPointsTask++;
TH2F *h15 = new TH2F("SDDGlobalCoordDistribRZFSE","RZ Global Coord Distrib FSE",Int_t(6400/nOnline3),-32,32,1400/nOnline4,12,26);//position number 15
h15->GetYaxis()->SetTitle("R[cm]");
h15->GetXaxis()->SetTitle("Z[cm]");
- fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h15)),15+fGenRecPointsOffset,kTRUE);
+ fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h15)),15+fGenRecPointsOffset, expert, !image);
delete h15;
fSDDhRecPointsTask++;
//printf("%d SDD Recs histograms booked\n",fSDDhRecPointsTask);
- AliDebug(1,Form("%d SDD Recs histograms booked\n",fSDDhRecPointsTask));
+ AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Recs histograms booked\n",fSDDhRecPointsTask));
}
//____________________________________________________________________________
-void AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree) {
+void AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
+{
+
+
// Fill QA for RecPoints - SDD -
Int_t lay, lad, det;
TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
//_______________________________________________________________
-void AliITSQASDDDataMakerRec::SetHLTModeFromEnvironment() {
- // test an environment variable to set HLT mode
+void AliITSQASDDDataMakerRec::SetHLTModeFromEnvironment()
+{
Int_t hltmode= ::atoi(gSystem->Getenv("HLT_MODE"));
- if(hltmode==1) {
- AliInfo("Online mode: HLT mode A selected from environment for SDD\n");
- SetHLTMode(kFALSE);
- }
- else if(hltmode==2){
- AliInfo("Online mode: HLT mode C compressed selected from environment for SDD\n");
- SetHLTMode(kTRUE);
- }
- else {
- AliError(Form("Illegal value for env. var. HLT_MODE: %d . Nothing done",hltmode));
- }
+ if(hltmode==1)
+ {
+ AliInfo("Online mode: HLT mode A selected from environment for SDD\n");
+ SetHLTMode(kFALSE);
+ }
+ else
+ if(hltmode==2)
+ {
+ AliInfo("Online mode: HLT mode C compressed selected from environment for SDD\n");
+ SetHLTMode(kTRUE);
+ }
}
//_______________________________________________________________
-Int_t AliITSQASDDDataMakerRec::GetOffset(AliQA::TASKINDEX_t task) {
- // Returns offset number according to the specified task
+Int_t AliITSQASDDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task)
+{
Int_t offset=0;
- if( task == AliQA::kRAWS ) {
- offset=fGenRawsOffset;
- }
- else if( task == AliQA::kRECPOINTS ) {
- offset=fGenRecPointsOffset;
- }
- else {
- AliInfo("No task has been selected. Offset set to zero.\n");
- }
-
+ if( task == AliQAv1::kRAWS )
+ {
+ offset=fGenRawsOffset;
+ }
+ else
+ if( task == AliQAv1::kRECPOINTS )
+ {
+ offset=fGenRecPointsOffset;
+ }
+ else AliInfo("No task has been selected. Offset set to zero.\n");
return offset;
}
//_______________________________________________________________
-Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQA::TASKINDEX_t task) {
- // Returns the number of histograms associated to the specified task
- Int_t histotot=0;
+Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task)
+{
- if( task == AliQA::kRAWS ) {
- histotot=fSDDhRawsTask;
- }
- else if( task == AliQA::kRECPOINTS ){
- histotot=fSDDhRecPointsTask;
- }
- else {
- AliInfo("No task has been selected. TaskHisto set to zero.\n");
- }
+ Int_t histotot=0;
+ if( task == AliQAv1::kRAWS )
+ {
+ histotot=fSDDhRawsTask ;
+ }
+ else
+ if( task == AliQAv1::kRECPOINTS )
+ {
+ histotot=fSDDhRecPointsTask;
+ }
+ else AliInfo("No task has been selected. TaskHisto set to zero.\n");
return histotot;
}