]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muondep/AliAnalysisTaskMuonTrackingEff.h
minor coverity defects: self-assignment protection
[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 AliESDMuonTrack;
17 class AliMUONTrackParam;
18 class TList;
19 class TString;
20 class TObjArray;
21
22 class AliAnalysisTaskMuonTrackingEff : public AliAnalysisTaskSE
23 {
24  public:
25   AliAnalysisTaskMuonTrackingEff();
26   AliAnalysisTaskMuonTrackingEff(TString name);
27   virtual ~AliAnalysisTaskMuonTrackingEff();
28
29   /// Set location of the default OCDB storage (if not set use "raw://")
30   void SetDefaultStorage(const char* ocdbPath) { fOCDBpath = ocdbPath; }
31   
32   /// set the flag to use only tracks matched with trigger or not
33   void MatchTrigger(Bool_t flag = kTRUE) { fMatchTrig = flag; }
34   
35   /// set the flag to use only tracks passing the acceptance cuts (Rabs, eta)
36   void ApplyAccCut(Bool_t flag = kTRUE) { fApplyAccCut = flag; }
37   
38   /// set the sigma cut value on p*DCA
39   void PDCACut(Double_t cut) { fPDCACut = cut; }
40   
41   /// set the cut value on normalized chi2
42   void Chi2Cut(Double_t cut) { fChi2Cut = cut; }
43   
44   /// set the cut value on minimum pt
45   void PtCut(Double_t cut) { fPtCut = cut; }
46   
47   /// set the cut value on minimum pt
48   void UseMCLabel(Bool_t flag = kTRUE) { fUseMCLabel = flag; }
49   
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 *);
55   
56   
57  private:
58   
59   /// Not implemented
60   AliAnalysisTaskMuonTrackingEff(const AliAnalysisTaskMuonTrackingEff& rhs);
61   /// Not implemented
62   AliAnalysisTaskMuonTrackingEff& operator = (const AliAnalysisTaskMuonTrackingEff& rhs);
63   
64   void TrackParamLoop(const TObjArray* trackParams);
65   
66   void FindAndFillMissedDetElt (const AliMUONTrackParam* trackParam,
67                                 const Bool_t* trackFilter,
68                                 Int_t firstMissCh, Int_t lastChamber);
69   
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;
73   
74   Bool_t CoordinatesInDetElt(Int_t DeId, Double_t x, Double_t y) const;
75   
76   void FillTDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
77   
78   void FillTTHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
79
80   void FillSDHistos (Int_t chamber, Int_t detElt, Double_t posXL, Double_t posYL);
81   
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;
85   
86   
87 private:
88   
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).
91   
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
102
103   AliMUONGeometryTransformer *fTransformer; //!< Transformer object
104
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.
112
113   
114   ClassDef(AliAnalysisTaskMuonTrackingEff, 4)
115 };
116
117 #endif
118