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
18 class AliMUONGeometryTransformer;
19 class AliMUONDigitMaker;
20 class AliMUONTriggerTrack;
21 class AliMUONVDigitStore;
22 class AliMUONVTriggerStore;
23 class AliMUONVTriggerTrackStore;
24 class AliMUONVTrackStore;
26 class AliMUONTriggerChamberEff : public TObject
29 AliMUONTriggerChamberEff();
30 AliMUONTriggerChamberEff(const AliMUONGeometryTransformer* transformer,
31 const AliMUONDigitMaker* digitMaker,
32 Bool_t writeOnESD=kFALSE);
34 virtual ~AliMUONTriggerChamberEff();
36 AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); // copy constructor
37 AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); // assignment operator
39 /// Set Reproduce trigger response
40 void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE)
41 {fReproduceTrigResponse=reproduceTrigRes;}
42 /// Set Print informations on event
43 void SetPrintInfo(Bool_t printInfo=kFALSE)
44 {fPrintInfo=printInfo;}
46 void SetDebugLevel(Int_t debugLevel)
47 {fDebugLevel=debugLevel;}
49 void EventChamberEff(const AliMUONVTriggerStore& triggerStore,
50 const AliMUONVTriggerTrackStore& trigTrackStore,
51 const AliMUONVTrackStore& trackStore);
54 Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2],
55 Bool_t isMatch[2], TArrayI nboard[2],
56 TArrayF &zRealMatch, Float_t y11);
57 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
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);
62 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode);
63 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
64 Int_t cathode, Int_t localBoard[4]);
67 Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore,
68 AliMUONVDigitStore& digitStore) const;
69 Bool_t IsCleanTrack(AliMUONTriggerTrack *triggerTrack,
70 const AliMUONVTrackStore& trackStore);
72 void GetEfficiencyHistos(TList &countList, TList &noCountList);
76 void CheckConstants() const;
77 /// Get max number of strips along x
78 Int_t GetMaxX(Int_t cath) const {return (cath==0) ? 7 : 112;}
79 /// Get max number of strips along x
80 Int_t GetMaxY(Int_t cath) const {return (cath==0) ? 64 : 1;}
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
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
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
103 TH3F *fPadFired[fgkNcathodes]; ///< Histo counting the fired pads
105 ClassDef(AliMUONTriggerChamberEff,3) // Trigger chamber efficiency