]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTriggerChamberEff.h
Protection against not accessible input OCDB (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerChamberEff.h
CommitLineData
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 17class AliMUONGeometryTransformer;
18class AliMUONDigitMaker;
19class AliMUONTriggerTrack;
20class AliMUONVDigitStore;
21class AliMUONVTriggerStore;
22class AliMUONVTriggerTrackStore;
23class AliMUONVTrackStore;
f165a2d2 24
25class AliMUONTriggerChamberEff : public TObject
26{
27public:
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);
8c0b5e70 51
a690d2f8 52protected:
8c0b5e70 53 Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2],
8b1cdc26 54 Bool_t isMatch[2], TArrayI nboard[2],
55 TArrayF &zRealMatch, Float_t y11);
a690d2f8 56 Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
8c0b5e70 57 Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber);
58 void InfoDigit(AliMUONVDigitStore& digitStore);
59 void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency,
60 Float_t &error, Bool_t failuresAsInput);
a690d2f8 61 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode);
8c0b5e70 62 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId,
63 Int_t cathode, Int_t localBoard[4]);
a690d2f8 64 void ResetArrays();
8c0b5e70 65 Bool_t TriggerDigits(const AliMUONVTriggerStore& triggerStore,
66 AliMUONVDigitStore& digitStore) const;
67 Bool_t IsCleanTrack(AliMUONTriggerTrack *triggerTrack,
68 const AliMUONVTrackStore& trackStore);
69 void SaveInESDFile();
311d0691 70 void GetEfficiencyHistos(TList &countList, TList &noCountList);
a690d2f8 71
8b1cdc26 72
73private:
74 void CheckConstants() const;
75
76 const AliMUONGeometryTransformer* fTransformer; //!< geometry transformer
77 const AliMUONDigitMaker* fDigitMaker; //!< pointer to digit maker
78 Bool_t fReproduceTrigResponse; //!< Reproduce trigger response
79 Bool_t fPrintInfo; //!< Print informations on event
80 Int_t fWriteOnESD; //!< flag to write on ESD
81 Int_t fDebugLevel; //!< Debug level
82 const Float_t fkMaxDistance; //!< Maximum distance for reference
83
84 static const Int_t fgkNcathodes=2; ///<Number of cathodes
85 static const Int_t fgkNchambers=4; ///<Number of chambers
86 static const Int_t fgkNplanes=8; ///<Number of planes
87 static const Int_t fgkNslats=18; ///<Number of slats
88 static const Int_t fgkNlocations=4; ///<Number of locations
89
90 TArrayI fTrigger44; ///< Array counting # of times all chambers were efficient
91 TArrayI fTrigger34; ///< Array counting # of times chamber was inefficient
92 TArrayI fInefficientSlat[fgkNplanes]; ///< Array counting # of times slats were inefficient
93 TArrayI fHitPerSlat[fgkNplanes]; ///< Array counting # of times slats were efficient
94 TArrayI fInefficientBoard[fgkNplanes]; ///< Array counting # of times boards were inefficient
95 TArrayI fHitPerBoard[fgkNplanes]; ///< Array counting # of times boards were efficient
96
97 ClassDef(AliMUONTriggerChamberEff,2) // Trigger chamber efficiency
f165a2d2 98};
99#endif