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"
15 class AliMUONGeometryTransformer;
16 class AliESDMuonTrack;
17 class AliMUONTrackParam;
22 class AliAnalysisTaskMuonTrackingEff : public AliAnalysisTaskSE
25 AliAnalysisTaskMuonTrackingEff();
26 AliAnalysisTaskMuonTrackingEff(TString name);
27 virtual ~AliAnalysisTaskMuonTrackingEff();
29 /// Set location of the default OCDB storage (if not set use "raw://")
30 void SetDefaultStorage(const char* ocdbPath) { fOCDBpath = ocdbPath; }
32 /// set the flag to use only tracks matched with trigger or not
33 void MatchTrigger(Bool_t flag = kTRUE) { fMatchTrig = flag; }
35 /// set the flag to use only tracks passing the acceptance cuts (Rabs, eta)
36 void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
38 /// set the sigma cut value on p*DCA
39 void PDCACut(Double_t cut) { fPDCACut = cut; }
41 /// set the cut value on normalized chi2
42 void Chi2Cut(Double_t cut) { fChi2Cut = cut; }
44 /// set the cut value on minimum pt
45 void PtCut(Double_t cut) { fPtCut = cut; }
47 /// set the cut value on minimum pt
48 void UseMCLabel(Bool_t flag = kTRUE) { fUseMCLabel = flag; }
50 // Implementation of interface methods
51 virtual void UserCreateOutputObjects();
52 virtual void UserExec(Option_t *);
53 virtual void NotifyRun();
54 virtual void Terminate(Option_t *);
60 AliAnalysisTaskMuonTrackingEff(const AliAnalysisTaskMuonTrackingEff& rhs);
62 AliAnalysisTaskMuonTrackingEff& operator = (const AliAnalysisTaskMuonTrackingEff& rhs);
64 void TrackParamLoop(const TObjArray* trackParams);
66 void FindAndFillMissedDetElt (const AliMUONTrackParam* trackParam,
67 const Bool_t* trackFilter,
68 Int_t firstMissCh, Int_t lastChamber);
70 void CoordinatesOfMissingCluster(Double_t x1, Double_t y1, Double_t z1,
71 Double_t x2, Double_t y2, Double_t z2,
72 Double_t& x, Double_t& y) const;
74 Bool_t CoordinatesInDetElt(Int_t DeId, Double_t x, Double_t y) const;
76 void FillTDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
78 void FillTTHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
80 void FillSDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
82 Int_t FromDetElt2iDet (Int_t chamber, Int_t detElt) const;
83 Int_t FromDetElt2LocalId (Int_t chamber, Int_t detElt) const;
84 Int_t FromLocalId2DetElt(Int_t chamber, Int_t iDet) const;
89 static const Int_t fgkNbrOfDetectionElt[10]; ///< The total number of detection element in each chamber.
90 static const Int_t fgkOffset; ///< fFirstDetectionElt[iChamber] = fOffset * (iChamber+1).
92 Bool_t fOCDBLoaded; //!< Determine if the OCDB and =geometry have been loaded
93 TString fOCDBpath; ///< OCDB path
94 Bool_t fMatchTrig; ///< use only tracks matched with trigger
95 Bool_t fApplyAccCut; ///< use only tracks passing the acceptance cuts (Rabs, eta)
96 Double_t fPDCACut; ///< sigma cut on p*DCA
97 Double_t fChi2Cut; ///< cut on normalized chi2
98 Double_t fPtCut; ///< cut on minimum pt
99 Bool_t fUseMCLabel; ///< select tracks using MC label
100 Float_t fCurrentCentrality; //!< centrality of the current event
101 AliESDMuonTrack* fCurrentTrack; //!< pointer to the currently analyzed track
103 AliMUONGeometryTransformer *fTransformer; //!< Transformer object
105 TList* fDetEltTDHistList; //!< List of histograms of the tracks detected in the detection elements.
106 TList* fDetEltTTHistList; //!< List of histograms of the tracks which have passed through the detection elements.
107 TList* fDetEltSDHistList; //!< List of histograms of the tracks only detected by one chamber of the station at the detection element level.
108 TList* fChamberTDHistList; //!< List of histograms of the tracks detected in the chambers.
109 TList* fChamberTTHistList; //!< List of histograms of the tracks which have passed through the chambers.
110 TList* fChamberSDHistList; //!< List of histograms of the tracks only detected by one chamber of the station.
111 TList* fExtraHistList; //!< List of extra histograms.
114 ClassDef(AliAnalysisTaskMuonTrackingEff, 4)