]>
Commit | Line | Data |
---|---|---|
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" | |
313c3f0c | 14 | #include "TArrayF.h" |
70b4a8d6 | 15 | #include "TArrayI.h" |
16 | #include "TVector2.h" | |
17 | #include "TString.h" | |
313c3f0c | 18 | #include "TMatrix.h" |
70b4a8d6 | 19 | |
20 | class AliMUONTriggerEfficiencyCells : public TObject | |
21 | { | |
22 | public: | |
23 | AliMUONTriggerEfficiencyCells(); | |
24 | AliMUONTriggerEfficiencyCells(const char* filename); | |
25 | ||
26 | virtual ~AliMUONTriggerEfficiencyCells(); | |
27 | ||
313c3f0c | 28 | void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2) const; |
29 | void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2) const; | |
70b4a8d6 | 30 | |
313c3f0c | 31 | void IsTriggered(Int_t detElemId, Float_t x, Float_t y, Bool_t &trig1, Bool_t &trig2) const; |
32 | void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2) const; | |
70b4a8d6 | 33 | |
34 | TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0); | |
35 | ||
36 | void Reset(); | |
37 | ||
38 | protected: | |
313c3f0c | 39 | TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y) const; |
70b4a8d6 | 40 | void ReadFile(const char* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat"); |
41 | ||
42 | private: | |
313c3f0c | 43 | void CheckConstants() const; |
44 | Int_t FindChamberIndex(Int_t detElemId) const; | |
45 | Int_t FindSlatIndex(Int_t detElemId) const; | |
081d3361 | 46 | void ReadFileXY(ifstream &file); |
47 | void ReadFileBoards(ifstream &file); | |
8c0b5e70 | 48 | void ReadHistoBoards(const char* filename="MUON.TriggerEfficiencyMap.root"); |
70b4a8d6 | 49 | |
313c3f0c | 50 | static const Int_t fgkNcells=80; ///< Number of cells |
51 | static const Int_t fgkNcathodes=2; ///<Number of cathodes | |
52 | static const Int_t fgkNchambers=4; ///<Number of chambers | |
53 | static const Int_t fgkNplanes=8; ///<Number of planes | |
54 | static const Int_t fgkNslats=18; ///<Number of slats | |
081d3361 | 55 | |
70b4a8d6 | 56 | |
313c3f0c | 57 | TMatrixF fCellContent[fgkNplanes][fgkNslats]; ///< the cells content |
58 | TArrayF fCellSize[fgkNplanes]; ///< the size of the cells | |
59 | TArrayI fCellNumber[fgkNplanes]; ///< id of the cells | |
60 | TArrayF fBoardContent[fgkNplanes];///< the boards content | |
61 | ||
62 | ClassDef(AliMUONTriggerEfficiencyCells,3) // Trigger efficiency store | |
70b4a8d6 | 63 | }; |
64 | #endif |