]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerEfficiencyCells.h
Coding violation fixes
[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, const Char_t* listname="triggerChamberEff");
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   Bool_t LowStatisticsSettings(Bool_t useMeanValues=kTRUE);
39
40   // Methods for display
41   void DisplayEfficiency(Bool_t perSlat=kFALSE);
42
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
48 protected:
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);
54
55
56 private:
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");
61     void InitHistos();
62     void FillHistosFromList(Bool_t useMeanValues = kFALSE);
63     Bool_t GetListsForCheck();
64
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
68
69     /// Return the current plane
70     Int_t GetPlane(Int_t chamber, Int_t cathode){ return fgkNchambers * cathode + chamber; }
71     
72     TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
73     TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
74
75     TList *fCountHistoList; ///<list of efficiency numerators
76     TList *fNoCountHistoList; ///<list of efficiency denominators
77     TList *fFiredStrips; ///<list of fired strips for efficiency check
78
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
83
84     ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store
85 };
86 #endif