]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTriggerChamberEff.h
Adding CreateIterator(void) and GetNeighbours() pure virtual methods,
[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
9/// \author Diego Stocco
10
11#include <TObject.h>
12#include <TString.h>
13
14class AliRunLoader;
15class AliMUONData;
16class AliMUON;
17class AliMUONGlobalTrigger;
2227e936 18class TString;
f165a2d2 19
20class AliMUONTriggerChamberEff : public TObject
21{
22public:
23 AliMUONTriggerChamberEff(const char* galiceFile, Int_t firstEvent=0, Int_t lastEvent=-1);
24 AliMUONTriggerChamberEff(Int_t firstRun, Int_t lastRun, const char* galiceRunDir, Int_t firstEvent=0, Int_t lastEvent=-1);
25 virtual ~AliMUONTriggerChamberEff();
26
27 void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE)
28 {fReproduceTrigResponse=reproduceTrigRes;}
29 void SetPrintInfo(Bool_t printInfo=kFALSE)
30 {fPrintInfo=printInfo;}
31 void SetDebugLevel(Int_t debugLevel)
32 {fDebugLevel=debugLevel;}
33
34 void PerformTriggerChamberEff(const char* outputDir);
35
36protected:
37 Bool_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy,
38 Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber);
2227e936 39 Bool_t IsDiffLocalBoard(Int_t currDetElemId, Int_t iy, Int_t detElemIdP1, Int_t iyDigitP1) const;
f165a2d2 40 void PrintTrigger(AliMUONGlobalTrigger *globalTrig);
41 void InfoDigit();
42 void CalculateEfficiency(Int_t trigger44, Int_t trigger34, Float_t &efficiency, Float_t &error, Bool_t failuresAsInput);
43 Int_t DetElemIdFromPos(Float_t x, Float_t y, Int_t chamber, Int_t cathode);
44 void LocalBoardFromPos(Float_t x, Float_t y, Int_t detElemId, Int_t cathode, Int_t localBoard[4]);
45 void ResetArrays();
46 void WriteOutput(const char* outputDir, Int_t totNumOfTrig[4][2], Int_t atLeast1MuPerEv[4][2]);
47 void WriteEfficiencyMap(const char* outputDir);
48
49private:
2227e936 50 AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other);
51 AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other);
52
f165a2d2 53 void SetGaliceFile(const char* galiceFile);
54 void CleanGalice();
55
56 Int_t fFirstEvent; //!< First event to consider
57 Int_t fLastEvent; //!< Last event to consider
58 Int_t fFirstRun; //!< First run to consider
59 Int_t fLastRun; //!< Last run to consider
60 AliRunLoader* fRunLoader; //!< AliRunLoader pointer
61 AliMUONData* fData; //!< AliMUONData pointer (to access containers)
62 Bool_t fReproduceTrigResponse;//!< Reproduce trigger response
63 Bool_t fPrintInfo;//!< Print informations on event
64 AliMUON *fMUON; //!< AliMUON pointer
65 Int_t fDebugLevel; //!< Debug level
66 TString fGaliceDir; //!< base directory for many runs.
67
2227e936 68 static const Int_t fgkNchambers=4; //!< Number of trigger chambers
69 static const Int_t fgkNcathodes=2; //!< Number of cathodes per chamber
70 static const Int_t fgkNslats=18; //!< Number of slats per chamber
71 static const Int_t fgkNboards=234; //!< Number of trigger boards per chamber
f165a2d2 72
73 Int_t fTrigger34[fgkNchambers][fgkNcathodes];//!< Array counting # of times chamber was inefficient
74 Int_t fTrigger44[fgkNcathodes];//!< Array counting # of times all chambers were efficient
75 Int_t fInefficientSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were inefficient
76 Int_t fHitPerSlat[fgkNchambers][fgkNcathodes][fgkNslats];//!< Array counting # of times slats were efficient
77 Int_t fInefficientBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were inefficient
78 Int_t fHitPerBoard[fgkNchambers][fgkNcathodes][fgkNboards];//!< Array counting # of times boards were efficient
79
80 ClassDef(AliMUONTriggerChamberEff,0) // Dumper of MUON related data
81};
82#endif