1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include "AliMUONTriggerEfficiencyCells.h"
19 #include "AliMpConstants.h"
21 // Classes for display
22 #include "AliMUONTriggerDisplay.h"
23 #include "AliCDBManager.h"
24 #include "AliMpDDLStore.h"
25 #include "AliMpLocalBoard.h"
27 #include "AliMpVSegmentation.h"
28 #include "AliMpSegmentation.h"
33 #include "Riostream.h"
43 #include "TPaveLabel.h"
49 //-----------------------------------------------------------------------------
50 /// \class AliMUONTriggerEfficiencyCells
51 /// A class to store and give access to the trigger chamber efficiency.
53 /// Efficiency is stored per cathode on local boards
55 /// The main method of this class is IsTriggered().
57 /// $ALICE_ROOT/MUON/data/efficiencyCells.dat contains efficiency
58 /// for each chamber (i.e. DetElement).
60 /// In the case of local boards, efficiency is stored from left to right
61 /// per increasing board number (from 1 to 234)
63 /// The file can be edited in order to change efficiency
64 /// in a chosen local board/region of the chamber.
67 /// But please note that this object is also available from the CDB
69 /// \author Diego Stocco; INFN Torino
70 //-----------------------------------------------------------------------------
73 ClassImp(AliMUONTriggerEfficiencyCells)
76 //__________________________________________________________________________
77 AliMUONTriggerEfficiencyCells::AliMUONTriggerEfficiencyCells()
81 fNoCountHistoList(0x0),
83 fDisplayHistoList(0x0),
85 fFiredFitHistoList(0x0),
86 fFiredDisplayHistoList(0x0)
88 /// Default constructor.
94 //__________________________________________________________________________
95 AliMUONTriggerEfficiencyCells::AliMUONTriggerEfficiencyCells(const Char_t* filename)
99 fNoCountHistoList(0x0),
101 fDisplayHistoList(0x0),
102 fBoardLabelList(0x0),
103 fFiredFitHistoList(0x0),
104 fFiredDisplayHistoList(0x0)
106 /// Constructor using an ASCII file.
112 AliMUONTriggerEfficiencyCells::AliMUONTriggerEfficiencyCells(TList *countHistoList,
113 TList *noCountHistoList)
116 fCountHistoList(countHistoList),
117 fNoCountHistoList(noCountHistoList),
119 fDisplayHistoList(0x0),
120 fBoardLabelList(0x0),
121 fFiredFitHistoList(0x0),
122 fFiredDisplayHistoList(0x0)
124 /// Constructor using an ASCII file.
128 FillHistosFromList();
131 //_____________________________________________________________________________
132 AliMUONTriggerEfficiencyCells::AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other)
135 fCountHistoList(other.fCountHistoList),
136 fNoCountHistoList(other.fNoCountHistoList),
137 fFiredStrips(other.fFiredStrips),
138 fDisplayHistoList(other.fDisplayHistoList),
139 fBoardLabelList(other.fBoardLabelList),
140 fFiredFitHistoList(other.fFiredFitHistoList),
141 fFiredDisplayHistoList(other.fFiredDisplayHistoList)
145 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
146 fBoardEfficiency[chCath] = other.fBoardEfficiency[chCath];
147 fSlatEfficiency[chCath] = other.fSlatEfficiency[chCath];
151 //_____________________________________________________________________________
152 AliMUONTriggerEfficiencyCells& AliMUONTriggerEfficiencyCells::operator=(const AliMUONTriggerEfficiencyCells& other)
154 /// Asignment operator
155 // check assignement to self
159 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
160 fBoardEfficiency[chCath] = other.fBoardEfficiency[chCath];
161 fSlatEfficiency[chCath] = other.fSlatEfficiency[chCath];
164 fCountHistoList = other.fCountHistoList;
165 fNoCountHistoList = other.fNoCountHistoList;
166 fFiredStrips = other.fFiredStrips;
168 fDisplayHistoList = other.fDisplayHistoList;
169 fBoardLabelList = other.fBoardLabelList;
170 fFiredFitHistoList = other.fFiredFitHistoList;
171 fFiredDisplayHistoList = other.fFiredDisplayHistoList;
176 //__________________________________________________________________________
177 AliMUONTriggerEfficiencyCells::~AliMUONTriggerEfficiencyCells()
183 //__________________________________________________________________________
184 void AliMUONTriggerEfficiencyCells::GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const
186 /// Get the efficiencies of the 2 cathodes at a given local board
188 Int_t chamber = FindChamberIndex(detElemId);
189 Int_t bin = fBoardEfficiency[chamber]->FindBin(localBoard);
190 eff1 = fBoardEfficiency[chamber]->GetBinContent(bin);
191 eff2 = fBoardEfficiency[fgkNchambers+chamber]->GetBinContent(bin);
195 //__________________________________________________________________________
197 AliMUONTriggerEfficiencyCells::IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const
199 /// Whether or not a given local board has a chance to trig, on each cathode.
203 GetCellEfficiency(detElemId, localBoard, eff1, eff2);
206 if(gRandom->Rndm()>eff1)trig1 = kFALSE;
207 if(gRandom->Rndm()>eff2)trig2 = kFALSE;
211 //__________________________________________________________________________
212 void AliMUONTriggerEfficiencyCells::ReadFile(const Char_t* filename)
214 /// Reads a file containing the efficiency map.
216 TString fileName = gSystem->ExpandPathName(filename);
217 if(fileName.EndsWith(".root")){
218 ReadHistoBoards(fileName.Data());
223 ifstream file(fileName.Data());
227 if(!strcmp(dat,"localBoards"))ReadFileBoards(file);
228 else AliWarning("File .dat in wrong format");
231 AliWarning(Form("Can't read file %s",fileName.Data()));
236 //__________________________________________________________________________
237 void AliMUONTriggerEfficiencyCells::ReadFileBoards(ifstream &file)
239 /// Structure of file (.dat) containing local board efficency
240 Int_t datInt=0, detEl=0, chamber=0, chCath=0, bin=0;
241 Float_t datFloat=0.0;
244 while (file >> dat) {
246 chamber = FindChamberIndex(detEl);
247 for(Int_t cath=0; cath<fgkNcathodes; cath++){
248 chCath = fgkNchambers*cath + chamber;
251 for(Int_t board=1; board<=AliMpConstants::NofLocalBoards(); board++){
253 bin = fBoardEfficiency[chCath]->FindBin(board);
254 fBoardEfficiency[chCath]->SetBinContent(bin, datFloat);
261 //__________________________________________________________________________
262 void AliMUONTriggerEfficiencyCells::ReadHistoBoards(const Char_t *filename)
264 /// Structure of file (.root) containing local board efficency
265 TFile *file = new TFile(filename, "read");
267 AliWarning(Form("Can't read file %s",filename));
271 TString cathCode[fgkNcathodes] = {"bendPlane", "nonBendPlane"};
272 enum {kAllChEff, kChNonEff, kNumOfHistoTypes};
273 TString histoTypeName[2] = {"CountInCh", "NonCountInCh"};
275 if(!fCountHistoList) fCountHistoList = new TList();
276 else fCountHistoList->Delete();
277 if(!fNoCountHistoList) fNoCountHistoList = new TList();
278 else fNoCountHistoList->Delete();
280 TList *currList[2] = {fCountHistoList, fNoCountHistoList};
284 for(Int_t cath=0; cath<fgkNcathodes; cath++){
285 for(Int_t hType=0; hType<kNumOfHistoTypes; hType++){
286 histoName = Form("%sChamber%s", cathCode[cath].Data(), histoTypeName[hType].Data());
287 histo = (TH1F*)file->Get(histoName.Data());
288 currList[hType]->Add(histo);
292 for(Int_t cath=0; cath<fgkNcathodes; cath++){
293 for(Int_t ch=0; ch<fgkNchambers; ch++){
294 for(Int_t hType=0; hType<kNumOfHistoTypes; hType++){
295 histoName = Form("%sSlat%s%i", cathCode[cath].Data(), histoTypeName[hType].Data(), 11+ch);
296 histo = (TH1F*)file->Get(histoName.Data());
297 currList[hType]->Add(histo);
302 for(Int_t cath=0; cath<fgkNcathodes; cath++){
303 for(Int_t ch=0; ch<fgkNchambers; ch++){
304 for(Int_t hType=0; hType<kNumOfHistoTypes; hType++){
305 histoName = Form("%sBoard%s%i", cathCode[cath].Data(), histoTypeName[hType].Data(), 11+ch);
306 histo = (TH1F*)file->Get(histoName.Data());
307 currList[hType]->Add(histo);
313 FillHistosFromList();
317 //_____________________________________________________________________________
318 void AliMUONTriggerEfficiencyCells::CheckConstants() const
320 /// Check consistence of redefined constants
322 assert(fgkNcathodes == AliMpConstants::NofCathodes());
323 assert(fgkNchambers == AliMpConstants::NofTriggerChambers());
324 assert(fgkNplanes == AliMpConstants::NofTriggerChambers() * fgkNcathodes);
328 //__________________________________________________________________________
329 Int_t AliMUONTriggerEfficiencyCells::FindChamberIndex(Int_t detElemId) const
331 /// From detElemId to chamber number
333 // Int_t iChamber = AliMpDEManager::GetChamberId(detElemId);
334 Int_t iChamber = detElemId/100 - 1;
335 Int_t chamber = iChamber-AliMpConstants::NofTrackingChambers();
340 //__________________________________________________________________________
342 AliMUONTriggerEfficiencyCells::Reset()
344 /// Sets our internal array contents to zero.
346 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
347 fBoardEfficiency[chCath] = 0x0;
348 fSlatEfficiency[chCath] = 0x0;
353 //__________________________________________________________________________
355 AliMUONTriggerEfficiencyCells::InitHistos()
357 /// Sets our internal array contents to zero.
359 const Int_t kNumOfBoards = AliMpConstants::NofLocalBoards();
360 const Int_t kNslats = 18;
364 TString cathCode[fgkNcathodes] = {"bendPlane", "nonBendPlane"};
366 for(Int_t ch=0; ch<fgkNchambers; ch++){
367 for(Int_t cath=0; cath<fgkNcathodes; cath++){
368 chCath = fgkNchambers*cath + ch;
369 histoName = Form("%sBoardEffChamber%i", cathCode[cath].Data(), 11+ch);
370 fBoardEfficiency[chCath] = new TH1F(histoName.Data(), histoName.Data(), kNumOfBoards, 1-0.5, kNumOfBoards+1.-0.5);
371 histoName = Form("%sSlatEffChamber%i", cathCode[cath].Data(), 11+ch);
372 fSlatEfficiency[chCath] = new TH1F(histoName.Data(), histoName.Data(), kNslats, 0-0.5, kNslats-0.5);
378 //__________________________________________________________________________
380 AliMUONTriggerEfficiencyCells::FillHistosFromList()
382 /// Fills internal histos from list.
385 TH1F *histoNum = 0x0, *histoDen=0x0, *currHisto = 0x0;
386 TString slatName = "Slat", boardName = "Board", histoName;
387 Int_t iHistoBoard = -1, iHistoSlat = -1;
388 Float_t efficiency, efficiencyError;
390 Int_t nentries = fCountHistoList->GetEntries();
392 for(Int_t iEntry=0; iEntry<nentries; iEntry++){
393 histoNum = (TH1F*)fCountHistoList->At(iEntry);
394 histoDen = (TH1F*)fNoCountHistoList->At(iEntry);
397 AliWarning("Histogram not found in fCountHistoList. Skip to next");
401 AliWarning("Histogram not found in fNoCountHistoList. Skip to next");
405 histoName = histoNum->GetName();
406 nHistoBins = histoNum->GetNbinsX();
408 if(histoName.Contains(boardName)){
410 currHisto = fBoardEfficiency[iHistoBoard];
412 else if(histoName.Contains(slatName)){
414 currHisto = fSlatEfficiency[iHistoSlat];
418 for(Int_t iBin=1; iBin<=nHistoBins; iBin++){
419 CalculateEfficiency((Int_t)histoNum->GetBinContent(iBin), (Int_t)histoNum->GetBinContent(iBin) + (Int_t)histoDen->GetBinContent(iBin), efficiency, efficiencyError, kFALSE);
421 currHisto->SetBinContent(iBin, efficiency);
422 currHisto->SetBinError(iBin, efficiencyError);
428 //_____________________________________________________________________________
429 void AliMUONTriggerEfficiencyCells::CalculateEfficiency(Int_t trigger44, Int_t trigger34,
430 Float_t &efficiency, Float_t &error,
431 Bool_t failuresAsInput)
434 /// Returns the efficiency.
440 efficiency=(Double_t)trigger44/((Double_t)trigger34);
441 if(failuresAsInput)efficiency=1.-(Double_t)trigger44/((Double_t)trigger34);
443 Double_t q = TMath::Abs(1-efficiency);
444 if(efficiency<0)error=0.0;
445 else error = TMath::Sqrt(efficiency*q/((Double_t)trigger34));
449 //_____________________________________________________________________________
450 void AliMUONTriggerEfficiencyCells::CheckFiredStrips(const Char_t* cdbStorage,
454 /// Check for fired strips participating to efficiency
455 /// calculation (when available).
456 /// Strips inside a local board should be quite homogeneously hit
457 /// If not, this could be a problem of electronics (i.e. ADULT board off).
461 AliWarning("List of fired pads not present. Check not performable.");
465 GetListsForCheck(cdbStorage, runNumber);
469 // Check fired pads (when available)
470 if(fFiredFitHistoList){
473 TCanvas *histoFiredCan[20];
474 Int_t nEntries = fFiredFitHistoList->GetEntries();
475 for(Int_t iEntry=0; iEntry<nEntries; iEntry++){
476 histo1D = (TH1F*)fFiredFitHistoList->At(iEntry);
477 printf("Problems found in %s\n", histo1D->GetTitle());
479 Int_t nPrintCan = nEntries;
481 AliWarning("Too many boards with problems: only 20 will be shown");
484 for(Int_t iCan=0; iCan<nPrintCan; iCan++){
485 histo1D = (TH1F*)fFiredFitHistoList->At(iCan);
486 histoName = histo1D->GetName();
487 histoName.Append("Can");
488 histoFiredCan[iCan] = new TCanvas(histoName.Data(), histoName.Data(), 100+10*iCan, 10*iCan, 700, 700);
489 histoFiredCan[iCan]->SetRightMargin(0.14);
490 histoFiredCan[iCan]->SetLeftMargin(0.12);
492 fitFunc = histo1D->GetFunction("pol0");
493 fitFunc->SetLineColor(2);
494 fitFunc->Draw("same");
497 printf("\nAll local boards seem ok!!\n\n");
503 //_____________________________________________________________________________
504 void AliMUONTriggerEfficiencyCells::DisplayEfficiency(Bool_t perSlat,
505 const Char_t* cdbStorage,
509 /// Display calculated efficiency.
512 Bool_t isInitSlat = kFALSE, isInitBoard = kFALSE;
513 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
514 if(fBoardEfficiency[chCath]->GetEntries()>0) isInitBoard = kTRUE;
515 if(fSlatEfficiency[chCath]->GetEntries()>0) isInitSlat = kTRUE;
519 printf("Trigger efficiency not initialized per board.\nDisplay not yet implemented.\n");
522 if(!isInitSlat && perSlat){
523 printf("Trigger efficiency not initialized for slat.\nPlease try option kFALSE.\n");
527 GetListsForCheck(cdbStorage, runNumber);
529 //const Int_t kNumOfBoards = AliMpConstants::NofLocalBoards();
532 TString histoName, histoTitle;
534 // Plot fired strips (when available)
535 if(fFiredDisplayHistoList){
536 TCanvas *displayFiredCan[fgkNplanes];
537 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
538 histo = (TH2F*)fFiredDisplayHistoList->At(chCath);
539 histoName = Form("%sCan", histo->GetName());
540 histoTitle = Form("%s", histo->GetTitle());
541 displayFiredCan[chCath] = new TCanvas(histoName.Data(), histoTitle.Data(), 100+10*chCath, 10*chCath, 700, 700);
542 displayFiredCan[chCath]->SetRightMargin(0.14);
543 displayFiredCan[chCath]->SetLeftMargin(0.12);
544 histo->GetYaxis()->SetTitleOffset(1.4);
545 histo->SetStats(kFALSE);
551 if(fDisplayHistoList){
552 TCanvas *can[fgkNplanes];
553 for(Int_t chCath=0; chCath<fgkNplanes; chCath++){
554 Int_t currChCath = chCath;
555 if(perSlat==kTRUE) currChCath += fgkNplanes;
556 histo = (TH2F*)fDisplayHistoList->At(currChCath);
557 histoName = Form("%sCan", histo->GetName());
558 histoTitle = Form("%s", histo->GetTitle());
559 can[chCath] = new TCanvas(histoName.Data(), histoTitle.Data(), 100+10*chCath, 10*chCath, 700, 700);
560 can[chCath]->SetRightMargin(0.14);
561 can[chCath]->SetLeftMargin(0.12);
562 histo->GetZaxis()->SetRangeUser(0.,1.);
563 histo->GetYaxis()->SetTitleOffset(1.4);
564 histo->SetStats(kFALSE);
566 if(perSlat==kTRUE) continue;
567 histo = (TH2F*)fBoardLabelList->At(currChCath);
568 histo->Draw("textsame");
574 //__________________________________________________________________________
575 Bool_t AliMUONTriggerEfficiencyCells::GetListsForCheck(const Char_t* cdbStorage,
579 /// Getting histograms for efficiency,
580 /// map of fired strips entering efficiency calculations,
581 /// fits for checking switched-off elements in chambers.
583 const Float_t kChi2RedMax = 1.5;
584 const Float_t kDummyFired = 1e-5;
586 if(fDisplayHistoList || fBoardLabelList || fFiredFitHistoList || fFiredDisplayHistoList) return kTRUE;
588 if(!fDisplayHistoList) fDisplayHistoList = new TList();
589 if(!fBoardLabelList) fBoardLabelList = new TList();
590 if(!fFiredFitHistoList && fFiredStrips) fFiredFitHistoList = new TList();
591 if(!fFiredDisplayHistoList && fFiredStrips) fFiredDisplayHistoList = new TList();
593 AliCDBManager::Instance()->SetDefaultStorage(cdbStorage);
594 AliCDBManager::Instance()->SetRun(runNumber);
596 TH3F* padFired = 0x0;
597 TH2F* displayHisto = 0x0;
598 TH1F* histoFired[fgkNplanes][234];
600 Bool_t isStripOffInBoard[fgkNplanes][234];
602 TString histoName, histoTitle;
603 TString cathName[fgkNcathodes] = {"bendPlane", "nonBendPlane"};
605 AliMUONTriggerDisplay triggerDisplay;
607 for(Int_t iCath=0; iCath<fgkNcathodes; iCath++){
608 if(fFiredStrips) padFired = (TH3F*)fFiredStrips->At(iCath);
609 for(Int_t iCh=0; iCh<fgkNchambers; iCh++){
610 Int_t chCath = fgkNchambers*iCath + iCh;
611 Int_t currCh = 11 + iCh;
612 histoName = Form("%sChamber%i", cathName[iCath].Data(), currCh);
613 histoTitle = Form("Chamber %i: efficiency %s", currCh, cathName[iCath].Data());
615 (TH2F*)triggerDisplay.GetDisplayHistogram(fBoardEfficiency[chCath], histoName,
616 AliMUONTriggerDisplay::kDisplayBoards,
617 iCath,currCh,histoTitle,
618 AliMUONTriggerDisplay::kShowZeroes);
619 fDisplayHistoList->Add(displayHisto);
621 histoName = Form("labels%sChamber%i", cathName[iCath].Data(), currCh);
623 (TH2F*)triggerDisplay.GetBoardNumberHisto(histoName,currCh);
624 fBoardLabelList->Add(displayHisto);
626 if(!fFiredStrips) continue;
627 histoName = Form("firedPads%sChamber%i", cathName[iCath].Data(), currCh);
628 histoTitle = Form("Chamber %i: Fired pads %s", currCh, cathName[iCath].Data());
629 bin = padFired->GetXaxis()->FindBin(currCh);
630 padFired->GetXaxis()->SetRange(bin,bin);
632 (TH2F*)triggerDisplay.GetDisplayHistogram(padFired->Project3D("zy"),histoName,
633 AliMUONTriggerDisplay::kDisplayStrips,
634 iCath,currCh,histoTitle);
635 fFiredDisplayHistoList->Add(displayHisto);
637 for(Int_t ib=0; ib<AliMpConstants::NofLocalBoards(); ib++){
638 histoName = Form("%sChamber%iBoard%i", cathName[iCath].Data(), currCh, ib+1);
639 histoTitle = Form("Chamber %i: fired pads %s board = %i", currCh, cathName[iCath].Data(), ib+1);
640 histoFired[chCath][ib] = new TH1F(histoName.Data(), histoTitle.Data(), 16, -0.5, 15.5);
641 histoFired[chCath][ib]->SetXTitle("board");
642 isStripOffInBoard[chCath][ib] = kFALSE;
647 for(Int_t iCath=0; iCath<fgkNcathodes; iCath++){
648 for(Int_t iCh=0; iCh<fgkNchambers; iCh++){
649 Int_t chCath = fgkNchambers*iCath + iCh;
650 Int_t currCh = 11+iCh;
651 histoName = Form("%sChamber%iSlatEff", cathName[iCath].Data(), currCh);
652 histoTitle = Form("Chamber %i: efficiency %s per slat", currCh, cathName[iCath].Data());
654 (TH2F*)triggerDisplay.GetDisplayHistogram(fSlatEfficiency[chCath], histoName,
655 AliMUONTriggerDisplay::kDisplaySlats,
656 iCath,currCh,histoTitle);
657 fDisplayHistoList->Add(displayHisto);
661 if(!fFiredStrips) return kTRUE;
663 // Check fired pads (when available)
664 for(Int_t iLoc = 0; iLoc < AliMpConstants::NofLocalBoards(); iLoc++) {
665 Int_t iBoard = iLoc+1;
666 for(Int_t iCh=0; iCh<AliMpConstants::NofChambers(); iCh++){
667 Int_t iChamber = iCh + AliMpConstants::NofTrackingChambers();
669 Int_t detElemId = AliMpDDLStore::Instance()->GetDEfromLocalBoard(iBoard, iChamber);
671 if (!detElemId) continue;
673 AliMpLocalBoard* localBoard = AliMpDDLStore::Instance()->GetLocalBoard(iBoard, kFALSE);
676 if( !localBoard->IsNotified())
679 for(Int_t iCath=0; iCath<AliMpConstants::NofCathodes(); iCath++){
680 Int_t chCath = fgkNchambers*iCath + iCh;
682 const AliMpVSegmentation* seg =
683 AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::GetCathodType(iCath));
685 for (Int_t iStrip = 0; iStrip < 16; ++iStrip) {
686 AliMpPad pad = seg->PadByLocation(iBoard,iStrip,kFALSE);
687 if (!pad.IsValid()) continue;
689 padFired = (TH3F*)fFiredStrips->At(iCath);
690 Float_t nFired = padFired->GetBinContent(11+iCh, iBoard, iStrip);
691 if(nFired==0.) nFired = kDummyFired;
692 histoFired[chCath][iLoc]->Fill(iStrip, nFired);
695 histoFired[chCath][iLoc]->Fit("pol0","Q0R","",0., (Float_t)nStrips-1.);
696 fitFunc = histoFired[chCath][iLoc]->GetFunction("pol0");
697 Float_t chi2 = fitFunc->GetChisquare();
698 Float_t ndf = (Float_t)fitFunc->GetNDF();
699 Float_t reducedChi2 = chi2/ndf;
700 if(reducedChi2>kChi2RedMax) {
701 isStripOffInBoard[chCath][iLoc] = kTRUE;
702 fFiredFitHistoList->Add(histoFired[chCath][iLoc]);
704 } // loop on cathodes
705 } // loop on chambers
706 } // loop on local boards
711 //__________________________________________________________________________
712 Bool_t AliMUONTriggerEfficiencyCells::SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other)
714 /// Sums results from different runs and gives the efficiency
715 if(!fCountHistoList || !fNoCountHistoList) {
716 AliWarning("Histograms for efficiency calculations not implemented in object");
719 if(!other.fCountHistoList || !other.fNoCountHistoList) {
720 AliWarning("Histograms for efficiency calculations not implemented in object passed as argument");
724 Int_t nentries = fCountHistoList->GetEntries();
725 TH1F *currNum = 0x0, *currDen = 0x0, *otherNum = 0x0, *otherDen = 0x0;
727 for(Int_t iEntry=0; iEntry<nentries; iEntry++){
728 currNum = (TH1F*)fCountHistoList->At(iEntry);
729 currDen = (TH1F*)fNoCountHistoList->At(iEntry);
730 otherNum = (TH1F*)other.fCountHistoList->At(iEntry);
731 otherDen = (TH1F*)other.fNoCountHistoList->At(iEntry);
732 currNum->Add(otherNum);
733 currDen->Add(otherDen);
736 FillHistosFromList();
739 AliWarning("Histograms for fired region check not implemented in object");
742 if(!other.fFiredStrips) {
743 AliWarning("Histograms for fired region check not implemented in object passed as argument");
747 TH3F *currFired = 0x0, *otherFired = 0x0;
748 nentries = fFiredStrips->GetEntries();
749 for(Int_t iEntry=0; iEntry<nentries; iEntry++){
750 currFired = (TH3F*)fFiredStrips->At(iEntry);
751 otherFired = (TH3F*)fFiredStrips->At(iEntry);
752 currFired->Add(otherFired);