]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerEfficiencyCells.h
Unicor is lower case now (Stefan)
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerEfficiencyCells.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5
6 /// \ingroup calib
7 /// \class AliMUONTriggerEfficiencyCells
8 /// \brief Store and give access to the trigger chamber efficiency.
9 ///
10 //  Author: Diego Stocco; INFN Torino
11
12 #ifndef ALIMUONTRIGGEREFFICIENCYCELLS_H
13 #define ALIMUONTRIGGEREFFICIENCYCELLS_H
14
15 #include "TObject.h"
16 #include "TArrayI.h"
17 #include "TH1F.h"
18 #include "TList.h"
19
20 class AliMUONTriggerEfficiencyCells : public TObject
21 {
22 public:
23   AliMUONTriggerEfficiencyCells();
24   AliMUONTriggerEfficiencyCells(const Char_t* filename);
25   AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
26
27   AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
28   AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
29
30   virtual ~AliMUONTriggerEfficiencyCells();
31
32   void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const;
33     
34   void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
35
36   Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
37
38
39   // Methods for display
40   void DisplayEfficiency(Bool_t perSlat=kFALSE,
41                          const Char_t* cdbStorage = "local://$ALICE_ROOT/OCDB",
42                          Int_t runNumber=0);
43
44   // Methods for efficiency check
45   /// Set the list of fired strips
46   void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
47   void CheckFiredStrips(const Char_t* cdbStorage = "local://$ALICE_ROOT/OCDB",
48                         Int_t runNumber=0);
49                                 // Check for strips with lower counts than others:
50                                 // syntomatic of possible read-out problems in boards
51 protected:
52     void Reset();
53     void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
54     void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
55                              Float_t &efficiency, Float_t &error,
56                              Bool_t failuresAsInput);
57
58
59 private:
60     void CheckConstants() const;
61     Int_t FindChamberIndex(Int_t detElemId) const;
62     void ReadFileBoards(ifstream &file);
63     void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root");
64     void InitHistos();
65     void FillHistosFromList();
66     Bool_t GetListsForCheck(const Char_t* cdbStorage, Int_t runNumber);
67     
68     static const Int_t fgkNcathodes=2; ///<Number of cathodes
69     static const Int_t fgkNchambers=4; ///<Number of chambers
70     static const Int_t fgkNplanes=8;   ///<Number of planes
71
72     
73     TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
74     TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
75
76     TList *fCountHistoList; ///<list of efficiency numerators
77     TList *fNoCountHistoList; ///<list of efficiency denominators
78     TList *fFiredStrips; ///<list of fired strips for efficiency check
79
80     TList *fDisplayHistoList; //!< list of efficiency histograms for display
81     TList *fBoardLabelList; //!< list of board labels for display
82     TList *fFiredFitHistoList; //!< list of fired strips for checks
83     TList *fFiredDisplayHistoList; //!< list of fired strips for display
84
85     ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store
86 };
87 #endif