1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 // *****************************************
19 // Checks the quality assurance
20 // by comparing with reference data
21 // P. Cerello Apr 2008
24 // --- ROOT system ---
28 // --- AliRoot header files ---
29 #include "AliITSQASPDChecker.h"
32 ClassImp(AliITSQASPDChecker)
33 //__________________________________________________________________
34 AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qac )
37 this->~AliITSQASPDChecker();
38 new(this) AliITSQASPDChecker(qac);
43 //__________________________________________________________________
44 const Double_t AliITSQASPDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list)
46 AliDebug(1,Form("AliITSQASPDChecker called with offset: %d\n", fSubDetOffset));
51 if (list->GetEntries() == 0) {
52 test = 1.; // nothing to check
58 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
60 TString histName = hdata->GetName();
61 if (!histName.Contains("_SPD")) continue;
63 if (hdata->GetEntries()>0) rv = 1;
64 if (histName.Contains("LayPattern")) {
65 Double_t ratio=hdata->GetBinContent(2)/hdata->GetBinContent(1);
66 AliInfo(Form("%s: ratio RecPoints lay2 / lay1 = %f", hdata->GetName(), ratio));
68 else if(histName.Contains("ModPattern")) {
70 for(Int_t ibin=0;ibin<hdata->GetNbinsX();ibin++) {
71 if(histName.Contains("SPD1") && ibin<80 && hdata->GetBinContent(ibin+1)>0) ndead++;
72 if(histName.Contains("SPD2") && ibin>79 && hdata->GetBinContent(ibin+1)>0) ndead++;
74 AliInfo(Form("%s: Entries = %d number of empty modules = %d",
75 hdata->GetName(),(Int_t)hdata->GetEntries(),ndead));
77 else if(histName.Contains("SizeYvsZ")) {
78 Double_t meanz=hdata->GetMean(1);
79 Double_t meany=hdata->GetMean(2);
80 Double_t rmsz=hdata->GetRMS(1);
81 Double_t rmsy=hdata->GetRMS(2);
82 AliInfo(Form("%s: Cluster sizeY mean = %f rms = %f", hdata->GetName(),meany,rmsy));
83 AliInfo(Form("%s: Cluster sizeZ mean = %f rms = %f", hdata->GetName(),meanz,rmsz));
85 else if(histName.Contains("Multiplicity")) {
86 AliInfo(Form("%s: Events = %d mean = %f rms = %f",
87 hdata->GetName(),(Int_t)hdata->GetEntries(),hdata->GetMean(),hdata->GetRMS()));}
89 // else AliInfo(Form("%s -> %f", hdata->GetName(), rv));
94 AliError("Data type cannot be processed") ;
100 AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
101 test = 0.5; //upper limit value to set kWARNING flag for a task
109 AliInfo(Form("Test Result = %f", test));
114 //__________________________________________________________________
115 void AliITSQASPDChecker::SetTaskOffset(Int_t TaskOffset)
117 fSubDetOffset = TaskOffset;