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
17 class AliMUONGeometryTransformer;
18 class AliMUONDigitMaker;
19 class AliMUONTriggerTrack;
20 class AliMUONVDigitStore;
21 class AliMUONVTriggerStore;
22 class AliMUONVTriggerTrackStore;
23 class AliMUONVTrackStore;
25 class AliMUONTriggerChamberEff : public TObject
28 AliMUONTriggerChamberEff();
29 AliMUONTriggerChamberEff(const AliMUONGeometryTransformer* transformer,
30 const AliMUONDigitMaker* digitMaker,
31 Bool_t writeOnESD=kFALSE);
33 virtual ~AliMUONTriggerChamberEff();
35 AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); // copy constructor
36 AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); // assignment operator
38 /// Set Reproduce trigger response
39 void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE)
40 {fReproduceTrigResponse=reproduceTrigRes;}
41 /// Set Print informations on event
42 void SetPrintInfo(Bool_t printInfo=kFALSE)
43 {fPrintInfo=printInfo;}
45 void SetDebugLevel(Int_t debugLevel)
46 {fDebugLevel=debugLevel;}
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);
53 void DisplayEfficiency(Bool_t perSlat=kFALSE);
57 Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2],
58 Bool_t isMatch[2], TArrayI nboard[2],
59 TArrayF &zRealMatch, Float_t y11);
60 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
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);
65 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode);
66 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
67 Int_t cathode, Int_t localBoard[4]);
69 Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore,
70 AliMUONVDigitStore& digitStore) const;
71 Bool_t IsCleanTrack(AliMUONTriggerTrack *triggerTrack,
72 const AliMUONVTrackStore& trackStore);
77 void CheckConstants() const;
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
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
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
100 ClassDef(AliMUONTriggerChamberEff,2) // Trigger chamber efficiency