]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/dielectron/AliDielectronTrackRotator.h
defects from coverity fixed
[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 //#############################################################
8 //#                                                           # 
9 //#         Class AliDielectronTrackRotator                   #
10 //#                                                           #
11 //#  Authors:                                                 #
12 //#   Anton     Andronic, GSI / A.Andronic@gsi.de             #
13 //#   Ionut C.  Arsene,   GSI / I.C.Arsene@gsi.de             #
14 //#   Julian    Book,     Uni Ffm / Julian.Book@cern.ch       #
15 //#   Frederick Kramer,   Uni Ffm, / Frederick.Kramer@cern.ch #
16 //#   Magnus    Mager,    CERN / Magnus.Mager@cern.ch         #
17 //#   WooJin J. Park,     GSI / W.J.Park@gsi.de               #
18 //#   Jens      Wiechula, Uni HD / Jens.Wiechula@cern.ch      #
19 //#                                                           #
20 //#############################################################
21
22 #include <TNamed.h>
23
24 #include <AliKFParticle.h>
25
26 class TObjArray;
27 class AliVTrack;
28 class AliVEvent;
29
30 class AliDielectronTrackRotator : public TNamed {
31 public:
32   enum ERotationType {kRotatePositive, kRotateNegative, kRotateBothRandom};
33   
34   AliDielectronTrackRotator();
35   AliDielectronTrackRotator(const char*name, const char* title);
36
37   virtual ~AliDielectronTrackRotator();
38
39   void SetTrackArrays(const TObjArray * const arrP, const TObjArray * const arrN) {fkArrTracksP=arrP;fkArrTracksN=arrN;}
40   void Reset();
41   Bool_t NextCombination();
42
43   //Setters
44   void SetIterations(UInt_t niter)         { fIterations=niter;  }
45   void SetRotationType(ERotationType type) { fRotationType=type; }
46   void SetStartAnglePhi(Double_t phi)      { fStartAnglePhi=phi; }
47   void SetConeAnglePhi(Double_t phi)       { fConeAnglePhi=phi;  }
48
49   //Getters
50   Int_t GetIterations() const           { return fIterations;    }
51   ERotationType GetRotationType() const { return fRotationType;  }
52   Double_t GetStartAnglePhi() const     { return fStartAnglePhi; }
53   Double_t GetConeAnglePhi() const      { return fConeAnglePhi;  }
54
55   void SetEvent(AliVEvent * const ev)   { fEvent = ev;           }
56   void SetPdgLegs(Int_t pdfLeg1, Int_t pdfLeg2) { fPdgLeg1=pdfLeg1; fPdgLeg2=pdfLeg2; }
57
58   const AliKFParticle& GetKFTrackP() const {return fTrackP;}
59   const AliKFParticle& GetKFTrackN() const {return fTrackN;}
60
61   AliVTrack* GetVTrackP() const {return fVTrackP;}
62   AliVTrack* GetVTrackN() const {return fVTrackN;}
63   
64 private:
65   UInt_t   fIterations;             // number of iterations
66
67   ERotationType fRotationType;      // which track to rotate
68   
69   Double_t fStartAnglePhi;          // starting angle for rotation
70   Double_t fConeAnglePhi;           // opening angle in phi for multiple rotation
71
72   const TObjArray *fkArrTracksP;    //! array of positive tracks
73   const TObjArray *fkArrTracksN;    //! array of negative tracks
74
75   UInt_t   fCurrentIteration;       //! current iteration step
76   Int_t    fCurrentTackP;           //! current positive track in array
77   Int_t    fCurrentTackN;           //! current negative track in array
78
79   AliVEvent *fEvent;                //! current event
80   
81   AliKFParticle fTrackP;            //! Positive track
82   AliKFParticle fTrackN;            //! Negative track
83   
84   AliVTrack *fVTrackP;              //! Positive track
85   AliVTrack *fVTrackN;              //! Negative track
86   
87   Int_t fPdgLeg1;                   //! pdg code leg1
88   Int_t fPdgLeg2;                   //! pdg code leg2
89   
90
91   Bool_t RotateTracks();
92   
93   AliDielectronTrackRotator(const AliDielectronTrackRotator &c);
94   AliDielectronTrackRotator &operator=(const AliDielectronTrackRotator &c);
95
96   
97   ClassDef(AliDielectronTrackRotator,1)         // Dielectron TrackRotator
98 };
99
100
101
102 #endif