]>
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> | |
a690d2f8 | 14 | #include "AliMUONGeometryTransformer.h" |
f165a2d2 | 15 | |
16 | class AliRunLoader; | |
6b092dfc | 17 | class AliMUONRecData; |
f165a2d2 | 18 | class AliMUON; |
19 | class AliMUONGlobalTrigger; | |
2227e936 | 20 | class TString; |
f165a2d2 | 21 | |
22 | class AliMUONTriggerChamberEff : public TObject | |
23 | { | |
24 | public: | |
25 | AliMUONTriggerChamberEff(const char* galiceFile, Int_t firstEvent=0, Int_t lastEvent=-1); | |
26 | AliMUONTriggerChamberEff(Int_t firstRun, Int_t lastRun, const char* galiceRunDir, Int_t firstEvent=0, Int_t lastEvent=-1); | |
27 | virtual ~AliMUONTriggerChamberEff(); | |
28 | ||
71a2d3aa | 29 | /// Set Reproduce trigger response |
f165a2d2 | 30 | void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE) |
31 | {fReproduceTrigResponse=reproduceTrigRes;} | |
71a2d3aa | 32 | /// Set Print informations on event |
f165a2d2 | 33 | void SetPrintInfo(Bool_t printInfo=kFALSE) |
34 | {fPrintInfo=printInfo;} | |
71a2d3aa | 35 | /// Set Debug level |
f165a2d2 | 36 | void SetDebugLevel(Int_t debugLevel) |
37 | {fDebugLevel=debugLevel;} | |
38 | ||
39 | void PerformTriggerChamberEff(const char* outputDir); | |
a690d2f8 | 40 | |
f165a2d2 | 41 | |
42 | private: | |
71a2d3aa | 43 | /// Not implemented |
2227e936 | 44 | AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); |
71a2d3aa | 45 | /// Not implemented |
2227e936 | 46 | AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); |
47 | ||
f165a2d2 | 48 | void SetGaliceFile(const char* galiceFile); |
49 | void CleanGalice(); | |
50 | ||
51 | Int_t fFirstEvent; //!< First event to consider | |
52 | Int_t fLastEvent; //!< Last event to consider | |
53 | Int_t fFirstRun; //!< First run to consider | |
54 | Int_t fLastRun; //!< Last run to consider | |
55 | AliRunLoader* fRunLoader; //!< AliRunLoader pointer | |
6b092dfc | 56 | AliMUONRecData* fData; //!< AliMUONData pointer (to access containers) |
f165a2d2 | 57 | Bool_t fReproduceTrigResponse;//!< Reproduce trigger response |
58 | Bool_t fPrintInfo;//!< Print informations on event | |
59 | AliMUON *fMUON; //!< AliMUON pointer | |
60 | Int_t fDebugLevel; //!< Debug level | |
61 | TString fGaliceDir; //!< base directory for many runs. | |
62 | ||
2227e936 | 63 | static const Int_t fgkNchambers=4; //!< Number of trigger chambers |
64 | static const Int_t fgkNcathodes=2; //!< Number of cathodes per chamber | |
65 | static const Int_t fgkNslats=18; //!< Number of slats per chamber | |
66 | static const Int_t fgkNboards=234; //!< Number of trigger boards per chamber | |
f165a2d2 | 67 | |
68 | Int_t fTrigger34[fgkNchambers][fgkNcathodes];//!< Array counting # of times chamber was inefficient | |
69 | Int_t fTrigger44[fgkNcathodes];//!< Array counting # of times all chambers were efficient | |
70 | Int_t fInefficientSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were inefficient | |
71 | Int_t fHitPerSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were efficient | |
72 | Int_t fInefficientBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were inefficient | |
73 | Int_t fHitPerBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were efficient | |
74 | ||
a690d2f8 | 75 | |
76 | protected: | |
77 | Int_t MatchingPad(Int_t &detElemId, Float_t coor[2], const AliMUONGeometryTransformer *kGeomTransformer, | |
78 | Bool_t isMatch[fgkNcathodes], Int_t nboard[fgkNcathodes][4], Float_t zRealMatch[fgkNchambers], Float_t y11); | |
79 | Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy, | |
80 | Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber); | |
81 | void PrintTrigger(AliMUONGlobalTrigger *globalTrig); | |
82 | void InfoDigit(); | |
83 | void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency, Float_t &error, Bool_t failuresAsInput); | |
84 | Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode); | |
85 | void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId, Int_t cathode, Int_t localBoard[4]); | |
86 | void ResetArrays(); | |
87 | void WriteOutput(const char* outputDir, Int_t totNumOfTrig[4][2], Int_t atLeast1MuPerEv[4][2]); | |
88 | void WriteEfficiencyMap(const char* outputDir); | |
89 | ||
90 | ||
f165a2d2 | 91 | ClassDef(AliMUONTriggerChamberEff,0) // Dumper of MUON related data |
92 | }; | |
93 | #endif |