22 #include <TIterator.h> 27 #include <TPaveText.h> 46 fTextSM(new TText*[fgknSM]),
47 fLineCol(new TLine(47.5,-0.5,47.5,207.5)),
48 fText(new TPaveText(0.2,0.7,0.8,0.9,"NDC"))
50 fLineCol->SetLineColor(1);
51 fLineCol->SetLineWidth(2);
53 for(
int iSM = 0; iSM < fgknSM; iSM++)
59 if (isectNum > 5) isectNum += 3;
65 fTextSM[iSM]=
new TText(20, 8+24*isect, Form(
"SM A%d",isectNum) );
69 fTextSM[iSM]=
new TText(64, 8+24*isect, Form(
"SM C%d",isectNum) );
72 else if ( isectNum>4 && isectNum<12)
77 fTextSM[iSM]=
new TText(20, 8+24*(isect-1)+8+6, Form(
"SM A%d",isectNum) );
79 fTextSM[iSM]=
new TText(20, 8+24*(isect-1)+8, Form(
"SM A%d",isectNum) );
84 fTextSM[iSM]=
new TText(64, 8+24*(isect-1)+8+6, Form(
"SM C%d",isectNum) );
86 fTextSM[iSM]=
new TText(64, 8+24*(isect-1)+8, Form(
"SM C%d",isectNum) );
92 fTextSM[iSM]=
new TText(20, 8+24*(isect-2)+16+6, Form(
"SM A%d",isectNum) );
95 fTextSM[iSM]=
new TText(64, 8+24*(isect-2)+16+6, Form(
"SM C%d",isectNum) );
100 for(
int i = 0; i < fgknSectLines; i++)
104 fLineRow[i] =
new TLine(-0.5,23.5+(24*i),95.5,23.5+(24*i));
105 fLineRow[i]->SetLineColor(1);
106 fLineRow[i]->SetLineWidth(2);
109 fLineRow[i] =
new TLine(-0.5,23.5+(24*(i-1))+8,95.5,23.5+(24*(i-1))+8);
110 fLineRow[i]->SetLineColor(1);
111 fLineRow[i]->SetLineWidth(2);
114 fLineRow[i] =
new TLine(-0.5,23.5+(24*(i-2))+16,95.5,23.5+(24*(i-2))+16);
115 fLineRow[i]->SetLineColor(1);
116 fLineRow[i]->SetLineWidth(2);
120 for(
int i = 0; i < 3; i++) {
121 fTextL1[i] =
new TPaveText(0.2,0.8,0.8,0.9,
"NDC");
133 for (Int_t i=0; i<5; ++i)
delete fLineRow[i] ;
170 AliError(Form(
"Did not find expected histo %s",hname));
199 Float_t ratioThresh = 0.9;
200 Float_t threshG = 0.5;
201 Float_t threshJ = 0.5;
202 Int_t badLinkThresh = 1;
216 TParameter<float>* paramR = (TParameter<float>*) thresholds->
GetThreshold(0);
217 TParameter<float>* paramG = (TParameter<float>*) thresholds->
GetThreshold(1);
218 TParameter<float>* paramJ = (TParameter<float>*) thresholds->
GetThreshold(2);
219 TParameter<int>* paramL = (TParameter<int>*) thresholds->
GetThreshold(3);
222 ratioThresh = paramR->GetVal();
224 threshG = paramG->GetVal();
226 threshJ = paramJ->GetVal();
228 badLinkThresh = paramL->GetVal();
248 if (list[specie]->GetEntries() == 0)
255 TH2F * hdata = (TH2F*)list[specie]->At(
k2DRatioAmp) ;
256 TH1F * ratio = (TH1F*)list[specie]->At(
kRatioDist) ;
259 TH2F *hL1GammaPatch = (TH2F*)list[specie]->At(
kGL1);
260 TH2F *hL1JetPatch = (TH2F*)list[specie]->At(
kJL1);
261 TH1I *hFrameR = (TH1I*)list[specie]->At(
kSTUTRU);
270 lstF = hdata->GetListOfFunctions();
272 lstF = ratio->GetListOfFunctions();
275 if(hdata->GetEntries()!=0 && ratio->GetEntries()!=0)
277 lstF = hdata->GetListOfFunctions();
283 lstF->Add(
fLineRow[iLine]->Clone());
287 for(Int_t iSM = 0 ; iSM <
fgknSM ; iSM++)
289 lstF->Add(
fTextSM[iSM]->Clone());
293 lstF = ratio->GetListOfFunctions();
295 Double_t binContent = 0. ;
296 Int_t nGoodTower = 0 ;
298 for(Int_t ix = 1; ix <= hdata->GetNbinsX(); ix++)
300 for(Int_t iy = 1; iy <= hdata->GetNbinsY(); iy++)
302 binContent = hdata->GetBinContent(ix, iy) ;
343 lstF = hL1GammaPatch->GetListOfFunctions();
346 if (specie != calibSpecieId)
349 if(hL1GammaPatch->GetEntries() > 10)
351 lstF = hL1GammaPatch->GetListOfFunctions();
358 Double_t dL1GEntries = hL1GammaPatch->GetEntries();
362 Int_t nBadL1GTRU = 0;
364 for(Int_t ix = 1; ix <= hL1GammaPatch->GetNbinsX(); ix++)
366 for(Int_t iy = 1; iy <= hL1GammaPatch->GetNbinsY(); iy++)
368 Double_t binContent = hL1GammaPatch->GetBinContent(ix, iy) ;
373 binContentTRU[(Int_t)((ix-1)/8)][(Int_t)((iy-1)/12)] += binContent;
384 if (binContent/dL1GEntries > threshG / ( 1 + threshG ))
386 badL1G[ix-1][iy-1] += 1;
394 for(Int_t ix = 1; ix <= 2; ix++)
398 if(binContentTRU[ix-1][iy-1]/dL1GEntries > threshG / ( 1 + threshG ))
400 badL1GTRU[ix-1][iy-1] += 1;
437 lstF = hL1JetPatch->GetListOfFunctions();
440 if (specie != calibSpecieId)
443 if(hL1JetPatch->GetEntries() > 10)
445 lstF = hL1JetPatch->GetListOfFunctions();
450 Double_t dL1JEntries = hL1JetPatch->GetEntries();
451 Int_t badL1J[12][16] = {{0}} ;
453 for(Int_t ix = 1; ix <= hL1JetPatch->GetNbinsX(); ix++)
455 for(Int_t iy = 1; iy <= hL1JetPatch->GetNbinsY(); iy++)
457 Double_t binContent = hL1JetPatch->GetBinContent(ix, iy) ;
468 if ((
double)binContent/(
double)dL1JEntries > threshJ / ( 1 + threshJ ))
470 badL1J[ix-1][iy-1] += 1 ;
505 lstF = hFrameR->GetListOfFunctions();
508 if(hFrameR->GetEntries() !=0)
510 lstF = hFrameR->GetListOfFunctions();
514 for(Int_t ix = 1; ix <= hFrameR->GetNbinsX(); ix++)
516 Double_t binContent = hFrameR->GetBinContent(ix) ;
517 if (binContent == 0) {
525 lstF->Add(
fTextL1[2]->Clone()) ;
528 if (nBadLink < badLinkThresh)
531 fTextL1[2]->AddText(Form(
"LINK TRU-STU = OK, ENJOY..."));
536 fTextL1[2]->AddText(Form(
"PROBLEM WITH TRU-STU LINK = CALL EXPERT!!"));
567 SetHiLo(&hiValue[0], &lowValue[0]) ;
578 TObject *stats = list->FindObject(
"stats"); list->Remove(stats);
581 while ( (obj = list->First()) )
583 while(list->Remove(obj)) { }
delete obj;
586 if (stats) list->Add(stats);
590 AliWarning(Form(
"Checker : empty list of data functions; returning"));
static const char * GetEventSpecieName(EventSpecie_t es)
Double_t MarkHisto(TH1 &histo, Double_t value) const
TPaveText * fText
! Information text for the quality of each SM
virtual void Init(const AliQAv1::DETECTORINDEX_t det)
void CheckRaws(Double_t *test, TObjArray **list)
virtual ~AliEMCALQAChecker()
static const Int_t fgknSectLines
! lines between SM sectors
TPaveText * fTextL1[3]
! Information text for the quality of L1 plots (3 plots in total)
static const Int_t fNPhi
Number of FastOR/SM in Phi.
virtual void Check(Double_t *test, AliQAv1::ALITASK_t index, TObjArray **list, const AliDetectorRecoParam *)
static const Int_t fgknSM
! number of current SM; EMCal + DCal
TText ** fTextSM
! Text info for each SM
#define AliWarning(message)
void CheckRecPoints(Double_t *, TObjArray **) const
AliCDBEntry * Get(const AliCDBId &query, Bool_t forceCaching=kFALSE)
static const Int_t fNModulesInTRU
Number of FastOR/TRU.
void CheckESD(Double_t *, TObjArray **) const
TH1 * GetHisto(TObjArray *list, const char *hname, Int_t specie) const
static const Int_t fNTotalTRU
Total TRU in EMCAL.
TLine * fLineCol
! line to distinguish the different SM side: A side and C side
void SetHiLo(Float_t *hiValue, Float_t *lowValue)
void CleanListOfFunctions(TList *list)
Bool_t IsEventSpecieSet(AliRecoParam::EventSpecie_t es) const
static const Int_t fNEta
Number of FastOR/SM in Eta.
static const Int_t fSTURegionNPhi
Number of FastOR/EMCALs in Phi.
#define AliError(message)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
static const Int_t fSTURegionNEta
EMCAL+DCAL region eta size.
TLine * fLineRow[fgknSectLines]
! line to distinguish the different SM sectors (0-5, 9-12)
static AliQAv1 * Instance()
TObject * GetThreshold(Int_t i)