fTextSM(new TText*[fknSM]),
fLineCol(new TLine(48.0,0.,48.0,47.0)),
fLineRow(new TLine(0.,24.,96.,24.)),
-fText(new TPaveText(0.4,10,0.7,20.))
+fText(new TPaveText(0.2,40.,1.6,90.,"br"))
{
// ctor
fLineCol->SetLineColor(1);
fTextSM(new TText*[fknSM]) ,
fLineCol(static_cast<TLine*>(qac.fLineCol->Clone())) ,
fLineRow(static_cast<TLine*>(qac.fLineRow->Clone())) ,
-fText(new TPaveText(0.4,10,0.7,20.))
+fText(new TPaveText(0.2,40.,1.6,90.,"br"))
{
// copy ctor
for (Int_t sm = 0 ; sm < fknSM ; sm++){
fTextSM = new TText*[fknSM] ;
fLineCol = static_cast<TLine*>(qac.fLineCol->Clone()) ;
fLineRow = static_cast<TLine*>(qac.fLineRow->Clone()) ;
- fText = new TPaveText(0.4,10,0.7,20.) ;
+ fText = new TPaveText(0.2,40.,1.6,90.,"br") ;
for (Int_t sm = 0 ; sm < fknSM ; sm++){
fTextSM[sm] = static_cast<TText *>(qac.fTextSM[sm]->Clone()) ;
}
//______________________________________________________________________________
void AliEMCALQAChecker::CheckRaws(Double_t * test, TObjArray ** list)
{
-// Check RAW QA histograms
-// We count the times of the response for each tower, the propability for all towers should be the same (average is given value).
-// We skip the first few cycles since the statistics is not enough, the average should be always larger than 1 at least.
-// By calculating the difference between the counts for each tower and the average, we decide whether we should recalculate
-// the average depending the the gaus fitting on the divation distribution.
-// During the recalutation of the average, we count how many towers are used for the calculation.
-// From the fraction of towers used, we decide whether each SM works fine or not
-// From the divation of average, we set the QA flag for the full detetcor as INFO, WARNING, ERROR or FATAL.
+ // Check RAW QA histograms
+ // -- Yaxian Mao, CCNU/CERN/LPSC
+ //adding new checking method: 25/04/2010, Yaxian Mao
+ //Comparing the amplitude from current run to the reference run, if the ratio in the range [0.8, .12], count as a good tower.
+ //If more than 90% towers are good, EMCAL works fine, otherwise experts should be contacted.
-// -- Yaxian Mao, CCNU/CERN/LPSC
//Float_t kThreshold = 80. ;
Int_t nTowersPerSM = 24*48; // number of towers in a SuperModule; 24x48
Double_t nTot = fknSM * nTowersPerSM ;
- Double_t rv = 0. ;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
test[specie] = 0.0 ;
if ( !AliQAv1::Instance()->IsEventSpecieSet(specie))
hdata->GetListOfFunctions()->Add(fTextSM[iSM]);
}
}
-// if ( ratio->GetListOfFunctions()->GetEntries() == 0 ){
-// ratio->GetListOfFunctions()->Add(fText) ;
-// }
+ if ( ratio->GetListOfFunctions()->GetEntries() == 0 ){
+ ratio->GetListOfFunctions()->Add(fText) ;
+ }
//now check the ratio histogram
Double_t binContent = 0. ;
Int_t NGoodTower = 0 ;
+ Double_t rv = 0. ;
for(Int_t ix = 1; ix <= hdata->GetNbinsX(); ix++) {
for(Int_t iy = 1; iy <= hdata->GetNbinsY(); iy++) {
binContent = hdata->GetBinContent(ix, iy) ;
}
}
rv = NGoodTower/nTot ;
-
-
-// if (rv < 0.9) {
-// test[specie] = 0.9 ;
-// // 2 lines text info for quality
-// fText->Clear() ;
-// fText->AddText(Form("%2.2f %% towers out of range [0.8, 1.2]", (1-rv)*100));
-// fText->AddText(Form("EMCAL = NOK, CALL EXPERTS!!!"));
-// }
-// else {
-// test[specie] = 0.1 ;
-// fText->Clear() ;
-// fText->AddText(Form("%2.2f %% towers out of range [0.8, 1.2]", (1-rv)*100));
-// fText->AddText(Form("EMCAL = OK"));
-// }
+ printf("%2.2f %% towers out of range [0.8, 1.2]\n", (1-rv)*100);
+ if(fText){
+ fText->DeleteText() ;
+ fText->Clear() ;
+ }
+ fText->AddText(Form("%2.2f %% towers out of range [0.8, 1.2]", (1-rv)*100));
+ if (rv < 0.9) {
+ test[specie] = 0.9 ;
+ // 2 lines text info for quality
+ fText->SetFillColor(2) ;
+ fText->AddText(Form("EMCAL = NOK, CALL EXPERTS!!!"));
+ }
+ else {
+ test[specie] = 0.1 ;
+ fText->SetFillColor(3) ;
+ fText->AddText(Form("EMCAL = OK, ENJOY..."));
+ }
}
} //finish the checking
}
//temp 2D amplitude histogram for the current run
fHighEmcHistoH2F = new TH2F("h2DHighEC2", "High Gain EMC:Max - Min [ADC counts]", nbinsZ, -0.5 , nbinsZ-0.5, nbinsPhi, -0.5, nbinsPhi-0.5);
-
+ fHighEmcHistoH2F->SetDirectory(0) ; // this histo must be memory resident
//add ratio histograms: to comapre the current run with the reference data
TH2F * h15 = new TH2F("h2DRatioAmp", "High Gain Ratio to Reference:Amplitude_{current run}/Amplitude_{reference run}", nbinsZ, -0.5 , nbinsZ-0.5,
nbinsPhi, -0.5, nbinsPhi-0.5);
gStyle->SetPalette(3,color);
h15->GetZaxis()->SetNdivisions(3);
h15->UseCurrentStyle();
+ h15->SetDirectory(0);
Add2RawsList(h15, k2DRatioAmp, !expert, image, !saveCorr) ;
TH1F * h16 = new TH1F("hRatioDist", "Amplitude_{current run}/Amplitude_{reference run} ratio distribution", nTot, 0., 2.);
h16->SetMinimum(1.);
+ h16->SetDirectory(0);
Add2RawsList(h16, kRatioDist, !expert, image, !saveCorr) ;
// now repeat the same for TRU and LEDMon data
Double_t binContent = 0. ;
//calculate the ratio of the amplitude and fill the histograms, only if the events type is Calib
if (rawReader->GetType() == AliRawEventHeaderBase::kCalibrationEvent) {
- GetRawsData(k2DRatioAmp)->Reset();
- GetRawsData(kRatioDist)->Reset();
+ if(GetRawsData(k2DRatioAmp)->GetEntries())
+ GetRawsData(k2DRatioAmp)->Reset("ICE");
+ if(GetRawsData(kRatioDist)->GetEntries())
+ GetRawsData(kRatioDist)->Reset("ICE");
for(Int_t ix = 1; ix <= fHighEmcHistoH2F->GetNbinsX(); ix++) {
for(Int_t iy = 1; iy <= fHighEmcHistoH2F->GetNbinsY(); iy++) {
if(fCalibRefHistoH2F->GetBinContent(ix, iy))binContent = fHighEmcHistoH2F->GetBinContent(ix, iy)/fCalibRefHistoH2F->GetBinContent(ix, iy) ;
GetRawsData(kLEDMonRatio)->Reset();
GetRawsData(kLEDMonRatioDist)->Reset();
- Double_t binContent, binError;
+ Double_t binError = 0. ;
for(int ib = 1; ib <= fLEDMonRefHistoPro->GetNbinsX(); ib++) {