]>
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> | |
8c0b5e70 | 13 | #include <TList.h> |
8b1cdc26 | 14 | #include <TArrayI.h> |
15 | #include <TArrayF.h> | |
f165a2d2 | 16 | |
8c0b5e70 | 17 | class AliMUONGeometryTransformer; |
18 | class AliMUONDigitMaker; | |
19 | class AliMUONTriggerTrack; | |
20 | class AliMUONVDigitStore; | |
21 | class AliMUONVTriggerStore; | |
22 | class AliMUONVTriggerTrackStore; | |
23 | class AliMUONVTrackStore; | |
f165a2d2 | 24 | |
25 | class AliMUONTriggerChamberEff : public TObject | |
26 | { | |
27 | public: | |
8c0b5e70 | 28 | AliMUONTriggerChamberEff(); |
29 | AliMUONTriggerChamberEff(const AliMUONGeometryTransformer* transformer, | |
30 | const AliMUONDigitMaker* digitMaker, | |
31 | Bool_t writeOnESD=kFALSE); | |
32 | ||
f165a2d2 | 33 | virtual ~AliMUONTriggerChamberEff(); |
34 | ||
8b1cdc26 | 35 | AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); // copy constructor |
36 | AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); // assignment operator | |
8c0b5e70 | 37 | |
71a2d3aa | 38 | /// Set Reproduce trigger response |
f165a2d2 | 39 | void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE) |
40 | {fReproduceTrigResponse=reproduceTrigRes;} | |
71a2d3aa | 41 | /// Set Print informations on event |
f165a2d2 | 42 | void SetPrintInfo(Bool_t printInfo=kFALSE) |
43 | {fPrintInfo=printInfo;} | |
71a2d3aa | 44 | /// Set Debug level |
f165a2d2 | 45 | void SetDebugLevel(Int_t debugLevel) |
46 | {fDebugLevel=debugLevel;} | |
47 | ||
8c0b5e70 | 48 | void EventChamberEff(const AliMUONVTriggerStore& triggerStore, |
49 | const AliMUONVTriggerTrackStore& trigTrackStore, | |
50 | const AliMUONVTrackStore& trackStore); | |
51 | void WriteEfficiencyMap(const char* outputDir); | |
52 | void WriteEfficiencyMapTxt(const char* outputDir); | |
8b1cdc26 | 53 | void DisplayEfficiency(Bool_t perSlat=kFALSE); |
a690d2f8 | 54 | |
8c0b5e70 | 55 | |
a690d2f8 | 56 | protected: |
8c0b5e70 | 57 | Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2], |
8b1cdc26 | 58 | Bool_t isMatch[2], TArrayI nboard[2], |
59 | TArrayF &zRealMatch, Float_t y11); | |
a690d2f8 | 60 | Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy, |
8c0b5e70 | 61 | Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber); |
62 | void InfoDigit(AliMUONVDigitStore& digitStore); | |
63 | void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency, | |
64 | Float_t &error, Bool_t failuresAsInput); | |
a690d2f8 | 65 | Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode); |
8c0b5e70 | 66 | void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId, |
67 | Int_t cathode, Int_t localBoard[4]); | |
a690d2f8 | 68 | void ResetArrays(); |
8c0b5e70 | 69 | Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore, |
70 | AliMUONVDigitStore& digitStore) const; | |
71 | Bool_t IsCleanTrack(AliMUONTriggerTrack *triggerTrack, | |
72 | const AliMUONVTrackStore& trackStore); | |
73 | void SaveInESDFile(); | |
a690d2f8 | 74 | |
8b1cdc26 | 75 | |
76 | private: | |
77 | void CheckConstants() const; | |
78 | ||
79 | const AliMUONGeometryTransformer* fTransformer; //!< geometry transformer | |
80 | const AliMUONDigitMaker* fDigitMaker; //!< pointer to digit maker | |
81 | Bool_t fReproduceTrigResponse; //!< Reproduce trigger response | |
82 | Bool_t fPrintInfo; //!< Print informations on event | |
83 | Int_t fWriteOnESD; //!< flag to write on ESD | |
84 | Int_t fDebugLevel; //!< Debug level | |
85 | const Float_t fkMaxDistance; //!< Maximum distance for reference | |
86 | ||
87 | static const Int_t fgkNcathodes=2; ///<Number of cathodes | |
88 | static const Int_t fgkNchambers=4; ///<Number of chambers | |
89 | static const Int_t fgkNplanes=8; ///<Number of planes | |
90 | static const Int_t fgkNslats=18; ///<Number of slats | |
91 | static const Int_t fgkNlocations=4; ///<Number of locations | |
92 | ||
93 | TArrayI fTrigger44; ///< Array counting # of times all chambers were efficient | |
94 | TArrayI fTrigger34; ///< Array counting # of times chamber was inefficient | |
95 | TArrayI fInefficientSlat[fgkNplanes]; ///< Array counting # of times slats were inefficient | |
96 | TArrayI fHitPerSlat[fgkNplanes]; ///< Array counting # of times slats were efficient | |
97 | TArrayI fInefficientBoard[fgkNplanes]; ///< Array counting # of times boards were inefficient | |
98 | TArrayI fHitPerBoard[fgkNplanes]; ///< Array counting # of times boards were efficient | |
99 | ||
100 | ClassDef(AliMUONTriggerChamberEff,2) // Trigger chamber efficiency | |
f165a2d2 | 101 | }; |
102 | #endif |