]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerEfficiencyCells.h
Adding MUONChamberMaterialBudget.C:
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerEfficiencyCells.h
index 72a9bcea9ee87e400e7e66cee7ce94e8f37a7983..bb48381332e5f9c8e9cc3d9c82527510d50f620d 100755 (executable)
@@ -1,6 +1,8 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
+// $Id$
+
 /// \ingroup calib
 /// \class AliMUONTriggerEfficiencyCells
 /// \brief Store and give access to the trigger chamber efficiency.
 
 #include "TObject.h"
 #include "TArrayI.h"
-#include "TVector2.h"
-#include "TString.h"
+#include "TH1F.h"
+#include "TList.h"
 
 class AliMUONTriggerEfficiencyCells : public TObject
 {
 public:
   AliMUONTriggerEfficiencyCells();
-  AliMUONTriggerEfficiencyCells(const char* filename);
+  AliMUONTriggerEfficiencyCells(const Char_t* filename);
+  AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
+
+  AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
+  AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
 
   virtual ~AliMUONTriggerEfficiencyCells();
 
-  void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2);
-  void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2);
+  void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const;
     
-  void IsTriggered(Int_t detElemId, Float_t x, Float_t y, Bool_t &trig1, Bool_t &trig2);
-  void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2);
+  void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
 
-  TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0);
+  Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
 
-  void Reset();
-    
+  Bool_t LowStatisticsSettings(Bool_t useMeanValues=kTRUE);
+
+  // Methods for display
+  void DisplayEfficiency(Bool_t perSlat=kFALSE);
+
+  // Methods for efficiency check
+  /// Set the list of fired strips
+  void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
+  void CheckFiredStrips(); // Check for strips with lower counts than others:
+                           // syntomatic of possible read-out problems in boards
 protected:
-    TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y);
-    void ReadFile(const char* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
+    void Reset(Bool_t resetAll = kTRUE);
+    void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
+    void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
+                            Float_t &efficiency, Float_t &error,
+                            Bool_t failuresAsInput);
+
 
 private:
-    Int_t FindChamberIndex(Int_t detElemId);
-    Int_t FindSlatIndex(Int_t detElemId);
-    void ReadFileXY(ifstream &file);
+    void CheckConstants() const;
+    Int_t FindChamberIndex(Int_t detElemId) const;
     void ReadFileBoards(ifstream &file);
-    
-    static const Int_t fgkNofCells=80; ///< Number of cells
-    
-    /// the cells content
-    Float_t fCellContent[4][18][2][fgkNofCells][fgkNofCells]; //[trig. chambers][RPCs][cathode][cellsX][cellsY]
+    void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root");
+    void InitHistos();
+    void FillHistosFromList(Bool_t useMeanValues = kFALSE);
+    Bool_t GetListsForCheck();
 
-    Float_t fCellSize[4][18][2]; ///< the size of the cells
-    Int_t fCellNumber[4][18][2]; ///< id of the cells
+    static const Int_t fgkNcathodes=2; ///<Number of cathodes
+    static const Int_t fgkNchambers=4; ///<Number of chambers
+    static const Int_t fgkNplanes=8;   ///<Number of planes
 
-    static const Int_t fgkNofBoards=234; ///< Number of boards
-    /// the boards content
-    Float_t fBoardContent[4][2][fgkNofBoards]; //[trig. chambers][RPCs][cathode][board]
+    /// Return the current plane
+    Int_t GetPlane(Int_t chamber, Int_t cathode){ return fgkNchambers * cathode + chamber; }
     
-    ClassDef(AliMUONTriggerEfficiencyCells,2) // Trigger efficiency store
+    TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
+    TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
+
+    TList *fCountHistoList; ///<list of efficiency numerators
+    TList *fNoCountHistoList; ///<list of efficiency denominators
+    TList *fFiredStrips; ///<list of fired strips for efficiency check
+
+    TList *fDisplayHistoList; //!< list of efficiency histograms for display
+    TList *fBoardLabelList; //!< list of board labels for display
+    TList *fFiredFitHistoList; //!< list of fired strips for checks
+    TList *fFiredDisplayHistoList; //!< list of fired strips for display
+
+    ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store
 };
 #endif