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 */
7 /// \class AliMUONTriggerChamberEff
8 /// \brief trigger chamber efficiency from data
10 // Author Diego Stocco
15 class AliMUONGeometryTransformer;
16 class AliMUONDigitMaker;
17 class AliMUONTriggerTrack;
18 class AliMUONVDigitStore;
19 class AliMUONVTriggerStore;
20 class AliMUONVTriggerTrackStore;
21 class AliMUONVTrackStore;
24 class AliMUONTriggerChamberEff : public TObject
27 AliMUONTriggerChamberEff();
28 AliMUONTriggerChamberEff(const AliMUONGeometryTransformer* transformer,
29 const AliMUONDigitMaker* digitMaker,
30 Bool_t writeOnESD=kFALSE);
32 virtual ~AliMUONTriggerChamberEff();
34 AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other);
35 AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other);
37 /// Set Reproduce trigger response
38 void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE)
39 {fReproduceTrigResponse=reproduceTrigRes;}
40 /// Set Print informations on event
41 void SetPrintInfo(Bool_t printInfo=kFALSE)
42 {fPrintInfo=printInfo;}
44 void SetDebugLevel(Int_t debugLevel)
45 {fDebugLevel=debugLevel;}
47 void EventChamberEff(const AliMUONVTriggerStore& triggerStore,
48 const AliMUONVTriggerTrackStore& trigTrackStore,
49 const AliMUONVTrackStore& trackStore);
50 void WriteEfficiencyMap(const char* outputDir);
51 void WriteEfficiencyMapTxt(const char* outputDir);
57 AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other);
59 AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other);
62 static const Int_t fgkNchambers=4; ///< Number of trigger chambers
63 static const Int_t fgkNcathodes=2; ///< Number of cathodes per chamber
64 static const Int_t fgkNslats=18; ///< Number of slats per chamber
65 static const Int_t fgkNboards=234; ///< Number of trigger boards per chamber
67 Int_t fTrigger34[fgkNchambers][fgkNcathodes]; ///< Array counting # of times chamber was inefficient
68 Int_t fTrigger44[fgkNcathodes]; ///< Array counting # of times all chambers were efficient
69 Int_t fInefficientSlat[fgkNchambers][fgkNcathodes][fgkNslats]; ///< Array counting # of times slats were inefficient
70 Int_t fHitPerSlat[fgkNchambers][fgkNcathodes][fgkNslats]; ///< Array counting # of times slats were efficient
71 Int_t fInefficientBoard[fgkNchambers][fgkNcathodes][fgkNboards]; ///< Array counting # of times boards were inefficient
72 Int_t fHitPerBoard[fgkNchambers][fgkNcathodes][fgkNboards]; ///< Array counting # of times boards were efficient
74 const AliMUONGeometryTransformer* fTransformer; //!< geometry transformer
75 const AliMUONDigitMaker* fDigitMaker; //!< pointer to digit maker
76 Bool_t fReproduceTrigResponse; //!< Reproduce trigger response
77 Bool_t fPrintInfo; //!< Print informations on event
78 Int_t fWriteOnESD; //!< flag to write on ESD
79 Int_t fDebugLevel; //!< Debug level
80 const Float_t fkMaxDistance; //!< Maximum distance for reference
84 Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2],
85 Bool_t isMatch[fgkNcathodes], Int_t nboard[fgkNcathodes][4],
86 Float_t zRealMatch[fgkNchambers], Float_t y11);
87 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
88 Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber);
89 void InfoDigit(AliMUONVDigitStore& digitStore);
90 void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency,
91 Float_t &error, Bool_t failuresAsInput);
92 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode);
93 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
94 Int_t cathode, Int_t localBoard[4]);
96 Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore,
97 AliMUONVDigitStore& digitStore) const;
98 Bool_t IsCleanTrack(AliMUONTriggerTrack *triggerTrack,
99 const AliMUONVTrackStore& trackStore);
100 void SaveInESDFile();
102 ClassDef(AliMUONTriggerChamberEff,1) // Trigger chamber efficiency