]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerEfficiencyCells.h
Do not update AMORE pool with an empty object
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerEfficiencyCells.h
index 03816e30b846d1f195e4c51009672a8902369833..fd8a64710cf17a1032c980257f7fae07fde12a3e 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.
 #define ALIMUONTRIGGEREFFICIENCYCELLS_H
 
 #include "TObject.h"
-#include "TArrayF.h"
 #include "TArrayI.h"
-#include "TVector2.h"
-#include "TMatrix.h"
 #include "TH1F.h"
 #include "TList.h"
 
@@ -22,7 +21,7 @@ class AliMUONTriggerEfficiencyCells : public TObject
 {
 public:
   AliMUONTriggerEfficiencyCells();
-  AliMUONTriggerEfficiencyCells(const Char_t* filename);
+  AliMUONTriggerEfficiencyCells(const Char_t* filename, const Char_t* listname="triggerChamberEff");
   AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
 
   AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
@@ -30,26 +29,25 @@ public:
 
   virtual ~AliMUONTriggerEfficiencyCells();
 
-  void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2) const;
   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) const;
   void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
 
-  void DisplayEfficiency(Bool_t perSlat=kFALSE, const Char_t* geoFilename="geometry.root");
   Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
 
+  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(const Char_t *geoFilename="geometry.root");
-                                // Check for strips with lower counts than others:
-                                // syntomatic of possible read-out problems in boards
-  void Reset();
-    
+  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) const;
-    TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0);
-    void ReadFile(const Char_t* 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", const Char_t* listname="");
     void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
                             Float_t &efficiency, Float_t &error,
                             Bool_t failuresAsInput);
@@ -58,24 +56,18 @@ protected:
 private:
     void CheckConstants() const;
     Int_t FindChamberIndex(Int_t detElemId) const;
-    Int_t FindSlatIndex(Int_t detElemId) const;
-    void ReadFileXY(ifstream &file);
     void ReadFileBoards(ifstream &file);
-    void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root");
+    void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root", const Char_t* listname="triggerChamberEff");
     void InitHistos();
-    void FillHistosFromList();
-    Bool_t GetListsForCheck(const Char_t* geoFilename="geometry.root");
-    
-    static const Int_t fgkNcells=80;   ///< Number of cells
+    void FillHistosFromList(Bool_t useMeanValues = kFALSE);
+    Bool_t GetListsForCheck();
+
     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 fgkNslats=18;   ///<Number of slats
 
-    
-    TMatrixF fCellContent[fgkNplanes][fgkNslats]; ///< the cells content
-    TArrayF  fCellSize[fgkNplanes];    ///< the size of the cells
-    TArrayI  fCellNumber[fgkNplanes];  ///< id of the cells
+    /// Return the current plane
+    Int_t GetPlane(Int_t chamber, Int_t cathode){ return fgkNchambers * cathode + chamber; }
     
     TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
     TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
@@ -89,6 +81,6 @@ private:
     TList *fFiredFitHistoList; //!< list of fired strips for checks
     TList *fFiredDisplayHistoList; //!< list of fired strips for display
 
-    ClassDef(AliMUONTriggerEfficiencyCells,5) // Trigger efficiency store
+    ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store
 };
 #endif