]>
Commit | Line | Data |
---|---|---|
1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /// \ingroup calib | |
5 | /// \class AliMUONTriggerEfficiencyCells | |
6 | /// \brief Store and give access to the trigger chamber efficiency. | |
7 | /// | |
8 | // Author: Diego Stocco; INFN Torino | |
9 | ||
10 | #ifndef ALIMUONTRIGGEREFFICIENCYCELLS_H | |
11 | #define ALIMUONTRIGGEREFFICIENCYCELLS_H | |
12 | ||
13 | #include "TObject.h" | |
14 | #include "TArrayF.h" | |
15 | #include "TArrayI.h" | |
16 | #include "TVector2.h" | |
17 | #include "TMatrix.h" | |
18 | #include "TH1F.h" | |
19 | #include "TList.h" | |
20 | ||
21 | class AliMUONTriggerEfficiencyCells : public TObject | |
22 | { | |
23 | public: | |
24 | AliMUONTriggerEfficiencyCells(); | |
25 | AliMUONTriggerEfficiencyCells(const char* filename); | |
26 | AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList); | |
27 | ||
28 | AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor | |
29 | AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator | |
30 | ||
31 | virtual ~AliMUONTriggerEfficiencyCells(); | |
32 | ||
33 | void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2) const; | |
34 | void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const; | |
35 | ||
36 | void IsTriggered(Int_t detElemId, Float_t x, Float_t y, Bool_t &trig1, Bool_t &trig2) const; | |
37 | void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const; | |
38 | ||
39 | void DisplayEfficiency(Bool_t perSlat=kFALSE); | |
40 | Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other); | |
41 | ||
42 | void Reset(); | |
43 | ||
44 | protected: | |
45 | TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y) const; | |
46 | TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0); | |
47 | void ReadFile(const char* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat"); | |
48 | void CalculateEfficiency(Int_t trigger44, Int_t trigger34, | |
49 | Float_t &efficiency, Float_t &error, | |
50 | Bool_t failuresAsInput); | |
51 | ||
52 | ||
53 | private: | |
54 | void CheckConstants() const; | |
55 | Int_t FindChamberIndex(Int_t detElemId) const; | |
56 | Int_t FindSlatIndex(Int_t detElemId) const; | |
57 | void ReadFileXY(ifstream &file); | |
58 | void ReadFileBoards(ifstream &file); | |
59 | void ReadHistoBoards(const char* filename="MUON.TriggerEfficiencyMap.root"); | |
60 | void InitHistos(); | |
61 | void FillHistosFromList(); | |
62 | ||
63 | static const Int_t fgkNcells=80; ///< Number of cells | |
64 | static const Int_t fgkNcathodes=2; ///<Number of cathodes | |
65 | static const Int_t fgkNchambers=4; ///<Number of chambers | |
66 | static const Int_t fgkNplanes=8; ///<Number of planes | |
67 | static const Int_t fgkNslats=18; ///<Number of slats | |
68 | ||
69 | ||
70 | TMatrixF fCellContent[fgkNplanes][fgkNslats]; ///< the cells content | |
71 | TArrayF fCellSize[fgkNplanes]; ///< the size of the cells | |
72 | TArrayI fCellNumber[fgkNplanes]; ///< id of the cells | |
73 | ||
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 | |
79 | ||
80 | ClassDef(AliMUONTriggerEfficiencyCells,4) // Trigger efficiency store | |
81 | }; | |
82 | #endif |