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 */
9 /// \class AliAnalysisTaskMuonTrackingEff
10 /// \brief tracking chamber efficiency from ESD data
11 //Author: Nicolas LE BRIS - SUBATECH Nantes
13 #include "AliAnalysisTaskSE.h"
14 #include "AliMuonTrackCuts.h"
19 class AliCounterCollection;
20 class AliMUONGeometryTransformer;
22 class AliMUONTrackParam;
28 class AliAnalysisTaskMuonTrackingEff : public AliAnalysisTaskSE
33 AliAnalysisTaskMuonTrackingEff();
34 AliAnalysisTaskMuonTrackingEff(TString name);
35 virtual ~AliAnalysisTaskMuonTrackingEff();
37 /// Set location of the default OCDB storage (if not set use "raw://")
38 void SetDefaultStorage(const char* ocdbPath) { fOCDBpath = ocdbPath; }
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; }
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; }
46 /// Select tracks in the given centrality range
47 void SelectCentrality(Double_t min, Double_t max) {fCentMin = min; fCentMax = max;}
49 // set standard cuts to select tracks to be considered
50 void SetMuonTrackCuts(AliMuonTrackCuts &trackCuts);
52 /// set the muon low pT cut
53 void SetMuonPtCut(Double_t cut) {fPtCut = cut;}
55 /// set the flag to select tracks using MC label
56 void UseMCLabel(Bool_t flag = kTRUE) { fUseMCLabel = flag; }
58 /// enable the display in the terminate
59 void EnableDisplay(Bool_t flag = kTRUE) { fEnableDisplay = flag; }
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 *);
71 AliAnalysisTaskMuonTrackingEff(const AliAnalysisTaskMuonTrackingEff& rhs);
73 AliAnalysisTaskMuonTrackingEff& operator = (const AliAnalysisTaskMuonTrackingEff& rhs);
75 // Identify clusters/chambers that can be removed from the track
76 Bool_t TagRemovableClusters(AliMUONTrack &track, Bool_t removableChambers[10]);
78 // Find which detection elements should have been hit and record the missing clusters
79 void FindAndRecordMissingClusters(AliMUONTrackParam ¶m, Int_t chamber, Double_t trackInfo[6]);
81 // Find the intersection point between the track (assuming straight line) and the DE in the global frame
82 void Intersect(AliMUONTrackParam ¶m, Int_t deId, Double_t p[3]);
84 // Check whether (global) area overlaps with the given DE
85 Bool_t OverlapDE(AliMpArea &area, Int_t deId);
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);
91 /// Look for pads at the cluster's location
92 Bool_t FindPads(Int_t deId, Double_t pos[3], AliMpPad pad[2]);
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
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
112 AliMUONGeometryTransformer *fTransformer; //!< Transformer object
114 TObjArray *fDEPlanes; //!< vectors (x0, y0, z0, a, b, c) defining the plane of each DE in the global frame
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.
123 ClassDef(AliAnalysisTaskMuonTrackingEff, 5)
128 //________________________________________________________________________
129 inline void AliAnalysisTaskMuonTrackingEff::SetMuonTrackCuts(AliMuonTrackCuts &trackCuts)
131 /// set standard cuts to select tracks to be considered
132 delete fMuonTrackCuts;
133 fMuonTrackCuts = new AliMuonTrackCuts(trackCuts);