ClassImp(AliACORDEQAChecker)
-//__________________________________________________________________
+//____________________________________________________________________________
+Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 0.0 ;
+ return rv ;
+}
-Double_t AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list)
+//__________________________________________________________________
+Double_t * AliACORDEQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
{
// Super-basic check on the QA histograms on the input list:
// look whether they are empty!
- Double_t test = 0.0 ;
- Int_t count = 0 ;
-
- if (list->GetEntries() == 0){
- test = 1. ; // nothing to check
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ Int_t * count = new Int_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ test[specie] = 0.0 ;
+ count[specie] = 0 ;
}
- else {
- TIter next(list) ;
- TH1 * hdata ;
- count = 0 ;
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
- if (hdata) {
- Double_t rv = 0.;
- if(hdata->GetEntries()>0)rv=1;
- AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
- count++ ;
- test += rv ;
- }
- else{
- AliError("Data type cannot be processed") ;
- }
-
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if (list[specie]->GetEntries() == 0){
+ test[specie] = 1. ; // nothing to check
}
- if (count != 0) {
- if (test==0) {
- AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
- test = 0.5; //upper limit value to set kWARNING flag for a task
+ else {
+ TIter next(list[specie]) ;
+ TH1 * hdata ;
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if (hdata) {
+ Double_t rv = 0.0 ;
+ if(hdata->GetEntries()>0)rv=1;
+ AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+ count[specie]++ ;
+ test[specie] += rv ;
+ }
+ else{
+ AliError("Data type cannot be processed") ;
+ }
}
- else {
- test /= count ;
+ if (count[specie] != 0) {
+ if (test[specie]==0) {
+ AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+ test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
+ }
+ else {
+ test[specie] /= count[specie] ;
+ }
}
}
+ AliInfo(Form("Test Result = %f", test[specie])) ;
}
-
- AliInfo(Form("Test Result = %f", test)) ;
return test ;
-
-
-
}
AliACORDEQAChecker(const AliACORDEQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // constructor
virtual ~AliACORDEQAChecker() {;} // destructor
- virtual Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * list) ;
- virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} ;
- virtual Double_t Check() {return 0.;} ;
- virtual Double_t Check(TObjArray*) {return 0.;} ;
- virtual Double_t Check(AliQA::ALITASK_t, TNtupleD*) {return -1.;} ;
+ virtual Double_t * Check(AliQA::ALITASK_t index) ;
+ virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
// Double_t CheckEntries(TObjArray * list) const ;/*--> to be implemented*/
return *this;
}
//____________________________________________________________________________
-void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void InitESDs() ; //book ESD QA histo
virtual void MakeRaws(AliRawReader* rawReader) ;
virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void StartOfDetectorCycle() ;
ClassDef(AliACORDEQADataMakerRec,1) // description
return *this;
}
//____________________________________________________________________________
-void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
- printf("ACORDE---->Detector specific actions at END of cycle\n................\n");
+ AliInfo("ACORDE---->Detector specific actions at END of cycle\n................\n");
AliQAChecker::Instance()->Run(AliQA::kACORDE, task, list) ;
}
void AliACORDEQADataMakerSim::StartOfDetectorCycle()
{
//Detector specific actions at start of cycle
- printf("ACORDE---->Detector specific actions at START of cycle\n................\n");
+ AliInfo("ACORDE---->Detector specific actions at START of cycle\n................\n");
}
//____________________________________________________________________________
void AliACORDEQADataMakerSim::InitHits()
virtual void MakeHits(TClonesArray *) {} //Dummy for the moment
virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo
virtual void MakeDigits(TClonesArray *) {} //Dummy for the moment
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void StartOfDetectorCycle() ;
ClassDef(AliACORDEQADataMakerSim,1) // description
}
//____________________________________________________________________________
-void AliEMCALQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliEMCALQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual ~AliEMCALQADataMakerRec() {;} // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void InitESDs() ;
virtual void InitRecPoints() ;
virtual void InitRaws() ;
}
//____________________________________________________________________________
-void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual ~AliEMCALQADataMakerSim() {;} // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void InitHits() ;
virtual void InitDigits() ;
virtual void InitSDigits() ;
void
AliFMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task,
- TObjArray * list)
+ TObjArray ** list)
{
// Detector specific actions at end of cycle
// do the QA checking
AliFMDQADataMakerRec& operator = (const AliFMDQADataMakerRec& qadm) ;
virtual ~AliFMDQADataMakerRec();
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list);
virtual void InitESDs();
// virtual void InitDigits();
virtual void InitRecPoints();
//_____________________________________________________________________
void AliFMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task,
- TObjArray * list)
+ TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual ~AliFMDQADataMakerSim(); // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list);
virtual void InitHits();
virtual void InitDigits();
// virtual void InitRaws() ;
ClassImp(AliHMPIDQAChecker)
+//____________________________________________________________________________
+Double_t * AliHMPIDQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 0.0 ;
+ return rv ;
+}
+
//_________________________________________________________________
-Double_t AliHMPIDQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t * AliHMPIDQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list)
{
//
// Main check function: Depending on the TASK, different checks are applied
// At the moment: check for empty histograms and checks for RecPoints
- AliDebug(1,Form("AliHMPIDChecker"));
+ Double_t * check = new Double_t[AliRecoParam::kNSpecies] ;
+
+//YS THIS IS NOT CORRECT
+ AliInfo(Form("Fix needed ....."));
AliCDBEntry *QARefRec = AliCDBManager::Instance()->Get("HMPID/QARef/Rec");
if( !QARefRec){
- AliInfo("QA reference data NOT retrieved for Recostruction check. No HMPIDChecker ...exiting");
- return 1.;
+ AliInfo("QA reference data NOT retrieved for Reconstruction check. No HMPIDChecker ...exiting");
+ return check;
}
+//YS THIS IS NOT CORRECT
// checking for empy histograms
- Double_t check =0;
- if(CheckEntries(list) == 0) {
- AliWarning("histograms are empty");
- check = 0.4;//-> Corresponds to kWARNING see AliQACheckerBase::Run
- return check;
- }
-
-// checking rec points
- if(index == AliQA::kREC) check = CheckRecPoints(list,(TObjArray *)QARefRec->GetObject());
-
-//default check response. It will be changed when reasonable checks will be considered
- else check = 0.7 ; // /-> Corresponds to kINFO see AliQACheckerBase::Run
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ check[specie] = 1.0;
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ if(CheckEntries(list[specie]) == 0) {
+ AliWarning("histograms are empty");
+ check[specie] = 0.4;//-> Corresponds to kWARNING see AliQACheckerBase::Run
+ }
+
+ // checking rec points
+ if(index == AliQA::kREC) check[specie] = CheckRecPoints(list[specie],(TObjArray *)QARefRec->GetObject());
+ //default check response. It will be changed when reasonable checks will be considered
+ else check[specie] = 0.7 ; // /-> Corresponds to kINFO see AliQACheckerBase::Run
+ }
return check;
}
AliHMPIDQAChecker(const AliHMPIDQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor
virtual ~AliHMPIDQAChecker() {;} // dtor
- virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list) ;
- virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} ;
- virtual Double_t Check() {return 0.;} ;
- virtual Double_t Check(TObjArray*) {return 0.;} ;
- virtual Double_t Check(AliQA::ALITASK_t, TNtupleD *) { return 0. ;}
+ virtual Double_t * Check(AliQA::ALITASK_t /*index*/) ;
+ virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
Double_t CheckEntries(TObjArray * list) const ;
Double_t CheckRecPoints(TObjArray *listrec, TObjArray *listref) const ;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray *histos)
+void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray **histos)
{
//Detector specific actions at end of cycle
// do the QA checking
if(task==AliQA::kRAWS) {
- for(Int_t iddl=0;iddl<14;iddl++) {
- TH1F *h = (TH1F*)histos->At(14+iddl); //ddl histos scaled by the number of events
- h->Scale(1./(Float_t)fEvtRaw);
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ for(Int_t iddl=0;iddl<14;iddl++) {
+ TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events
+ h->Scale(1./(Float_t)fEvtRaw);
+ }
}
}
virtual void MakeRaws(AliRawReader* rawReader);
virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * obj) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** obj) ;
Int_t fEvtRaw; //internal event counter for raw
ClassDef(AliHMPIDQADataMakerRec,1) // description
}
-void AliHMPIDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray *obj)
+void AliHMPIDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray **obj)
{
//Detector specific actions at end of cycle
// do the QA checking
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * obj) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** obj) ;
virtual void InitHits() ; //book hit QA histo
virtual void InitDigits() ; //book Digit QA histo
virtual void InitSDigits() ; //book SDigits QA histo
}
//____________________________________________________________________________
-Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t * AliITSQAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 0.5 ;
+ return rv ;
+}
+
+//____________________________________________________________________________
+Double_t * AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list)
{
// Super-basic check on the QA histograms on the input list:
// look whether they are empty!
if(index == AliQA::kESD){
- AliDebug(1,"Checker for ESD");
- Int_t tested = 0;
- Int_t empty = 0;
- Double_t rv = 0.;
- // The following flags are set to kTRUE if the corresponding
- // QA histograms exceed a given quality threshold
- Bool_t cluMapSA = kFALSE;
- Bool_t cluMapMI = kFALSE;
- Bool_t cluMI = kFALSE;
- Bool_t cluSA = kFALSE;
- Bool_t verSPDZ = kFALSE;
- if (list->GetEntries() == 0) {
- rv = 0.; // nothing to check
- }
- else {
- TIter next1(list);
- TH1 * hdata;
- Int_t nskipped=0;
- Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
- // look for layers that we wanted to skip
- while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
- if(!hdata) continue;
- TString hname = hdata->GetName();
- if(!hname.Contains("hESDSkippedLayers")) continue;
- for(Int_t k=1; k<7; k++) {
- if(hdata->GetBinContent(k)>0) {
- nskipped++;
- skipped[k-1]=kTRUE;
- }
- }
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ rv[specie] = 0.0 ;
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ AliDebug(1,"Checker for ESD");
+ Int_t tested = 0;
+ Int_t empty = 0;
+ // The following flags are set to kTRUE if the corresponding
+ // QA histograms exceed a given quality threshold
+ Bool_t cluMapSA = kFALSE;
+ Bool_t cluMapMI = kFALSE;
+ Bool_t cluMI = kFALSE;
+ Bool_t cluSA = kFALSE;
+ Bool_t verSPDZ = kFALSE;
+ if (list[specie]->GetEntries() == 0) {
+ rv[specie] = 0.; // nothing to check
}
- TIter next(list);
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
- if(hdata){
- TString hname = hdata->GetName();
- Double_t entries = hdata->GetEntries();
- ++tested;
- if(!(entries>0.))++empty;
- AliDebug(1,Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
+ else {
+ TIter next1(list[specie]);
+ TH1 * hdata;
+ Int_t nskipped=0;
+ Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
+ // look for layers that we wanted to skip
+ while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
+ if(!hdata) continue;
+ TString hname = hdata->GetName();
+ if(!hname.Contains("hESDSkippedLayers")) continue;
+ for(Int_t k=1; k<7; k++) {
+ if(hdata->GetBinContent(k)>0) {
+ nskipped++;
+ skipped[k-1]=kTRUE;
+ }
+ }
+ }
+ TIter next(list[specie]);
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if(hdata){
+ TString hname = hdata->GetName();
+ Double_t entries = hdata->GetEntries();
+ ++tested;
+ if(!(entries>0.))++empty;
+ AliDebug(1,Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
+ if(hname.Contains("hESDClusterMapSA") && entries>0.){
+ cluMapSA = kTRUE;
+ AliDebug(1,Form("Processing histogram %s",hname.Data()));
+ // Check if there are layers with anomalously low
+ // contributing points to SA reconstructed tracks
+ for(Int_t k=1;k<7;k++){
+ // check if the layer was skipped
+ if(skipped[k-1]) continue;
+ if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+ cluMapSA = kFALSE;
+ AliInfo(Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
+ }
+ }
+ }
- if(hname.Contains("hESDClusterMapSA") && entries>0.){
- cluMapSA = kTRUE;
- AliDebug(1,Form("Processing histogram %s",hname.Data()));
- // Check if there are layers with anomalously low
- // contributing points to SA reconstructed tracks
- for(Int_t k=1;k<7;k++){
- // check if the layer was skipped
- if(skipped[k-1]) continue;
- if(hdata->GetBinContent(k)<0.5*(entries/6.)){
- cluMapSA = kFALSE;
- AliInfo(Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
- }
- }
- }
+ else if(hname.Contains("hESDClusterMapMI") && entries>0.){
+ // Check if there are layers with anomalously low
+ // contributing points to MI reconstructed tracks
+ AliDebug(1,Form("Processing histogram %s",hname.Data()));
+ cluMapMI = kTRUE;
+ for(Int_t k=1;k<7;k++){
+ // check if the layer was skipped
+ if(skipped[k-1]) continue;
+ if(hdata->GetBinContent(k)<0.5*(entries/6.)){
+ cluMapMI = kFALSE;
+ AliInfo(Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
+ }
+ }
+ }
- else if(hname.Contains("hESDClusterMapMI") && entries>0.){
- // Check if there are layers with anomalously low
- // contributing points to MI reconstructed tracks
- AliDebug(1,Form("Processing histogram %s",hname.Data()));
- cluMapMI = kTRUE;
- for(Int_t k=1;k<7;k++){
- // check if the layer was skipped
- if(skipped[k-1]) continue;
- if(hdata->GetBinContent(k)<0.5*(entries/6.)){
- cluMapMI = kFALSE;
- AliInfo(Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
- }
- }
- }
+ else if(hname.Contains("hESDClustersMI") && entries>0.){
+ // Check if 6 clusters MI tracks are the majority
+ AliDebug(1,Form("Processing histogram %s",hname.Data()));
+ cluMI = kTRUE;
+ Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+ for(Int_t k=2; k<7-nskipped; k++){
+ if(hdata->GetBinContent(k)>maxlaytracks){
+ cluMI = kFALSE;
+ AliInfo(Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
+ }
+ }
+ }
- else if(hname.Contains("hESDClustersMI") && entries>0.){
- // Check if 6 clusters MI tracks are the majority
- AliDebug(1,Form("Processing histogram %s",hname.Data()));
- cluMI = kTRUE;
- Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
- for(Int_t k=2; k<7-nskipped; k++){
- if(hdata->GetBinContent(k)>maxlaytracks){
- cluMI = kFALSE;
- AliInfo(Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
- }
- }
- }
+ else if(hname.Contains("hESDClustersSA") && entries>0.){
+ // Check if 6 clusters SA tracks are the majority
+ AliDebug(1,Form("Processing histogram %s",hname.Data()));
+ cluSA = kTRUE;
+ Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
+ for(Int_t k=2; k<7-nskipped; k++){
+ if(hdata->GetBinContent(k)>maxlaytracks){
+ cluSA = kFALSE;
+ AliInfo(Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
+ }
+ }
+ }
- else if(hname.Contains("hESDClustersSA") && entries>0.){
- // Check if 6 clusters SA tracks are the majority
- AliDebug(1,Form("Processing histogram %s",hname.Data()));
- cluSA = kTRUE;
- Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
- for(Int_t k=2; k<7-nskipped; k++){
- if(hdata->GetBinContent(k)>maxlaytracks){
- cluSA = kFALSE;
- AliInfo(Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
- }
- }
- }
+ else if(hname.Contains("hSPDVertexZ") && entries>0.){
+ // Check if average Z vertex coordinate is -5 < z < 5 cm
+ AliDebug(1,Form("Processing histogram %s",hname.Data()));
+ verSPDZ = kTRUE;
+ if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
+ verSPDZ = kFALSE;
+ AliInfo(Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
+ }
+ }
+ }
- else if(hname.Contains("hSPDVertexZ") && entries>0.){
- // Check if average Z vertex coordinate is -5 < z < 5 cm
- AliDebug(1,Form("Processing histogram %s",hname.Data()));
- verSPDZ = kTRUE;
- if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
- verSPDZ = kFALSE;
- AliInfo(Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
- }
- }
-
- }
- else{
- AliError("ESD Checker - invalid data type");
- }
+ else{
+ AliError("ESD Checker - invalid data type");
+ }
- rv = 0.;
- if(tested>0){
- if(tested == empty){
- rv = 0.1;
- AliWarning("All ESD histograms are empty");
- }
- else {
- rv = 0.1+0.4*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested));
- if(cluMapSA)rv+=0.1;
- if(cluMapMI)rv+=0.1;
- if(cluMI)rv+=0.1;
- if(cluSA)rv+=0.1;
- if(verSPDZ)rv+=0.1;
- }
- }
-
- }
- }
- AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv));
- return rv;
+ rv[specie] = 0.;
+ if(tested>0){
+ if(tested == empty){
+ rv[specie] = 0.1;
+ AliWarning("All ESD histograms are empty");
+ }
+ else {
+ rv[specie] = 0.1+0.4*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested));
+ if(cluMapSA)rv[specie]+=0.1;
+ if(cluMapMI)rv[specie]+=0.1;
+ if(cluMI)rv[specie]+=0.1;
+ if(cluSA)rv[specie]+=0.1;
+ if(verSPDZ)rv[specie]+=0.1;
+ }
+ }
+ }
+ }
+ AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
+ }
+ return rv ;
} // end of ESD QA
-
+
+ Double_t * retval = new Double_t[AliRecoParam::kNSpecies] ;
//____________________________________________________________________________
Double_t spdCheck, sddCheck, ssdCheck;
- Double_t retval = 1.;
//pixel
if(fDet == 0 || fDet == 1) {
AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
fSPDChecker = new AliITSQASPDChecker();
}
fSPDChecker->SetTaskOffset(fSPDOffset);
- spdCheck = fSPDChecker->Check(index, list);
- if(spdCheck<retval)retval = spdCheck;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ retval[specie] = 1.0 ;
+ if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+ spdCheck = fSPDChecker->Check(index, list[specie]);
+ if(spdCheck<retval[specie])retval[specie] = spdCheck;
+ }
+ }
}
//drift
if(fDet == 0 || fDet == 2) {
fSDDChecker = new AliITSQASDDChecker();
}
fSDDChecker->SetTaskOffset(fSDDOffset);
- sddCheck = fSDDChecker->Check(index, list);
- if(sddCheck<retval)retval = sddCheck;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ retval[specie] = 1.0 ;
+ if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+ sddCheck = fSDDChecker->Check(index, list[specie]);
+ if(sddCheck<retval[specie])retval[specie] = sddCheck;
+ }
+ }
}
//strip
if(fDet == 0 || fDet == 3) {
AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
if(!fSSDChecker) {
fSSDChecker = new AliITSQASSDChecker();
- AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));
+ AliInfo(Form("Number of monitored objects SSD: %d", list[AliRecoParam::kDefault]->GetEntries()));
}
fSSDChecker->SetTaskOffset(fSSDOffset);
- ssdCheck = fSSDChecker->Check(index, list);
- if(ssdCheck<retval)retval = ssdCheck; }
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ retval[specie] = 1.0 ;
+ if ( AliQA::Instance()->IsEventSpecieSet(specie) ) {
+ ssdCheck = fSSDChecker->Check(index, list[specie]);
+ if(ssdCheck<retval[specie])retval[specie] = ssdCheck;
+ }
+ }
+ }
// here merging part for common ITS QA result
//
- AliDebug(1,Form("AliITSQAChecker::QAChecker returned value is %f \n",retval));
- return retval;
-
+
+ return retval;
}
virtual void SetDetTaskOffset(Int_t subdet=0,Int_t offset=0);
protected:
-
+ virtual Double_t * Check(AliQA::ALITASK_t /*index*/) ;
+ virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list ) ;
virtual void SetSPDTaskOffset(Int_t SPDOffset){fSPDOffset = SPDOffset;} ;
virtual void SetSDDTaskOffset(Int_t SDDOffset){fSDDOffset = SDDOffset;} ;
virtual void SetSSDTaskOffset(Int_t SSDOffset){fSSDOffset = SSDOffset;} ;
- virtual Double_t Check(AliQA::ALITASK_t /*index*/){return 0.5;}
- virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list ) ;
- Double_t Check(AliQA::ALITASK_t, TNtupleD*) {AliFatal("Not implemented\n"); return 0;}
private:
Bool_t fkOnline;
}
//____________________________________________________________________________
-void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
{
// launch the QA checking
- AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
- if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ SetEventSpecie(specie) ;
+ AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list[specie])\n");
+ if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ }
AliQAChecker *qac = AliQAChecker::Instance();
AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm);
AliITSQADataMakerRec& operator = (const AliITSQADataMakerRec& qac);
virtual void StartOfDetectorCycle();
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list);
virtual void EndOfDetectorCycle(const char *fgDataName);
virtual void InitRaws();
virtual void InitRecPoints();
// --- ROOT system ---
#include <TTree.h>
+#include <TMath.h>
// --- Standard library ---
// --- AliRoot header files ---
}
//____________________________________________________________________________
-void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
{
// launch the QA checking
- AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
- if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);
- if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
- if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ SetEventSpecie(specie) ;
+ AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
+ if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
+ }
AliQAChecker *qac = AliQAChecker::Instance();
AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
AliITSQADataMakerSim(const AliITSQADataMakerSim& qadm);
AliITSQADataMakerSim& operator = (const AliITSQADataMakerSim& qac);
virtual void StartOfDetectorCycle();
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list);
virtual void InitDigits();
virtual void InitSDigits();
virtual void InitHits();
void AliITSQASDDDataMakerRec::InitRaws()
{
// Initialization for RAW data - SDD -
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+ fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");
Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
if(!ddlMapSDD)
{
// Initialization for RECPOINTS - SDD -
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+ fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
Int_t nOnline=1;
Int_t nOnline2=1;
void AliITSQASDDDataMakerSim::InitDigits()\r
{ \r
// Initialization for DIGIT data - SDD - \r
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+ fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5); //hmod\r
h0->GetXaxis()->SetTitle("SDD Module Number");\r
void AliITSQASDDDataMakerSim::InitSDigits()\r
{ \r
// Initialization for SDIGIT data - SDD -\r
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+ fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
TH1F* h0=new TH1F("SDD SDIGITS Module Pattern","SDIGITS SDD Module Pattern",260,239.5,499.5); //hmod\r
h0->GetXaxis()->SetTitle("SDD Module Number");\r
{ \r
\r
// Initialization for HITS data - SDD -\r
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+ fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();\r
//fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List\r
//printf("AliITSQASDDDataMakerSim::InitHits called \n");\r
TH1F *h0=new TH1F("SDD HITS Module Pattern","SDD HITS Module Pattern",260,239.5,499.5); \r
void AliITSQASPDDataMakerRec::InitRaws()
{
// Initialization for RAW data - SPD -
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+ fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
AliInfo("Book Offline Histograms for SPD\n ");
Char_t name[50];
void AliITSQASPDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SPD -
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+ fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
hlayer->GetXaxis()->SetTitle("Layer number");
hlayer->GetYaxis()->SetTitle("Entries");
void AliITSQASPDDataMakerSim::InitDigits()
{
// Initialization for DIGIT data - SPD -
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+ fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//fSPDhDTask must be incremented by one unit every time a histogram is ADDED to the QA List
Char_t name[50];
void AliITSQASPDDataMakerSim::InitSDigits()
{
// Initialization for SDIGIT data - SPD -
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+ fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
//printf("--W-- AliITSQASPDDataMakerSim::InitSDigits() fGenOffset= %d \n",fGenOffset);
//fSPDhSTask must be incremented by one unit every time a histogram is ADDED to the QA List
void AliITSQASPDDataMakerSim::InitHits()
{
// Initialization for HITS data - SPD -
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+ fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
//printf("--W-- AliITSQASPDDataMakerSim::InitHits() fGenOffset= %d \n",fGenOffset);
//fSPDhHTask must be incremented by one unit every time a histogram is ADDED to the QA List
Char_t name[50];
fSSDEventPerCycle = 0;
- AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+ // AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
}
//____________________________________________________________________________
void AliITSQASSDDataMakerRec::InitRaws() {
// Initialization for RAW data - SSD -
- // fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
- fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+ fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
if(fkOnline) {
AliInfo("Book Online Histograms for SSD\n");
void AliITSQASSDDataMakerRec::InitRecPoints()
{
// Initialization for RECPOINTS - SSD -
- //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::InitRecpoints called \n");
- // fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
- fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
- //printf("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset);
+ fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
+ //AliInfo(Form("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset));
Int_t nModuleOffset = 500;
Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
}
//____________________________________________________________________________
-void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list) {
+void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/) {
// launch the QA checking
AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n");
- AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+// AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
}
//____________________________________________________________________________
void AliITSQASSDDataMakerSim::InitDigits() {
// Initialization for DIGIT data - SSD -
- fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+ fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
//____________________________________________________________________________
void AliITSQASSDDataMakerSim::InitSDigits() {
// Initialization for SDIGIT data - SSD -
- fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+ fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDSDigitsModule",
//____________________________________________________________________________
void AliITSQASSDDataMakerSim::InitHits() {
// Initialization for HITS data - SSD -
- fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+ fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
// custom code here
TH1F *fHistSSDModule = new TH1F("fHistSSDHitsModule",
}
//______________________________________________________________________________
-Double_t
+Double_t *
AliMUONQAChecker::Check(AliQA::ALITASK_t /*index*/)
{
/// Check data
AliError(Form("This method is not implemented. Should it be ? fDataSubDir = %p (%s)",
fDataSubDir, ( fDataSubDir ? fDataSubDir->GetPath() : "")));
- return 0.0;
+ return NULL;
}
//______________________________________________________________________________
-Double_t
-AliMUONQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
+Double_t *
+AliMUONQAChecker::Check(AliQA::ALITASK_t index, TObjArray ** list)
{
/// Check objects in list
}
AliWarning(Form("Checker for task %d not implement for the moment",index));
- return 0.0;
+ return NULL;
}
//______________________________________________________________________________
}
//______________________________________________________________________________
-Double_t
-AliMUONQAChecker::CheckRecPoints(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckRecPoints(TObjArray ** list)
{
/// Check rec points
/// Very binary check for the moment.
- TH1* h = GetHisto(list,"hTrackerNumberOfClustersPerDE");
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 1.0 ;
- if ( !h ) return 0.75; // only a warning if histo not found, in order not to kill anything because QA failed...
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ TH1* h = GetHisto(list[specie],"hTrackerNumberOfClustersPerDE");
- if ( h->GetMean() == 0.0 ) return MarkHisto(*h,0.0);
+ if ( !h ) rv[specie] = 0.75; // only a warning if histo not found, in order not to kill anything because QA failed...
- return 1.0;
+ else if ( h->GetMean() == 0.0 ) rv[specie] = MarkHisto(*h,0.0);
+ }
+ return rv;
}
//______________________________________________________________________________
}
//______________________________________________________________________________
-Double_t
-AliMUONQAChecker::CheckESD(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckESD(TObjArray ** list)
{
/// Check ESD
- TH1* h = GetHisto(list,"hESDnTracks");
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 1.0 ;
- if (!h) return 0.75;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+
+ TH1* h = GetHisto(list[specie],"hESDnTracks");
- if ( h->GetMean() == 0.0 ) return MarkHisto(*h,0.0); // no track -> fatal
+ if (!h) rv[specie] = 0.75;
- h = GetHisto(list,"hESDMatchTrig");
+ else if ( h->GetMean() == 0.0 ) rv[specie] = MarkHisto(*h,0.0); // no track -> fatal
- if (!h) return 0.75;
+ h = GetHisto(list[specie],"hESDMatchTrig");
- if (h->GetMean() == 0.0 ) return MarkHisto(*h,0.25); // no trigger matching -> error
+ if (!h) rv[specie] = 0.75;
- return 1.0;
+ else if (h->GetMean() == 0.0 ) rv[specie] = MarkHisto(*h,0.25); // no trigger matching -> error
+ }
+ return rv;
}
//______________________________________________________________________________
-Double_t
-AliMUONQAChecker::CheckRaws(TObjArray * list)
+Double_t *
+AliMUONQAChecker::CheckRaws(TObjArray ** list)
{
/// Check raws
- TIter next(list);
- TObject* object;
- AliMUONVTrackerData* data(0x0);
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 1.0 ;
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ TIter next(list[specie]);
+ TObject* object;
+ AliMUONVTrackerData* data(0x0);
- while ( (object=next()) && !data )
- {
- if (object->InheritsFrom("AliMUONVTrackerData"))
- {
- data = static_cast<AliMUONVTrackerData*>(object);
- }
- }
+ while ( (object=next()) && !data )
+ {
+ if (object->InheritsFrom("AliMUONVTrackerData"))
+ {
+ data = static_cast<AliMUONVTrackerData*>(object);
+ }
+ }
- if ( !data )
- {
- AliError("Did not find TrackerData in the list !");
- return 0.0;
- }
+ if ( !data )
+ {
+ AliError("Did not find TrackerData in the list !");
+ return NULL;
+ }
- AliMpManuIterator it;
- Int_t detElemId;
- Int_t manuId;
- Int_t n50(0); // number of manus with occupancy above 0.5
- Int_t n75(0); // number of manus with occupancy above 0.75
- Int_t n(0); // number of manus with some occupancy
+ AliMpManuIterator it;
+ Int_t detElemId;
+ Int_t manuId;
+ Int_t n50(0); // number of manus with occupancy above 0.5
+ Int_t n75(0); // number of manus with occupancy above 0.75
+ Int_t n(0); // number of manus with some occupancy
- while ( it.Next(detElemId,manuId) )
- {
- Float_t occ = data->Manu(detElemId,manuId,2);
- if (occ > 0 ) ++n;
- if (occ >= 0.5 ) ++n50;
- if (occ >= 0.75 ) ++n75;
- }
+ while ( it.Next(detElemId,manuId) )
+ {
+ Float_t occ = data->Manu(detElemId,manuId,2);
+ if (occ > 0 ) ++n;
+ if (occ >= 0.5 ) ++n50;
+ if (occ >= 0.75 ) ++n75;
+ }
- AliInfo(Form("n %d n50 %d n75 %d",n,n50,n75));
+ AliInfo(Form("n %d n50 %d n75 %d",n,n50,n75));
- if ( n == 0 )
- {
- AliError("Oups. Got zero occupancy in all manus ?!");
- return 0.0;
- }
+ if ( n == 0 )
+ {
+ AliError("Oups. Got zero occupancy in all manus ?!");
+ rv[specie] = 0.0;
+ }
- if ( n75 )
- {
- AliError(Form("Got %d manus with occupancy above 0.75",n75));
- return 0.1;
- }
+ if ( n75 )
+ {
+ AliError(Form("Got %d manus with occupancy above 0.75",n75));
+ rv[specie] = 0.1;
+ }
- if ( n50 )
- {
- AliWarning(Form("Got %d manus with occupancy above 0.5",n50));
- return 0.9;
+ if ( n50 )
+ {
+ AliWarning(Form("Got %d manus with occupancy above 0.5",n50));
+ rv[specie] = 0.9;
+ }
}
+ return rv;
+}
- return 1.0;
+//______________________________________________________________________________
+void AliMUONQAChecker::Init(const AliQA::DETECTORINDEX_t det)
+{
+ // intialises QA and QA checker settings
+ AliQA::Instance(det) ;
+ Float_t * hiValue = new Float_t[AliQA::kNBIT] ;
+ Float_t * lowValue = new Float_t[AliQA::kNBIT] ;
+ lowValue[AliQA::kINFO] = 0.999 ;
+ hiValue[AliQA::kINFO] = 1.0 ;
+ hiValue[AliQA::kWARNING] = 0.99 ;
+ lowValue[AliQA::kWARNING] = 0.5 ;
+ lowValue[AliQA::kERROR] = 0.0 ;
+ hiValue[AliQA::kERROR] = 0.5 ;
+ lowValue[AliQA::kFATAL] = -1.0 ;
+ hiValue[AliQA::kFATAL] = 0.0 ;
+ SetHiLo(hiValue, lowValue) ;
}
//______________________________________________________________________________
void
-AliMUONQAChecker::SetQA(AliQA::ALITASK_t index, const Double_t value) const
+AliMUONQAChecker::SetQA(AliQA::ALITASK_t index, const Double_t * value) const
{
/// sets the QA according the return value of the Check
AliQA * qa = AliQA::Instance(index);
- qa->UnSet(AliQA::kFATAL);
- qa->UnSet(AliQA::kWARNING);
- qa->UnSet(AliQA::kERROR);
- qa->UnSet(AliQA::kINFO);
-
- if ( value == 1.0 )
- {
- qa->Set(AliQA::kINFO);
- }
- else if ( value == 0.0 )
- {
- qa->Set(AliQA::kFATAL);
- }
- else if ( value > 0.5 )
- {
- qa->Set(AliQA::kWARNING);
- }
- else
- {
- qa->Set(AliQA::kERROR);
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ qa->UnSet(AliQA::kFATAL, specie);
+ qa->UnSet(AliQA::kWARNING, specie);
+ qa->UnSet(AliQA::kERROR, specie);
+ qa->UnSet(AliQA::kINFO, specie);
+
+ if ( ! value ) { // No checker is implemented, set all QA to Fatal
+ qa->Set(AliQA::kFATAL, specie) ;
+ } else {
+ if ( value[specie] >= fLowTestValue[AliQA::kFATAL] && value[specie] < fUpTestValue[AliQA::kFATAL] )
+ qa->Set(AliQA::kFATAL, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kERROR] && value[specie] <= fUpTestValue[AliQA::kERROR] )
+ qa->Set(AliQA::kERROR, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kWARNING] && value[specie] <= fUpTestValue[AliQA::kWARNING] )
+ qa->Set(AliQA::kWARNING, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kINFO] && value[specie] <= fUpTestValue[AliQA::kINFO] )
+ qa->Set(AliQA::kINFO, specie) ;
+ }
}
}
AliMUONQAChecker(const AliMUONQAChecker& qac);
virtual ~AliMUONQAChecker();
+ virtual void Init(const AliQA::DETECTORINDEX_t det) ;
+
protected:
using AliQACheckerBase::Check;
- virtual Double_t Check(AliQA::ALITASK_t index) ;
- virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * list) ;
- virtual void SetQA(AliQA::ALITASK_t index, const Double_t value) const ;
+ virtual Double_t * Check(AliQA::ALITASK_t index) ;
+ virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** list) ;
+ virtual void SetQA(AliQA::ALITASK_t index, const Double_t * value) const ;
- Double_t CheckRaws(TObjArray* list);
- Double_t CheckRecPoints(TObjArray* list);
- Double_t CheckESD(TObjArray* list);
+ Double_t * CheckRaws(TObjArray** list);
+ Double_t * CheckRecPoints(TObjArray** list);
+ Double_t * CheckESD(TObjArray** list);
TH1* GetHisto(TObjArray* list, const char* hname) const;
Double_t MarkHisto(TH1& histo, Double_t value) const;
}
//____________________________________________________________________________
-void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
{
///Detector specific actions at end of cycle
// Display trigger histos in a more user friendly way
DisplayTriggerInfo(task);
- if ( task == AliQA::kRAWS && fTrackerDataMaker )
- {
- TIter next(list);
- TObject* o;
- Bool_t alreadyThere(kFALSE);
- while ( ( o = next() ) && !alreadyThere )
- {
- TString classname(o->ClassName());
- if ( classname.Contains("TrackerData") ) alreadyThere = kTRUE;
- }
- if (!alreadyThere && fTrackerDataMaker)
- {
- AliInfo("Adding fTrackerDataMaker to the list of qa objects");
- list->AddAt(fTrackerDataMaker->Data(),(Int_t)kTrackerData);
- }
- if ( fTrackerDataMaker )
- {
- TH1* hbp = GetRawsData(kTrackerBusPatchOccupancy);
- hbp->Reset();
- TIter nextBP(AliMpDDLStore::Instance()->CreateBusPatchIterator());
- AliMpBusPatch* bp(0x0);
- AliMUONVTrackerData* data = fTrackerDataMaker->Data();
- Int_t occDim = 2;
-
- while ( ( bp = static_cast<AliMpBusPatch*>(nextBP())) )
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ SetEventSpecie(specie) ;
+ if ( task == AliQA::kRAWS && fTrackerDataMaker )
{
- Int_t busPatchId = bp->GetId();
- Int_t bin = hbp->FindBin(busPatchId);
- hbp->SetBinContent(bin,data->BusPatch(busPatchId,occDim));
+ TIter next(list[specie]);
+ TObject* o;
+ Bool_t alreadyThere(kFALSE);
+ while ( ( o = next() ) && !alreadyThere )
+ {
+ TString classname(o->ClassName());
+ if ( classname.Contains("TrackerData") ) alreadyThere = kTRUE;
+ }
+ if (!alreadyThere && fTrackerDataMaker)
+ {
+ AliInfo("Adding fTrackerDataMaker to the list of qa objects");
+ list[specie]->AddAt(fTrackerDataMaker->Data(),(Int_t)kTrackerData);
+ }
+ if ( fTrackerDataMaker )
+ {
+ TH1* hbp = GetRawsData(kTrackerBusPatchOccupancy);
+ hbp->Reset();
+ TIter nextBP(AliMpDDLStore::Instance()->CreateBusPatchIterator());
+ AliMpBusPatch* bp(0x0);
+ AliMUONVTrackerData* data = fTrackerDataMaker->Data();
+ Int_t occDim = 2;
+
+ while ( ( bp = static_cast<AliMpBusPatch*>(nextBP())) )
+ {
+ Int_t busPatchId = bp->GetId();
+ Int_t bin = hbp->FindBin(busPatchId);
+ hbp->SetBinContent(bin,data->BusPatch(busPatchId,occDim));
+ }
+ }
}
- }
- }
- if ( task == AliQA::kESDS ) {
- // Normalize ESD histos
- TH1* h;
- Int_t bin;
- AliMpDEIterator it;
- it.First();
- while ( !it.IsDone()) {
+ if ( task == AliQA::kESDS ) {
+ // Normalize ESD histos
+ TH1* h;
+ Int_t bin;
+ AliMpDEIterator it;
+ it.First();
+ while ( !it.IsDone()) {
- Int_t detElemId = it.CurrentDEId();
+ Int_t detElemId = it.CurrentDEId();
- if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger ) {
+ if ( AliMpDEManager::GetStationType(detElemId) != AliMp::kStationTrigger ) {
- h = GetESDsData(kESDnClustersPerDE);
- Double_t nClusters = h->GetBinContent(h->GetXaxis()->FindFixBin((Double_t)detElemId));
+ h = GetESDsData(kESDnClustersPerDE);
+ Double_t nClusters = h->GetBinContent(h->GetXaxis()->FindFixBin((Double_t)detElemId));
if (nClusters > 0) {
- h = GetESDsData(kESDClusterChargePerDE);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ h = GetESDsData(kESDClusterChargePerDE);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
h->SetBinContent(bin, h->GetBinContent(bin)/nClusters);
- h = GetESDsData(kESDClusterMultPerDE);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ h = GetESDsData(kESDClusterMultPerDE);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
h->SetBinContent(bin, h->GetBinContent(bin)/nClusters);
- h = GetESDsData(kESDResidualXPerDEMean);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
- Double_t meanResX = h->GetBinContent(bin)/nClusters;
+ h = GetESDsData(kESDResidualXPerDEMean);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ Double_t meanResX = h->GetBinContent(bin)/nClusters;
h->SetBinContent(bin, meanResX);
- h = GetESDsData(kESDResidualYPerDEMean);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
- Double_t meanResY = h->GetBinContent(bin)/nClusters;
+ h = GetESDsData(kESDResidualYPerDEMean);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ Double_t meanResY = h->GetBinContent(bin)/nClusters;
h->SetBinContent(bin, meanResY);
- h = GetESDsData(kESDResidualXPerDESigma);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
- if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResX*meanResX));
- else h->SetBinContent(bin, 0.);
-
- h = GetESDsData(kESDResidualYPerDESigma);
- bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
- if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResY*meanResY));
- else h->SetBinContent(bin, 0.);
+ h = GetESDsData(kESDResidualXPerDESigma);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResX*meanResX));
+ else h->SetBinContent(bin, 0.);
+ h = GetESDsData(kESDResidualYPerDESigma);
+ bin = h->GetXaxis()->FindFixBin((Double_t)detElemId);
+ if (nClusters > 1) h->SetBinContent(bin, TMath::Sqrt(h->GetBinContent(bin)/nClusters - meanResY*meanResY));
+ else h->SetBinContent(bin, 0.);
}
}
GetESDsData(kESDnClustersPerDE)->Scale(1./nTracks);
}
}
-
+ }
// do the QA checking
AliQAChecker::Instance()->Run(AliQA::kMUON, task, list) ;
}
virtual void DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t) {}
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list);
private:
}
//____________________________________________________________________________
-void AliMUONQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
+void AliMUONQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
{
///Detector specific actions at end of cycle
// do the QA checking
/// make SDigits QA from Tree
virtual void MakeDigits(TTree* digitsTree);
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list);
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list);
AliMUONVHitStore* fHitStore; //!< pointer to hit store
AliMUONVDigitStore* fDigitStore; //!< pointer to digit store
}
//____________________________________________________________________________
-void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
- if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1))
- GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ;
- if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2))
- GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ;
- if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3))
- GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ;
- if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4))
- GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ;
- if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5))
- GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ SetEventSpecie(specie) ;
+ if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1))
+ GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ;
+ if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2))
+ GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ;
+ if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3))
+ GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ;
+ if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4))
+ GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ;
+ if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5))
+ GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ;
+ }
// do the QA checking
AliQAChecker::Instance()->Run(AliQA::kPHOS, task, list) ;
}
void AliPHOSQADataMakerRec::InitRecPoints()
{
// create Reconstructed Points histograms in RecPoints subdir
- Bool_t expert = kTRUE ;
-
+ Bool_t expert = kTRUE ;
TH2I * h0 = new TH2I("hRpPHOSxyMod1","RecPoints Rows x Columns for PHOS module 1", 64, -72., 72., 56, -63., 63.) ;
Add2RecPointsList(h0,kRPmod1, expert) ;
TH2I * h1 = new TH2I("hRpPHOSxyMod2","RecPoints Rows x Columns for PHOS module 2", 64, -72., 72., 56, -63., 63.) ;
}
}
delete decoder;
+
GetRawsData(kEtotLG)->Fill(lgEtot) ;
TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kEtotLG)->GetName()))) ;
p->SetVal(lgEtot) ;
private:
const AliPHOSRecoParam* GetRecoParam() const { return dynamic_cast<const AliPHOSRecoParam *>(fRecoParam); }
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void InitESDs() ;
virtual void InitRecPoints() ;
virtual void InitRaws() ;
}
//____________________________________________________________________________
-void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
Bool_t expert = kTRUE ;
TH1F * h0 = new TH1F("hPhosHits", "Hits energy distribution in PHOS", 100, 0., 100.) ;
h0->Sumw2() ;
- Add2HitsList(h0, 0, !expert) ;
+ Add2HitsList(h0, kHits, !expert) ;
TH1I * h1 = new TH1I("hPhosHitsMul", "Hits multiplicity distribution in PHOS", 500, 0., 10000) ;
h1->Sumw2() ;
- Add2HitsList(h1, 1, !expert) ;
+ Add2HitsList(h1, kHitsMul, !expert) ;
+
}
//____________________________________________________________________________
Bool_t expert = kTRUE ;
TH1I * h0 = new TH1I("hPhosDigits", "Digits amplitude distribution in PHOS", 500, 0, 1000) ;
h0->Sumw2() ;
- Add2DigitsList(h0, 0, !expert) ;
+ Add2DigitsList(h0, kDigits, !expert) ;
TH1I * h1 = new TH1I("hPhosDigitsMul", "Digits multiplicity distribution in PHOS", 2000, 0, 10000) ;
h1->Sumw2() ;
- Add2DigitsList(h1, 1, !expert) ;
+ Add2DigitsList(h1, kDigitsMul, !expert) ;
}
//____________________________________________________________________________
Bool_t expert = kTRUE ;
TH1F * h0 = new TH1F("hPhosSDigits", "SDigits energy distribution in PHOS", 500, 0., 1000.) ;
h0->Sumw2() ;
- Add2SDigitsList(h0, 0, !expert) ;
+ Add2SDigitsList(h0, kSDigits, !expert) ;
TH1I * h1 = new TH1I("hPhosSDigitsMul", "SDigits multiplicity distribution in PHOS", 500, 0, 1000) ;
h1->Sumw2() ;
- Add2SDigitsList(h1, 1, !expert) ;
+ Add2SDigitsList(h1, kSDigitsMul, !expert) ;
}
//____________________________________________________________________________
TIter next(fHits) ;
AliPHOSHit * hit ;
while ( (hit = dynamic_cast<AliPHOSHit *>(next())) ) {
- GetHitsData(0)->Fill( hit->GetEnergy()) ;
+ GetHitsData(kHits)->Fill( hit->GetEnergy()) ;
}
}
TIter next(digits) ;
AliPHOSDigit * digit ;
while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
- GetDigitsData(0)->Fill( digit->GetEnergy()) ;
+ GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ;
}
}
TIter next(sdigits) ;
AliPHOSDigit * sdigit ;
while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
- GetSDigitsData(0)->Fill( sdigit->GetEnergy()) ;
+ GetSDigitsData(kSDigits)->Fill( sdigit->GetEnergy()) ;
}
}
class AliPHOSQADataMakerSim: public AliQADataMakerSim {
public:
+ enum HHitType_t {kHits=0, kHitsMul} ;
+ enum HDigitType_t {kDigits=0, kDigitsMul} ;
+ enum HSDigitType_t {kSDigits=0, kSDigitsMul} ;
+
AliPHOSQADataMakerSim() ; // ctor
AliPHOSQADataMakerSim(const AliPHOSQADataMakerSim& qadm) ;
AliPHOSQADataMakerSim& operator = (const AliPHOSQADataMakerSim& qadm) ;
virtual ~AliPHOSQADataMakerSim() {;} // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void InitHits() ;
virtual void InitDigits() ;
virtual void InitSDigits() ;
}
//____________________________________________________________________________
-void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeRecPoints(TTree * recpoTree) ;
virtual void MakeESDs(AliESDEvent * esd) ;
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
ClassDef(AliPMDQADataMakerRec,1) // description
}
//____________________________________________________________________________
-void AliPMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeDigits(TClonesArray * digits) ;
virtual void MakeDigits(TTree * digitTree) ;
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
ClassDef(AliPMDQADataMakerSim,1) // description
ClassImp(AliCorrQAChecker)
//__________________________________________________________________
-Double_t AliCorrQAChecker::Check(AliQA::ALITASK_t index, TNtupleD * nData)
+Double_t * AliCorrQAChecker::Check(AliQA::ALITASK_t index, TNtupleD ** nData)
{
// check the QA of correlated data stored in a ntuple
+
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ test[specie] = 0. ;
+
if ( index != AliQA::kRAW ) {
AliWarning("Checker not implemented") ;
- return 1.0 ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ test[specie] = 1. ;
+ return test ;
}
- Double_t test = 0.0 ;
// if (!fRefSubDir) {
// test = 1. ; // no reference data
// } else {
if ( ! nData ) {
AliError(Form("nRawCorr not found in %s", fDataSubDir->GetName())) ;
} else {
- TObjArray * bList = nData->GetListOfBranches() ;
- for (Int_t b = 0 ; b < bList->GetEntries() ; b++) {
- AliInfo(Form("Ntuple parameter name %d : %s", b, bList->At(b)->GetName())) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ TObjArray * bList = nData[specie]->GetListOfBranches() ;
+ for (Int_t b = 0 ; b < bList->GetEntries() ; b++) {
+ AliInfo(Form("Ntuple %s parameter name %d : %s", nData[specie]->GetName(), b, bList->At(b)->GetName())) ;
+ }
}
}
// }
AliCorrQAChecker(const AliCorrQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor
virtual ~AliCorrQAChecker() {;} // dtor
- virtual Double_t Check(AliQA::ALITASK_t index) { return AliQACheckerBase::Check(index) ;}
- virtual Double_t Check(AliQA::ALITASK_t index, TObjArray * obj) { return AliQACheckerBase::Check(index, obj) ;}
- virtual Double_t Check(AliQA::ALITASK_t index, TNtupleD * nData) ;
+ virtual Double_t * Check(AliQA::ALITASK_t index) { return AliQACheckerBase::Check(index) ;}
+ virtual Double_t * Check(AliQA::ALITASK_t index, TObjArray ** obj) { return AliQACheckerBase::Check(index, obj) ;}
+ Double_t * Check(AliQA::ALITASK_t index, TNtupleD ** nData) ;
private:
#include <TH2F.h>
#include <TNtupleD.h>
#include <TParameter.h>
+#include <TMath.h>
// --- Standard library ---
fqadm(qadm)
{
// ctor
-
+ fCorrNt = new TNtupleD *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ fCorrNt[specie] = NULL ;
}
//____________________________________________________________________________
//__________________________________________________________________
AliCorrQADataMakerRec& AliCorrQADataMakerRec::operator = (const AliCorrQADataMakerRec& qadm )
{
- // Equal operator.
+ // assign operator.
this->~AliCorrQADataMakerRec();
new(this) AliCorrQADataMakerRec(qadm);
return *this;
}
-
+
+//____________________________________________________________________________
+AliCorrQADataMakerRec::~AliCorrQADataMakerRec()
+{
+ // dtor only destroy the ntuple
+ if ( fCorrNt ) {
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fCorrNt[specie] != NULL )
+ delete fCorrNt[specie] ;
+ }
+ delete[] fCorrNt ;
+ }
+}
+
//____________________________________________________________________________
-void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * /*list*/)
+void AliCorrQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** /*list*/)
{
//Detector specific actions at end of cycle
// do the QA checking
if (task == AliQA::kRAWS) {
- AliQAChecker::Instance()->Run(AliQA::kCORR, task, fObject) ;
+ AliQAChecker::Instance()->Run(AliQA::kCORR, task, fCorrNt) ;
}
}
void AliCorrQADataMakerRec::InitRaws()
{
// createa ntuple taking all the parameters declared by detectors
- if (fObject)
+ if (fCorrNt)
return ;
delete fRawsQAList ; // not needed for the time being
fRawsQAList = NULL ;
if (fMaxRawVar == 0) {
AliWarning("NTUPLE not created") ;
} else {
- fObject = new TNtupleD(AliQA::GetQACorrName(), "Raws data correlation among detectors", varlist.Data()) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ char * name = Form("%s_%s", AliQA::GetQACorrName(), AliRecoParam::GetEventSpecieName(specie)) ;
+ fCorrNt[specie] = new TNtupleD(name, "Raws data correlation among detectors", varlist.Data()) ;
+ }
}
}
varvalue[index++] = p->GetVal() ;
}
}
- (dynamic_cast<TNtupleD*>(fObject))->Fill(varvalue);
+ (dynamic_cast<TNtupleD*>(fCorrNt[(Int_t)TMath::Log2(fEventSpecie)]))->Fill(varvalue);
delete [] varvalue;
}
}
AliCorrQADataMakerRec(AliQADataMaker **) ; // ctor
AliCorrQADataMakerRec(const AliCorrQADataMakerRec& qadm) ;
AliCorrQADataMakerRec& operator = (const AliCorrQADataMakerRec& qadm) ;
- virtual ~AliCorrQADataMakerRec() {;} // dtor
+ virtual ~AliCorrQADataMakerRec() ; // dtor
private:
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void InitESDs() ;
virtual void InitRecPoints() ;
virtual void InitRaws() ;
ClassImp(AliGlobalQADataMaker)
//____________________________________________________________________________
-void AliGlobalQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliGlobalQADataMaker::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
AliQADataMakerRec(qadm) {;}
private:
- void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
void InitRaws();
void InitRecPoints();
ClassImp(AliQA)
AliQA * AliQA::fgQA = 0x0 ;
TFile * AliQA::fgQADataFile = 0x0 ;
-TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.cycle.root
+TString AliQA::fgQADataFileName = "QA" ; // will transform into Det.QA.run.root
TFile * AliQA::fgQARefFile = 0x0 ;
TString AliQA::fgQARefDirName = "" ;
TString AliQA::fgQARefFileName = "QA.root" ;
TString AliQA::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD",
"ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global", "CORR"} ;
TString AliQA::fgGRPPath = "GRP/GRP/Data" ;
-TString AliQA::fgRTNames[] = {"UNKNOWN", "AUTO_TEST", "CALIBRATION", "CALIBRATION_PULSER", "CHANNEL_DELAY_TUNING", "COSMIC",
- "COSMICS", "DAQ_FO_UNIF_SCAN", "DAQ_GEN_DAC_SCAN", "DAQ_MEAN_TH_SCAN", "DAQ_MIN_TH_SCAN",
- "DAQ_NOISY_PIX_SCAN", "DAQ_PIX_DELAY_SCAN", "DAQ_UNIFORMITY_SCAN", "DCS_FO_UNIF_SCAN",
- "DCS_MEAN_TH_SCAN", "DCS_MIN_TH_SCAN", "DCS_PIX_DELAY_SCAN", "DCS_UNIFORMITY_SCAN",
- "DDL_TEST", "GAIN", "PEDESTAL", "INJECTOR", "LASER", "MONTECARLO", "NOISE", "NOISY_PIX_SCAN",
- "PHYSICS", "PULSER", "STANDALONE", "STANDALONE_BC", "STANDALONE_CENTRAL", "STANDALONE_COSMIC",
- "STANDALONE_EMD", "STANDALONE_LASER", "STANDALONE_MB", "STANDALONE_PEDESTAL",
- "STANDALONE_SEMICENTRAL", "STANDALONE_PULSER" } ;
TString AliQA::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ;
const TString AliQA::fkgLabLocalFile = "file://" ;
const TString AliQA::fkgLabLocalOCDB = "local://" ;
const TString AliQA::fkgRefFileName = "QA.root" ;
const TString AliQA::fkgQAName = "QA" ;
const TString AliQA::fkgQACorrNtName = "CorrQA" ;
-const TString AliQA::fkgRefOCDBDirName = "Ref" ;
+const TString AliQA::fkgRefOCDBDirName = "QA" ;
TString AliQA::fkgRefDataDirName = "" ;
const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20" ;
const TString AliQA::fkgExpert = "Expert" ;
AliQA::AliQA() :
TNamed("", ""),
fNdet(kNDET),
- fQA(new ULong_t[fNdet]),
+ fNEventSpecie(AliRecoParam::kNSpecies),
+ fQA(new ULong_t*[fNdet]),
fDet(kNULLDET),
- fTask(kNULLTASK)
-
+ fTask(kNULLTASK),
+ fEventSpecie(AliRecoParam::kDefault),
+ fEventSpecies(new Bool_t[fNEventSpecie])
{
// default constructor
- // beware singleton: not to be used
-
- for (Int_t index = 0 ; index < fNdet ; index++)
- fQA[index] = 0 ;
+ Int_t det ;
+ for (det = 0 ; det < fNdet ; det++) {
+ fQA[det] = new ULong_t[fNEventSpecie] ;
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fQA[det][es] = 0 ;
+ }
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fEventSpecies[es] = kFALSE ;
}
//____________________________________________________________________________
AliQA::AliQA(const AliQA& qa) :
TNamed(qa),
fNdet(qa.fNdet),
+ fNEventSpecie(qa.fNEventSpecie),
fQA(qa.fQA),
fDet(qa.fDet),
- fTask(qa.fTask)
+ fTask(qa.fTask),
+ fEventSpecie(qa.fEventSpecie),
+ fEventSpecies(qa.fEventSpecies)
{
// cpy ctor
}
//_____________________________________________________________________________
AliQA& AliQA::operator = (const AliQA& qa)
{
-// assignment operator
- if(&qa == this) return *this;
+ // assignment operator
+ if(&qa == this) return *this;
- fNdet = qa.fNdet;
- for (Int_t index = 0 ; index < fNdet ; index++)
- fQA[index] = qa.fQA[index];
- return *this;
+ fNdet = qa.fNdet;
+ fNEventSpecie = qa.fNEventSpecie;
+ for (Int_t det = 0 ; det < fNdet ; det++)
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fQA[det][es] = qa.fQA[det][es];
+
+ fNEventSpecie = qa.fNEventSpecie ;
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fEventSpecies[es] = qa. fEventSpecies[es] ;
+
+ return *this;
}
//_______________________________________________________________
AliQA::AliQA(const DETECTORINDEX_t det) :
TNamed("QA", "Quality Assurance status"),
fNdet(kNDET),
- fQA(new ULong_t[fNdet]),
+ fNEventSpecie(AliRecoParam::kNSpecies),
+ fQA(new ULong_t*[fNdet]),
fDet(det),
- fTask(kNULLTASK)
+ fTask(kNULLTASK),
+ fEventSpecie(AliRecoParam::kDefault),
+ fEventSpecies(new Bool_t[fNEventSpecie])
{
// constructor to be used
if (! CheckRange(det) ) {
fDet = kNULLDET ;
return ;
}
- Int_t index ;
- for (index = 0; index < fNdet; index++)
- fQA[index] = 0 ;
+ Int_t idet ;
+ for (idet = 0; idet < fNdet; idet++) {
+ fQA[det] = new ULong_t[fNEventSpecie] ;
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fQA[idet][es] = 0 ;
+ }
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fEventSpecies[es] = kFALSE ;
}
//_______________________________________________________________
AliQA::AliQA(const ALITASK_t tsk) :
TNamed("QA", "Quality Assurance status"),
fNdet(kNDET),
- fQA(new ULong_t[fNdet]),
+ fNEventSpecie(AliRecoParam::kNSpecies),
+ fQA(new ULong_t*[fNdet]),
fDet(kNULLDET),
- fTask(tsk)
+ fTask(tsk),
+ fEventSpecie(AliRecoParam::kDefault),
+ fEventSpecies(new Bool_t[fNEventSpecie])
{
// constructor to be used in the AliRoot module (SIM, REC, ESD or ANA)
if (! CheckRange(tsk) ) {
fTask = kNULLTASK ;
return ;
}
- Int_t index ;
- for (index = 0; index < fNdet; index++)
- fQA[index] = 0 ;
+ Int_t det ;
+ for (det = 0; det < fNdet; det++) {
+ fQA[det] = new ULong_t[fNEventSpecie] ;
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fQA[det][es] = 0 ;
+ }
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fEventSpecies[es] = kFALSE ;
}
//____________________________________________________________________________
AliQA::~AliQA()
{
// dtor
+ for (Int_t idet = 0; idet < fNdet; idet++)
+ delete fQA[idet] ;
delete[] fQA ;
}
Bool_t rv = kFALSE ;
Int_t index ;
for (index = 0; index < kNDET ; index++)
- rv = rv || IsSet(DETECTORINDEX_t(index), fTask, kFATAL) ;
+ rv = rv || IsSet(DETECTORINDEX_t(index), fTask, fEventSpecie, kFATAL) ;
return rv ;
}
return rv ;
}
-
+//_______________________________________________________________
+Bool_t AliQA::CheckRange(AliRecoParam::EventSpecie_t es) const
+{
+ // check if bit is in given bit range: 0-kNBit
+ Bool_t rv = kFALSE ;
+ switch (es) {
+ case AliRecoParam::kDefault:
+ rv = kTRUE ;
+ break ;
+ case AliRecoParam::kLowMult:
+ rv = kTRUE ;
+ break ;
+ case AliRecoParam::kHighMult:
+ rv = kTRUE ;
+ break ;
+ case AliRecoParam::kCosmic:
+ rv = kTRUE ;
+ break ;
+ case AliRecoParam::kCalib:
+ rv = kTRUE ;
+ break ;
+ }
+ if (!rv)
+ AliFatal(Form("Event Specie %d is not valid", es)) ;
+ return rv ;
+}
//_______________________________________________________________
const char * AliQA::GetAliTaskName(ALITASK_t tsk)
return fgQAResultFile ;
}
-//_______________________________________________________________
-const TString AliQA::GetRunTypeName(RUNTYPE_t rt)
-{
- TString rv("Invalid Run Type") ;
- if ( rt == kNULLTYPE ) {
- rv = "Known RUN_TYPE are: \n" ;
- for (Int_t index = 0 ; index < kNTYPE; index++) {
- rv += Form("%2d -- %s\n", index, fgRTNames[index].Data()) ;
- }
- printf("%s", rv.Data()) ;
- return "" ;
- }
- else {
- if ( rt > kNULLTYPE && rt < kNTYPE )
- rv = fgRTNames[rt] ;
- }
- return rv ;
-}
-
//_______________________________________________________________
AliQA::TASKINDEX_t AliQA::GetTaskIndex(const char * name)
{
}
//_______________________________________________________________
-Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const
+Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t ies, QABIT_t bit) const
+{
+ // Checks is the requested bit is set
+
+ const AliRecoParam::EventSpecie_t es = AliRecoParam::Convert(ies) ;
+ return IsSet(det, tsk, es, bit) ;
+
+}
+
+//_______________________________________________________________
+Bool_t AliQA::IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const
{
// Checks is the requested bit is set
CheckRange(det) ;
CheckRange(tsk) ;
CheckRange(bit) ;
+ CheckRange(es) ;
ULong_t offset = Offset(tsk) ;
- ULong_t status = GetStatus(det) ;
+ ULong_t status = GetStatus(det, es) ;
offset+= bit ;
status = (status & 1 << offset) != 0 ;
return status ;
}
//_______________________________________________________________
-Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk) const
+Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
{
// Checks is the requested bit is set
CheckRange(det) ;
CheckRange(tsk) ;
+ CheckRange(es) ;
ULong_t offset = Offset(tsk) ;
- ULong_t status = GetStatus(det) ;
+ ULong_t status = GetStatus(det, es) ;
ULong_t st = 0 ;
for ( Int_t bit = 0 ; bit < kNBIT ; bit++) {
offset+= bit ;
return kTRUE ;
}
//_______________________________________________________________
-Bool_t AliQA::IsSetAny(DETECTORINDEX_t det) const
+Bool_t AliQA::IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const
{
// Checks is the requested bit is set
CheckRange(det) ;
+ CheckRange(es) ;
- ULong_t status = GetStatus(det) ;
+ ULong_t status = GetStatus(det, es) ;
ULong_t st = 0 ;
for ( Int_t tsk = 0 ; tsk < kNTASK ; tsk++) {
ULong_t offset = Offset(ALITASK_t(tsk)) ;
//_______________________________________________________________
AliQA * AliQA::Instance()
{
- // Get an instance of the singleton.
- // Object must have been instantiated with Instance(ALITASK) first
+ // Get an instance of the singleton. The only authorized way to call the ctor
+ if ( ! fgQA) {
+ TFile * f = GetQAResultFile() ;
+ fgQA = dynamic_cast<AliQA *>(f->Get("QA")) ;
+ if ( ! fgQA )
+ fgQA = new AliQA() ;
+ }
return fgQA ;
}
//_______________________________________________________________
AliQA * AliQA::Instance(const ALITASK_t tsk)
{
- // get an instance of the singleton.
+ // Get an instance of the singleton. The only authorized way to call the ctor
if ( ! fgQA)
switch (tsk) {
TIter next(list) ;
AliQA * qa ;
while ( (qa = (AliQA*)next() ) ) {
- qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), QABIT_t(bit)) ;
- Set(QABIT_t(bit)) ;
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++) {
+ if (qa->IsSet(DETECTORINDEX_t(det), ALITASK_t(task), es, QABIT_t(bit)))
+ Set(QABIT_t(bit), es) ;
+ }
} // qa list
} // bit
} // task
}
//_______________________________________________________________
-void AliQA::Set(QABIT_t bit)
+void AliQA::ResetStatus(DETECTORINDEX_t det)
+{
+ // reset the status of det for all event specie
+ for (Int_t es = 0 ; es < fNEventSpecie ; es++)
+ fQA[det][es] = 0 ;
+}
+
+//_______________________________________________________________
+void AliQA::Set(QABIT_t bit, Int_t ies)
{
- // Set the status bit of the current detector in the current module
+ // Set the status bit of the current detector in the current module and for the current event specie
+ Set(bit, AliRecoParam::Convert(ies)) ;
+}
+
+//_______________________________________________________________
+void AliQA::Set(QABIT_t bit, AliRecoParam::EventSpecie_t es)
+{
+ // Set the status bit of the current detector in the current module and for the current event specie
- SetStatusBit(fDet, fTask, bit) ;
+ SetStatusBit(fDet, fTask, es, bit) ;
}
//_____________________________________________________________________________
printf("AliQA::SetQARefDir: QA references are in %s\n", tmp.Data() ) ;
}
-//_____________________________________________________________________________
-void AliQA::SetQARefDataDirName(const char * name)
-{
- // Set the lower level directory name where reference data are found
- TString test(name) ;
- RUNTYPE_t rt = kNULLTYPE ;
- for (Int_t index = 0; index < kNTYPE; index++) {
- if (test.CompareTo(fgRTNames[index]) == 0) {
- rt = (RUNTYPE_t) index ;
- break ;
- }
- }
-
- if (rt == kNULLTYPE) {
- printf("AliQA::SetQARefDataDirName: %s is an unknown RUN TYPE name\n", name) ;
- return ;
- }
-
- SetQARefDataDirName(rt) ;
-}
-
//_____________________________________________________________________________
void AliQA::SetQAResultDirName(const char * name)
{
}
//_______________________________________________________________
-void AliQA::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit)
+void AliQA::SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
{
// Set the status bit for a given detector and a given task
CheckRange(det) ;
CheckRange(tsk) ;
CheckRange(bit) ;
+ CheckRange(es) ;
ULong_t offset = Offset(tsk) ;
- ULong_t status = GetStatus(det) ;
+ ULong_t status = GetStatus(det, es) ;
offset+= bit ;
status = status | 1 << offset ;
- SetStatus(det, status) ;
+ SetStatus(det, es, status) ;
+}
+
+//_______________________________________________________________
+void AliQA::Show() const
+{
+ // dispplay the QA status word
+
+ for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+ const Bool_t what = IsEventSpecieSet(ies) ;
+ if ( what )
+ ShowStatus(fDet, fTask, AliRecoParam::Convert(ies)) ;
+ }
+}
+
+//_______________________________________________________________
+void AliQA::Show(DETECTORINDEX_t det) const
+{
+ // dispplay the QA status word
+
+ for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+ const Bool_t what = IsEventSpecieSet(ies) ;
+ if ( what )
+ ShowStatus(fDet, kNULLTASK, AliRecoParam::Convert(ies)) ;
+ }
}
//_______________________________________________________________
-void AliQA::ShowAll() const
+void AliQA::ShowAll() const
{
// dispplay the QA status word
Int_t index ;
for (index = 0 ; index < kNDET ; index++) {
for (Int_t tsk = kRAW ; tsk < kNTASK ; tsk++) {
- ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk)) ;
- }
+ for (Int_t ies = 0 ; ies < fNEventSpecie ; ies++) {
+ const Bool_t what = IsEventSpecieSet(ies) ;
+ if ( what )
+ ShowStatus(DETECTORINDEX_t(index), ALITASK_t(tsk), AliRecoParam::Convert(ies)) ;
+ }
+ }
}
}
//_______________________________________________________________
-void AliQA::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk) const
+void AliQA::ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const
{
// Prints the full QA status of a given detector
CheckRange(det) ;
- ULong_t status = GetStatus(det) ;
+ CheckRange(es) ;
+ ULong_t status = GetStatus(det, es) ;
ULong_t tskStatus[kNTASK] ;
tskStatus[kRAW] = status & 0x0000f ;
tskStatus[kSIM] = status & 0x000f0 ;
tskStatus[kESD] = status & 0x0f000 ;
tskStatus[kANA] = status & 0xf0000 ;
- AliInfo(Form("====> QA Status for %8s raw =0x%x, sim=0x%x, rec=0x%x, esd=0x%x, ana=0x%x", GetDetName(det).Data(),
+ AliInfo(Form("====> QA Status for %8s %8s raw =0x%x, sim=0x%x, rec=0x%x, esd=0x%x, ana=0x%x", GetDetName(det).Data(), AliRecoParam::GetEventSpecieName(es),
tskStatus[kRAW], tskStatus[kSIM], tskStatus[kREC], tskStatus[kESD], tskStatus[kANA] )) ;
if (tsk == kNULLTASK) {
for (Int_t itsk = kRAW ; itsk < kNTASK ; itsk++) {
- ShowASCIIStatus(det, ALITASK_t(itsk), tskStatus[itsk]) ;
+ ShowASCIIStatus(es, det, ALITASK_t(itsk), tskStatus[itsk]) ;
}
} else {
- ShowASCIIStatus(det, tsk, tskStatus[tsk]) ;
+ ShowASCIIStatus(es, det, tsk, tskStatus[tsk]) ;
}
}
//_______________________________________________________________
-void AliQA::ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
+void AliQA::ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, const ULong_t status) const
{
// print the QA status in human readable format
TString text;
for (Int_t bit = kINFO ; bit < kNBIT ; bit++) {
- if (IsSet(det, tsk, QABIT_t(bit))) {
+ if (IsSet(det, tsk, es, QABIT_t(bit))) {
text = GetBitName(QABIT_t(bit)) ;
text += " " ;
}
}
if (! text.IsNull())
- printf(" %8s %4s 0x%4lx, Problem signalled: %8s \n", GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ;
+ printf(" %8s %8s %4s 0x%4lx, Problem signalled: %8s \n", AliRecoParam::GetEventSpecieName(es), GetDetName(det).Data(), GetAliTaskName(tsk), status, text.Data()) ;
+}
+
+//_______________________________________________________________
+void AliQA::UnSet(QABIT_t bit, Int_t ies)
+{
+ // UnSet the status bit of the current detector in the current module
+ UnSet(bit, AliRecoParam::Convert(ies)) ;
}
//_______________________________________________________________
-void AliQA::UnSet(QABIT_t bit)
+void AliQA::UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es)
{
// UnSet the status bit of the current detector in the current module
- UnSetStatusBit(fDet, fTask, bit) ;
+ UnSetStatusBit(fDet, fTask, es, bit) ;
}
//_______________________________________________________________
-void AliQA::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit)
+void AliQA::UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit)
{
// UnSet the status bit for a given detector and a given task
CheckRange(det) ;
CheckRange(tsk) ;
CheckRange(bit) ;
+ CheckRange(es) ;
ULong_t offset = Offset(tsk) ;
- ULong_t status = GetStatus(det) ;
+ ULong_t status = GetStatus(det, es) ;
offset+= bit ;
status = status & 0 << offset ;
- SetStatus(det, status) ;
+ SetStatus(det, es, status) ;
}
//
#include <TNamed.h>
+#include <TMath.h>
class TFile ;
#include "AliLog.h"
+#include "AliRecoParam.h"
class AliQA : public TNamed {
public:
kNULLTASK=-1, kRAW, kSIM, kREC, kESD, kANA, kNTASK };
enum QABIT_t {
kNULLBit=-1, kINFO, kWARNING, kERROR, kFATAL, kNBIT };
- enum RUNTYPE_t {
- kNULLTYPE=-1, kUNKOWN, kAUTO_TEST, kCALIBRATION, kCALIBRATION_PULSER, kCHANNEL_DELAY_TUNING, kCOSMIC, kCOSMICS, kDAQ_FO_UNIF_SCAN,
- kDAQ_GEN_DAC_SCAN, kDAQ_MEAN_TH_SCAN, kDAQ_MIN_TH_SCAN, kDAQ_NOISY_PIX_SCAN, kDAQ_PIX_DELAY_SCAN, kDAQ_UNIFORMITY_SCAN,
- kDCS_FO_UNIF_SCAN, kDCS_MEAN_TH_SCAN, kDCS_MIN_TH_SCAN, kDCS_PIX_DELAY_SCAN, kDCS_UNIFORMITY_SCAN, kDDL_TEST, kGAIN,
- kPEDESTAL, kINJECTOR, kLASER, kMONTECARLO, kNOISE, kNOISY_PIX_SCAN, kPHYSICS, kPULSER, kSTANDALONE, kSTANDALONE_BC,
- kSTANDALONE_CENTRAL, kSTANDALONE_COSMIC, kSTANDALONE_EMD, kSTANDALONE_LASER, kSTANDALONE_MB, kSTANDALONE_PEDESTAL,
- kSTANDALONE_SEMICENTRAL, kSTANDALONE_PULSER, kNTYPE};
-
enum TASKINDEX_t {
kNULLTASKINDEX=-1, kRAWS, kHITS, kSDIGITS, kDIGITS, kRECPOINTS, kTRACKSEGMENTS, kRECPARTICLES, kESDS, kNTASKINDEX };
static AliQA * Instance(const DETECTORINDEX_t det) ;
static AliQA * Instance(const ALITASK_t tsk) ;
static AliQA * Instance(const TASKINDEX_t tsk) ;
- Bool_t CheckFatal() const ;
+ Bool_t CheckFatal() const ;
static void Close() ;
static const char * GetAliTaskName(ALITASK_t tsk) ;
static const TString GetExpert() { return fkgExpert ; }
static const TString GetLabLocalFile() { return fkgLabLocalFile ; }
static const TString GetLabLocalOCDB() { return fkgLabLocalOCDB ; }
static const TString GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; }
- static DETECTORINDEX_t GetDetIndex(const char * name) ;
+ static DETECTORINDEX_t GetDetIndex(const char * name) ;
static const TString GetDetName(DETECTORINDEX_t det) { return fgDetNames[det] ; }
static const char * GetDetName(Int_t det) ;
static const TString GetGRPPath() { return fgGRPPath ; }
static const char * GetQARefStorage() { return fgQARefDirName.Data() ; }
static const char * GetRefOCDBDirName() { return fkgRefOCDBDirName.Data() ; }
static const char * GetRefDataDirName() { return fkgRefDataDirName.Data() ; }
- static const TString GetRunTypeName(RUNTYPE_t rt = kNULLTYPE) ;
- static TASKINDEX_t GetTaskIndex(const char * name) ;
+ static TASKINDEX_t GetTaskIndex(const char * name) ;
static TString GetTaskName(UInt_t tsk) { return fgTaskNames[tsk] ; }
- Bool_t IsSet(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) const ;
- Bool_t IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk) const ;
- Bool_t IsSetAny(DETECTORINDEX_t det) const ;
+ Bool_t IsEventSpecieSet(AliRecoParam::EventSpecie_t es) const { return fEventSpecies[(Int_t)TMath::Log2(es)] ; }
+ Bool_t IsEventSpecieSet(Int_t es) const { return fEventSpecies[es] ; }
+ Bool_t IsSet(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) const ;
+ Bool_t IsSet(DETECTORINDEX_t det, ALITASK_t tsk, Int_t es, QABIT_t bit) const ;
+ Bool_t IsSetAny(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es) const ;
+ Bool_t IsSetAny(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const ;
void Merge(TCollection * list) ;
- void Set(QABIT_t bit) ;
+ void Set(QABIT_t bit, AliRecoParam::EventSpecie_t es) ;
+ void Set(QABIT_t bit, Int_t es) ;
+ void SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecies[(Int_t)TMath::Log2(es)] = kTRUE ; }
static void SetQAResultDirName(const char * name) ;
static void SetQARefStorage(const char * name) ;
- static void SetQARefDataDirName(RUNTYPE_t rt) { fkgRefDataDirName = GetRunTypeName(rt) ; }
- static void SetQARefDataDirName(const char * name) ;
- void Show() const { ShowStatus(fDet, fTask) ; }
- void Show(DETECTORINDEX_t det) const { ShowStatus(det) ; }
+ static void SetQARefDataDirName(AliRecoParam::EventSpecie_t es) { fkgRefDataDirName = AliRecoParam::GetEventSpecieName(es) ; }
+ static void SetQARefDataDirName(Int_t es) { fkgRefDataDirName = AliRecoParam::GetEventSpecieName(es) ; }
+ void Show() const ;
+ void Show(DETECTORINDEX_t det) const ;
void ShowAll() const ;
- void ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk=kNULLTASK) const ;
- void UnSet(QABIT_t bit) ;
+ void ShowStatus(DETECTORINDEX_t det, ALITASK_t tsk=kNULLTASK, AliRecoParam::EventSpecie_t es=AliRecoParam::kDefault) const ;
+ void UnSet(QABIT_t bit, AliRecoParam::EventSpecie_t es) ;
+ void UnSet(QABIT_t bit, Int_t es) ;
private:
Bool_t CheckRange(DETECTORINDEX_t det) const ;
Bool_t CheckRange(ALITASK_t tsk) const ;
Bool_t CheckRange(QABIT_t bit) const ;
+ Bool_t CheckRange(AliRecoParam::EventSpecie_t es) const ;
const char * GetBitName(QABIT_t bit) const ;
- ULong_t GetStatus(DETECTORINDEX_t det) const { return fQA[det] ;}
+ ULong_t GetStatus(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es) const { return fQA[det][(Int_t)TMath::Log2(es)] ;}
void Finish() const ;
ULong_t Offset(ALITASK_t tsk) const ;
- void ShowASCIIStatus(DETECTORINDEX_t det, ALITASK_t tsk, ULong_t status) const ;
- void ResetStatus(DETECTORINDEX_t det) { fQA[det] = 0 ; }
+ void ShowASCIIStatus(AliRecoParam::EventSpecie_t es, DETECTORINDEX_t det, ALITASK_t tsk, ULong_t status) const ;
+ void ResetStatus(DETECTORINDEX_t det) ;
void Set(DETECTORINDEX_t det) { fDet = det ;}
void Set(ALITASK_t tsk) { fTask = tsk ; AliDebug(1, Form("Ready to set QA status in %s", GetAliTaskName(tsk) )) ; }
- void SetStatus(DETECTORINDEX_t det, ULong_t status) { fQA[det] = status ; }
- void SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) ;
- void UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, QABIT_t bit) ;
+ void SetStatus(DETECTORINDEX_t det, AliRecoParam::EventSpecie_t es, ULong_t status) { fQA[det][(Int_t)TMath::Log2(es)] = status ; }
+ void SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
+ void UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ;
static AliQA * fgQA ; // pointer to the instance of the singleton
Int_t fNdet ; // number of detectors
- ULong_t * fQA ; //[fNdet] the status word 4 bits for SIM, REC, ESD, ANA each
- DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....)
- ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA)
+ Int_t fNEventSpecie ; // number of Event Specie (see AliRecoParam)
+ ULong_t ** fQA ; //[fNdet][fNEventSpecie] the status word 4 bits for SIM, REC, ESD, ANA each
+ DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....)
+ ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA)
+ AliRecoParam::EventSpecie_t fEventSpecie ; //! the current event specie
static TString fgDetNames[] ; //! list of detector names
static TString fgGRPPath ; //! path of the GRP object in OCDB
static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results
static const TString fkgRefOCDBDirName ; //! name of Reference directory name in OCDB
static TString fkgRefDataDirName ; //! name of Reference directory name in OCDB for data
static const TString fkgQARefOCDBDefault ; //! default storage for QA in OCDB
+ Bool_t * fEventSpecies ; //[fNEventSpecie] list of event species encountered in a run
ClassDef(AliQA,1) //ALICE Quality Assurance Object
};
fRunInfo(0x0),
fRunInfoOwner(kFALSE),
fRefFile(0x0),
- fFoundDetectors(".")
+ fFoundDetectors("."),
+ fEventSpecie(AliRecoParam::kDefault)
{
// ctor: initialise checkers and open the data file
for (Int_t det = 0 ; det < AliQA::kNDET ; det++)
fRunInfo(qac.fRunInfo),
fRunInfoOwner(kFALSE),
fRefFile(qac.fRefFile),
- fFoundDetectors(qac.fFoundDetectors)
+ fFoundDetectors(qac.fFoundDetectors),
+ fEventSpecie(qac.fEventSpecie)
{
// copy constructor
}
//_____________________________________________________________________________
-void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray *& dirOCDB)
+void AliQAChecker::GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB)
{
// Opens and returns the file with the reference data
dirFile = NULL ;
- dirOCDB = NULL ;
TString refStorage(AliQA::GetQARefStorage()) ;
- //refStorage += AliQA::GetQARefFileName() ;
if (refStorage.Contains(AliQA::GetLabLocalFile())) {
refStorage.ReplaceAll(AliQA::GetLabLocalFile(), "") ;
+ refStorage += AliQA::GetQARefFileName() ;
if ( fRefFile )
if ( fRefFile->IsOpen() )
fRefFile->Close() ;
}
} else if (refStorage.Contains(AliQA::GetLabLocalOCDB()) || refStorage.Contains(AliQA::GetLabAliEnOCDB())) {
AliCDBManager* man = AliCDBManager::Instance() ;
- if ( strcmp(AliQA::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (RUNTYPE)
- // Get it from RunInfo
- if (!fRunInfo) // not yet set, get the info from GRP
- LoadRunInfoFromGRP() ;
- AliQA::SetQARefDataDirName(fRunInfo->GetRunType()) ;
- }
- if ( ! man->GetLock() ) {
- man->SetDefaultStorage(AliQA::GetQARefStorage()) ;
- man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
- }
- char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ;
- AliInfo(Form("Reference QA data are taken from %s", detOCDBDir)) ;
- AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
- if (entry) {
- TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
- if ( listDetQAD )
- dirOCDB = dynamic_cast<TObjArray *>(listDetQAD->FindObject(task)) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ //if ( strcmp(AliQA::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (EventSpecie)
+ // Get it from RunInfo
+ //if (!fRunInfo) // not yet set, get the info from GRP
+ // LoadRunInfoFromGRP() ;
+ AliQA::SetQARefDataDirName(specie) ;
+ //}
+ if ( ! man->GetLock() ) {
+ man->SetDefaultStorage(AliQA::GetQARefStorage()) ;
+ man->SetSpecificStorage("*", AliQA::GetQARefStorage()) ;
+ }
+ char * detOCDBDir = Form("%s/%s/%s", det, AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName()) ;
+ AliCDBEntry * entry = man->Get(detOCDBDir, man->GetRun()) ;
+ if (entry) {
+ dirOCDB = new TObjArray*[AliRecoParam::kNSpecies] ;
+ TList * listDetQAD = dynamic_cast<TList *>(entry->GetObject()) ;
+ TIter next(listDetQAD) ;
+ TObjArray * ar ;
+ while ( ar = (TObjArray*)next() )
+ if ( listDetQAD )
+ dirOCDB[specie] = dynamic_cast<TObjArray *>(listDetQAD->FindObject(Form("%s/%s", task, AliRecoParam::GetEventSpecieName(specie)))) ;
+ }
}
}
}
fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
fRunInfoOwner = kTRUE ;
+
+ // set the event specie
+ fEventSpecie = AliRecoParam::kDefault ;
+ if (strcmp(runType,"PHYSICS")) {
+ // Not a physics run, the event specie is set to kCalib
+ fEventSpecie = AliRecoParam::kCalib ;
+ return;
+ }
+ if (strcmp(lhcState,"STABLE_BEAMS") == 0) {
+ // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
+ fEventSpecie = AliRecoParam::kHighMult ;
+ if ((strcmp(beamType,"p-p") == 0) ||
+ (strcmp(beamType,"p-") == 0) ||
+ (strcmp(beamType,"-p") == 0) ||
+ (strcmp(beamType,"P-P") == 0) ||
+ (strcmp(beamType,"P-") == 0) ||
+ (strcmp(beamType,"-P") == 0)) {
+ // Proton run, the event specie is set to kLowMult
+ fEventSpecie = AliRecoParam::kLowMult ;
+ }
+ else if (strcmp(beamType,"-") == 0) {
+ // No beams, we assume cosmic data
+ fEventSpecie = AliRecoParam::kCosmic ;
+ }
+ else if (strcmp(beamType,"UNKNOWN") == 0) {
+ // No LHC beam information is available, we use the default event specie
+ fEventSpecie = AliRecoParam::kDefault ;
+ }
+ }
}
//_____________________________________________________________________________
Bool_t AliQAChecker::Run(const char * fileName)
{
// run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, recpoints, tracksegments, recparticles and ESDs
- // starting from data in file
-
- Bool_t rv = kFALSE ;
-
+ // starting from data in file
TStopwatch stopwatch;
stopwatch.Start();
for ( det = 0; det < AliQA::kNDET ; det++) {
detName = AliQA::GetDetName(det) ;
if (detNameQA.Contains(detName)) {
- fFoundDetectors+=detName ;
- fFoundDetectors+="." ;
- break ;
+ fFoundDetectors+=detName ;
+ fFoundDetectors+="." ;
+ break ;
}
}
TDirectory * detDir = AliQA::GetQADataFile(fileName)->GetDirectory(detKey->GetName()) ;
taskDir->cd() ;
AliQACheckerBase * qac = GetDetQAChecker(det) ;
if (qac)
- AliInfo(Form("QA checker found for %s", detName.Data())) ;
+ AliInfo(Form("QA checker found for %s", detName.Data())) ;
if (!qac)
- AliFatal(Form("QA checker not found for %s", detName.Data())) ;
+ AliFatal(Form("QA checker not found for %s", detName.Data())) ;
AliQA::ALITASK_t index = AliQA::kNULLTASK ;
if ( taskName == AliQA::GetTaskName(AliQA::kHITS) )
- index = AliQA::kSIM ;
+ index = AliQA::kSIM ;
if ( taskName == AliQA::GetTaskName(AliQA::kSDIGITS) )
- index = AliQA::kSIM ;
+ index = AliQA::kSIM ;
if ( taskName == AliQA::GetTaskName(AliQA::kDIGITS) )
- index = AliQA::kSIM ;
+ index = AliQA::kSIM ;
if ( taskName == AliQA::GetTaskName(AliQA::kRECPOINTS) )
- index = AliQA::kREC ;
+ index = AliQA::kREC ;
if ( taskName == AliQA::GetTaskName(AliQA::kTRACKSEGMENTS) )
- index = AliQA::kREC ;
+ index = AliQA::kREC ;
if ( taskName == AliQA::GetTaskName(AliQA::kRECPARTICLES) )
- index = AliQA::kREC ;
+ index = AliQA::kREC ;
if ( taskName == AliQA::GetTaskName(AliQA::kESDS) )
- index = AliQA::kESD ;
+ index = AliQA::kESD ;
qac->Init(AliQA::DETECTORINDEX_t(det)) ;
-
- TDirectory * refDir = NULL ;
- TObjArray * refOCDBDir = NULL ;
- GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
- if ( refDir || refOCDBDir) {
+
+ TDirectory * refDir = NULL ;
+ TObjArray ** refOCDBDir = NULL ;
+ GetRefSubDir(detNameQA.Data(), taskName.Data(), refDir, refOCDBDir) ;
qac->SetRefandData(refDir, refOCDBDir, taskDir) ;
qac->Run(index) ;
- }
- }
+ }
}
AliInfo("QA performed for following detectors:") ;
for ( Int_t det = 0; det < AliQA::kNDET; det++) {
}
}
printf("\n") ;
- rv = kTRUE ;
-
- return rv ;
-
+ return kTRUE ;
}
//_____________________________________________________________________________
-Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObject * obj)
+Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObjArray ** list)
{
// run the Quality Assurance Checker for detector det, for task task starting from data in list
else if ( task == AliQA::kESDS )
index = AliQA::kESD ;
- TDirectory * refDir = NULL ;
- TObjArray * refOCDBDir = NULL ;
- qac->Init(det) ;
- GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
- if ( refDir || refOCDBDir) // references found
- qac->SetRefandData(refDir, refOCDBDir) ;
-
- TString className(obj->ClassName()) ;
- if (className.Contains(TObjArray::Class()->GetName())) {
- qac->Run(index, static_cast<TObjArray *>(obj)) ;
- } else if (className.Contains(TNtupleD::Class()->GetName())) {
- qac->Run(index, static_cast<TNtupleD *>(obj)) ;
- } else {
- AliError(Form("%s class not implemented", className.Data())) ;
- return kFALSE ;
- }
+ TDirectory * refDir = NULL ;
+ TObjArray ** refOCDBDir = NULL ;
+ qac->Init(det) ;
+ GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
+ qac->SetRefandData(refDir, refOCDBDir) ;
+ qac->Run(index, list) ;
return kTRUE ;
}
+
+//_____________________________________________________________________________
+Bool_t AliQAChecker::Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TNtupleD ** list)
+{
+ // run the Quality Assurance Checker for detector det, for task task starting from data in list
+
+ AliQACheckerBase * qac = GetDetQAChecker(det) ;
+ if (qac)
+ AliDebug(1, Form("QA checker found for %s", AliQA::GetDetName(det).Data())) ;
+ if (!qac)
+ AliError(Form("QA checker not found for %s", AliQA::GetDetName(det).Data())) ;
+
+ AliQA::ALITASK_t index = AliQA::kNULLTASK ;
+ if ( task == AliQA::kRAWS )
+ index = AliQA::kRAW ;
+ else if ( task == AliQA::kHITS )
+ index = AliQA::kSIM ;
+ else if ( task == AliQA::kSDIGITS )
+ index = AliQA::kSIM ;
+ else if ( task == AliQA::kDIGITS )
+ index = AliQA::kSIM ;
+ else if ( task == AliQA::kRECPOINTS )
+ index = AliQA::kREC ;
+ else if ( task == AliQA::kTRACKSEGMENTS )
+ index = AliQA::kREC ;
+ else if ( task == AliQA::kRECPARTICLES )
+ index = AliQA::kREC ;
+ else if ( task == AliQA::kESDS )
+ index = AliQA::kESD ;
+
+ TDirectory * refDir = NULL ;
+ TObjArray ** refOCDBDir = NULL ;
+ qac->Init(det) ;
+ GetRefSubDir(AliQA::GetDetName(det), AliQA::GetTaskName(task), refDir, refOCDBDir) ;
+ qac->SetRefandData(refDir, refOCDBDir) ;
+ qac->Run(index, list) ;
+ return kTRUE ;
+}
#include <TNamed.h>
#include <TFile.h>
+class TNtupleD ;
#include "AliQA.h"
+#include "AliRecoParam.h"
class AliCDBEntry ;
class AliRunInfo ;
class AliQACheckerBase ;
static AliQAChecker * Instance() ;
AliQACheckerBase * GetDetQAChecker(Int_t det) ;
- void GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray *& dirOCDB) ;
+ void GetRefSubDir(const char * det, const char * task, TDirectory *& dirFile, TObjArray **& dirOCDB) ;
// static TFile * GetQAResultFile() ;
// static const char * GetQAResultFileName() { return fgQAResultFileName.Data() ; }
// void SetQAResultDirName(const char * name) ;
// void SetRefDirName(const char * name) ;
virtual Bool_t Run(const char * fileName = NULL) ;
- virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObject * obj = NULL);
+ virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObjArray ** list);
+ virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TNtupleD ** list);
void SetRunInfo(AliRunInfo * ei) {fRunInfo = ei;}
private:
void LoadRunInfoFromGRP() ;
- static AliQAChecker *fgQAChecker ; // pointer to the instance of the singleton
- TFile * fDataFile ; //! Data file to check
- AliRunInfo * fRunInfo ; //! Event info object
- Bool_t fRunInfoOwner; //! owns fRunInfo or not
- TFile * fRefFile ; //! Reference Data file
- TString fFoundDetectors ; //! detectors for which the Quality assurance could be done
- AliQACheckerBase * fCheckers[AliQA::kNDET] ; //! list of detectors checkers
+ static AliQAChecker * fgQAChecker ; // pointer to the instance of the singleton
+ TFile * fDataFile ; //! Data file to check
+ AliRunInfo * fRunInfo ; //! Event info object
+ Bool_t fRunInfoOwner; //! owns fRunInfo or not
+ TFile * fRefFile ; //! Reference Data file
+ TString fFoundDetectors ; //! detectors for which the Quality assurance could be done
+ AliQACheckerBase * fCheckers[AliQA::kNDET] ; //! list of detectors checkers
+ AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie deduced from the GRP data
ClassDef(AliQAChecker, 1) // class for running generation, simulation and digitization
};
#endif
TNamed(name, title),
fDataSubDir(0x0),
fRefSubDir(0x0),
- fRefOCDBSubDir(0x0)
+ fRefOCDBSubDir(0x0),
+ fLowTestValue(0x0),
+ fUpTestValue(0x0)
{
// ctor
+ fLowTestValue = new Float_t[AliQA::kNBIT] ;
+ fUpTestValue = new Float_t[AliQA::kNBIT] ;
+ fLowTestValue[AliQA::kINFO] = 0.5 ;
+ fUpTestValue[AliQA::kINFO] = 1.0 ;
+ fLowTestValue[AliQA::kWARNING] = 0.002 ;
+ fUpTestValue[AliQA::kWARNING] = 0.5 ;
+ fLowTestValue[AliQA::kERROR] = 0.0 ;
+ fUpTestValue[AliQA::kERROR] = 0.002 ;
+ fLowTestValue[AliQA::kFATAL] = -1.0 ;
+ fUpTestValue[AliQA::kFATAL] = 0.0 ;
+
+ AliInfo("Default setting is:") ;
+ printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ;
+ printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ;
+ printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ;
+ printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ;
+
}
//____________________________________________________________________________
TNamed(qac.GetName(), qac.GetTitle()),
fDataSubDir(qac.fDataSubDir),
fRefSubDir(qac.fRefSubDir),
- fRefOCDBSubDir(qac.fRefOCDBSubDir)
+ fRefOCDBSubDir(qac.fRefOCDBSubDir),
+ fLowTestValue(qac.fLowTestValue),
+ fUpTestValue(qac.fLowTestValue)
{
//copy ctor
+ for (Int_t index = 0 ; index < AliQA::kNBIT ; index++) {
+ fLowTestValue[index] = qac.fLowTestValue[index] ;
+ fUpTestValue[index] = qac.fUpTestValue[index] ;
+ }
}
return *this;
}
+//____________________________________________________________________________
+AliQACheckerBase::~AliQACheckerBase()
+{
+ delete [] fLowTestValue ;
+ delete [] fUpTestValue ;
+}
+
//____________________________________________________________________________
-Double_t AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/)
+Double_t * AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/)
{
// Performs a basic checking
// Compares all the histograms stored in the directory
// With reference histograms either in a file of in OCDB
- Double_t test = 0.0 ;
- Int_t count = 0 ;
-
- if (!fDataSubDir)
- test = 1. ; // nothing to check
- else
- if (!fRefSubDir && !fRefOCDBSubDir)
- test = -1 ; // no reference data
- else {
- TList * keyList = fDataSubDir->GetListOfKeys() ;
- TIter next(keyList) ;
- TKey * key ;
- count = 0 ;
- while ( (key = static_cast<TKey *>(next())) ) {
- TObject * odata = fRefSubDir->Get(key->GetName()) ;
- if ( odata->IsA()->InheritsFrom("TH1") ) {
- TH1 * hdata = static_cast<TH1*>(odata) ;
- TH1 * href = NULL ;
- if (fRefSubDir)
- href = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
- else if (fRefOCDBSubDir) {
- href = static_cast<TH1*>(fRefOCDBSubDir->FindObject(key->GetName())) ;
- }
- if (!href)
- test = -1 ; // no reference data ;
- else {
- Double_t rv = DiffK(hdata, href) ;
- AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
- test += rv ;
- count++ ;
- }
- } else
- AliError(Form("%s Is a Classname that cannot be processed", key->GetClassName())) ;
- }
- }
-
- if (count != 0)
- test /= count ;
-
- return test ;
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ Int_t count[AliRecoParam::kNSpecies] = { 0 };
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ test[specie] = 1.0 ;
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ if (!fDataSubDir) {
+ test[specie] = 0. ; // nothing to check
+ } else if (!fRefSubDir && !fRefOCDBSubDir) {
+ test[specie] = -1 ; // no reference data
+ } else {
+ TList * keyList = fDataSubDir->GetListOfKeys() ;
+ TIter next(keyList) ;
+ TKey * key ;
+ count[specie] = 0 ;
+ while ( (key = static_cast<TKey *>(next())) ) {
+ TObject * odata = fRefSubDir->Get(key->GetName()) ;
+ if ( odata->IsA()->InheritsFrom("TH1") ) {
+ TH1 * hdata = static_cast<TH1*>(odata) ;
+ TH1 * href = NULL ;
+ if (fRefSubDir)
+ href = static_cast<TH1*>(fRefSubDir->Get(key->GetName())) ;
+ else if (fRefOCDBSubDir[specie]) {
+ href = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(key->GetName())) ;
+ }
+ if (!href)
+ test[specie] = -1 ; // no reference data ;
+ else {
+ Double_t rv = DiffK(hdata, href) ;
+ AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
+ test[specie] += rv ;
+ count[specie]++ ;
+ }
+ } else
+ AliError(Form("%s Is a Classname that cannot be processed", key->GetClassName())) ;
+ }
+ if (count[specie] != 0)
+ test[specie] /= count[specie] ;
+ }
+ }
+ return test ;
}
//____________________________________________________________________________
-Double_t AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/, TObjArray * list)
+Double_t * AliQACheckerBase::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
{
// Performs a basic checking
// Compares all the histograms in the list
- Double_t test = 0.0 ;
- Int_t count = 0 ;
-
- if (list->GetEntries() == 0)
- test = 1. ; // nothing to check
- else {
- if (!fRefSubDir)
- test = -1 ; // no reference data
- else {
- TIter next(list) ;
- TH1 * hdata ;
- count = 0 ;
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
- if ( hdata) {
- TH1 * href = NULL ;
- if (fRefSubDir)
- href = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName())) ;
- else if (fRefOCDBSubDir)
- href = static_cast<TH1*>(fRefOCDBSubDir->FindObject(hdata->GetName())) ;
- if (!href)
- test = -1 ; // no reference data ;
- else {
- Double_t rv = DiffK(hdata, href) ;
- AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
- test += rv ;
- count++ ;
- }
- }
- else
- AliError("Data type cannot be processed") ;
- }
- }
- }
- if (count != 0)
- test /= count ;
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ Int_t count[AliRecoParam::kNSpecies] = { 0 };
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ test[specie] = 1.0 ;
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ if (list[specie]->GetEntries() == 0)
+ test[specie] = 0. ; // nothing to check
+ else {
+ if (!fRefSubDir && !fRefOCDBSubDir)
+ test[specie] = -1 ; // no reference data
+ else {
+ TIter next(list[specie]) ;
+ TH1 * hdata ;
+ count[specie] = 0 ;
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if ( hdata) {
+ if ( hdata->TestBit(AliQA::GetExpertBit()) ) // does not perform the test for expert data
+ continue ;
+ TH1 * href = NULL ;
+ if (fRefSubDir)
+ href = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName())) ;
+ else if (fRefOCDBSubDir[specie])
+ href = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(hdata->GetName())) ;
+ if (!href)
+ test[specie] = -1 ; // no reference data ;
+ else {
+ Double_t rv = DiffK(hdata, href) ;
+ AliInfo(Form("%s ->Test = %f", hdata->GetName(), rv)) ;
+ test[specie] += rv ;
+ count[specie]++ ;
+ }
+ }
+ else
+ AliError("Data type cannot be processed") ;
+ }
+ if (count[specie] != 0)
+ test[specie] /= count[specie] ;
+ }
+ }
+ }
return test ;
}
+
//____________________________________________________________________________
Double_t AliQACheckerBase::DiffC(const TH1 * href, const TH1 * hin) const
{
return hin->KolmogorovTest(href) ;
}
-//____________________________________________________________________________
-void AliQACheckerBase::Init(const AliQA::DETECTORINDEX_t det)
-{
- AliQA::Instance(det) ;
-}
-
-
//____________________________________________________________________________
-void AliQACheckerBase::Run(AliQA::ALITASK_t index, TObject * obj)
+void AliQACheckerBase::Run(AliQA::ALITASK_t index, TObjArray ** list)
{
AliDebug(1, Form("Processing %s", AliQA::GetAliTaskName(index))) ;
- Double_t rv = -1 ;
- if ( !obj ) {
+ Double_t * rv = NULL ;
+ if ( !list)
rv = Check(index) ;
- } else {
- TString className(obj->IsA()->GetName()) ;
- if (className.Contains("TObjArray")) {
- rv = Check(index, static_cast<TObjArray *>(obj)) ;
- } else if (className.Contains("TNtupleD")) {
- rv = Check(index, static_cast<TNtupleD *>(obj)) ;
- } else {
- AliError(Form("%s class not implemented", className.Data())) ;
- }
- }
-
+ else
+ rv = Check(index, list) ;
SetQA(index, rv) ;
AliDebug(1, Form("Test result of %s", AliQA::GetAliTaskName(index))) ;
+ if (rv)
+ delete [] rv ;
Finish() ;
}
}
//____________________________________________________________________________
-void AliQACheckerBase::SetQA(AliQA::ALITASK_t index, Double_t value) const
+void AliQACheckerBase::SetHiLo(Float_t * hiValue, Float_t * lowValue)
{
- // sets the QA according the return value of the Check
+ AliInfo("Previous setting was:") ;
+ printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ;
+ printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ;
+ printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ;
+ printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ;
+
+ for (Int_t index = 0 ; index < AliQA::kNBIT ; index++) {
+ fLowTestValue[index] = lowValue[index] ;
+ fUpTestValue[index] = hiValue[index] ;
+ }
+ AliInfo("Current setting is:") ;
+ printf( " INFO -> %1.5f < value < %1.5f \n", fLowTestValue[AliQA::kINFO], fUpTestValue[AliQA::kINFO]) ;
+ printf( " WARNING -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kWARNING], fUpTestValue[AliQA::kWARNING]) ;
+ printf( " ERROR -> %1.5f < value <= %1.5f \n", fLowTestValue[AliQA::kERROR], fUpTestValue[AliQA::kERROR]) ;
+ printf( " FATAL -> %1.5f <= value < %1.5f \n", fLowTestValue[AliQA::kFATAL], fUpTestValue[AliQA::kFATAL]) ;
+}
- AliQA * qa = AliQA::Instance(index) ;
+//____________________________________________________________________________
+void AliQACheckerBase::SetQA(AliQA::ALITASK_t index, Double_t * value) const
+{
+ // sets the QA according the return value of the Check
- if ( value <= 0.)
- qa->Set(AliQA::kFATAL) ;
- else if ( value > 0 && value <= 0.0002 )
- qa->Set(AliQA::kERROR) ;
- else if ( value > 0.0002 && value <= 0.5 )
- qa->Set(AliQA::kWARNING) ;
- else if ( value > 0.5 && value < 1 )
- qa->Set(AliQA::kINFO) ;
+ AliQA * qa = AliQA::Instance(index) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( value == NULL ) { // No checker is implemented, set all QA to Fatal
+ qa->Set(AliQA::kFATAL, specie) ;
+ } else {
+ if ( value[specie] >= fLowTestValue[AliQA::kFATAL] && value[specie] < fUpTestValue[AliQA::kFATAL] )
+ qa->Set(AliQA::kFATAL, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kERROR] && value[specie] <= fUpTestValue[AliQA::kERROR] )
+ qa->Set(AliQA::kERROR, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kWARNING] && value[specie] <= fUpTestValue[AliQA::kWARNING] )
+ qa->Set(AliQA::kWARNING, specie) ;
+ else if ( value[specie] > fLowTestValue[AliQA::kINFO] && value[specie] <= fUpTestValue[AliQA::kINFO] )
+ qa->Set(AliQA::kINFO, specie) ;
+ }
+ }
}
AliQACheckerBase(const char * name = "", const char * title = "") ; // ctor
AliQACheckerBase(const AliQACheckerBase& qac) ;
AliQACheckerBase& operator = (const AliQACheckerBase& qac) ;
- virtual ~AliQACheckerBase() {;} // dtor
+ virtual ~AliQACheckerBase() ; // dtor
- void Init(const AliQA::DETECTORINDEX_t det) ;
- void Run(AliQA::ALITASK_t tsk, TObject * obj = NULL);
- void SetRefandData(TDirectory * ref, TObjArray * refOCDB, TDirectory * data=NULL) { fRefSubDir = ref ; fRefOCDBSubDir = refOCDB, fDataSubDir = data ; }
+ virtual void Init(const AliQA::DETECTORINDEX_t det) { AliQA::Instance(det) ; }
+ void Run(AliQA::ALITASK_t tsk, TObjArray ** list = NULL);
+ void Run(AliQA::ALITASK_t /*tsk*/, TNtupleD ** /*nt*/) {;}
+ void SetHiLo(Float_t * hiValue, Float_t * lowValue) ;
+ void SetRefandData(TDirectory * ref, TObjArray ** refOCDB, TDirectory * data=NULL) { fRefSubDir = ref ; fRefOCDBSubDir = refOCDB, fDataSubDir = data ; }
protected:
- virtual Double_t Check(AliQA::ALITASK_t index) ;
- virtual Double_t Check(AliQA::ALITASK_t, TObjArray *) ;
- virtual Double_t Check(AliQA::ALITASK_t, TNtupleD *) { return -1.0 ;}
- Double_t DiffC(const TH1 * href, const TH1 * hin) const ;
- Double_t DiffK(const TH1 * href, const TH1 * hin) const ;
- void Finish() const ;
- virtual void SetQA(AliQA::ALITASK_t index, Double_t value) const ;
-
- TDirectory * fDataSubDir ; //! directory for the current task directory in the current detector directory in the data file
- TDirectory * fRefSubDir ; //! directory for the current task directory in the current detector directory in the reference file
- TObjArray * fRefOCDBSubDir ; //! Entry in OCDB for the current detector
+ virtual Double_t * Check(AliQA::ALITASK_t index) ;
+ virtual Double_t * Check(AliQA::ALITASK_t, TObjArray **) ;
+
+ Double_t DiffC(const TH1 * href, const TH1 * hin) const ;
+ Double_t DiffK(const TH1 * href, const TH1 * hin) const ;
+ void Finish() const ;
+ virtual void SetQA(AliQA::ALITASK_t index, Double_t * value) const ;
+
+ TDirectory * fDataSubDir ; //! directory for the current task directory in the current detector directory in the data file
+ TDirectory * fRefSubDir ; //! directory for the current task directory in the current detector directory in the reference file
+ TObjArray ** fRefOCDBSubDir ; //! Entry in OCDB for the current detector
+ Float_t * fLowTestValue ; // array of lower bounds for INFO, WARNING, ERROR, FATAL
+ Float_t * fUpTestValue ; // array of upper bounds for INFO, WARNING, ERROR, FATAL
ClassDef(AliQACheckerBase,1) // description
#include <TTree.h>
#include <TClonesArray.h>
#include <TParameter.h>
+#include <TH1K.h>
+#include <TH2C.h>
+#include <TH2D.h>
+#include <TH2F.h>
+#include <TH2I.h>
+#include <TH3C.h>
+#include <TH3D.h>
+#include <TH3F.h>
+#include <TH3I.h>
+#include <TH3S.h>
// --- Standard library ---
fCycle(9999999),
fCycleCounter(0),
fWriteExpert(kFALSE),
- fParameterList(0x0),
- fRun(0)
+ fParameterList(new TList*[AliRecoParam::kNSpecies]),
+ fRun(0),
+ fEventSpecie(AliRecoParam::kDefault)
{
// ctor
fDetectorDirName = GetName() ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ fParameterList[specie] = NULL ;
}
//____________________________________________________________________________
fCycleCounter(qadm.fCycleCounter),
fWriteExpert(qadm.fWriteExpert),
fParameterList(qadm.fParameterList),
- fRun(qadm.fRun)
+ fRun(qadm.fRun),
+ fEventSpecie(qadm.fEventSpecie)
{
//copy ctor
fDetectorDirName = GetName() ;
}
//____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert, const Bool_t saveForCorr)
+Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert, const Bool_t saveForCorr)
{
// Set histograms memory resident and add to the list
// Maximm allowed is 10000
- TString className(hist->ClassName()) ;
- if( ! className.BeginsWith("T") ) {
- AliError(Form("QA data Object must be a generic ROOT object and not %s", className.Data())) ;
-// return -1 ;
- }
- if ( index > 10000 ) {
+
+ Int_t rv = -1 ;
+ TClass * classType = hist->Class() ;
+ TString className(classType->GetName()) ;
+ if( ! className.BeginsWith("T") && ! classType->InheritsFrom("TH1") ) {
+ AliError(Form("QA data Object must be a generic ROOT object and derive fom TH1 and not %s", className.Data())) ;
+ } else if ( index > 10000 ) {
AliError("Max number of authorized QA objects is 10000") ;
- return -1 ;
- } else {
- hist->SetDirectory(0) ;
-
+ } else {
if (expert)
hist->SetBit(AliQA::GetExpertBit()) ;
-
- list->AddAtAndExpand(hist, index) ;
- char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;
- TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
- if(saveForCorr) {
- if ( ! fParameterList )
- fParameterList = new TList() ;
- fParameterList->Add(p) ;
+ TH1 * histClone[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ histClone[specie] = CloneMe(hist, specie) ;
+ histClone[specie]->SetDirectory(0) ;
+ list[specie]->AddAtAndExpand(histClone[specie], index) ;
+ if(saveForCorr) {
+ char * name = Form("%s_%s", list[AliRecoParam::kDefault]->GetName(), hist->GetName()) ;
+ TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
+ if ( fParameterList[specie] == NULL )
+ fParameterList[specie] = new TList() ;
+ fParameterList[specie]->Add(p) ;
+ }
}
- return list->GetLast() ;
+ rv = list[AliRecoParam::kDefault]->GetLast() ;
}
+ delete hist ;
+ return rv ;
+}
+
+//____________________________________________________________________________
+TH1 * AliQADataMaker::CloneMe(TH1 * hist, Int_t specie) const
+{
+ // clones a histogram
+ char * name = Form("%s_%s", AliRecoParam::GetEventSpecieName(specie), hist->GetName()) ;
+ return dynamic_cast<TH1 *>(hist->Clone(name)) ;
}
//____________________________________________________________________________
// sets the QA result to Fatal
AliQA::Instance(AliQA::GetDetIndex(GetName())) ;
AliQA * qa = AliQA::Instance(task) ;
- qa->Set(AliQA::kFATAL) ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ qa->Set(AliQA::kFATAL, specie) ;
AliQA::GetQAResultFile()->cd() ;
qa->Write(AliQA::GetQAName(), kWriteDelete) ;
AliQA::GetQAResultFile()->Close() ;
}
//____________________________________________________________________________
-TObject * AliQADataMaker::GetData(TObjArray * list, const Int_t index)
+TObject * AliQADataMaker::GetData(TObjArray ** list, const Int_t index)
{
// Returns the QA object at index. Limit is 100.
- if (list) {
+ if (list[AliRecoParam::AConvert(fEventSpecie)]) {
if ( index > 10000 ) {
AliError("Max number of authorized QA objects is 10000") ;
return NULL ;
} else {
- return list->At(index) ;
+ Int_t esindex = AliRecoParam::AConvert(fEventSpecie) ;
+ return list[esindex]->At(index) ;
}
- } else {
+ } else {
AliError("Data list is NULL !!") ;
return NULL ;
}
// --- AliRoot header files ---
#include "AliQA.h"
+#include "AliRecoParam.h"
class AliQADataMaker: public TNamed {
virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) = 0 ;
virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ;
- virtual void Exec(AliQA::TASKINDEX_t, TObject * data) = 0 ;
- virtual void EndOfCycle() = 0 ;
- virtual void EndOfCycle(AliQA::TASKINDEX_t) = 0 ;
+ virtual void Exec(AliQA::TASKINDEX_t, TObject * data) = 0 ;
+ virtual void EndOfCycle() = 0 ;
+ virtual void EndOfCycle(AliQA::TASKINDEX_t ) = 0 ;
void Finish() const ;
virtual TH1 * GetDigitsData(const Int_t index) = 0 ;
virtual TH1 * GetESDsData(const Int_t index) = 0 ;
virtual TH1 * GetRawsData(const Int_t index) = 0 ;
virtual TH1 * GetSDigitsData(const Int_t index) = 0 ;
const char * GetDetectorDirName() const { return fDetectorDirName.Data() ; }
- TList * GetParameterList() const { return fParameterList ; }
- Int_t Increment() { return ++fCycleCounter ; }
- virtual TObjArray * Init(AliQA::TASKINDEX_t, Int_t cycles = -1) = 0 ;
- virtual void Init(AliQA::TASKINDEX_t, TObjArray * list, Int_t run, Int_t cycles = -1) = 0 ;
- Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
+ TList * GetParameterList() const { return fParameterList[AliRecoParam::AConvert(fEventSpecie)] ; }
+ Int_t Increment() { return ++fCycleCounter ; }
+ virtual TObjArray** Init(AliQA::TASKINDEX_t, Int_t cycles = -1) = 0 ;
+ virtual void Init(AliQA::TASKINDEX_t, TObjArray ** list, Int_t run, Int_t cycles = -1) = 0 ;
+ Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
void Reset() { fCycleCounter = 0 ; }
void SetCycle(Int_t nevts) { fCycle = nevts ; }
void SetWriteExpert() { fWriteExpert = kTRUE ; }
- virtual void StartOfCycle(Int_t run = -1) = 0 ;
+ virtual void StartOfCycle(Int_t run = -1) = 0 ;
virtual void StartOfCycle(AliQA::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ;
void UnSetWriteExpert() { fWriteExpert = kFALSE ; }
Bool_t WriteExpert() { return fWriteExpert ; }
-
- virtual void SetRecoParam(const AliDetectorRecoParam */*param*/) { return; }
+ void SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; }
+ void SetEventSpecie(Int_t es) { fEventSpecie = AliRecoParam::Convert(es) ; }
+ virtual void SetRecoParam(const AliDetectorRecoParam */*param*/) {AliInfo("To be implemented by AliQADataMakerRec, not needed yet in Sim") ; }
protected:
- Int_t Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
+ Int_t Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
+ TH1 * CloneMe(TH1 * hist, Int_t specie) const ;
virtual void DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * obj ) = 0 ;
- TObject * GetData(TObjArray * list, const Int_t index) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list ) = 0 ;
+ TObject * GetData(TObjArray ** list, const Int_t index) ;
virtual void InitDigits() = 0 ;
virtual void InitESDs() = 0 ;
virtual void InitHits() = 0 ;
Int_t fCycle ; //! length (# events) of the QA data acquisition cycle
Int_t fCycleCounter ; //! cycle counter
Bool_t fWriteExpert ; //! flag to write or not the expert QA data
- TList * fParameterList ; //! list of QA data parameters
+ TList ** fParameterList ; //! list of QA data parameters
Int_t fRun ; //! run number
-
+ AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
private:
AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented
// --- ROOT system ---
#include <TFile.h>
#include <TTree.h>
+#include <TNtupleD.h>
// --- Standard library ---
fESDsQAList(NULL),
fRawsQAList(NULL),
fRecPointsQAList(NULL),
- fObject(NULL),
+ fCorrNt(NULL),
fRecoParam(NULL)
{
// ctor
fESDsQAList(qadm.fESDsQAList),
fRawsQAList(qadm.fRawsQAList),
fRecPointsQAList(qadm.fRecPointsQAList),
- fObject(qadm.fObject),
+ fCorrNt(qadm.fCorrNt),
fRecoParam(qadm.fRecoParam)
{
//copy ctor
{
//dtor: delete the TObjArray and thei content
if ( fESDsQAList ) {
- if ( fESDsQAList->IsOwner() )
- fESDsQAList->Delete() ;
- delete fESDsQAList ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fESDsQAList[specie] ) {
+ if ( fESDsQAList[specie]->IsOwner() )
+ fESDsQAList[specie]->Delete() ;
+ }
+ }
+ delete[] fESDsQAList ;
}
if ( fRawsQAList ) {
- if ( fRawsQAList->IsOwner() )
- fRawsQAList->Delete() ;
- delete fRawsQAList ;
- }
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fRawsQAList[specie] ) {
+ if ( fRawsQAList[specie]->IsOwner() )
+ fRawsQAList[specie]->Delete() ;
+ }
+ }
+ delete[] fRawsQAList ;
+ }
if ( fRecPointsQAList ) {
- if ( fRecPointsQAList->IsOwner() )
- fRecPointsQAList->Delete() ;
- delete fRecPointsQAList ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fRecPointsQAList[specie] ) {
+ if ( fRecPointsQAList[specie]->IsOwner() )
+ fRecPointsQAList[specie]->Delete() ;
+ }
+ }
+ delete[] fRecPointsQAList ;
}
}
{
// Finishes a cycle of QA
- TObjArray * list = NULL ;
+ TObjArray ** list = NULL ;
if ( task == AliQA::kRAWS )
list = fRawsQAList ;
list = fESDsQAList ;
- if ( ! list && ! fObject )
+ if ( ! list && ! fCorrNt )
return ;
//DefaultEndOfDetectorCycle(task) ;
EndOfDetectorCycle(task, list) ;
subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if ( subDir ) {
subDir->cd() ;
- if (list) {
- TIter next(list) ;
- TObject * obj ;
- while( (obj = next()) ) {
- if (!obj->TestBit(AliQA::GetExpertBit()))
- obj->Write() ;
- }
- if (WriteExpert()) {
- TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
- if ( expertDir ) { // Write only if requested
- expertDir->cd() ;
- next.Reset() ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+ if (eventSpecieDir) {
+ eventSpecieDir->cd() ;
+ if (list[specie]) {
+ TIter next(list[specie]) ;
+ TObject * obj ;
while( (obj = next()) ) {
if (!obj->TestBit(AliQA::GetExpertBit()))
- continue ;
- obj->Write() ;
- }
+ obj->Write() ;
+ }
+ if (WriteExpert()) {
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ;
+ if ( expertDir ) { // Write only if requested
+ expertDir->cd() ;
+ next.Reset() ;
+ while( (obj = next()) ) {
+ if (!obj->TestBit(AliQA::GetExpertBit()))
+ continue ;
+ obj->Write() ;
+ }
+ }
+ }
+ }
+ if ( !fCorrNt )
+ continue ;
+ if (fCorrNt[specie] && AliQA::GetDetIndex(GetName()) == AliQA::kCORR) {
+ eventSpecieDir->cd() ;
+ fCorrNt[specie]->Write() ;
}
}
}
- if (fObject && AliQA::GetDetIndex(GetName()) == AliQA::kCORR) {
- subDir->cd() ;
- fObject->Write() ;
- }
fOutput->Save() ;
}
}
}
//____________________________________________________________________________
-TObjArray * AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t cycles)
+TObjArray ** AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t cycles)
{
// general intialisation
-
- TObjArray * rv = NULL ;
+
+ TObjArray ** rv = NULL ;
if (cycles > 0)
SetCycle(cycles) ;
if ( task == AliQA::kRAWS ) {
if (! fRawsQAList ) {
- fRawsQAList = new TObjArray(100) ;
- fRawsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ;
+ fRawsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fRawsQAList[specie] = new TObjArray(100) ;
+ fRawsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
InitRaws() ;
}
rv = fRawsQAList ;
} else if ( task == AliQA::kRECPOINTS ) {
if ( ! fRecPointsQAList ) {
- fRecPointsQAList = new TObjArray(100) ;
- fRecPointsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ;
- InitRecPoints() ;
+ fRecPointsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fRecPointsQAList[specie] = new TObjArray(100) ;
+ fRecPointsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
+ InitRecPoints() ;
}
rv = fRecPointsQAList ;
} else if ( task == AliQA::kESDS ) {
if ( ! fESDsQAList ) {
- fESDsQAList = new TObjArray(100) ;
- fESDsQAList->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data())) ;
+ fESDsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fESDsQAList[specie] = new TObjArray(100) ;
+ fESDsQAList[specie]->SetName(Form("%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
InitESDs() ;
}
rv = fESDsQAList ;
}
-
return rv ;
}
//____________________________________________________________________________
-void AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles)
+void AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles)
{
// Intialisation by passing the list of QA data booked elsewhere
TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (!subDir)
subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;
-
- TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
- if (!expertDir)
- expertDir = subDir->mkdir(AliQA::GetExpert()) ;
- subDir->cd() ;
-
-
+ for ( Int_t specie = AliRecoParam::kDefault ; specie < AliRecoParam::kNSpecies ; specie++ ) {
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+ if (!eventSpecieDir)
+ eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(specie)) ;
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ;
+ if (!expertDir)
+ expertDir = eventSpecieDir->mkdir(AliQA::GetExpert()) ;
+ }
StartOfDetectorCycle() ;
}
//
// --- ROOT system ---
-
+class TNtupleD ;
// --- Standard library ---
// --- AliRoot header files ---
virtual void Exec(AliQA::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQA::TASKINDEX_t task) ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * ) {AliInfo("To be implemented by detectors");}
- virtual TH1 * GetDigitsData(const Int_t /*index*/) { return NULL ; }
- virtual TH1 * GetESDsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
- virtual TH1 * GetHitsData(const Int_t /*index*/) { return NULL ; }
- virtual TH1 * GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
- virtual TH1 * GetRawsData(const Int_t index) { return fRawsQAList ? dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) : NULL ; }
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");}
+ virtual TH1 * GetDigitsData(const Int_t /*index*/) { return NULL ; }
+ virtual TH1 * GetESDsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
+ virtual TH1 * GetHitsData(const Int_t /*index*/) { return NULL ; }
+ virtual TH1 * GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
+ virtual TH1 * GetRawsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
virtual TH1 * GetSDigitsData(const Int_t /*index*/) { return NULL ; }
- virtual TObjArray * Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
- virtual void Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles = -1) ;
+ virtual TObjArray** Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
+ virtual void Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ;
virtual void StartOfCycle(Int_t run = -1) ;
virtual void StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ;
virtual void MakeSDigits(TTree * ) {AliWarning("Call not valid") ; }
virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
- TObjArray * fESDsQAList ; //! list of the ESDs QA data objects
- TObjArray * fRawsQAList ; //! list of the raws QA data objects
- TObjArray * fRecPointsQAList ; //! list of the RecPoints QA data objects
- TObject * fObject ; //! This is used by Corr only to hold its Ntuple. Allows to write something else than TH1 to QA data file
+ TObjArray * * fESDsQAList ; //! list of the ESDs QA data objects
+ TObjArray * * fRawsQAList ; //! list of the raws QA data objects
+ TObjArray * * fRecPointsQAList ; //! list of the RecPoints QA data objects
+ TNtupleD * * fCorrNt ; //! This is used by Corr only to hold its Ntuple.
const AliDetectorRecoParam *fRecoParam; //! const pointer to the reco parameters to be used in the reco QA
ClassDef(AliQADataMakerRec,2) // description
{
//dtor: delete the TObjArray and thei content
if ( fDigitsQAList ) {
- if ( fDigitsQAList->IsOwner() )
- fDigitsQAList->Delete() ;
- delete fDigitsQAList ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fDigitsQAList[specie]->IsOwner() )
+ fDigitsQAList[specie]->Delete() ;
+ }
+ delete[] fDigitsQAList ;
}
if ( fHitsQAList ) {
- if ( fHitsQAList->IsOwner() )
- fHitsQAList->Delete() ;
- delete fHitsQAList ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fHitsQAList[specie]->IsOwner() )
+ fHitsQAList[specie]->Delete() ;
+ }
+ delete[] fHitsQAList ;
}
if ( fSDigitsQAList ) {
- if ( fSDigitsQAList->IsOwner() )
- fSDigitsQAList->Delete() ;
- delete fSDigitsQAList ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( fSDigitsQAList[specie]->IsOwner() )
+ fSDigitsQAList[specie]->Delete() ;
+ }
+ delete[] fSDigitsQAList ;
}
}
void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task)
{
// Finishes a cycle of QA data acquistion
- TObjArray * list = 0x0 ;
+ TObjArray ** list = NULL ;
if ( task == AliQA::kHITS )
list = fHitsQAList ;
subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (subDir) {
subDir->cd() ;
- TIter next(list) ;
- TH1 * obj ;
- while ( (obj = dynamic_cast<TH1 *>(next())) ) {
- if (!obj->TestBit(AliQA::GetExpertBit()))
- obj->Write() ;
- }
- if (WriteExpert()) {
- TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
- if ( expertDir ) {
- expertDir->cd() ;
- next.Reset() ;
- while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ;
+ if (eventSpecieDir) {
+ eventSpecieDir->cd() ;
+ TIter next(list[specie]) ;
+ TObject * obj ;
+ while ( (obj = next()) ) {
if (!obj->TestBit(AliQA::GetExpertBit()))
- continue ;
- obj->Write() ;
- }
+ obj->Write() ;
+ }
+ if (WriteExpert()) {
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ;
+ if ( expertDir ) {
+ expertDir->cd() ;
+ next.Reset() ;
+ while ( (obj = next()) ) {
+ if (!obj->TestBit(AliQA::GetExpertBit()))
+ continue ;
+ obj->Write() ;
+ }
+ }
+ }
}
}
+ fOutput->Save() ;
}
- fOutput->Save() ;
ResetCycle() ;
}
}
//____________________________________________________________________________
-TObjArray * AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, Int_t cycles)
+TObjArray ** AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, Int_t cycles)
{
// general intialisation
if (cycles > 0)
SetCycle(cycles) ;
- TObjArray * rv = NULL ;
+ TObjArray ** rv = NULL ;
if ( task == AliQA::kHITS ) {
if ( ! fHitsQAList ) {
- fHitsQAList = new TObjArray(100) ;
- fHitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ;
+ fHitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fHitsQAList[specie] = new TObjArray(100) ;
+ fHitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
InitHits() ;
}
rv = fHitsQAList ;
} else if ( task == AliQA::kSDIGITS ) {
if ( ! fSDigitsQAList ) {
- fSDigitsQAList = new TObjArray(100) ;
- fSDigitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ;
- InitSDigits() ;
+ fSDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fSDigitsQAList[specie] = new TObjArray(100) ;
+ fSDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
+ InitSDigits() ;
}
rv = fSDigitsQAList ;
} else if ( task == AliQA::kDIGITS ) {
if ( ! fDigitsQAList ) {
- fDigitsQAList = new TObjArray(100) ;
- fDigitsQAList->SetName(Form("%s/%s", GetName(), AliQA::GetTaskName(task).Data())) ;
+ fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fDigitsQAList[specie] = new TObjArray(100) ;
+ fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ;
+ }
InitDigits() ;
}
rv = fDigitsQAList ;
}
//____________________________________________________________________________
-void AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles)
+void AliQADataMakerSim::Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles)
{
// Intialisation by passing the list of QA data booked elsewhere
if (!subDir)
subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;
- TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
- if (!expertDir)
- expertDir = subDir->mkdir(AliQA::GetExpert()) ;
-
- subDir->cd() ;
-
+ for ( Int_t index = AliRecoParam::kDefault ; index < AliRecoParam::kNSpecies ; index++ ) {
+ TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(index)) ;
+ if (!eventSpecieDir)
+ eventSpecieDir = subDir->mkdir(AliRecoParam::GetEventSpecieName(index)) ;
+ TDirectory * expertDir = eventSpecieDir->GetDirectory(AliQA::GetExpert()) ;
+ if (!expertDir)
+ expertDir = eventSpecieDir->mkdir(AliQA::GetExpert()) ;
+ }
StartOfDetectorCycle() ;
}
virtual void Exec(AliQA::TASKINDEX_t task, TObject * data) ;
virtual void EndOfCycle() ;
virtual void EndOfCycle(AliQA::TASKINDEX_t task) ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * ) {AliInfo("To be implemented by detectors");}
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** ) {AliInfo("To be implemented by detectors");}
virtual TH1 * GetDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
virtual TH1 * GetESDsData(const Int_t /*index*/) { return NULL ; }
virtual TH1 * GetHitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
virtual TH1 * GetRecPointsData(const Int_t /*index*/) { return NULL ; }
virtual TH1 * GetRawsData(const Int_t /*index*/) { return NULL ; }
virtual TH1 * GetSDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
- virtual TObjArray * Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
- virtual void Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles = -1) ;
+ virtual TObjArray** Init(AliQA::TASKINDEX_t task, Int_t cycles = -1) ;
+ virtual void Init(AliQA::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ;
virtual void StartOfCycle(Int_t run = -1) ;
virtual void StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ;
virtual void MakeSDigits(TTree * ) {AliInfo("To be implemented by detectors");}
virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
- TObjArray * fDigitsQAList ; //! list of the digits QA data objects
- TObjArray * fHitsQAList ; //! list of the hits QA data objects
- TObjArray * fSDigitsQAList ; //! list of the sdigits QA data objects
+ TObjArray * * fDigitsQAList ; //! list of the digits QA data objects
+ TObjArray * * fHitsQAList ; //! list of the hits QA data objects
+ TObjArray * * fSDigitsQAList ; //! list of the sdigits QA data objects
ClassDef(AliQADataMakerSim,1) // description
fRawReader(NULL),
fRawReaderDelete(kTRUE),
fRunLoader(NULL),
- fTasks("")
+ fTasks(""),
+ fEventSpecie(AliRecoParam::kDefault)
{
// default ctor
fMaxEvents = fNumberOfEvents ;
fLoader[iDet] = NULL ;
fQADataMaker[iDet] = NULL ;
fQACycles[iDet] = 999999 ;
- fQAWriteExpert[iDet] = kFALSE ;
+ fQAWriteExpert[iDet] = kTRUE ;
}
}
}
fRawReader(NULL),
fRawReaderDelete(kTRUE),
fRunLoader(NULL),
- fTasks(qas.fTasks)
+ fTasks(qas.fTasks),
+ fEventSpecie(qas.fEventSpecie)
{
// cpy ctor
for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
AliQADataMaker * qadm = GetQADataMaker(iDet) ;
if (!qadm) continue; // This detector doesn't have any QA (for example, HLT)
if ( qadm->IsCycleDone() ) {
- qadm->EndOfCycle(taskIndex) ;
+ qadm->EndOfCycle(taskIndex) ;
}
TTree * data = NULL ;
AliLoader* loader = GetLoader(qadm->GetUniqueID());
for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
if (IsSelected(AliQA::GetDetName(iDet))) {
AliQADataMaker * qadm = GetQADataMaker(iDet) ;
- if (qadm) qadm->EndOfCycle(taskIndex) ;
+ if (qadm)
+ qadm->EndOfCycle(taskIndex) ;
}
}
return kTRUE ;
}
//_____________________________________________________________________________
-AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
+AliQADataMaker * AliQADataMakerSteer::GetQADataMaker(const Int_t iDet)
{
// get the quality assurance data maker for a detector
- if (fQADataMaker[iDet])
+ if (fQADataMaker[iDet]) {
+ fQADataMaker[iDet]->SetEventSpecie(fEventSpecie) ;
return fQADataMaker[iDet] ;
+ }
AliQADataMaker * qadm = NULL ;
qadm->SetName(AliQA::GetDetName(iDet));
qadm->SetUniqueID(iDet);
fQADataMaker[iDet] = qadm;
+ qadm->SetEventSpecie(fEventSpecie) ;
return qadm;
}
qadm->SetName(AliQA::GetDetName(iDet));
qadm->SetUniqueID(iDet);
fQADataMaker[iDet] = qadm;
+ qadm->SetEventSpecie(fEventSpecie) ;
return qadm;
}
qadm->SetName(AliQA::GetDetName(iDet));
qadm->SetUniqueID(iDet);
fQADataMaker[iDet] = qadm ;
+ qadm->SetEventSpecie(fEventSpecie) ;
}
-
- return qadm ;
+
+ return qadm ;
}
//_____________________________________________________________________________
if ( ! AliGeomManager::GetGeometry() )
AliGeomManager::LoadGeometry() ;
- InitQADataMaker(fRunNumber, fRecoParam, detArray) ; //, fCycleSame, kTRUE, detArray) ;
+ InitQADataMaker(fRunNumber, detArray) ; //, fCycleSame, kTRUE, detArray) ;
return kTRUE ;
}
//_____________________________________________________________________________
-void AliQADataMakerSteer::InitQADataMaker(UInt_t run, const AliRecoParam & par, TObjArray * detArray)
+void AliQADataMakerSteer::InitQADataMaker(UInt_t run, TObjArray * detArray)
{
// Initializes The QADataMaker for all active detectors and for all active tasks
-
for (UInt_t iDet = 0; iDet < fgkNDetectors ; iDet++) {
if (IsSelected(AliQA::GetDetName(iDet))) {
AliQADataMaker * qadm = GetQADataMaker(iDet) ;
AliError(Form("AliQADataMaker not found for %s", AliQA::GetDetName(iDet))) ;
fDetectorsW.ReplaceAll(AliQA::GetDetName(iDet), "") ;
} else {
+ if (fQAWriteExpert[iDet])
+ qadm->SetWriteExpert() ;
AliDebug(1, Form("Data Maker found for %s", qadm->GetName())) ;
// skip non active detectors
if (detArray) {
}
if (fQAWriteExpert[iDet]) qadm->SetWriteExpert() ;
// Set default reco params
- qadm->SetRecoParam(par.GetDetRecoParam(iDet));
Bool_t sameCycle = kFALSE ;
for (UInt_t taskIndex = 0; taskIndex < AliQA::kNTASKINDEX; taskIndex++) {
if ( fTasks.Contains(Form("%d", taskIndex)) ) {
- qadm->StartOfCycle(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), run, sameCycle) ;
qadm->Init(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), GetQACycles(qadm->GetUniqueID())) ;
+ qadm->StartOfCycle(AliQA::GetTaskIndex(AliQA::GetTaskName(taskIndex)), run, sameCycle) ;
sameCycle = kTRUE ;
}
}
qadm->EndOfCycle() ;
}
AliCodeTimerStart(Form("running RAW quality assurance data maker for %s", AliQA::GetDetName(iDet)));
+ qadm->SetEventSpecie(fEventSpecie) ;
qadm->Exec(AliQA::kRAWS, rawReader) ;
AliCodeTimerStop(Form("running RAW quality assurance data maker for %s", AliQA::GetDetName(iDet)));
}
}
//_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, const char * year, const char * detectors) const
+Bool_t AliQADataMakerSteer::Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year, const char * detectors) const
{
// take the locasl QA data merge into a single file and save in OCDB
Bool_t rv = kTRUE ;
return kFALSE ;
TString inputFileName(Form("Merged.%s.Data.%d.root", AliQA::GetQADataFileName(), runNumber)) ;
inputFile = TFile::Open(inputFileName.Data()) ;
- rv = SaveIt2OCDB(runNumber, inputFile, year) ;
+ rv = SaveIt2OCDB(runNumber, inputFile, year, es) ;
} else {
for (Int_t index = 0; index < AliQA::kNDET; index++) {
if (sdet.Contains(AliQA::GetDetName(index))) {
TString inputFileName(Form("%s.%s.%d.root", AliQA::GetDetName(index), AliQA::GetQADataFileName(), runNumber)) ;
inputFile = TFile::Open(inputFileName.Data()) ;
- rv *= SaveIt2OCDB(runNumber, inputFile, year) ;
+ rv *= SaveIt2OCDB(runNumber, inputFile, year, es) ;
}
}
}
}
//_____________________________________________________________________________
-Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const
+Bool_t AliQADataMakerSteer::SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const
{
// reads the TH1 from file and adds it to appropriate list before saving to OCDB
Bool_t rv = kTRUE ;
TDirectory * detDir = inputFile->GetDirectory(AliQA::GetDetName(detIndex)) ;
if ( detDir ) {
AliInfo(Form("Entering %s", detDir->GetName())) ;
+ AliQA::SetQARefDataDirName(es) ;
TString detOCDBDir(Form("%s/%s/%s", AliQA::GetDetName(detIndex), AliQA::GetRefOCDBDirName(), AliQA::GetRefDataDirName())) ;
- printf("SSSSSSSSSSSSSSSSSSSSS %s\n", detOCDBDir.Data()) ;
AliCDBId idr(detOCDBDir.Data(), runNumber, AliCDBRunRange::Infinity()) ;
TList * listDetQAD = new TList() ;
TString listName(Form("%s QA data Reference", AliQA::GetDetName(detIndex))) ;
- mdr.SetComment("HMPID QA stuff");
+ mdr.SetComment(Form("%s QA stuff", AliQA::GetDetName(detIndex)));
listDetQAD->SetName(listName) ;
TList * taskList = detDir->GetListOfKeys() ;
TIter nextTask(taskList) ;
TKey * taskKey ;
while ( (taskKey = dynamic_cast<TKey*>(nextTask())) ) {
TDirectory * taskDir = detDir->GetDirectory(taskKey->GetName()) ;
- AliInfo(Form("Saving %s", taskDir->GetName())) ;
+ TDirectory * esDir = taskDir->GetDirectory(AliRecoParam::GetEventSpecieName(es)) ;
+ AliInfo(Form("Saving %s", esDir->GetName())) ;
TObjArray * listTaskQAD = new TObjArray(100) ;
- listTaskQAD->SetName(taskKey->GetName()) ;
+ listTaskQAD->SetName(Form("%s/%s", taskKey->GetName(), AliRecoParam::GetEventSpecieName(es))) ;
listDetQAD->Add(listTaskQAD) ;
- TList * histList = taskDir->GetListOfKeys() ;
+ TList * histList = esDir->GetListOfKeys() ;
TIter nextHist(histList) ;
TKey * histKey ;
while ( (histKey = dynamic_cast<TKey*>(nextHist())) ) {
- TObject * odata = taskDir->Get(histKey->GetName()) ;
+ TObject * odata = esDir->Get(histKey->GetName()) ;
if ( !odata ) {
AliError(Form("%s in %s/%s returns a NULL pointer !!", histKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
} else {
+ if ( AliQA::GetExpert() == histKey->GetName() ) {
+ TDirectory * expertDir = esDir->GetDirectory(histKey->GetName()) ;
+ TList * expertHistList = expertDir->GetListOfKeys() ;
+ TIter nextExpertHist(expertHistList) ;
+ TKey * expertHistKey ;
+ while ( (expertHistKey = dynamic_cast<TKey*>(nextExpertHist())) ) {
+ TObject * expertOdata = expertDir->Get(expertHistKey->GetName()) ;
+ if ( !expertOdata ) {
+ AliError(Form("%s in %s/%s/Expert returns a NULL pointer !!", expertHistKey->GetName(), detDir->GetName(), taskDir->GetName())) ;
+ } else {
+ AliInfo(Form("Adding %s", expertHistKey->GetName())) ;
+ if ( expertOdata->IsA()->InheritsFrom("TH1") ) {
+ AliInfo(Form("Adding %s", expertHistKey->GetName())) ;
+ TH1 * hExpertdata = static_cast<TH1*>(expertOdata) ;
+ listTaskQAD->Add(hExpertdata) ;
+ }
+ }
+ }
+ }
AliInfo(Form("Adding %s", histKey->GetName())) ;
if ( odata->IsA()->InheritsFrom("TH1") ) {
AliInfo(Form("Adding %s", histKey->GetName())) ;
}
//_____________________________________________________________________________
-void AliQADataMakerSteer::SetRecoParam(const char* detector, AliDetectorRecoParam *par)
+void AliQADataMakerSteer::SetEventSpecie(AliRecoParam::EventSpecie_t es)
+{
+ // set the current event specie and inform AliQA that this event specie has been encountered
+ fEventSpecie = es ;
+ AliQA::Instance()->SetEventSpecie(es) ;
+}
+
+//_____________________________________________________________________________
+void AliQADataMakerSteer::SetRecoParam(const Int_t det, const AliDetectorRecoParam *par)
{
// Set custom reconstruction parameters for a given detector
// Single set of parameters for all the events
- for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
- if(!strcmp(detector, AliQA::GetDetName(iDet))) {
- par->SetAsDefault();
- fRecoParam.AddDetRecoParam(iDet,par);
- break;
- }
- }
+ GetQADataMaker(det)->SetRecoParam(par) ;
}
-#ifndef ALIQADATAMAKERSTEER_H
+ #ifndef ALIQADATAMAKERSTEER_H
#define ALIQADATAMAKERSTEER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
TObjArray * GetFromOCDB(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, const char * year) const ;
AliQADataMaker * GetQADataMaker(const Int_t iDet) ;
void Increment() ;
- void InitQADataMaker(UInt_t run, const AliRecoParam & par, TObjArray * detArray=0x0) ;
+ void InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ;
Bool_t Merge(const Int_t runNumber = -1 ) const ;
void Reset(const Bool_t sameCycle = kFALSE) ;
TString Run(const char * detectors, const AliQA::TASKINDEX_t taskIndex=AliQA::kNULLTASKINDEX, Bool_t const sameCycle = kFALSE, const char * fileName = NULL) ;
void RunOneEvent(AliRawReader * rawReader) ;
void RunOneEventInOneDetector(Int_t det, TTree * tree) ;
void RunOneEvent(AliESDEvent *& esd) ;
- Bool_t Save2OCDB(const Int_t runNumber, const char * year = "08", const char * detectors = "ALL") const ;
+ Bool_t Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year = "08", const char * detectors = "ALL") const ;
void SetActiveDetectors(TString aDet) { fDetectors = aDet ; }
void SetCycleLength(const AliQA::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; }
void SetWriteExpert(const AliQA::DETECTORINDEX_t det) { fQAWriteExpert[det] = kTRUE ; }
- void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }
+ void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }
+ void SetEventSpecie(AliRecoParam::EventSpecie_t es) ;
void SetFirsEvent(UInt_t first) { fFirstEvent = first ; }
void SetMaxEvents(UInt_t max) { fMaxEvents = max ; }
void SetNewCycle() { fCycleSame = kTRUE ; }
- void SetRecoParam(const char* detector, AliDetectorRecoParam *par) ;
+ void SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ;
void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
void SetTasks(TString tasks) { fTasks = tasks ; }
private:
Bool_t DoIt(const AliQA::TASKINDEX_t taskIndex) ;
AliLoader * GetLoader(Int_t iDet) ;
- Int_t GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; }
+ Int_t GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; }
Bool_t Init(const AliQA::TASKINDEX_t taskIndex, const char * fileName = NULL) ;
Bool_t InitRunLoader() ;
Bool_t IsSelected(const char * detName) ;
Bool_t Finish(const AliQA::TASKINDEX_t taskIndex) ;
Bool_t MergeData(const Int_t runNumber) const ;
Bool_t MergeResults(const Int_t runNumber) const ;
- Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const ;
+ Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const ;
UInt_t fCurrentEvent ; //! event counter
AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects
Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length
Bool_t fQAWriteExpert[fgkNDetectors]; //! array of QA cycle length
-
+ AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam::EventSpecie_t
ClassDef(AliQADataMakerSteer, 0) // class for running the QA makers
};
///////////////////////////////////////////////////////////////////////////////
#include "TObjArray.h"
+#include "TMath.h"
#include "AliDetectorRecoParam.h"
#include "AliLog.h"
ClassImp(AliRecoParam)
+TString AliRecoParam::fkgEventSpecieName[] = {"Default", "LowMultiplicity", "HighMultiplicity", "Cosmic", "Calibration", "Unknown"} ;
+
AliRecoParam::AliRecoParam():
TObject(),
fEventSpecie(kDefault)
}
}
+Int_t AliRecoParam::AConvert(EventSpecie_t es)
+{
+ //Converts EventSpecie_t into int
+ return static_cast<Int_t>(TMath::Log2(es)) ;
+
+}
+
+AliRecoParam::EventSpecie_t AliRecoParam::Convert(Int_t ies)
+{
+ //Converts int into EventSpecie_t
+ AliRecoParam::EventSpecie_t es = AliRecoParam::kDefault ;
+
+ Int_t i = (Int_t)TMath::Power(2, ies) ;
+
+ if ( i == AliRecoParam::kLowMult)
+ es = kLowMult ;
+ else if ( i == AliRecoParam::kHighMult)
+ es = kHighMult ;
+ else if ( i == AliRecoParam::kCosmic)
+ es = kCosmic ;
+ else if ( i == AliRecoParam::kCalib)
+ es = kCalib ;
+
+ return es ;
+}
+
void AliRecoParam::Print(Option_t *option) const {
//
// Print reconstruction setup
if (strcmp(runInfo->GetLHCState(),"STABLE_BEAMS") == 0) {
// In case of stable beams
- if ((strcmp(runInfo->GetBeamType(),"A-A") == 0) ||
- (strcmp(runInfo->GetBeamType(),"A-") == 0) ||
- (strcmp(runInfo->GetBeamType(),"-A") == 0)) {
- // Heavy ion run, the event specie is set to kHighMult
+// if ((strcmp(runInfo->GetBeamType(),"A-A") == 0) ||
+// (strcmp(runInfo->GetBeamType(),"A-") == 0) ||
+// (strcmp(runInfo->GetBeamType(),"-A") == 0)) {
+ // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
fEventSpecie = kHighMult;
- }
- else if ((strcmp(runInfo->GetBeamType(),"p-p") == 0) ||
+// }
+// else
+ if ((strcmp(runInfo->GetBeamType(),"p-p") == 0) ||
(strcmp(runInfo->GetBeamType(),"p-") == 0) ||
(strcmp(runInfo->GetBeamType(),"-p") == 0) ||
(strcmp(runInfo->GetBeamType(),"P-P") == 0) ||
// event specie
switch (fEventSpecie) {
case kDefault:
- return "Default";
+ return fkgEventSpecieName[0].Data() ;
break;
case kLowMult:
- return "Low-multiplicity";
+ return fkgEventSpecieName[1].Data() ;
break;
case kHighMult:
- return "High-multiplicity";
+ return fkgEventSpecieName[2].Data() ;
break;
case kCosmic:
- return "Cosmic";
+ return fkgEventSpecieName[3].Data() ;
break;
case kCalib:
- return "Calibration";
+ return fkgEventSpecieName[4].Data() ;
break;
default:
- return "Unknown";
+ return fkgEventSpecieName[5].Data() ;
break;
}
}
+
+const char * AliRecoParam::GetEventSpecieName(EventSpecie_t es)
+{
+ switch (es) {
+ case kDefault:
+ return fkgEventSpecieName[0].Data() ;
+ break;
+ case kLowMult:
+ return fkgEventSpecieName[1].Data() ;
+ break;
+ case kHighMult:
+ return fkgEventSpecieName[2].Data() ;
+ break;
+ case kCosmic:
+ return fkgEventSpecieName[3].Data() ;
+ break;
+ case kCalib:
+ return fkgEventSpecieName[4].Data() ;
+ break;
+ default:
+ return fkgEventSpecieName[5].Data() ;
+ break;
+ }
+}
+
+const char * AliRecoParam::GetEventSpecieName(Int_t esIndex)
+{
+ if ( esIndex >= 0 && esIndex < kNSpecies)
+ return fkgEventSpecieName[esIndex].Data() ;
+ else
+ return fkgEventSpecieName[kNSpecies].Data() ;
+}
kCosmic = 8,
kCalib = 16};
+ static Int_t AConvert(EventSpecie_t es) ;
+ static EventSpecie_t Convert(Int_t es) ;
virtual void Print(Option_t *option="") const;
const TObjArray *GetDetRecoParamArray(Int_t iDet) const { return fDetRecoParams[iDet]; }
void SetEventSpecie(const AliRunInfo*runInfo, const AliEventInfo &evInfo);
EventSpecie_t GetEventSpecie() const { return fEventSpecie; }
+ static const char* GetEventSpecieName(EventSpecie_t es);
+ static const char* GetEventSpecieName(Int_t esIndex);
const char* PrintEventSpecie() const;
const AliDetectorRecoParam *GetDetRecoParam(Int_t iDet) const;
void AddDetRecoParam(Int_t iDet, AliDetectorRecoParam* param);
AliRecoParam(const AliRecoParam&);
AliRecoParam& operator=(const AliRecoParam&);
+
private:
Int_t fDetRecoParamsIndex[kNSpecies][kNDetectors]; // index to fDetRecoParams arrays
TObjArray *fDetRecoParams[kNDetectors]; // array with reconstruction-parameter objects for all detectors
EventSpecie_t fEventSpecie; // current event specie
-
- ClassDef(AliRecoParam, 5)
+ static TString fkgEventSpecieName[] ; // the names of the event species
+ ClassDef(AliRecoParam, 6)
};
}
fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
-
+ printf("qqqqqqqqqqqqqqqqqqqqqqq %s %s %f %s %d\n", lhcState.Data(), beamType.Data(), beamEnergy, runType.Data(), activeDetectors);
fRunInfo->Dump();
fQASteer->SetActiveDetectors(fQADetectors) ;
for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
fQASteer->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ;
- if (fQAWriteExpert[det])
- fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+ fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
}
-
if (!fRawReader && fQATasks.Contains(AliQA::kRAWS))
fQATasks.ReplaceAll(Form("%d",AliQA::kRAWS), "") ;
fQASteer->SetTasks(fQATasks) ;
- fQASteer->InitQADataMaker(AliCDBManager::Instance()->GetRun(), fRecoParam) ;
+ fQASteer->InitQADataMaker(AliCDBManager::Instance()->GetRun()) ;
}
if (fRunGlobalQA) {
AliInfo(Form("Initializing the global QA data maker"));
if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) {
qadm->StartOfCycle(AliQA::kRECPOINTS, AliCDBManager::Instance()->GetRun(), sameCycle) ;
- TObjArray *arr=qadm->Init(AliQA::kRECPOINTS);
+ TObjArray **arr=qadm->Init(AliQA::kRECPOINTS);
AliTracker::SetResidualsArray(arr);
sameCycle = kTRUE ;
}
if (!IsSelected(fgkDetectorName[iDet], detStr)) continue;
AliReconstructor *reconstructor = GetReconstructor(iDet);
if (reconstructor && fRecoParam.GetDetRecoParamArray(iDet)) {
- const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
- reconstructor->SetRecoParam(par);
+ const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
+ reconstructor->SetRecoParam(par);
+ if (fRunQA) {
+ fQASteer->SetRecoParam(iDet, par) ;
+ }
}
}
}
// QA on single raw
- if (fRunQA)
- fQASteer->RunOneEvent(fRawReader) ;
-
+ if (fRunQA) {
+ fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
+ fQASteer->RunOneEvent(fRawReader) ;
+ }
// local single event reconstruction
if (!fRunLocalReconstruction.IsNull()) {
TString detectors=fRunLocalReconstruction;
// write ESD
if (fCleanESD) CleanESD(fesd);
- if (fRunQA)
+ if (fRunQA) {
+ fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
fQASteer->RunOneEvent(fesd) ;
-
+ }
if (fRunGlobalQA) {
AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+ qadm->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
qadm->Exec(AliQA::kESDS, fesd);
}
}
// End of cycle for the in-loop
- if (fRunQA) {
+ if (fRunQA)
fQASteer->EndOfCycle() ;
- }
+
if (fRunGlobalQA) {
AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
if (qadm) {
}
TString detQAStr(fQADetectors) ;
- if (fRunQA)
+ if (fRunQA) {
+ fQASteer->SetEventSpecie(fRecoParam.GetEventSpecie()) ;
fQASteer->RunOneEventInOneDetector(iDet, clustersTree) ;
-
+ }
loader->WriteRecPoints("OVERWRITE");
loader->UnloadRecPoints();
AliSysInfo::AddStamp(Form("LRec%s_%d",fgkDetectorName[iDet],eventNr), iDet,1,eventNr);
// run tracking
if (iDet>1) // start filling residuals for the "outer" detectors
- if (fRunGlobalQA) AliTracker::SetFillResiduals(kTRUE);
+ if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
if (fTracker[iDet]->PropagateBack(esd) != 0) {
AliError(Form("%s backward propagation failed", fgkDetectorName[iDet]));
AliSysInfo::AddStamp(Form("Tracking1%s_%d",fgkDetectorName[iDet],eventNr), iDet,3, eventNr);
}
//stop filling residuals for the "outer" detectors
- if (fRunGlobalQA) AliTracker::SetFillResiduals(kFALSE);
+ if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kFALSE);
// pass 3: TRD + TPC + ITS refit inwards
// run tracking
if (iDet<2) // start filling residuals for TPC and ITS
- if (fRunGlobalQA) AliTracker::SetFillResiduals(kTRUE);
+ if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kTRUE);
if (fTracker[iDet]->RefitInward(esd) != 0) {
AliError(Form("%s inward refit failed", fgkDetectorName[iDet]));
AliSysInfo::AddStamp(Form("RUnloadCluster%s_%d",fgkDetectorName[iDet],eventNr), iDet,5, eventNr);
}
// stop filling residuals for TPC and ITS
- if (fRunGlobalQA) AliTracker::SetFillResiduals(kFALSE);
+ if (fRunGlobalQA) AliTracker::SetFillResiduals(fRecoParam.GetEventSpecie(), kFALSE);
eventNr++;
return kTRUE;
// check the QA of SIM for this run and remove the detectors
// with status Fatal
- TString newRunLocalReconstruction ;
- TString newRunTracking ;
- TString newFillESD ;
-
- for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) {
- TString detName(AliQA::GetDetName(iDet)) ;
- AliQA * qa = AliQA::Instance(AliQA::DETECTORINDEX_t(iDet)) ;
- if ( qa->IsSet(AliQA::DETECTORINDEX_t(iDet), AliQA::kSIM, AliQA::kFATAL)) {
- AliInfo(Form("QA status for %s in Hits and/or SDIGITS and/or Digits was Fatal; No reconstruction performed", detName.Data())) ;
- } else {
- if ( fRunLocalReconstruction.Contains(AliQA::GetDetName(iDet)) ||
- fRunLocalReconstruction.Contains("ALL") ) {
- newRunLocalReconstruction += detName ;
- newRunLocalReconstruction += " " ;
- }
- if ( fRunTracking.Contains(AliQA::GetDetName(iDet)) ||
- fRunTracking.Contains("ALL") ) {
- newRunTracking += detName ;
- newRunTracking += " " ;
- }
- if ( fFillESD.Contains(AliQA::GetDetName(iDet)) ||
- fFillESD.Contains("ALL") ) {
- newFillESD += detName ;
- newFillESD += " " ;
- }
- }
- }
- fRunLocalReconstruction = newRunLocalReconstruction ;
- fRunTracking = newRunTracking ;
- fFillESD = newFillESD ;
+// TString newRunLocalReconstruction ;
+// TString newRunTracking ;
+// TString newFillESD ;
+//
+// for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) {
+// TString detName(AliQA::GetDetName(iDet)) ;
+// AliQA * qa = AliQA::Instance(AliQA::DETECTORINDEX_t(iDet)) ;
+// if ( qa->IsSet(AliQA::DETECTORINDEX_t(iDet), AliQA::kSIM, specie, AliQA::kFATAL)) {
+// AliInfo(Form("QA status for %s %s in Hits and/or SDIGITS and/or Digits was Fatal; No reconstruction performed",
+// detName.Data(), AliRecoParam::GetEventSpecieName(es))) ;
+// } else {
+// if ( fRunLocalReconstruction.Contains(AliQA::GetDetName(iDet)) ||
+// fRunLocalReconstruction.Contains("ALL") ) {
+// newRunLocalReconstruction += detName ;
+// newRunLocalReconstruction += " " ;
+// }
+// if ( fRunTracking.Contains(AliQA::GetDetName(iDet)) ||
+// fRunTracking.Contains("ALL") ) {
+// newRunTracking += detName ;
+// newRunTracking += " " ;
+// }
+// if ( fFillESD.Contains(AliQA::GetDetName(iDet)) ||
+// fFillESD.Contains("ALL") ) {
+// newFillESD += detName ;
+// newFillESD += " " ;
+// }
+// }
+// }
+// fRunLocalReconstruction = newRunLocalReconstruction ;
+// fRunTracking = newRunTracking ;
+// fFillESD = newFillESD ;
}
//_____________________________________________________________________________
fQATasks("ALL"),
fQASteer(NULL),
fRunQA(kTRUE),
+ fEventSpecie(AliRecoParam::kDefault),
fRunHLT("default"),
fWriteGRPEntry(kTRUE)
{
TString detectorsw("") ;
Bool_t rv = kTRUE ;
+ fQASteer->SetEventSpecie(fEventSpecie) ;
detectorsw = fQASteer->Run(fQADetectors.Data()) ;
if ( detectorsw.IsNull() )
rv = kFALSE ;
- else
- fQASteer->EndOfCycle(detectorsw) ;
return rv ;
}
fRunQA = kTRUE ;
fQASteer->SetActiveDetectors(fQADetectors) ;
fQASteer->SetTasks(fQATasks) ;
+ for (Int_t det = 0 ; det < AliQA::kNDET ; det++)
+ fQASteer->SetWriteExpert(AliQA::DETECTORINDEX_t(det)) ;
+
return kTRUE;
}
}
//---------------------------------------------------------------------
-
void AliSimulation::WriteGRPEntry()
{
// Get the necessary information from galice (generator, trigger etc) and
TString beamType = projectile + "-" + target;
beamType.ReplaceAll(" ","");
if (!beamType.CompareTo("-")) {
-
- grpObj->SetBeamType("UNKNOWN");
+ grpObj->SetBeamType("UNKNOWN");
}
else {
- grpObj->SetBeamType(beamType);
+ grpObj->SetBeamType(beamType);
+ // Heavy ion run, the event specie is set to kHighMult
+ fEventSpecie = AliRecoParam::kHighMult;
+ if ((strcmp(beamType,"p-p") == 0) ||
+ (strcmp(beamType,"p-") == 0) ||
+ (strcmp(beamType,"-p") == 0) ||
+ (strcmp(beamType,"P-P") == 0) ||
+ (strcmp(beamType,"P-") == 0) ||
+ (strcmp(beamType,"-P") == 0)) {
+ // Proton run, the event specie is set to kLowMult
+ fEventSpecie = AliRecoParam::kLowMult;
+ }
}
- }
- else {
+ } else {
AliWarning("Unknown beam type and energy! Setting energy to 0");
grpObj->SetBeamEnergy(0);
grpObj->SetBeamType("UNKNOWN");
TObjArray fEventsPerFile; // number of events per file for given detectors and data types
TObjArray* fBkgrdFileNames; // names of background files for merging
- TObjArray* fAlignObjArray; // array with the alignment objects to be applied to the geometry
+ TObjArray* fAlignObjArray; // array with the alignment objects to be applied to the geometry
Bool_t fUseBkgrdVertex; // use vertex from background in case of merging
Bool_t fRegionOfInterest; // digitization in region of interest
- TString fCDBUri; //! Uri of the default CDB storage
- TObjArray fSpecCDBUri; //! Array with detector specific CDB storages
- Int_t fRun; //! Run number, will be passed to CDB and gAlice!!
- Int_t fSeed; //! Seed for random number generator
- Bool_t fInitCDBCalled; //! flag to check if CDB storages are already initialized
- Bool_t fInitRunNumberCalled; //! flag to check if run number is already initialized
- Bool_t fSetRunNumberFromDataCalled; //! flag to check if run number is already loaded from run loader
+ TString fCDBUri; //! Uri of the default CDB storage
+ TObjArray fSpecCDBUri; //! Array with detector specific CDB storages
+ Int_t fRun; //! Run number, will be passed to CDB and gAlice!!
+ Int_t fSeed; //! Seed for random number generator
+ Bool_t fInitCDBCalled; //! flag to check if CDB storages are already initialized
+ Bool_t fInitRunNumberCalled; //! flag to check if run number is already initialized
+ Bool_t fSetRunNumberFromDataCalled; //! flag to check if run number is already loaded from run loader
- Bool_t fEmbeddingFlag; // Flag for embedding
+ Bool_t fEmbeddingFlag; // Flag for embedding
//QA stuff
static const Int_t fgkNDetectors = 15 ; // number of detectors
TString fQATasks ; // list of QA tasks to be performed
AliQADataMakerSteer * fQASteer ; // steering object to run QA
Bool_t fRunQA ; // Runs the QA at the end of simulation
+ AliRecoParam::EventSpecie_t fEventSpecie ; // type of event (see AliRecoParam::EventSpecie_t)
//HLT
TString fRunHLT; // HLT options, HLT is disabled if empty, default='default'
Double_t AliTracker::fgBz=kAlmost0Field;
const AliMagF *AliTracker::fgkFieldMap=0;
Bool_t AliTracker::fFillResiduals=kFALSE;
-TObjArray *AliTracker::fResiduals=0;
+TObjArray **AliTracker::fResiduals=NULL;
+AliRecoParam::EventSpecie_t AliTracker::fEventSpecie=AliRecoParam::kDefault;
ClassImp(AliTracker)
fZ(0),
fSigmaX(0.005),
fSigmaY(0.005),
- fSigmaZ(0.010)
+ fSigmaZ(0.010)
{
//--------------------------------------------------------------------
// The default constructor.
TH1F *h=0;
AliGeomManager::ELayerID layer=AliGeomManager::VolUIDToLayer(id);
- h=(TH1F*)fResiduals->At(2*layer-2);
+ h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-2);
h->Fill(residuals[0]);
- h=(TH1F*)fResiduals->At(2*layer-1);
+ h=(TH1F*)fResiduals[fEventSpecie]->At(2*layer-1);
h->Fill(residuals[1]);
if (layer==5) {
if (p[1]<0) { // SSD1 absolute residuals
- ((TH1F*)fResiduals->At(40))->Fill(t->GetY()-p[0]); //C side
- ((TH1F*)fResiduals->At(41))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[fEventSpecie]->At(40))->Fill(t->GetY()-p[0]); //C side
+ ((TH1F*)fResiduals[fEventSpecie]->At(41))->Fill(t->GetZ()-p[1]);
} else {
- ((TH1F*)fResiduals->At(42))->Fill(t->GetY()-p[0]); //A side
- ((TH1F*)fResiduals->At(43))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[fEventSpecie]->At(42))->Fill(t->GetY()-p[0]); //A side
+ ((TH1F*)fResiduals[fEventSpecie]->At(43))->Fill(t->GetZ()-p[1]);
}
}
if (layer==6) { // SSD2 absolute residuals
if (p[1]<0) {
- ((TH1F*)fResiduals->At(44))->Fill(t->GetY()-p[0]); //C side
- ((TH1F*)fResiduals->At(45))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[fEventSpecie]->At(44))->Fill(t->GetY()-p[0]); //C side
+ ((TH1F*)fResiduals[fEventSpecie]->At(45))->Fill(t->GetZ()-p[1]);
} else {
- ((TH1F*)fResiduals->At(46))->Fill(t->GetY()-p[0]); //A side
- ((TH1F*)fResiduals->At(47))->Fill(t->GetZ()-p[1]);
+ ((TH1F*)fResiduals[fEventSpecie]->At(46))->Fill(t->GetY()-p[0]); //A side
+ ((TH1F*)fResiduals[fEventSpecie]->At(47))->Fill(t->GetZ()-p[1]);
}
}
//-------------------------------------------------------------------------
#include <TObject.h>
#include <AliPlaneEff.h>
+#include "AliRecoParam.h"
+
class TTree;
class AliMagF;
static void FillResiduals(const AliExternalTrackParam *t,
Double_t *p, Double_t *cov,
UShort_t id, Bool_t updated=kTRUE);
- static void SetFillResiduals(Bool_t flag=kTRUE) { fFillResiduals=flag; }
- static void SetResidualsArray(TObjArray *arr) { fResiduals=arr; }
+ static void SetFillResiduals(AliRecoParam::EventSpecie_t es, Bool_t flag=kTRUE) { fFillResiduals=flag; fEventSpecie = es ;}
+ static void SetResidualsArray(TObjArray **arr) { fResiduals=arr; }
protected:
AliTracker(const AliTracker &atr);
static Double_t fgBz; // Nominal Bz (kG)
static Bool_t fFillResiduals; // Fill residuals flag
- static TObjArray *fResiduals; //! Array of histograms with residuals
+ static TObjArray **fResiduals; //! Array of histograms with residuals
Double_t fX; //X-coordinate of the primary vertex
Double_t fY; //Y-coordinate of the primary vertex
Double_t fSigmaX; // error of the primary vertex position in X
Double_t fSigmaY; // error of the primary vertex position in Y
Double_t fSigmaZ; // error of the primary vertex position in Z
-
+
+ static AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
+
ClassDef(AliTracker,4) //abstract tracker
};
AliGlobalQAChecker.cxx
AliQACheckerBase.cxx
AliMillepede.cxx
-AliRecoParam.cxx
-AliDetectorRecoParam.cxx
AliPlaneEff.cxx
AliTriggerRunScalers.cxx AliGRPPreprocessor.cxx
AliGRPRecoParam.cxx
-AliRunInfo.cxx AliEventInfo.cxx
AliRelAlignerKalman.cxx
AliESDTagCreator.cxx
AliGRPObject.cxx
AliPDG.cxx
AliQA.cxx
AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx
+ AliRunInfo.cxx AliEventInfo.cxx
+ AliRecoParam.cxx
+ AliDetectorRecoParam.cxx
)
# fill list of header files from list of source files
#pragma link C++ class AliTriggerScalers+;
#pragma link C++ class AliTriggerScalersRecord+;
+#pragma link C++ class AliRunInfo+;
+#pragma link C++ class AliEventInfo+;
+#pragma link C++ class AliDetectorRecoParam+;
+#pragma link C++ class AliRecoParam+;
+
#endif
#pragma link C++ class AliQACheckerBase+;
#pragma link C++ class AliMillepede+;
-#pragma link C++ class AliDetectorRecoParam+;
-#pragma link C++ class AliRecoParam+;
#pragma link C++ class AliPlaneEff+;
#pragma link C++ class AliTriggerRunScalers+;
#pragma link C++ class AliGRPPreprocessor+;
#pragma link C++ class AliGRPRecoParam+;
-#pragma link C++ class AliRunInfo+;
-#pragma link C++ class AliEventInfo+;
-
#pragma link C++ class AliRelAlignerKalman+;
#pragma link C++ class AliESDTagCreator+;
AliGlobalQAChecker.cxx \
AliQACheckerBase.cxx \
AliMillepede.cxx \
-AliRecoParam.cxx \
-AliDetectorRecoParam.cxx \
AliPlaneEff.cxx \
AliTriggerRunScalers.cxx AliGRPPreprocessor.cxx \
AliGRPRecoParam.cxx \
-AliRunInfo.cxx AliEventInfo.cxx \
AliRelAlignerKalman.cxx \
AliESDTagCreator.cxx \
AliGRPObject.cxx
AliCodeTimer.cxx \
AliPDG.cxx \
AliQA.cxx \
- AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx
+ AliTimeStamp.cxx AliTriggerScalers.cxx AliTriggerScalersRecord.cxx \
+ AliRunInfo.cxx AliEventInfo.cxx \
+ AliRecoParam.cxx AliDetectorRecoParam.cxx
HDRS:= $(SRCS:.cxx=.h)
ClassImp(AliT0QAChecker)
+//____________________________________________________________________________
+Double_t * AliT0QAChecker::Check(AliQA::ALITASK_t /*index*/)
+{
+ Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ rv[specie] = 0.0 ;
+ return rv ;
+}
+
//__________________________________________________________________
-Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
+Double_t * AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray ** list)
{
// Super-basic check on the QA histograms on the input list:
// look whether they are empty!
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ test[specie] = 10.0 ;
- Double_t test = 10.0 ;
-
Double_t nent[250];
TString hname[250];
const char *cname;
memset(w,1,250*sizeof(Double_t));
TH2 *fhRecDiff[3];
TH2 *fhRawEff[250];
- TH1 *fhESD[2];
-
- // TString dataType = AliQA::GetAliTaskName(index);
-
- if (list->GetEntries() == 0){
- test = 1. ; // nothing to check
- }
- else {
-
- TIter next(list) ;
+ TH1 *fhESD[2];
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ // TString dataType = AliQA::GetAliTaskName(index);
+ if (list[specie]->GetEntries() == 0){
+ test[specie] = 1. ; // nothing to check
+ }
+ else {
+ TIter next(list[specie]) ;
TH1 * hdata ;
-
TH2 * h ;
- // printf(" data type %i %s nentries %i\n",
- // index,dataType.Data(),list->GetEntries());
-
- for (Int_t ir=0; ir<list->GetEntries(); ir++)
- {
- //raw
- if(index==0 ){
- /*
- if(ir < 205) {
- hdata = (TH1*) list->UncheckedAt(ir);
- if(hdata) {
- cname = hdata->GetName();
- hname[ir] = cname;
- AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
- fhRaw[ir] = hdata;
- }
- }*/
- if(ir > 204) {
- // else{
- h = (TH2*) list->UncheckedAt(ir);
- printf(" index %i ir %i \n", index,ir);
- if(h) {
- cname = h->GetName();
- hname[ir] = cname;
- AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
- fhRawEff[ir] = h;
- }
- }
- }
+ // AliInfo(Form(" data type %i %s nentries %i\n",
+ // index,dataType.Data(),list->GetEntries()));
+ for (Int_t ir=0; ir<list[specie]->GetEntries(); ir++) {
+ //raw
+ if(index==0 ){
+ /*
+ if(ir < 205) {
+ hdata = (TH1*) list[specie]->UncheckedAt(ir);
+ if(hdata) {
+ cname = hdata->GetName();
+ hname[ir] = cname;
+ AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
+ fhRaw[ir] = hdata;
+ }
+ }*/
+ if(ir > 204) {
+ // else{
+ h = (TH2*) list[specie]->UncheckedAt(ir);
+ AliInfo(Form(" index %i ir %i \n", index,ir));
+ if(h) {
+ cname = h->GetName();
+ hname[ir] = cname;
+ AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
+ fhRawEff[ir] = h;
+ }
+ }
+ }
- //rec
- if(index==2){
- h = (TH2*) list->UncheckedAt(ir);
-
- if(h) {
- cname = h->GetName();
- hname[ir] = cname;
- AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
- fhRecDiff[ir] = h;
- }
- }
- //esd
- if(index==3){
- cout<<" ir "<<ir<<endl;
- hdata = (TH1*) list->UncheckedAt(ir);
- if(hdata){
- fhESD[ir] = hdata;
- AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
- }
- }
+ //rec
+ if(index==2){
+ h = (TH2*) list[specie]->UncheckedAt(ir);
+ if(h) {
+ cname = h->GetName();
+ hname[ir] = cname;
+ AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
+ fhRecDiff[ir] = h;
+ }
+ }
+ //esd
+ if(index==3){
+ cout<<" ir "<<ir<<endl;
+ hdata = (TH1*) list[specie]->UncheckedAt(ir);
+ if(hdata){
+ fhESD[ir] = hdata;
+ AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
+ }
}
-
- if (index == 0)
- {
- //raw data
+ }
+ if (index == 0) {
+ //raw data
- for (Int_t icase=205; icase<207; icase++) {
- for (Int_t idet=0; idet<24; idet++) {
- Double_t mean = fhRawEff[icase]->
- ProjectionY(Form("%s_py_%i_%i",
- fhRawEff[icase]->GetName(), idet,icase),
- idet,idet+1)->GetMean();
- Double_t rms= fhRawEff[icase]->
- ProjectionY(Form("%s_py%i_%i",
- fhRawEff[icase]->GetName(), idet,icase),
- idet,idet+1)->GetRMS();
- printf("name %s icase %i idet %i mean %f, rms %f\n",
- fhRawEff[icase]->GetName(), icase, idet, mean,rms);
-
- if (mean<1.2 && mean> 0.8 ) {
- test = 1;
- AliDebug(1,Form("All channels works meane efficieny %f with rms %f test %f", mean, rms, test)) ;
- }
- if (mean<=0.8 && mean>= 0.5 ){
- test = 0.5;
- AliDebug(1,Form("%s problem in channel %i efficieny %f test %f",
- fhRawEff[icase]->GetName(), idet, mean, test)) ;
- }
- if (mean<0.5 ) {
- test = 0.25;
- AliDebug(1,Form("%s big problem in channel %i efficieny %f test %f",
- fhRawEff[icase]->GetName(), idet, mean, test)) ;
- }
-
- }
-
- }
+ for (Int_t icase=205; icase<207; icase++) {
+ for (Int_t idet=0; idet<24; idet++) {
+ Double_t mean = fhRawEff[icase]->ProjectionY(Form("%s_py_%i_%i",
+ fhRawEff[icase]->GetName(), idet,icase),
+ idet,idet+1)->GetMean();
+ Double_t rms= fhRawEff[icase]->ProjectionY(Form("%s_py%i_%i",
+ fhRawEff[icase]->GetName(), idet,icase),
+ idet,idet+1)->GetRMS();
+ AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
+ fhRawEff[icase]->GetName(), icase, idet, mean,rms));
+ if (mean<1.2 && mean> 0.8 ) {
+ test[specie] = 1;
+ AliDebug(1,Form("All channels works meane efficieny %f with rms %f test %f", mean, rms, test[specie])) ;
+ }
+ if (mean<=0.8 && mean>= 0.5 ){
+ test[specie] = 0.5;
+ AliDebug(1,Form("%s problem in channel %i efficieny %f test %f",
+ fhRawEff[icase]->GetName(), idet, mean, test[specie])) ;
+ }
+ if (mean<0.5 ) {
+ test[specie] = 0.25;
+ AliDebug(1,Form("%s big problem in channel %i efficieny %f test %f",
+ fhRawEff[icase]->GetName(), idet, mean, test[specie])) ;
+ }
+ }
+ }
}
-
- if(index == 2){
- //rec points
- for (Int_t icase=0; icase<2; icase++) {
- for (Int_t idet=0; idet<24; idet++) {
- Double_t mean = fhRecDiff[icase]->
- ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
- idet,idet+1)->GetMean();
- Double_t rms= fhRecDiff[icase]->
- ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
- idet,idet+1)->GetRMS();
- printf("name %s icase %i idet %i mean %f, rms %f\n",
- fhRecDiff[icase]->GetName(), icase, idet, mean,rms);
+ if(index == 2){
+ //rec points
+ for (Int_t icase=0; icase<2; icase++) {
+ for (Int_t idet=0; idet<24; idet++) {
+ Double_t mean = fhRecDiff[icase]->
+ ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
+ idet,idet+1)->GetMean();
+ Double_t rms= fhRecDiff[icase]->
+ ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
+ idet,idet+1)->GetRMS();
+ AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
+ fhRecDiff[icase]->GetName(), icase, idet, mean,rms));
- if(TMath::Abs(mean) >1.5 || rms >1){
- AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
- test=0.25;
- }
- if(mean>3 || rms >5) {
- test = 0.1;
- AliDebug(1,Form(" wrong calibration test=%f", test)) ;
- }
- }
-
- }
- }
-
- if (index == 3) {
- //ESD
- for (Int_t icase=0; icase<2; icase++) {
- Double_t rmsVertex = fhESD[icase]->GetRMS();
- Double_t meanVertex = fhESD[icase]->GetMean();
-
- test=1;
- cout<<"numentries "<< fhESD[icase]->GetEntries()<<" meanVertex "<<meanVertex<<" rmsVertex "<<rmsVertex<<endl;
- if (TMath::Abs(rmsVertex)>3) {
- test=0.25;
- AliDebug(1,Form("Vertex position resolution not good , rms= %f test=%f",
- rmsVertex, test)) ;
- }
- if (TMath::Abs(meanVertex)>3) {
- test=0.25;
- AliDebug(1,Form("Vertex position bad calibrated , Mean= %f test=%f",
- meanVertex, test)) ;
- }
+ if(TMath::Abs(mean) >1.5 || rms >1){
+ AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
+ test[specie]=0.25;
+ }
+ if(mean>3 || rms >5) {
+ test[specie] = 0.1;
+ AliDebug(1,Form(" wrong calibration test=%f", test[specie])) ;
+ }
+ }
+ }
}
-
- }
-
- } // if (list->GetEntries() != 0
-
- AliInfo(Form("Test Result = %f", test)) ;
-
+ if (index == 3) {
+ //ESD
+ for (Int_t icase=0; icase<2; icase++) {
+ Double_t rmsVertex = fhESD[icase]->GetRMS();
+ Double_t meanVertex = fhESD[icase]->GetMean();
+ test[specie]=1;
+ AliInfo(Form("numentries %d meanVertex %f rmsVertex %f", fhESD[icase]->GetEntries(), meanVertex, rmsVertex));
+ if (TMath::Abs(rmsVertex)>3) {
+ test[specie]=0.25;
+ AliDebug(1,Form("Vertex position resolution not good , rms= %f test=%f",
+ rmsVertex, test[specie])) ;
+ }
+ if (TMath::Abs(meanVertex)>3) {
+ test[specie]=0.25;
+ AliDebug(1,Form("Vertex position bad calibrated , Mean= %f test=%f",
+ meanVertex, test[specie])) ;
+ }
+ }
+ }
+ } // if (list->GetEntries() != 0
+ AliInfo(Form("Test Result = %f", test[specie])) ;
+ }
return test ;
}
// dtor
virtual ~AliT0QAChecker() {;}
private:
- virtual Double_t Check(AliQA::ALITASK_t,TObjArray * list) ;
- virtual Double_t Check(TObjArray*) {return 0.;}
- virtual Double_t Check(AliQA::ALITASK_t, TNtupleD*) {return 0.;}
- virtual Double_t Check(AliQA::ALITASK_t) {return 0.;}
- virtual Double_t Check() {return 0.;} ;
+ virtual Double_t * Check(AliQA::ALITASK_t) ;
+ virtual Double_t * Check(AliQA::ALITASK_t, TObjArray ** list) ;
-
ClassDef(AliT0QAChecker,1) // description
};
return *this;
}
//____________________________________________________________________________
-void AliT0QADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliT0QADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
AliQAChecker::Instance()->Run(AliQA::kT0, task, list) ;
- if ( task == AliQA::kRAWS ) {
- const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
- for (Int_t itr=0; itr<6; itr++) {
- GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
- GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
- }
- GetRawsData(205)->SetOption("COLZ");
- GetRawsData(206)->SetOption("COLZ");
- GetRawsData(207)->SetOption("COLZ");
- GetRawsData(205)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(206)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(205)->GetYaxis()->SetTitle("NeventsReg/Nevents");
- GetRawsData(206)->GetYaxis()->SetTitle("NeventsReg/Nevents");
- GetRawsData(207)->GetXaxis()->SetTitle("#PMT");
- GetRawsData(207)->GetYaxis()->SetTitle("Charge, #channels");
- }
- if ( task == AliQA::kRECPOINTS) {
- GetRecPointsData(0)->SetOption("COLZ");
- GetRecPointsData(1)->SetOption("COLZ");
- GetRecPointsData(0)->GetXaxis()->SetTitle("#PMT");
- GetRecPointsData(1)->GetXaxis()->SetTitle("#PMT");
- GetRecPointsData(0)->GetYaxis()->SetTitle("CFD time");
- GetRecPointsData(1)->GetYaxis()->SetTitle("Charge, #channels");
- }
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ SetEventSpecie(specie) ;
+ if ( task == AliQA::kRAWS ) {
+ const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
+ for (Int_t itr=0; itr<6; itr++) {
+ GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
+ GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
+ }
+ GetRawsData(205)->SetOption("COLZ");
+ GetRawsData(206)->SetOption("COLZ");
+ GetRawsData(207)->SetOption("COLZ");
+ GetRawsData(205)->GetXaxis()->SetTitle("#PMT");
+ GetRawsData(206)->GetXaxis()->SetTitle("#PMT");
+ GetRawsData(205)->GetYaxis()->SetTitle("NeventsReg/Nevents");
+ GetRawsData(206)->GetYaxis()->SetTitle("NeventsReg/Nevents");
+ GetRawsData(207)->GetXaxis()->SetTitle("#PMT");
+ GetRawsData(207)->GetYaxis()->SetTitle("Charge, #channels");
+ }
+ if ( task == AliQA::kRECPOINTS) {
+ GetRecPointsData(0)->SetOption("COLZ");
+ GetRecPointsData(1)->SetOption("COLZ");
+ GetRecPointsData(0)->GetXaxis()->SetTitle("#PMT");
+ GetRecPointsData(1)->GetXaxis()->SetTitle("#PMT");
+ GetRecPointsData(0)->GetYaxis()->SetTitle("CFD time");
+ GetRecPointsData(1)->GetYaxis()->SetTitle("Charge, #channels");
+ }
+ }
}
//____________________________________________________________________________
virtual void MakeRaws(AliRawReader* rawReader) ;
virtual void MakeRecPoints(TTree * clusters) ; //Fill cluster QA histo
virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void StartOfDetectorCycle() ;
Int_t fNumTriggers[6]; //number of trigger signals;
return *this;
}
//____________________________________________________________________________
-void AliT0QADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliT0QADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeHits(TClonesArray *) {} //Dummy for the moment
virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo
virtual void MakeDigits(TClonesArray *) {} //Dummy for the moment
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray ** list) ;
virtual void StartOfDetectorCycle() ;
ClassDef(AliT0QADataMakerSim,1) // description
ClassImp(AliTOFQAChecker)
//____________________________________________________________________________
-Double_t AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list)
+Double_t * AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
{
// Super-basic check on the QA histograms on the input list:
// look whether they are empty!
- Double_t test = 0.0 ;
- Int_t count = 0 ;
-
- if (list->GetEntries() == 0){
- test = 1. ; // nothing to check
- }
- else {
- TIter next(list) ;
- TH1 * hdata ;
- count = 0 ;
- while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
- if (hdata) {
- Double_t rv = 0.;
- if(hdata->GetEntries()>0)rv=1;
- AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
- count++ ;
- test += rv ;
- }
- else{
- AliError("Data type cannot be processed") ;
- }
-
+ Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
+ Int_t count[AliRecoParam::kNSpecies] = { 0 };
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ test[specie] = 1.0 ;
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ if (list[specie]->GetEntries() == 0){
+ test[specie] = 0.0 ; // nothing to check
}
- if (count != 0) {
- if (test==0) {
- AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
- test = 0.5; //upper limit value to set kWARNING flag for a task
+ else {
+ TIter next(list[specie]) ;
+ TH1 * hdata ;
+ count[specie] = 0 ;
+ while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
+ if (hdata) {
+ Double_t rv = 0.;
+ if(hdata->GetEntries()>0)rv=1;
+ AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+ count[specie]++ ;
+ test[specie] += rv ;
+ }
+ else{
+ AliError("Data type cannot be processed") ;
+ }
}
- else {
- test /= count ;
+ if (count[specie] != 0) {
+ if (test[specie]==0) {
+ AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
+ test[specie] = 0.5; //upper limit value to set kWARNING flag for a task
+ }
+ else {
+ test[specie] /= count[specie] ;
+ }
+ AliInfo(Form("Test Result = %f", test[specie])) ;
}
}
}
-
- AliInfo(Form("Test Result = %f", test)) ;
return test ;
}
protected:
- virtual Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * list) ;
- virtual Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;}
- virtual Double_t Check() {return 0.;}
- virtual Double_t Check(TObjArray*) {return 0.;}
- virtual Double_t Check(AliQA::ALITASK_t, TNtupleD*) {return 0.;}
+ virtual Double_t * Check(AliQA::ALITASK_t /*index*/, TObjArray ** list) ;
+ virtual Double_t * Check(AliQA::ALITASK_t /*index*/) {return NULL;}
ClassDef(AliTOFQAChecker,2) // description
}
//____________________________________________________________________________
-void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeRecPoints(TTree * recTree) ;
virtual void MakeRaws(AliRawReader* rawReader) ;
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list) ;
virtual void GetMapIndeces(Int_t *in, Int_t *out) ;
ClassDef(AliTOFQADataMakerRec,1) // description
}
//____________________________________________________________________________
-void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTOFQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
virtual void MakeSDigits(TClonesArray * sdigits) ;
virtual void MakeSDigits(TTree * sdigTree);
virtual void StartOfDetectorCycle() ;
- virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list) ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list) ;
virtual void GetMapIndeces(Int_t *in, Int_t *out) ;
ClassDef(AliTOFQADataMakerSim,1) // description
AliTPCQADataMakerRec::AliTPCQADataMakerRec() :
AliQADataMakerRec(AliQA::GetDetName(AliQA::kTPC),
"TPC Rec Quality Assurance Data Maker"),
- fTPCdataQA(0),
- fHistESDclusters(0),fHistESDratio(0), fHistESDpt(0),
- fHistRawsOccupancy(0), fHistRawsOccupancyVsSector(0),
- fHistRawsNClustersPerEventVsSector(0), fHistRawsQVsSector(0),
- fHistRawsQmaxVsSector(0),
- fHistRecPointsQmaxShort(0), fHistRecPointsQmaxMedium(0),
- fHistRecPointsQmaxLong(0), fHistRecPointsQShort(0),
- fHistRecPointsQMedium(0), fHistRecPointsQLong(0),
- fHistRecPointsRow(0)
+ fTPCdataQA(NULL)
{
// ctor
+ fTPCdataQA = new AliTPCdataQA*[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ fTPCdataQA[specie] = NULL ;
+
for(Int_t i = 0; i < 6; i++)
fMapping[i] = 0;
}
//____________________________________________________________________________
AliTPCQADataMakerRec::AliTPCQADataMakerRec(const AliTPCQADataMakerRec& qadm) :
AliQADataMakerRec(),
- fTPCdataQA(0),
- fHistESDclusters(0),fHistESDratio(0), fHistESDpt(0),
- fHistRawsOccupancy(0), fHistRawsOccupancyVsSector(0),
- fHistRawsNClustersPerEventVsSector(0), fHistRawsQVsSector(0),
- fHistRawsQmaxVsSector(0),
- fHistRecPointsQmaxShort(0), fHistRecPointsQmaxMedium(0),
- fHistRecPointsQmaxLong(0), fHistRecPointsQShort(0),
- fHistRecPointsQMedium(0), fHistRecPointsQLong(0),
- fHistRecPointsRow(0)
+ fTPCdataQA(NULL)
{
//copy ctor
// Does not copy the calibration object, instead InitRaws have to be
SetName((const char*)qadm.GetName()) ;
SetTitle((const char*)qadm.GetTitle());
+ fTPCdataQA = new AliTPCdataQA*[AliRecoParam::kNSpecies] ;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ fTPCdataQA[specie] = NULL ;
+
for(Int_t i = 0; i < 6; i++)
fMapping[i] = 0;
// Associate class histogram objects to the copies in the list
// Could also be done with the indexes
//
- fHistESDclusters = (TH1F*)fESDsQAList->FindObject("hESDclusters");
- fHistESDratio = (TH1F*)fESDsQAList->FindObject("hESDratio");
- fHistESDpt = (TH1F*)fESDsQAList->FindObject("hESDpt");
-
- fHistRawsOccupancy = (TH1F*)fRawsQAList->FindObject("hRawsOccupancy");
- fHistRawsOccupancyVsSector =
- (TH1F*)fRawsQAList->FindObject("hRawsOccupancyVsSector");
- fHistRawsNClustersPerEventVsSector =
- (TH1F*)fRawsQAList->FindObject("hRawsNClustersPerEventVsSector");
- fHistRawsQVsSector = (TH1F*)fRawsQAList->FindObject("hRawsQVsSector");
- fHistRawsQmaxVsSector = (TH1F*)fRawsQAList->FindObject("hRawsQmaxVsSector");
-
- fHistRecPointsQmaxShort =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxShort");
- fHistRecPointsQmaxMedium =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxMedium");
- fHistRecPointsQmaxLong =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQmaxLong");
- fHistRecPointsQShort =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQShort");
- fHistRecPointsQMedium =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQMedium");
- fHistRecPointsQLong =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsQLong");
- fHistRecPointsRow =
- (TH1F*)fRecPointsQAList->FindObject("hRecPointsRow");
+
}
//__________________________________________________________________
AliTPCQADataMakerRec::~AliTPCQADataMakerRec()
{
// Destructor
- delete fTPCdataQA;
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
+ if ( fTPCdataQA[specie] != NULL )
+ delete fTPCdataQA[specie] ;
+ delete[] fTPCdataQA;
for(Int_t i = 0; i < 6; i++)
delete fMapping[i];
}
//____________________________________________________________________________
-void AliTPCQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliTPCQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
+
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ if ( !AliQA::Instance()->IsEventSpecieSet(specie) )
+ continue ;
+ if(fTPCdataQA[specie] != NULL) { // do the final step of the QA for Raw data
- if(fTPCdataQA) { // do the final step of the QA for Raw data
-
- fTPCdataQA->Analyse(); // 31/1-08 Analyse is now protected against
+ fTPCdataQA[specie]->Analyse(); // 31/1-08 Analyse is now protected against
// RAW data files with no TPC data
-
- //Add2RawsList(fTPCdataQA, 0);
- // get the histograms and add them to the output
- // 31/8-08 Histogram is only added if the Calibration class
- // receives TPC data
- const Int_t eventCounter = fTPCdataQA->GetEventCounter();
- if(eventCounter>0) { // some TPC data has been processed
-
- // Reset histograms and refill them
- fHistRawsOccupancy->Reset();
- fHistRawsOccupancyVsSector->Reset();
- fHistRawsNClustersPerEventVsSector->Reset();
- fHistRawsQVsSector->Reset();
- fHistRawsQmaxVsSector->Reset();
+
+ SetEventSpecie(specie) ;
+ TH1F * histRawsOccupancy = (TH1F*)GetRawsData(kOccupancy) ;
+ TH1F * histRawsOccupancyVsSector = (TH1F*)GetRawsData(kOccupancyVsSector) ;
+ TH1F * histRawsNClustersPerEventVsSector = (TH1F*)GetRawsData(kNClustersPerEventVsSector) ;
+ TH1F * histRawsQVsSector = (TH1F*)GetRawsData(kQVsSector) ;
+ TH1F * histRawsQmaxVsSector = (TH1F*)GetRawsData(kQmaxVsSector) ;
+ if ( !histRawsOccupancy ||
+ !histRawsOccupancyVsSector ||
+ !histRawsNClustersPerEventVsSector ||
+ !histRawsQVsSector ||
+ !histRawsQmaxVsSector) {
+ AliError("Something very wrong here, corrupted memory ?????. Please check\n") ;
+ continue ;
+ }
+
+ //Add2RawsList(fTPCdataQA, 0);
+ // get the histograms and add them to the output
+ // 31/8-08 Histogram is only added if the Calibration class
+ // receives TPC data
+ const Int_t eventCounter = fTPCdataQA[specie]->GetEventCounter();
+ if(eventCounter>0) { // some TPC data has been processed
+
+ // Reset histograms and refill them
+ histRawsOccupancy->Reset();
+ histRawsOccupancyVsSector->Reset();
+ histRawsNClustersPerEventVsSector->Reset();
+ histRawsQVsSector->Reset();
+ histRawsQmaxVsSector->Reset();
- TH1F* hNorm72 = new TH1F("hNorm72", "histogram to normalize 72 sectors",
- 72, 0, 72);
- hNorm72->Sumw2();
- TH1F* hNorm108 = new TH1F("hNorm108", "histogram to normalize 108 sectors (medium and long pads are split up)",
- 108, 0, 108);
- hNorm108->Sumw2();
-
- for (Int_t iSec = 0; iSec < 72; iSec++) {
+ TH1F* hNorm72 = new TH1F("hNorm72", "histogram to normalize 72 sectors",
+ 72, 0, 72);
+ hNorm72->Sumw2();
+ TH1F* hNorm108 = new TH1F("hNorm108", "histogram to normalize 108 sectors (medium and long pads are split up)",
+ 108, 0, 108);
+ hNorm108->Sumw2();
+
+ for (Int_t iSec = 0; iSec < 72; iSec++) {
- AliTPCCalROC* occupancyROC =
- fTPCdataQA->GetNoThreshold()->GetCalROC(iSec);
- AliTPCCalROC* nclusterROC =
- fTPCdataQA->GetNLocalMaxima()->GetCalROC(iSec);
- AliTPCCalROC* qROC =
- fTPCdataQA->GetMeanCharge()->GetCalROC(iSec);
- AliTPCCalROC* qmaxROC =
- fTPCdataQA->GetMaxCharge()->GetCalROC(iSec);
-
- const Int_t nRows = occupancyROC->GetNrows();
- for (Int_t iRow = 0; iRow < nRows; iRow++) {
-
- Int_t helpSector = iSec;
- if(iRow>=64)
- helpSector += 36; // OROC (long pads)
-
- const Int_t nPads = occupancyROC->GetNPads(iRow);
- for (Int_t iPad = 0; iPad < nPads; iPad++) {
+ AliTPCCalROC* occupancyROC =
+ fTPCdataQA[specie]->GetNoThreshold()->GetCalROC(iSec);
+ AliTPCCalROC* nclusterROC =
+ fTPCdataQA[specie]->GetNLocalMaxima()->GetCalROC(iSec);
+ AliTPCCalROC* qROC =
+ fTPCdataQA[specie]->GetMeanCharge()->GetCalROC(iSec);
+ AliTPCCalROC* qmaxROC =
+ fTPCdataQA[specie]->GetMaxCharge()->GetCalROC(iSec);
+
+ const Int_t nRows = occupancyROC->GetNrows();
+ for (Int_t iRow = 0; iRow < nRows; iRow++) {
+
+ Int_t helpSector = iSec;
+ if(iRow>=64)
+ helpSector += 36; // OROC (long pads)
+
+ const Int_t nPads = occupancyROC->GetNPads(iRow);
+ for (Int_t iPad = 0; iPad < nPads; iPad++) {
- fHistRawsOccupancy->Fill(occupancyROC->GetValue(iRow, iPad));
- hNorm72->Fill(iSec);
- fHistRawsOccupancyVsSector
- ->Fill(iSec, occupancyROC->GetValue(iRow, iPad));
+ histRawsOccupancy->Fill(occupancyROC->GetValue(iRow, iPad));
+ hNorm72->Fill(iSec);
+ histRawsOccupancyVsSector
+ ->Fill(iSec, occupancyROC->GetValue(iRow, iPad));
- const Int_t nClusters = TMath::Nint(nclusterROC->GetValue(iRow, iPad));
+ const Int_t nClusters = TMath::Nint(nclusterROC->GetValue(iRow, iPad));
- if(nClusters>0) {
+ if(nClusters>0) {
- fHistRawsNClustersPerEventVsSector->Fill(iSec, nClusters);
- hNorm108->Fill(helpSector, nClusters);
- fHistRawsQVsSector->Fill(helpSector,
- nClusters*qROC->GetValue(iRow, iPad));
- fHistRawsQmaxVsSector->Fill(helpSector,
- nClusters*qmaxROC->GetValue(iRow, iPad));
- }
- }
- }
- } // end loop over sectors
+ histRawsNClustersPerEventVsSector->Fill(iSec, nClusters);
+ hNorm108->Fill(helpSector, nClusters);
+ histRawsQVsSector->Fill(helpSector,
+ nClusters*qROC->GetValue(iRow, iPad));
+ histRawsQmaxVsSector->Fill(helpSector,
+ nClusters*qmaxROC->GetValue(iRow, iPad));
+ }
+ }
+ }
+ } // end loop over sectors
- // Normalize histograms
- fHistRawsOccupancyVsSector->Divide(hNorm72);
- fHistRawsNClustersPerEventVsSector->Scale(1.0/Float_t(eventCounter));
- fHistRawsQVsSector->Divide(hNorm108);
- fHistRawsQmaxVsSector->Divide(hNorm108);
- delete hNorm72;
- delete hNorm108;
-
+ // Normalize histograms
+ histRawsOccupancyVsSector->Divide(hNorm72);
+ histRawsNClustersPerEventVsSector->Scale(1.0/Float_t(eventCounter));
+ histRawsQVsSector->Divide(hNorm108);
+ histRawsQmaxVsSector->Divide(hNorm108);
+ delete hNorm72;
+ delete hNorm108;
+ }
}
}
-
AliQAChecker::Instance()->Run(AliQA::kTPC, task, list) ;
}
void AliTPCQADataMakerRec::InitESDs()
{
//create ESDs histograms in ESDs subdir
- fHistESDclusters =
+ TH1F * histESDclusters =
new TH1F("hESDclusters", "N TPC clusters per track; N clusters; Counts",
160, 0, 160);
- fHistESDclusters->Sumw2();
- Add2ESDsList(fHistESDclusters, 0);
+ histESDclusters->Sumw2();
+ Add2ESDsList(histESDclusters, KClusters);
- fHistESDratio =
+ TH1F * histESDratio =
new TH1F("hESDratio", "Ratio: TPC clusters / findable; Ratio: cluster/findable; Counts",
100, 0, 1);
- fHistESDratio->Sumw2();
- Add2ESDsList(fHistESDratio, 1);
+ histESDratio->Sumw2();
+ Add2ESDsList(histESDratio, kRatio);
- fHistESDpt =
+ TH1F * histESDpt =
new TH1F("hESDpt", "P_{T} distribution; p_{T} [GeV/c]; Counts",
50, 0, 5);
- fHistESDpt->Sumw2();
- Add2ESDsList(fHistESDpt, 2);
+ histESDpt->Sumw2();
+ Add2ESDsList(histESDpt, kPt);
}
//____________________________________________________________________________
// Laurent Aphecetche pointed out that the mapping was read from file
// for each event, so now we read in the map here and set if for
// the raw data qa
- fTPCdataQA = new AliTPCdataQA();
- LoadMaps(); // Load Altro maps
- fTPCdataQA->SetAltroMapping(fMapping); // set Altro mapping
- fTPCdataQA->SetRangeTime(100, 920); // set time bin interval
- Add2RawsList(fTPCdataQA, 0); // This is used by the AMORE monitoring
+ for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+ fTPCdataQA[specie] = new AliTPCdataQA(AliRecoParam::Convert(specie));
+ LoadMaps(); // Load Altro maps
+ fTPCdataQA[specie]->SetAltroMapping(fMapping); // set Altro mapping
+ fTPCdataQA[specie]->SetRangeTime(100, 920); // set time bin interval
+// Add2RawsList(fTPCdataQA, kTPCdataQA); // This is used by the AMORE monitoring <------- THIS WILL FAIL (YS)
+ }
- fHistRawsOccupancy =
+ TH1F * histRawsOccupancy =
new TH1F("hRawsOccupancy", "Occupancy (all pads); Occupancy; Counts",
100, 0, 1);
- fHistRawsOccupancy->Sumw2();
- Add2RawsList(fHistRawsOccupancy, 1);
-
- fHistRawsOccupancyVsSector =
+ histRawsOccupancy->Sumw2();
+ Add2RawsList(histRawsOccupancy, kOccupancy);
+
+ TH1F * histRawsOccupancyVsSector =
new TH1F("hRawsOccupancyVsSector", "Occupancy vs sector; Sector; Occupancy",
72, 0, 72);
- fHistRawsOccupancyVsSector->Sumw2();
- Add2RawsList(fHistRawsOccupancyVsSector, 2);
+ histRawsOccupancyVsSector->Sumw2();
+ Add2RawsList(histRawsOccupancyVsSector, kOccupancyVsSector);
- fHistRawsNClustersPerEventVsSector =
+ TH1F * histRawsNClustersPerEventVsSector =
new TH1F("hRawsNClustersPerEventVsSector", "Nclusters per event vs sector; Sector; Nclusters per event",
72, 0, 72);
- fHistRawsNClustersPerEventVsSector->Sumw2();
- Add2RawsList(fHistRawsNClustersPerEventVsSector, 3);
+ histRawsNClustersPerEventVsSector->Sumw2();
+ Add2RawsList(histRawsNClustersPerEventVsSector, kNClustersPerEventVsSector);
- fHistRawsQVsSector =
+ TH1F * histRawsQVsSector =
new TH1F("hRawsQVsSector", "<Q> vs sector (OROC med: 36-71, long: 72-107); Sector; <Q>",
108, 0, 108);
- fHistRawsQVsSector->Sumw2();
- Add2RawsList(fHistRawsQVsSector, 4);
+ histRawsQVsSector->Sumw2();
+ Add2RawsList(histRawsQVsSector, kQVsSector);
- fHistRawsQmaxVsSector =
+ TH1F * histRawsQmaxVsSector =
new TH1F("hRawsQmaxVsSector", "<Qmax> vs sector (OROC med: 36-71, long: 72-107); Sector; <Qmax>",
108, 0, 108);
- fHistRawsQmaxVsSector->Sumw2();
- Add2RawsList(fHistRawsQmaxVsSector, 5);
+ histRawsQmaxVsSector->Sumw2();
+ Add2RawsList(histRawsQmaxVsSector, kQmaxVsSector);
}
//____________________________________________________________________________
void AliTPCQADataMakerRec::InitRecPoints()
{
- fHistRecPointsQmaxShort =
+ TH1F * histRecPointsQmaxShort =
new TH1F("hRecPointsQmaxShort", "Qmax distrbution (short pads); Qmax; Counts",
100, 0, 300);
- fHistRecPointsQmaxShort->Sumw2();
- Add2RecPointsList(fHistRecPointsQmaxShort, 0);
+ histRecPointsQmaxShort->Sumw2();
+ Add2RecPointsList(histRecPointsQmaxShort, kQmaxShort);
- fHistRecPointsQmaxMedium =
+ TH1F * histRecPointsQmaxMedium =
new TH1F("hRecPointsQmaxMedium", "Qmax distrbution (medium pads); Qmax; Counts",
100, 0, 300);
- fHistRecPointsQmaxMedium->Sumw2();
- Add2RecPointsList(fHistRecPointsQmaxMedium, 1);
+ histRecPointsQmaxMedium->Sumw2();
+ Add2RecPointsList(histRecPointsQmaxMedium, kQmaxMedium);
- fHistRecPointsQmaxLong =
+ TH1F * histRecPointsQmaxLong =
new TH1F("hRecPointsQmaxLong", "Qmax distrbution (long pads); Qmax; Counts",
100, 0, 300);
- fHistRecPointsQmaxLong->Sumw2();
- Add2RecPointsList(fHistRecPointsQmaxLong, 2);
+ histRecPointsQmaxLong->Sumw2();
+ Add2RecPointsList(histRecPointsQmaxLong, kQmaxLong);
- fHistRecPointsQShort =
+ TH1F * histRecPointsQShort =
new TH1F("hRecPointsQShort", "Q distrbution (short pads); Q; Counts",
100, 0, 2000);
- fHistRecPointsQShort->Sumw2();
- Add2RecPointsList(fHistRecPointsQShort, 3);
+ histRecPointsQShort->Sumw2();
+ Add2RecPointsList(histRecPointsQShort, kQShort);
- fHistRecPointsQMedium =
+ TH1F * histRecPointsQMedium =
new TH1F("hRecPointsQMedium", "Q distrbution (medium pads); Q; Counts",
100, 0, 2000);
- fHistRecPointsQMedium->Sumw2();
- Add2RecPointsList(fHistRecPointsQMedium, 4);
+ histRecPointsQMedium->Sumw2();
+ Add2RecPointsList(histRecPointsQMedium, kQMedium);
- fHistRecPointsQLong =
+ TH1F * histRecPointsQLong =
new TH1F("hRecPointsQLong", "Q distrbution (long pads); Q; Counts",
100, 0, 2000);
- fHistRecPointsQLong->Sumw2();
- Add2RecPointsList(fHistRecPointsQLong, 5);
+ histRecPointsQLong->Sumw2();
+ Add2RecPointsList(histRecPointsQLong, kQLong);
- fHistRecPointsRow =
+ TH1F * histRecPointsRow =
new TH1F("hRecPointsRow", "Clusters per row; Row; Counts",
159, 0, 159);
- fHistRecPointsRow->Sumw2();
- Add2RecPointsList(fHistRecPointsRow, 6);
+ histRecPointsRow->Sumw2();
+ Add2RecPointsList(histRecPointsRow, kRow);
}
//____________________________________________________________________________
Int_t nTPCclusters = track->GetTPCNcls();
Int_t nTPCclustersFindable = track->GetTPCNclsF();
if ( nTPCclustersFindable<=0) continue;
- fHistESDclusters->Fill(nTPCclusters);
- fHistESDratio->Fill(Float_t(nTPCclusters)/Float_t(nTPCclustersFindable));
- fHistESDpt->Fill(track->Pt());
+ GetESDsData(KClusters)->Fill(nTPCclusters);
+ GetESDsData(kRatio)->Fill(Float_t(nTPCclusters)/Float_t(nTPCclustersFindable));
+ GetESDsData(kPt)->Fill(track->Pt());
}
}
// to handle the data and then in the end extract the data
//
rawReader->Reset() ;
- fTPCdataQA->ProcessEvent(rawReader);
-}
+ fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)]->ProcessEvent(rawReader);
+ }
//____________________________________________________________________________
void AliTPCQADataMakerRec::MakeRecPoints(TTree* recTree)