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