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