1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 /// \class AliMUONTriggerEfficiencyCells
6 /// \brief Store and give access to the trigger chamber efficiency.
8 // Author: Diego Stocco; INFN Torino
10 #ifndef ALIMUONTRIGGEREFFICIENCYCELLS_H
11 #define ALIMUONTRIGGEREFFICIENCYCELLS_H
21 class AliMUONTriggerEfficiencyCells : public TObject
24 AliMUONTriggerEfficiencyCells();
25 AliMUONTriggerEfficiencyCells(const Char_t* filename);
26 AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
28 AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
29 AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
31 virtual ~AliMUONTriggerEfficiencyCells();
33 void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2) const;
34 void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const;
36 void IsTriggered(Int_t detElemId, Float_t x, Float_t y, Bool_t &trig1, Bool_t &trig2) const;
37 void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
39 void DisplayEfficiency(Bool_t perSlat=kFALSE, const Char_t* geoFilename="geometry.root");
40 Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
42 void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
43 void CheckFiredStrips(const Char_t *geoFilename="geometry.root");
44 // Check for strips with lower counts than others:
45 // syntomatic of possible read-out problems in boards
49 TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y) const;
50 TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0);
51 void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
52 void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
53 Float_t &efficiency, Float_t &error,
54 Bool_t failuresAsInput);
58 void CheckConstants() const;
59 Int_t FindChamberIndex(Int_t detElemId) const;
60 Int_t FindSlatIndex(Int_t detElemId) const;
61 void ReadFileXY(ifstream &file);
62 void ReadFileBoards(ifstream &file);
63 void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root");
65 void FillHistosFromList();
66 Bool_t GetListsForCheck(const Char_t* geoFilename="geometry.root");
68 static const Int_t fgkNcells=80; ///< Number of cells
69 static const Int_t fgkNcathodes=2; ///<Number of cathodes
70 static const Int_t fgkNchambers=4; ///<Number of chambers
71 static const Int_t fgkNplanes=8; ///<Number of planes
72 static const Int_t fgkNslats=18; ///<Number of slats
75 TMatrixF fCellContent[fgkNplanes][fgkNslats]; ///< the cells content
76 TArrayF fCellSize[fgkNplanes]; ///< the size of the cells
77 TArrayI fCellNumber[fgkNplanes]; ///< id of the cells
79 TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
80 TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
82 TList *fCountHistoList; ///<list of efficiency numerators
83 TList *fNoCountHistoList; ///<list of efficiency denominators
84 TList *fFiredStrips; ///<list of fired strips for efficiency check
86 TList *fDisplayHistoList; //! list of efficiency histograms for display
87 TList *fBoardLabelList; //! list of board labels for display
88 TList *fFiredFitHistoList; //! list of fired strips for checks
89 TList *fFiredDisplayHistoList; //! list of fired strips for display
91 ClassDef(AliMUONTriggerEfficiencyCells,5) // Trigger efficiency store