//---
// Produces the data needed to calculate the quality assurance.
-// All data must be mergeable objects.
-// A. Mastroserio
+// Alla.Maevskaya@cern.ch
+//
//---
// --- ROOT system ---
#include "AliQAChecker.h"
#include "AliT0RawReader.h"
+#include <Riostream.h>
+
ClassImp(AliT0QADataMakerSim)
//____________________________________________________________________________
AliT0QADataMakerSim::AliT0QADataMakerSim() :
- AliQADataMakerSim(AliQA::GetDetName(AliQA::kT0), "T0 Quality Assurance Data Maker")
+ AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kT0), "T0 Quality Assurance Data Maker")
{
// ctor
- /*
- for(Int_t i=0; i<24; i++) {
- fhHitsTime[i]=0x0;
- fhDigCFD[i]=0x0;
- fhDigLEDamp[i]=0x0;
- fhRecCFD[i]=0x0;
- fhRecLEDamp[i]=0x0;
- fhRecQTC[i]=0x0;
- }
- */
// fDetectorDir = fOutput->GetDirectory(GetName()) ;
// if (!fDetectorDir)
// fDetectorDir = fOutput->mkdir(GetName()) ;
AliQADataMakerSim()
{
//copy ctor
- /*
- for(Int_t i=0; i<24; i++) {
- fhHitsTime[i]=0x0;
- fhDigCFD[i]=0x0;
- fhDigLEDamp[i]=0x0;
- fhRecCFD[i]=0x0;
- fhRecLEDamp[i]=0x0;
- fhRecQTC[i]=0x0;
- }
- */
SetName((const char*)qadm.GetName()) ;
SetTitle((const char*)qadm.GetTitle());
}
// Equal operator.
this->~AliT0QADataMakerSim();
new(this) AliT0QADataMakerSim(qadm);
- return *this;
+ return *this;
}
//____________________________________________________________________________
-void AliT0QADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
+void AliT0QADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
- AliQAChecker::Instance()->Run(AliQA::kT0, task, list) ;
+ AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ;
}
//____________________________________________________________________________
{
// create Hits histograms in Hits subdir
// create Hits histograms in Hits subdir
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+
TString timename;
- TH2F *fhHitsTimeA = new TH2F("hHitsTimeA", "Hits Efficiency", 25, 0, 25, 100,12,15 );
- Add2HitsList(fhHitsTimeA,0);
- TH2F *fhHitsTimeC = new TH2F("hHitsTimeC", "Hits Efficiency", 25, 0, 25, 100,2,5 );
- Add2HitsList(fhHitsTimeC,1);
+ TH2F *fhHitsTimeA = new TH2F("hHitsTimeA", "Hits Efficiency;#PMT; Time [ns];", 13, 12, 25, 100,12,15 );
+ fhHitsTimeA->SetOption("COLZ");
+ Add2HitsList(fhHitsTimeA,0, !expert, image);
+ TH2F *fhHitsTimeC = new TH2F("hHitsTimeC", "Hits Efficiency;#PMT; Time [ns];", 13, 0, 13, 100,2,5 );
+ fhHitsTimeC->SetOption("COLZ");
+ Add2HitsList(fhHitsTimeC,1, !expert, image);
}
//____________________________________________________________________________
void AliT0QADataMakerSim::InitDigits()
{
// create Digits histograms in Digits subdir
-
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
- TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits",25,-0.5,24.5,100,100,1000);
+ TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD time [#channel]",25,-0.5,24.5,100,0,1000);
+ fhDigCFD->SetOption("COLZ");
Add2DigitsList( fhDigCFD,0);
- TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits",25,-0.5,24.5,100,100,1000);
- Add2DigitsList( fhDigLEDamp,1);
- TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits",25,-0.5,24.5,100,100,1000);
- Add2DigitsList( fhDigQTC,2);
+ TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; amplitude LED-CFD [#channel]",25,-0.5,24.5,100,100,1000);
+ fhDigLEDamp->SetOption("COLZ");
+ Add2DigitsList( fhDigLEDamp,1, !expert, image);
+ TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; amplitude QTC [#channel]",25,-0.5,24.5,200,500,10000);
+ fhDigQTC->SetOption("COLZ");
+ Add2DigitsList( fhDigQTC,2, !expert, image);
void AliT0QADataMakerSim::MakeHits(TTree *hitTree)
{
//fills QA histos for Hits
- TClonesArray * hits = new TClonesArray("AliT0hit", 1000);
+ if (fHitsArray)
+ fHitsArray->Clear() ;
+ else
+ fHitsArray = new TClonesArray("AliT0hit", 1000);
TBranch * branch = hitTree->GetBranch("T0") ;
if ( ! branch ) {
} else {
if (branch) {
- branch->SetAddress(&hits);
+ branch->SetAddress(&fHitsArray);
}else{
AliError("Branch T0 hit not found");
exit(111);
if (ntracks<=0) return;
// Start loop on tracks in the hits containers
+
for (Int_t track=0; track<ntracks;track++) {
branch->GetEntry(track);
- Int_t nhits = hits->GetEntriesFast();
+ Int_t nhits = fHitsArray->GetEntriesFast();
for (Int_t ihit=0;ihit<nhits;ihit++)
{
- AliT0hit * startHit = (AliT0hit*) hits->UncheckedAt(ihit);
+ AliT0hit * startHit = (AliT0hit*) fHitsArray->UncheckedAt(ihit);
if (!startHit) {
AliError("The unchecked hit doesn't exist");
continue;
AliError(Form("EXEC Branch T0 digits not found"));
return;
}
+
digitsTree->GetEvent(0);
digitsTree->GetEntry(0);
brDigits->GetEntry(0);
fDigits->GetQT0(*digQT0);
fDigits->GetQT1(*digQT1);
refpoint = fDigits->RefPoint();
+
for (Int_t i=0; i<24; i++)
{
if (digCFD->At(i)>0) {
GetDigitsData(0) ->Fill(i,cfd);
GetDigitsData(1) -> Fill(i,(digLED->At(i) - digCFD->At(i)));
GetDigitsData(2) -> Fill(i, (digQT1->At(i) - digQT0->At(i)));
+
}
}