]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTriggerEfficiencyCells.h
Adding missing comments
[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"
313c3f0c 14#include "TArrayF.h"
70b4a8d6 15#include "TArrayI.h"
16#include "TVector2.h"
313c3f0c 17#include "TMatrix.h"
311d0691 18#include "TH1F.h"
19#include "TList.h"
70b4a8d6 20
21class AliMUONTriggerEfficiencyCells : public TObject
22{
23public:
24 AliMUONTriggerEfficiencyCells();
96079e17 25 AliMUONTriggerEfficiencyCells(const Char_t* filename);
311d0691 26 AliMUONTriggerEfficiencyCells(TList *countHistoList, TList *noCountHistoList);
27
28 AliMUONTriggerEfficiencyCells(const AliMUONTriggerEfficiencyCells& other); // copy constructor
29 AliMUONTriggerEfficiencyCells& operator=(const AliMUONTriggerEfficiencyCells& other); // assignment operator
70b4a8d6 30
31 virtual ~AliMUONTriggerEfficiencyCells();
32
313c3f0c 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;
70b4a8d6 35
313c3f0c 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;
70b4a8d6 38
96079e17 39 void DisplayEfficiency(Bool_t perSlat=kFALSE, const Char_t* geoFilename="geometry.root");
311d0691 40 Bool_t SumRunEfficiency(const AliMUONTriggerEfficiencyCells &other);
70b4a8d6 41
3e0aa963 42 /// Set the list of fired strips
96079e17 43 void SetFiredStrips(TList *firedStrips){fFiredStrips = firedStrips;}
44 void CheckFiredStrips(const Char_t *geoFilename="geometry.root");
45 // Check for strips with lower counts than others:
46 // syntomatic of possible read-out problems in boards
70b4a8d6 47 void Reset();
48
49protected:
313c3f0c 50 TArrayI CellByCoord(Int_t detElemId, Float_t x, Float_t y) const;
311d0691 51 TVector2 ChangeReferenceFrame(Float_t x, Float_t y, Float_t x0, Float_t y0);
96079e17 52 void ReadFile(const Char_t* filename="$ALICE_ROOT/MUON/data/efficiencyCells.dat");
311d0691 53 void CalculateEfficiency(Int_t trigger44, Int_t trigger34,
54 Float_t &efficiency, Float_t &error,
55 Bool_t failuresAsInput);
56
70b4a8d6 57
58private:
313c3f0c 59 void CheckConstants() const;
60 Int_t FindChamberIndex(Int_t detElemId) const;
61 Int_t FindSlatIndex(Int_t detElemId) const;
081d3361 62 void ReadFileXY(ifstream &file);
63 void ReadFileBoards(ifstream &file);
96079e17 64 void ReadHistoBoards(const Char_t* filename="MUON.TriggerEfficiencyMap.root");
311d0691 65 void InitHistos();
66 void FillHistosFromList();
96079e17 67 Bool_t GetListsForCheck(const Char_t* geoFilename="geometry.root");
70b4a8d6 68
313c3f0c 69 static const Int_t fgkNcells=80; ///< Number of cells
70 static const Int_t fgkNcathodes=2; ///<Number of cathodes
71 static const Int_t fgkNchambers=4; ///<Number of chambers
72 static const Int_t fgkNplanes=8; ///<Number of planes
73 static const Int_t fgkNslats=18; ///<Number of slats
081d3361 74
70b4a8d6 75
313c3f0c 76 TMatrixF fCellContent[fgkNplanes][fgkNslats]; ///< the cells content
77 TArrayF fCellSize[fgkNplanes]; ///< the size of the cells
78 TArrayI fCellNumber[fgkNplanes]; ///< id of the cells
311d0691 79
80 TH1F *fBoardEfficiency[fgkNplanes];///< the boards content
81 TH1F *fSlatEfficiency[fgkNplanes];///< the slats content
82
83 TList *fCountHistoList; ///<list of efficiency numerators
84 TList *fNoCountHistoList; ///<list of efficiency denominators
96079e17 85 TList *fFiredStrips; ///<list of fired strips for efficiency check
313c3f0c 86
3e0aa963 87 TList *fDisplayHistoList; //!< list of efficiency histograms for display
88 TList *fBoardLabelList; //!< list of board labels for display
89 TList *fFiredFitHistoList; //!< list of fired strips for checks
90 TList *fFiredDisplayHistoList; //!< list of fired strips for display
96079e17 91
92 ClassDef(AliMUONTriggerEfficiencyCells,5) // Trigger efficiency store
70b4a8d6 93};
94#endif