Add a draw class for the CORRFW (produces a warning, will be fixed
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronPair.h
CommitLineData
b2a297fa 1#ifndef ALIDIELECTRONPAIR_H
2#define ALIDIELECTRONPAIR_H
3/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6//#############################################################
7//# #
8//# AliDielectronPair #
9//# Class to store pair information #
10//# #
11//# #
12//# Authors: #
13//# Anton Andronic, GSI / A.Andronic@gsi.de #
14//# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de #
15//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
16//# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch #
17//# Magnus Mager, CERN / Magnus.Mager@cern.ch #
18//# WooJin J. Park, GSI / W.J.Park@gsi.de #
19//# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch #
20//# #
21//#############################################################
22
23#include <TMath.h>
24#include <TRef.h>
25#include <TLorentzVector.h>
26
27#include <AliKFParticle.h>
28#include <AliVParticle.h>
29
30class AliVTrack;
31
32//TODO
33//TODO: Should we inherit from AliVTrack in order to built another AliDielectronPair of KF with it?
34//TODO
35class AliDielectronPair : public AliVParticle {
36public:
37 AliDielectronPair();
38 virtual ~AliDielectronPair();
39
40 AliDielectronPair(AliVTrack * const particle1, Int_t pid1,
41 AliVTrack * const particle2, Int_t pid2, Char_t type);
42
43 //TODO: copy constructor + assignment operator
44
45 void SetTracks(AliVTrack * const particle1, Int_t pid1,
46 AliVTrack * const particle2, Int_t pid2);
47
48 //AliVParticle interface
49 // kinematics
50 virtual Double_t Px() const { return fPair.GetPx(); }
51 virtual Double_t Py() const { return fPair.GetPy(); }
52 virtual Double_t Pz() const { return fPair.GetPz(); }
53 virtual Double_t Pt() const { return fPair.GetPt(); }
54 virtual Double_t P() const { return fPair.GetP(); }
55 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0]=Px(); p[1]=Py(); p[2]=Pz(); return kTRUE; }
56
57 virtual Double_t Xv() const { return fPair.GetX(); }
58 virtual Double_t Yv() const { return fPair.GetY(); }
59 virtual Double_t Zv() const { return fPair.GetZ(); }
60 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0]=Xv(); x[1]=Xv(); x[2]=Zv(); return kTRUE; }
61
62 virtual Double_t OneOverPt() const { return Pt()>0.?1./Pt():0.; } //TODO: check
63 virtual Double_t Phi() const { return fPair.GetPhi();}
64 virtual Double_t Theta() const { return Pz()!=0?TMath::ATan(Pt()/Pz()):0.; } //TODO: check
65
66
67 virtual Double_t E() const { return fPair.GetE(); }
68 virtual Double_t M() const { return fPair.GetMass(); }
69
70 virtual Double_t Eta() const { return fPair.GetEta();}
6551594b 71 virtual Double_t Y() const { return TLorentzVector(Px(),Py(),Pz(),E()).Rapidity();}
b2a297fa 72
73 virtual Short_t Charge() const { return fPair.GetQ();}
74 virtual Int_t GetLabel() const { return -1; } //TODO: check
75 // PID
76 virtual const Double_t *PID() const { return 0;} //TODO: check
77
78 Double_t OpeningAngle() const { return fOpeningAngle; }
79
80 UChar_t GetType() const { return fType; }
81 void SetType(Char_t type) { fType=type; }
82 // internal KF particle
83 const AliKFParticle& GetKFParticle() const { return fPair; }
84
85 // daughter references
86 AliVParticle* GetFirstDaughter() const { return dynamic_cast<AliVParticle*>(fRefD1.GetObject()); }
87 AliVParticle* GetSecondDaughter() const { return dynamic_cast<AliVParticle*>(fRefD2.GetObject()); }
88
89
90private:
91 Double_t fOpeningAngle; // opening angle of the pair
92 Char_t fType; // type of the pair e.g. like sign SE, unlike sign SE, ... see AliDielectron
93
94 AliKFParticle fPair; // KF particle internally used for pair calculation
95
96 TRef fRefD1; // Reference to first daughter
97 TRef fRefD2; // Reference to second daughter
98
99 ClassDef(AliDielectronPair,1)
100};
101
102#endif