1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONTriggerEfficiencyCells
8 /// \brief Store and give access to the trigger chamber efficiency.
10 // Author: Diego Stocco; INFN Torino
12 #ifndef ALIMUONTRIGGEREFFICIENCYCELLS_H
13 #define ALIMUONTRIGGEREFFICIENCYCELLS_H
20 class AliMUONTriggerEfficiencyCells : public TObject
23 AliMUONTriggerEfficiencyCells();
24 AliMUONTriggerEfficiencyCells(const Char_t* filename, const Char_t* listname="triggerChamberEff");
25 AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
27 AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
28 AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
30 virtual ~AliMUONTriggerEfficiencyCells();
32 void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const;
34 void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
36 Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
38 Bool_t LowStatisticsSettings(Bool_t useMeanValues=kTRUE);
40 // Methods for display
41 void DisplayEfficiency(Bool_t perSlat=kFALSE);
43 // Methods for efficiency check
44 /// Set the list of fired strips
45 void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
46 void CheckFiredStrips(); // Check for strips with lower counts than others:
47 // syntomatic of possible read-out problems in boards
49 void Reset(Bool_t resetAll = kTRUE);
50 void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat", const Char_t* listname="");
51 void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
52 Float_t &efficiency, Float_t &error,
53 Bool_t failuresAsInput);
57 void CheckConstants() const;
58 Int_t FindChamberIndex(Int_t detElemId) const;
59 void ReadFileBoards(ifstream &file);
60 void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root", const Char_t* listname="triggerChamberEff");
62 void FillHistosFromList(Bool_t useMeanValues = kFALSE);
63 Bool_t GetListsForCheck();
65 static const Int_t fgkNcathodes=2; ///<Number of cathodes
66 static const Int_t fgkNchambers=4; ///<Number of chambers
67 static const Int_t fgkNplanes=8; ///<Number of planes
69 /// Return the current plane
70 Int_t GetPlane(Int_t chamber, Int_t cathode){ return fgkNchambers * cathode + chamber; }
72 TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
73 TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
75 TList *fCountHistoList; ///<list of efficiency numerators
76 TList *fNoCountHistoList; ///<list of efficiency denominators
77 TList *fFiredStrips; ///<list of fired strips for efficiency check
79 TList *fDisplayHistoList; //!< list of efficiency histograms for display
80 TList *fBoardLabelList; //!< list of board labels for display
81 TList *fFiredFitHistoList; //!< list of fired strips for checks
82 TList *fFiredDisplayHistoList; //!< list of fired strips for display
84 ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store