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