1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 #include "AliMUONQAChecker.h"
20 /// \class AliMUONQAChecker
22 /// Implementation of AliQACheckerBase for MCH and MTR
24 /// \author Laurent Aphecetche, Subatech
26 #include "AliMUONRecoParam.h"
27 #include "AliMUONTrackerQAChecker.h"
28 #include "AliMUONTriggerQAChecker.h"
29 #include "AliCodeTimer.h"
30 #include "AliMUONQAIndices.h"
33 ClassImp(AliMUONQAChecker)
38 const Int_t TRACKER=0;
39 const Int_t TRIGGER=1;
42 //__________________________________________________________________
43 AliMUONQAChecker::AliMUONQAChecker() :
44 AliQACheckerBase("MUON","MUON Quality Assurance Data Maker"),
45 fCheckers(new TObjArray)
48 fCheckers->SetOwner(kTRUE);
49 fCheckers->AddAt(new AliMUONTrackerQAChecker(),TRACKER);
50 fCheckers->AddAt(new AliMUONTriggerQAChecker(),TRIGGER);
53 //__________________________________________________________________
54 AliMUONQAChecker::~AliMUONQAChecker()
60 //______________________________________________________________________________
62 AliMUONQAChecker::Check(Double_t* rv, AliQAv1::ALITASK_t index,
64 const AliDetectorRecoParam * recoParam)
66 /// Check objects in list
68 AliCodeTimerAuto(AliQAv1::GetTaskName(index),0);
70 const AliMUONRecoParam* muonRecoParam = static_cast<const AliMUONRecoParam*>(recoParam);
71 AliMUONVQAChecker::ECheckCode* ecc(0x0);
73 for ( Int_t i = 0; i < AliRecoParam::kNSpecies; ++i )
78 for ( Int_t ic = 0; ic <= fCheckers->GetLast(); ++ic )
80 if ( ic != TRACKER && ic != TRIGGER ) continue;
82 Bool_t trackerRequested(kFALSE);
83 Bool_t triggerRequested(kFALSE);
85 for ( Int_t i = 0; i < AliRecoParam::kNSpecies; ++i )
87 // no need to take into account detector that was not requested
88 if ( ic == TRACKER && AliQAv1::GetData(list,AliMUONQAIndices::kTrackerIsThere,AliRecoParam::ConvertIndex(i)) ) trackerRequested=kTRUE;
89 if ( ic == TRIGGER && AliQAv1::GetData(list,AliMUONQAIndices::kTriggerIsThere,AliRecoParam::ConvertIndex(i)) ) triggerRequested=kTRUE;
92 if ( ic == TRACKER && !trackerRequested )
94 AliInfo("Skipping tracker check as tracker not requested");
98 if ( ic == TRIGGER && !triggerRequested )
100 AliInfo("Skipping trigger check as trigger not requested");
104 AliMUONVQAChecker* qac = static_cast<AliMUONVQAChecker*>(fCheckers->At(ic));
106 if ( index == AliQAv1::kRAW )
108 ecc = qac->CheckRaws(list,muonRecoParam);
111 if ( index == AliQAv1::kREC)
113 ecc = qac->CheckRecPoints(list,muonRecoParam);
116 if ( index == AliQAv1::kESD )
118 ecc = qac->CheckESD(list,muonRecoParam);
123 for ( Int_t i = 0; i < AliRecoParam::kNSpecies; ++i )
125 // no need to take into account detector that was not requested
126 if ( ic == TRACKER && AliQAv1::GetData(list,AliMUONQAIndices::kTrackerIsThere,AliRecoParam::ConvertIndex(i))==0x0 ) continue;
127 if ( ic == TRIGGER && AliQAv1::GetData(list,AliMUONQAIndices::kTriggerIsThere,AliRecoParam::ConvertIndex(i))==0x0 ) continue;
131 case AliMUONVQAChecker::kInfo:
134 case AliMUONVQAChecker::kWarning:
137 case AliMUONVQAChecker::kError:
140 case AliMUONVQAChecker::kFatal:
144 AliError("Invalid ecc value. FIXME !");
155 //______________________________________________________________________________
156 void AliMUONQAChecker::Init(const AliQAv1::DETECTORINDEX_t det)
158 /// intialises QA and QA checker settings
159 AliQAv1::Instance(det) ;
160 Float_t hiValue[AliQAv1::kNBIT] ;
161 Float_t lowValue[AliQAv1::kNBIT] ;
162 lowValue[AliQAv1::kINFO] = 0.999 ;
163 hiValue[AliQAv1::kINFO] = 1.0 ;
164 hiValue[AliQAv1::kWARNING] = 0.99 ;
165 lowValue[AliQAv1::kWARNING] = 0.5 ;
166 lowValue[AliQAv1::kERROR] = 0.0 ;
167 hiValue[AliQAv1::kERROR] = 0.5 ;
168 lowValue[AliQAv1::kFATAL] = -1.0 ;
169 hiValue[AliQAv1::kFATAL] = 0.0 ;
170 SetHiLo(&hiValue[0], &lowValue[0]) ;