X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ACORDE%2FAliACORDEQADataMakerRec.cxx;h=ed9957db912253eef712d802c98791ab41f377d7;hb=64647ced25646c7831839e5caea759cdcf682ae8;hp=0a38b5f7a82b430bd8800acdb26bf4c379398a2c;hpb=41d0241fb62775d3d0d1b857d917bb3127e9f209;p=u%2Fmrichter%2FAliRoot.git diff --git a/ACORDE/AliACORDEQADataMakerRec.cxx b/ACORDE/AliACORDEQADataMakerRec.cxx index 0a38b5f7a82..ed9957db912 100755 --- a/ACORDE/AliACORDEQADataMakerRec.cxx +++ b/ACORDE/AliACORDEQADataMakerRec.cxx @@ -25,8 +25,14 @@ // // Created: June 13th 2008 //--- +// Last update: Sept. 29th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) +// --> ACOMultiSL0_DQM_Shifter filling histogram fixed +// --> Expert histogram updated: 2 histograms (Checks the hits for SL0 and AMU mode) +// --> To be include in the next update: threshold settings from AliACORDEQAThreshold class (not yet) +// Last update: May 5th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) -->Creates QA expert histograms +// and QA-shifter histograms also with threshold lines and visual alarm // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram -// Last update: Nov. 14t 2009 --> MRC (FCFM-BUAP) +// Last update: Nov. 14t 2009 --> MRC (FCFM-BUAP) // |--> Change in Multiplicity histogram for AMORE (to detect empty triggers events of ACORDE) @@ -36,6 +42,7 @@ #include #include #include +#include // --- Standard library --- // --- AliRoot header files --- @@ -50,16 +57,23 @@ ClassImp(AliACORDEQADataMakerRec) //____________________________________________________________________________ -AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker") + AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker") { } //____________________________________________________________________________ -AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec() +AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm): + AliQADataMakerRec() { SetName((const char*)qadm.GetName()) ; SetTitle((const char*)qadm.GetTitle()); } + +//__________________________________________________________________ +AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec() +{ +} + //__________________________________________________________________ AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm ) { @@ -73,6 +87,72 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj { //Detector specific actions at end of cycle // do the QA checking + ResetEventTrigClasses(); // reset triggers list to select all histos + // Update for DQM GUI + // + + for (Int_t specie = 0; specie < AliRecoParam::kNSpecies ; specie++) { + if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ; + // + // RS Set event specie + SetEventSpecie(AliRecoParam::ConvertIndex(specie)); + // + for (int itc=-1;itcIntegral()==0) || (integralSL0=h0->Integral()==0) ) ) continue; + + Float_t maxSL0 = 1.1*h0->GetMaximum(); + Float_t scaleSL0 = 0.; + if (maxSL0!=0) scaleSL0 = 1./maxSL0; + else scaleSL0 = 1.; + h0->Scale(scaleSL0); + + + Float_t maxAMU = 1.1*h2->GetMaximum(); + Float_t scaleAMU = 0.; + if (maxAMU!=0) scaleAMU = 1./maxAMU; + else scaleAMU = 1.; + h2->Scale(scaleAMU); + + Int_t indexActiveModuleSL0 = 0; + Int_t indexActiveModuleAMU = 0; + + for(Int_t iModule = 0; iModule < 60; iModule++){ + if (h0->GetBinContent(iModule) > 0) indexActiveModuleSL0++; + if (h2->GetBinContent(iModule) > 0) indexActiveModuleAMU++; + } + + Float_t meanHitsSL0 = 0.; + Float_t meanHitsAMU = 0.; + if ((indexActiveModuleSL0==0) || (indexActiveModuleAMU == 0)) continue; + + meanHitsSL0 = h0->Integral()/indexActiveModuleSL0; + meanHitsAMU = h2->Integral()/indexActiveModuleAMU; + + TH1* h4 = (TH1*)harr[4]; + TH1* h5 = (TH1*)harr[5]; + + if (h4 && h5 && meanHitsAMU!=0 && meanHitsSL0!=0){ + for (Int_t iModule = 0; iModule < 60; iModule++){ + h4->Fill(h0->GetBinContent(iModule)/meanHitsSL0-1); + h5->Fill(h2->GetBinContent(iModule)/meanHitsAMU-1); + } + } + + } // end of trigger classes loop + } // end specie loop + // QA Checker standar (to be updated) + // AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ; } @@ -88,32 +168,57 @@ void AliACORDEQADataMakerRec::InitRaws() { // create Raw histograms in Raw subdir - const Bool_t expert = kTRUE ; - const Bool_t saveCorr = kTRUE ; - const Bool_t image = kTRUE ; - const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9", - "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9", - "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9", - "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9", - "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9", - "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"}; - - - TH1F *fhACORDEBitPattern[4]; - fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern - fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern - fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);//AcordeSingleMuon Multiplicity - fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);//AcordeMultiMuon Multiplicity - for(Int_t i=0;i<4;i++) - Add2RawsList(fhACORDEBitPattern[i],i,!expert, image, !saveCorr); - - for (Int_t iModule = 0; iModule<60; iModule++) - { - fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]); - fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]); - } + const Bool_t expert = kTRUE ; + const Bool_t saveCorr = kTRUE ; + const Bool_t image = kTRUE ; + TH1F * fhACORDEBitPatternDQM = new TH1F("ACOHitsSL0_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode + TH1F * fhACORDEMultiplicitySL0DQM = new TH1F("ACOMultiSL0_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode + TH1F * fhACORDEBitPatternAMUDQM = new TH1F("ACOHitsAMU_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode + TH1F * fhACORDEMultiplicityAMUDQM = new TH1F("ACOMultiAMU_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode + TH1F * fhACORDEBitPatternCheckDQMSL0 = new TH1F("ACOHitsTriggerCheck_DQMExpertSL0","Check the activity of ACORDE's modules; Hits per module/mean of Hits; Counts",100,-3,5); // Check the trigger status of ACORDE (SL0 vs AMU) + TH1F * fhACORDEBitPatternCheckDQMAMU = new TH1F("ACOHitsTriggerCheck_DQMExpertAMU","Check the activity of ACORDE's modules; Hits per module/mean of Hits; Counts",100,-3,5); // Check the trigger status of ACORDE (SL0 vs AMU) + // Expert histograms + // Check the hits multiplicity from trigger configuration + Add2RawsList(fhACORDEBitPatternCheckDQMSL0,4,expert,image,!saveCorr); + fhACORDEBitPatternCheckDQMSL0->SetFillColor(kOrange); + Add2RawsList(fhACORDEBitPatternCheckDQMAMU,5,expert,image,!saveCorr); + fhACORDEBitPatternCheckDQMAMU->SetFillColor(kRed+2); + + + // AMORE diplay settings for shifter on GUI + + // For SL0 ACO trigger mode + + Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr); + ForbidCloning(fhACORDEBitPatternDQM); + Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr); + ForbidCloning(fhACORDEMultiplicitySL0DQM); + // For Hits distribution on ACORDE + + fhACORDEBitPatternDQM->SetFillColor(kMagenta+2); + + // For ACORDE Multiplicity distribution of fired modules + + fhACORDEMultiplicitySL0DQM->SetFillColor(kMagenta); + + // For AMU ACO trigger mode + + Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr); + Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr); + + // For Hits distribution on ACORDE + + fhACORDEBitPatternAMUDQM->SetFillColor(kViolet+7); + + // For ACORDE Multiplicity distribution of fired modules + + fhACORDEMultiplicityAMUDQM->SetFillColor(kViolet+6); + + // + ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line } + //____________________________________________________________________________ void AliACORDEQADataMakerRec::InitDigits() { @@ -133,6 +238,8 @@ void AliACORDEQADataMakerRec::InitDigits() fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60); Add2DigitsList(fhDigitsModule,0,!expert,image); for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]); + // + ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line } //____________________________________________________________________________ @@ -141,6 +248,8 @@ void AliACORDEQADataMakerRec::InitRecPoints() { // create cluster histograms in RecPoint subdir // Not needed for ACORDE by now !!! + // + ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line } //____________________________________________________________________________ @@ -175,14 +284,15 @@ void AliACORDEQADataMakerRec::InitESDs() fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]); fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]); } - - + // + ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line } //____________________________________________________________________________ void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader) { //fills QA histos for RAW - + IncEvCountCycleRaws(); + IncEvCountTotalRaws(); rawReader->Reset(); AliACORDERawStream rawStream(rawReader); size_t contSingle=0; @@ -230,22 +340,30 @@ if(rawStream.Next()) { if(kroSingle[r]==1) { - GetRawsData(0)->Fill(r+1); - contSingle=contSingle+1; + FillRawsData(0,r); + //FillRawsData(4,r); + contSingle++; } if(kroMulti[r]==1) { - GetRawsData(1)->Fill(r+1); - contMulti++; + FillRawsData(2,r); + //FillRawsData(6,r); + contMulti++; } - - }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti); + + } + FillRawsData(1,contSingle); + FillRawsData(3,contMulti); + // FillRawsData(7,contMulti); } } //____________________________________________________________________________ void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree) { //fills QA histos for Digits + IncEvCountCycleDigits(); + IncEvCountTotalDigits(); + if (fDigitsArray) fDigitsArray->Clear() ; else @@ -263,7 +381,7 @@ void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree) AliError("The unchecked digit doesn't exist"); continue ; } - GetDigitsData(0)->Fill(AcoDigit->GetModule()-1); + FillDigitsData(0,AcoDigit->GetModule()-1); } } } @@ -273,17 +391,19 @@ void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree) void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd) { //fills QA histos for ESD - + IncEvCountCycleESDs(); + IncEvCountTotalESDs(); + // AliESDACORDE * fESDACORDE= esd->GetACORDEData(); Int_t acoMulti=0; for(int i=0;i<60;i++) { - if(fESDACORDE->GetHitChannel(i)) - { - GetESDsData(0)->Fill(i+1); - GetESDsData(1)->Fill(i+1); - acoMulti++; + if(fESDACORDE->GetHitChannel(i)) + { + FillESDsData(0,i+1); + FillESDsData(1,i+1); + acoMulti++; } - }GetESDsData(2)->Fill(acoMulti); + } FillESDsData(2,acoMulti); }