]>
Commit | Line | Data |
---|---|---|
f165a2d2 | 1 | #ifndef ALIMUONTRIGGERCHAMBEREFF_H |
2 | #define ALIMUONTRIGGERCHAMBEREFF_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /// \ingroup base | |
7 | /// \class AliMUONTriggerChamberEff | |
8 | /// \brief trigger chamber efficiency from data | |
78649106 | 9 | /// |
10 | // Author Diego Stocco | |
f165a2d2 | 11 | |
12 | #include <TObject.h> | |
13 | #include <TString.h> | |
14 | ||
15 | class AliRunLoader; | |
16 | class AliMUONData; | |
17 | class AliMUON; | |
18 | class AliMUONGlobalTrigger; | |
2227e936 | 19 | class TString; |
f165a2d2 | 20 | |
21 | class AliMUONTriggerChamberEff : public TObject | |
22 | { | |
23 | public: | |
24 | AliMUONTriggerChamberEff(const char* galiceFile, Int_t firstEvent=0, Int_t lastEvent=-1); | |
25 | AliMUONTriggerChamberEff(Int_t firstRun, Int_t lastRun, const char* galiceRunDir, Int_t firstEvent=0, Int_t lastEvent=-1); | |
26 | virtual ~AliMUONTriggerChamberEff(); | |
27 | ||
71a2d3aa | 28 | /// Set Reproduce trigger response |
f165a2d2 | 29 | void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE) |
30 | {fReproduceTrigResponse=reproduceTrigRes;} | |
71a2d3aa | 31 | /// Set Print informations on event |
f165a2d2 | 32 | void SetPrintInfo(Bool_t printInfo=kFALSE) |
33 | {fPrintInfo=printInfo;} | |
71a2d3aa | 34 | /// Set Debug level |
f165a2d2 | 35 | void SetDebugLevel(Int_t debugLevel) |
36 | {fDebugLevel=debugLevel;} | |
37 | ||
38 | void PerformTriggerChamberEff(const char* outputDir); | |
39 | ||
40 | protected: | |
41 | Bool_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy, | |
42 | Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber); | |
2227e936 | 43 | Bool_t IsDiffLocalBoard(Int_t currDetElemId, Int_t iy, Int_t detElemIdP1, Int_t iyDigitP1) const; |
f165a2d2 | 44 | void PrintTrigger(AliMUONGlobalTrigger *globalTrig); |
45 | void InfoDigit(); | |
46 | void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency, Float_t &error, Bool_t failuresAsInput); | |
47 | Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode); | |
48 | void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId, Int_t cathode, Int_t localBoard[4]); | |
49 | void ResetArrays(); | |
50 | void WriteOutput(const char* outputDir, Int_t totNumOfTrig[4][2], Int_t atLeast1MuPerEv[4][2]); | |
51 | void WriteEfficiencyMap(const char* outputDir); | |
52 | ||
53 | private: | |
71a2d3aa | 54 | /// Not implemented |
2227e936 | 55 | AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); |
71a2d3aa | 56 | /// Not implemented |
2227e936 | 57 | AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); |
58 | ||
f165a2d2 | 59 | void SetGaliceFile(const char* galiceFile); |
60 | void CleanGalice(); | |
61 | ||
62 | Int_t fFirstEvent; //!< First event to consider | |
63 | Int_t fLastEvent; //!< Last event to consider | |
64 | Int_t fFirstRun; //!< First run to consider | |
65 | Int_t fLastRun; //!< Last run to consider | |
66 | AliRunLoader* fRunLoader; //!< AliRunLoader pointer | |
67 | AliMUONData* fData; //!< AliMUONData pointer (to access containers) | |
68 | Bool_t fReproduceTrigResponse;//!< Reproduce trigger response | |
69 | Bool_t fPrintInfo;//!< Print informations on event | |
70 | AliMUON *fMUON; //!< AliMUON pointer | |
71 | Int_t fDebugLevel; //!< Debug level | |
72 | TString fGaliceDir; //!< base directory for many runs. | |
73 | ||
2227e936 | 74 | static const Int_t fgkNchambers=4; //!< Number of trigger chambers |
75 | static const Int_t fgkNcathodes=2; //!< Number of cathodes per chamber | |
76 | static const Int_t fgkNslats=18; //!< Number of slats per chamber | |
77 | static const Int_t fgkNboards=234; //!< Number of trigger boards per chamber | |
f165a2d2 | 78 | |
79 | Int_t fTrigger34[fgkNchambers][fgkNcathodes];//!< Array counting # of times chamber was inefficient | |
80 | Int_t fTrigger44[fgkNcathodes];//!< Array counting # of times all chambers were efficient | |
81 | Int_t fInefficientSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were inefficient | |
82 | Int_t fHitPerSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were efficient | |
83 | Int_t fInefficientBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were inefficient | |
84 | Int_t fHitPerBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were efficient | |
85 | ||
86 | ClassDef(AliMUONTriggerChamberEff,0) // Dumper of MUON related data | |
87 | }; | |
88 | #endif |