Correct way to get the geometry even in case of no galice.root (raw data)
[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"
15#include "TVector2.h"
16#include "TString.h"
17
18class AliMUONTriggerEfficiencyCells : public TObject
19{
20public:
21 AliMUONTriggerEfficiencyCells();
22 AliMUONTriggerEfficiencyCells(const char* filename);
23
24 virtual ~AliMUONTriggerEfficiencyCells();
25
70b4a8d6 26 void GetCellEfficiency(Int_t detElemId, Float_t x, Float_t y, Float_t &eff1, Float_t &eff2);
081d3361 27 void GetCellEfficiency(Int_t detElemId, Int_t localBoard, Float_t &eff1, Float_t &eff2);
70b4a8d6 28
70b4a8d6 29 void IsTriggered(Int_t detElemId, Float_t x, Float_t y, Bool_t &trig1, Bool_t &trig2);
081d3361 30 void IsTriggered(Int_t detElemId, Int_t localBoard, Bool_t &trig1, Bool_t &trig2);
70b4a8d6 31
32 TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0);
33
34 void Reset();
35
36protected:
37 TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y);
38 void ReadFile(const char* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
39
40private:
41 Int_t FindChamberIndex(Int_t detElemId);
42 Int_t FindSlatIndex(Int_t detElemId);
081d3361 43 void ReadFileXY(ifstream &file);
44 void ReadFileBoards(ifstream &file);
8c0b5e70 45 void ReadHistoBoards(const char* filename="MUON.TriggerEfficiencyMap.root");
70b4a8d6 46
18b6b8c7 47 static const Int_t fgkNofCells=80; ///< Number of cells
70b4a8d6 48
71a2d3aa 49 /// the cells content
70b4a8d6 50 Float_t fCellContent[4][18][2][fgkNofCells][fgkNofCells]; //[trig. chambers][RPCs][cathode][cellsX][cellsY]
18b6b8c7 51
52 Float_t fCellSize[4][18][2]; ///< the size of the cells
53 Int_t fCellNumber[4][18][2]; ///< id of the cells
081d3361 54
55 static const Int_t fgkNofBoards=234; ///< Number of boards
71a2d3aa 56 /// the boards content
8c0b5e70 57 Float_t fBoardContent[4][2][fgkNofBoards]; //[trig. chambers][cathode][board]
70b4a8d6 58
081d3361 59 ClassDef(AliMUONTriggerEfficiencyCells,2) // Trigger efficiency store
70b4a8d6 60};
61#endif