]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/dielectron/AliDielectronTrackRotator.h
Adding Id to PWG3 classes for better tracking of the coverity defect fixes (Ivana)
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronTrackRotator.h
1 #ifndef ALIDIELECTRONTRACKROTATOR_H
2 #define ALIDIELECTRONTRACKROTATOR_H
3
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */ 
8
9 //#############################################################
10 //#                                                           # 
11 //#         Class AliDielectronTrackRotator                   #
12 //#                                                           #
13 //#  Authors:                                                 #
14 //#   Anton     Andronic, GSI / A.Andronic@gsi.de             #
15 //#   Ionut C.  Arsene,   GSI / I.C.Arsene@gsi.de             #
16 //#   Julian    Book,     Uni Ffm / Julian.Book@cern.ch       #
17 //#   Frederick Kramer,   Uni Ffm, / Frederick.Kramer@cern.ch #
18 //#   Magnus    Mager,    CERN / Magnus.Mager@cern.ch         #
19 //#   WooJin J. Park,     GSI / W.J.Park@gsi.de               #
20 //#   Jens      Wiechula, Uni HD / Jens.Wiechula@cern.ch      #
21 //#                                                           #
22 //#############################################################
23
24 #include <TNamed.h>
25
26 class TObjArray;
27 class AliVTrack;
28
29 class AliDielectronTrackRotator : public TNamed {
30 public:
31   enum ERotationType {kRotatePositive, kRotateNegative, kRotateBothRandom};
32   
33   AliDielectronTrackRotator();
34   AliDielectronTrackRotator(const char*name, const char* title);
35
36   virtual ~AliDielectronTrackRotator();
37
38   void SetTrackArrays(const TObjArray * const arrP, const TObjArray * const arrN) {fkArrTracksP=arrP;fkArrTracksN=arrN;}
39   void Reset();
40   Bool_t NextCombination();
41
42   //Setters
43   void SetIterations(UInt_t niter)         { fIterations=niter;  }
44   void SetRotationType(ERotationType type) { fRotationType=type; }
45   void SetStartAnglePhi(Double_t phi)      { fStartAnglePhi=phi; }
46   void SetConeAnglePhi(Double_t phi)       { fConeAnglePhi=phi;  }
47
48   //Getters
49   Int_t GetIterations() const           { return fIterations;    }
50   ERotationType GetRotationType() const { return fRotationType;  }
51   Double_t GetStartAnglePhi() const     { return fStartAnglePhi; }
52   Double_t GetConeAnglePhi() const      { return fConeAnglePhi;  }
53
54
55   AliVTrack* GetTrackP() const {return fTrackP;}
56   AliVTrack* GetTrackN() const {return fTrackN;}
57
58 private:
59   UInt_t   fIterations;             // number of iterations
60
61   ERotationType fRotationType;      // which track to rotate
62   
63   Double_t fStartAnglePhi;          // starting angle for rotation
64   Double_t fConeAnglePhi;           // opening angle in phi for multiple rotation
65
66   const TObjArray *fkArrTracksP;           //! array of positive tracks
67   const TObjArray *fkArrTracksN;           //! array of negative tracks
68
69   UInt_t   fCurrentIteration;       //! current iteration step
70   Int_t    fCurrentTackP;           //! current positive track in array
71   Int_t    fCurrentTackN;           //! current negative track in array
72
73   AliVTrack *fTrackP;               //! Positive track
74   AliVTrack *fTrackN;               //! Negative track
75
76   Bool_t RotateTracks();
77   
78   AliDielectronTrackRotator(const AliDielectronTrackRotator &c);
79   AliDielectronTrackRotator &operator=(const AliDielectronTrackRotator &c);
80
81   
82   ClassDef(AliDielectronTrackRotator,1)         // Dielectron TrackRotator
83 };
84
85
86
87 #endif