]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muondep/AliAnalysisTaskMuonTrackingEff.h
- new clesses added
[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   Int_t FromDetElt2iDet (Int_t chamber, Int_t detElt) const;
68   Int_t FromDetElt2LocalId (Int_t chamber, Int_t detElt) const;
69   Int_t FromLocalId2DetElt(Int_t chamber, Int_t iDet) const;
70   
71   
72 private:
73   
74   static const Int_t fgkNbrOfDetectionElt[10]; ///< The total number of detection element in each chamber.
75   static const Int_t fgkOffset;                ///< fFirstDetectionElt[iChamber] = fOffset * (iChamber+1).
76   
77   Bool_t  fOCDBLoaded;        //!< Determine if the OCDB and =geometry have been loaded
78   TString fOCDBpath;          ///< OCDB path
79   Bool_t  fMatchTrig;         ///< use only tracks matched with trigger
80   Bool_t  fApplyAccCut;       ///< use only tracks passing the acceptance cuts (Rabs, eta)
81   Float_t fCurrentCentrality; //!< centrality of the current event
82
83   AliMUONGeometryTransformer *fTransformer; //!< Transformer object
84
85   TList* fDetEltTDHistList;  //!< List of histograms of the tracks detected in the detection elements. 
86   TList* fDetEltTTHistList;  //!< List of histograms of the tracks which have passed through the detection elements. 
87   TList* fChamberTDHistList; //!< List of histograms of the tracks detected in the chambers.
88   TList* fChamberTTHistList; //!< List of histograms of the tracks which have passed through the chambers.
89
90   
91   ClassDef(AliAnalysisTaskMuonTrackingEff, 2)
92 };
93
94 #endif
95