Fix for bug #67104 solving the following problems:
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerEfficiencyCells.h
CommitLineData
70b4a8d6 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
bf4d93eb 4// $Id$
5
be0c6f1f 6/// \ingroup calib
70b4a8d6 7/// \class AliMUONTriggerEfficiencyCells
8/// \brief Store and give access to the trigger chamber efficiency.
9///
5398f946 10// Author: Diego Stocco; INFN Torino
70b4a8d6 11
12#ifndef ALIMUONTRIGGEREFFICIENCYCELLS_H
13#define ALIMUONTRIGGEREFFICIENCYCELLS_H
14
15#include "TObject.h"
16#include "TArrayI.h"
311d0691 17#include "TH1F.h"
18#include "TList.h"
70b4a8d6 19
20class AliMUONTriggerEfficiencyCells : public TObject
21{
22public:
23 AliMUONTriggerEfficiencyCells();
2236b58a 24 AliMUONTriggerEfficiencyCells(const Char_t* filename, const Char_t* listname="triggerChamberEff");
311d0691 25 AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
26
27 AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
28 AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
70b4a8d6 29
30 virtual ~AliMUONTriggerEfficiencyCells();
31
313c3f0c 32 void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const;
70b4a8d6 33
313c3f0c 34 void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const;
70b4a8d6 35
311d0691 36 Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
70b4a8d6 37
a4342473 38 Bool_t LowStatisticsSettings(Bool_t useMeanValues=kTRUE);
683cb6c5 39
40 // Methods for display
a4342473 41 void DisplayEfficiency(Bool_t perSlat=kFALSE);
683cb6c5 42
43 // Methods for efficiency check
3e0aa963 44 /// Set the list of fired strips
96079e17 45 void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
a4342473 46 void CheckFiredStrips(); // Check for strips with lower counts than others:
47 // syntomatic of possible read-out problems in boards
70b4a8d6 48protected:
a4342473 49 void Reset(Bool_t resetAll = kTRUE);
2236b58a 50 void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat", const Char_t* listname="");
311d0691 51 void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
52 Float_t &efficiency, Float_t &error,
53 Bool_t failuresAsInput);
54
70b4a8d6 55
56private:
313c3f0c 57 void CheckConstants() const;
58 Int_t FindChamberIndex(Int_t detElemId) const;
081d3361 59 void ReadFileBoards(ifstream &file);
2236b58a 60 void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root", const Char_t* listname="triggerChamberEff");
311d0691 61 void InitHistos();
a4342473 62 void FillHistosFromList(Bool_t useMeanValues = kFALSE);
63 Bool_t GetListsForCheck();
64
313c3f0c 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
081d3361 68
a4342473 69 /// Return the current plane
70 Int_t GetPlane(Int_t chamber, Int_t cathode){ return fgkNchambers * cathode + chamber; }
70b4a8d6 71
311d0691 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
96079e17 77 TList *fFiredStrips; ///<list of fired strips for efficiency check
313c3f0c 78
3e0aa963 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
96079e17 83
683cb6c5 84 ClassDef(AliMUONTriggerEfficiencyCells,6) // Trigger efficiency store
70b4a8d6 85};
86#endif