]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/MUON/dep/AliAnalysisTaskMuonTrackingEff.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / MUON / dep / 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 #include "AliMuonTrackCuts.h"
15 #include "TString.h"
16
17 class TList;
18 class TObjArray;
19 class AliCounterCollection;
20 class AliMUONGeometryTransformer;
21 class AliMUONTrack;
22 class AliMUONTrackParam;
23 class AliMpArea;
24 class AliMpPad;
25 class AliMUON2DMap;
26
27
28 class AliAnalysisTaskMuonTrackingEff : public AliAnalysisTaskSE
29 {
30   
31  public:
32   
33   AliAnalysisTaskMuonTrackingEff();
34   AliAnalysisTaskMuonTrackingEff(TString name);
35   virtual ~AliAnalysisTaskMuonTrackingEff();
36
37   /// Set location of the default OCDB storage (if not set use "raw://")
38   void SetDefaultStorage(const char* ocdbPath) { fOCDBpath = ocdbPath; }
39   
40   /// Set the OCDB path to the alignment file used in the reco (if not set use default storage)
41   void SetAlignStorage(const char* ocdbPath) { fAlignOCDBpath = ocdbPath; }
42   
43   /// Set the OCDB path to the recoParam file used in the reco (if not set use default storage)
44   void SetRecoParamStorage(const char* ocdbPath) { fRecoParamOCDBpath = ocdbPath; }
45   
46   /// Select tracks in the given centrality range
47   void SelectCentrality(Double_t min, Double_t max) {fCentMin = min; fCentMax = max;}
48   
49   // set standard cuts to select tracks to be considered
50   void SetMuonTrackCuts(AliMuonTrackCuts &trackCuts);
51   
52   /// set the muon low pT cut
53   void SetMuonPtCut(Double_t cut) {fPtCut = cut;}
54   
55   /// set the flag to select tracks using MC label
56   void UseMCLabel(Bool_t flag = kTRUE) { fUseMCLabel = flag; }
57   
58   /// enable the display in the terminate
59   void EnableDisplay(Bool_t flag = kTRUE) { fEnableDisplay = flag; }
60   
61   // Implementation of interface methods
62   virtual void UserCreateOutputObjects();
63   virtual void UserExec(Option_t *);
64   virtual void NotifyRun();
65   virtual void Terminate(Option_t *);
66   
67   
68  private:
69   
70   /// Not implemented
71   AliAnalysisTaskMuonTrackingEff(const AliAnalysisTaskMuonTrackingEff& rhs);
72   /// Not implemented
73   AliAnalysisTaskMuonTrackingEff& operator = (const AliAnalysisTaskMuonTrackingEff& rhs);
74   
75   // Identify clusters/chambers that can be removed from the track
76   Bool_t TagRemovableClusters(AliMUONTrack &track, Bool_t removableChambers[10]);
77   
78   // Find which detection elements should have been hit and record the missing clusters
79   void FindAndRecordMissingClusters(AliMUONTrackParam &param, Int_t chamber, Double_t trackInfo[6]);
80   
81   // Find the intersection point between the track (assuming straight line) and the DE in the global frame
82   void Intersect(AliMUONTrackParam &param, Int_t deId, Double_t p[3]);
83   
84   // Check whether (global) area overlaps with the given DE
85   Bool_t OverlapDE(AliMpArea &area, Int_t deId);
86   
87   // Register the cluster in the given stores
88   void RecordCluster(Int_t chamber, Int_t deId, AliMpPad pad[2], Double_t trackInfo[6],
89                      TString clusterKey, TList *chamberHistList, Bool_t recordChamber);
90   
91   /// Look for pads at the cluster's location
92   Bool_t FindPads(Int_t deId, Double_t pos[3], AliMpPad pad[2]);
93   
94   
95 private:
96   
97   static const Int_t fgkNofDE[11];  ///< Total number of detection elements in each chamber
98   static const Int_t fgkNofBusPath; ///< Total number of bus patches
99   static const Int_t fgkNofManu;    ///< Total number of manus
100   
101   Bool_t   fOCDBLoaded;             //!< Determine if the OCDB and =geometry have been loaded
102   TString  fOCDBpath;               ///< OCDB path
103   TString  fAlignOCDBpath;          ///< OCDB path to the alignment file
104   TString  fRecoParamOCDBpath;      ///< OCDB path to the recoParam file
105   Double_t fCentMin;                ///< select centrality > fCentMin
106   Double_t fCentMax;                ///< select centrality <= fCentMax
107   AliMuonTrackCuts* fMuonTrackCuts; ///< cuts to select tracks to be considered
108   Double_t fPtCut;                  ///< cut on minimum pt
109   Bool_t   fUseMCLabel;             ///< select tracks using MC label
110   Bool_t   fEnableDisplay;          ///< enable the display in the terminate
111
112   AliMUONGeometryTransformer *fTransformer; //!< Transformer object
113   
114   TObjArray *fDEPlanes; //!< vectors (x0, y0, z0, a, b, c) defining the plane of each DE in the global frame
115   
116   AliCounterCollection* fClusters; //!< detected (all), accepted (for efficiency calculation) and expected clusters
117   TList* fChamberTDHistList; //!< List of histograms of the tracks detected in the chambers.
118   TList* fChamberTTHistList; //!< List of histograms of the tracks which have passed through the chambers.
119   TList* fChamberSDHistList; //!< List of histograms of the tracks only detected by one chamber of the station.
120   TList* fExtraHistList;     //!< List of extra histograms.
121
122
123   ClassDef(AliAnalysisTaskMuonTrackingEff, 5)
124   
125 };
126
127
128 //________________________________________________________________________
129 inline void AliAnalysisTaskMuonTrackingEff::SetMuonTrackCuts(AliMuonTrackCuts &trackCuts)
130 {
131   /// set standard cuts to select tracks to be considered
132   delete fMuonTrackCuts;
133   fMuonTrackCuts = new AliMuonTrackCuts(trackCuts);
134 }
135
136 #endif
137