]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muondep/AliAnalysisTaskMuonTrackingEff.h
Initial version of the QA task for Pb-Pb triggers and VZERO (Raphael).
[u/mrichter/AliRoot.git] / PWG3 / muondep / AliAnalysisTaskMuonTrackingEff.h
1 #ifndef ALIANALYSISTASKMUONTRACKINGEFF_H
2 #define ALIANALYSISTASKMUONTRACKINGEFF_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */ 
7
8 /// \ingroup base
9 /// \class AliAnalysisTaskMuonTrackingEff
10 /// \brief tracking chamber efficiency from ESD data
11 //Author: Nicolas LE BRIS - SUBATECH Nantes
12
13 #include "AliAnalysisTaskSE.h"
14
15 class AliMUONGeometryTransformer;
16 class AliMUONTrackParam;
17 class TList;
18 class TString;
19 class TObjArray;
20
21 class AliAnalysisTaskMuonTrackingEff : public AliAnalysisTaskSE
22 {
23  public:
24   AliAnalysisTaskMuonTrackingEff();
25   AliAnalysisTaskMuonTrackingEff(TString name);
26   virtual ~AliAnalysisTaskMuonTrackingEff();
27
28   /// Set location of the default OCDB storage (if not set use "raw://")
29   void SetDefaultStorage(const char* ocdbPath) { fOCDBpath = ocdbPath; }
30   
31   /// set the flag to use only tracks matched with trigger or not
32   void MatchTrigger(Bool_t flag = kTRUE) { fMatchTrig = flag; }
33   
34   /// set the flag to use only tracks passing the acceptance cuts (Rabs, eta)
35   void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
36   
37   // Implementation of interface methods
38   virtual void   UserCreateOutputObjects();
39   virtual void   UserExec(Option_t *);
40   virtual void   NotifyRun();
41   virtual void   Terminate(Option_t *);
42   
43   
44  private:
45   
46   /// Not implemented
47   AliAnalysisTaskMuonTrackingEff(const AliAnalysisTaskMuonTrackingEff& rhs);
48   /// Not implemented
49   AliAnalysisTaskMuonTrackingEff& operator = (const AliAnalysisTaskMuonTrackingEff& rhs);
50   
51   void TrackParamLoop(const TObjArray* trackParams);
52   
53   void FindAndFillMissedDetElt (const AliMUONTrackParam* trackParam,
54                                 const Bool_t* trackFilter,
55                                 Int_t firstMissCh, Int_t lastChamber);
56   
57   void CoordinatesOfMissingCluster(Double_t x1, Double_t y1, Double_t z1,
58                                    Double_t x2, Double_t y2, Double_t z2,
59                                    Double_t& x, Double_t& y) const;
60   
61   Bool_t CoordinatesInDetElt(Int_t DeId, Double_t x, Double_t y) const;
62   
63   void FillTDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
64   
65   void FillTTHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
66
67   void FillSDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
68   
69   Int_t FromDetElt2iDet (Int_t chamber, Int_t detElt) const;
70   Int_t FromDetElt2LocalId (Int_t chamber, Int_t detElt) const;
71   Int_t FromLocalId2DetElt(Int_t chamber, Int_t iDet) const;
72   
73   
74 private:
75   
76   static const Int_t fgkNbrOfDetectionElt[10]; ///< The total number of detection element in each chamber.
77   static const Int_t fgkOffset;                ///< fFirstDetectionElt[iChamber] = fOffset * (iChamber+1).
78   
79   Bool_t  fOCDBLoaded;        //!< Determine if the OCDB and =geometry have been loaded
80   TString fOCDBpath;          ///< OCDB path
81   Bool_t  fMatchTrig;         ///< use only tracks matched with trigger
82   Bool_t  fApplyAccCut;       ///< use only tracks passing the acceptance cuts (Rabs, eta)
83   Float_t fCurrentCentrality; //!< centrality of the current event
84
85   AliMUONGeometryTransformer *fTransformer; //!< Transformer object
86
87   TList* fDetEltTDHistList;  //!< List of histograms of the tracks detected in the detection elements. 
88   TList* fDetEltTTHistList;  //!< List of histograms of the tracks which have passed through the detection elements. 
89   TList* fDetEltSDHistList;  //!< List of histograms of the tracks only detected by one chamber of the station at the detection element level.
90   TList* fChamberTDHistList; //!< List of histograms of the tracks detected in the chambers.
91   TList* fChamberTTHistList; //!< List of histograms of the tracks which have passed through the chambers.
92   TList* fChamberSDHistList; //!< List of histograms of the tracks only detected by one chamber of the station.
93   TList* fExtraHistList;     //!< List of extra histograms.
94
95   
96   ClassDef(AliAnalysisTaskMuonTrackingEff, 3)
97 };
98
99 #endif
100