]>
Commit | Line | Data |
---|---|---|
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 | ||
30 | class AliVTrack; | |
31 | ||
32 | //TODO | |
33 | //TODO: Should we inherit from AliVTrack in order to built another AliDielectronPair of KF with it? | |
34 | //TODO | |
35 | class AliDielectronPair : public AliVParticle { | |
36 | public: | |
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();} | |
8df8e382 | 71 | virtual Double_t Y() const { |
72 | if((E()*E()-Px()*Px()-Py()*Py()-Pz()*Pz())>0.) return TLorentzVector(Px(),Py(),Pz(),E()).Rapidity(); | |
73 | else return -1111.; | |
74 | } | |
b2a297fa | 75 | |
76 | virtual Short_t Charge() const { return fPair.GetQ();} | |
a655b716 | 77 | virtual Int_t GetLabel() const { return fLabel; } |
b2a297fa | 78 | // PID |
79 | virtual const Double_t *PID() const { return 0;} //TODO: check | |
a655b716 | 80 | // Dummy |
81 | Int_t PdgCode() const {return 0;} | |
572b0139 | 82 | |
b2a297fa | 83 | |
84 | UChar_t GetType() const { return fType; } | |
85 | void SetType(Char_t type) { fType=type; } | |
a655b716 | 86 | |
87 | void SetLabel(Int_t label) {fLabel=label;} | |
572b0139 | 88 | |
89 | //inter leg information | |
90 | Double_t OpeningAngle() const { return fD1.GetAngle(fD2); } | |
91 | Double_t DistanceDaughters() const { return fD1.GetDistanceFromParticle(fD2); } | |
92 | Double_t DistanceDaughtersXY() const { return fD1.GetDistanceFromParticleXY(fD2); } | |
93 | Double_t DeviationDaughters() const { return fD1.GetDeviationFromParticle(fD2); } | |
94 | Double_t DeviationDaughtersXY() const { return fD1.GetDeviationFromParticleXY(fD2); } | |
8df8e382 | 95 | // calculate cos(theta*) and phi* in HE and CS pictures |
96 | Double_t ThetaPhiCM(Bool_t isHE, Bool_t isTheta) const; | |
97 | static Double_t ThetaPhiCM(const AliVParticle* d1, const AliVParticle* d2, | |
98 | const Bool_t isHE, const Bool_t isTheta); | |
572b0139 | 99 | |
b2a297fa | 100 | // internal KF particle |
572b0139 | 101 | const AliKFParticle& GetKFParticle() const { return fPair; } |
102 | const AliKFParticle& GetKFFirstDaughter() const { return fD1; } | |
103 | const AliKFParticle& GetKFSecondDaughter() const { return fD2; } | |
104 | ||
b2a297fa | 105 | // daughter references |
8df8e382 | 106 | void SetRefFirstDaughter(AliVParticle * const track) {fRefD1 = track;} |
107 | void SetRefSecondDaughter(AliVParticle * const track) {fRefD2 = track;} | |
108 | ||
b2a297fa | 109 | AliVParticle* GetFirstDaughter() const { return dynamic_cast<AliVParticle*>(fRefD1.GetObject()); } |
110 | AliVParticle* GetSecondDaughter() const { return dynamic_cast<AliVParticle*>(fRefD2.GetObject()); } | |
a655b716 | 111 | |
b2a297fa | 112 | |
113 | private: | |
a655b716 | 114 | Char_t fType; // type of the pair e.g. like sign SE, unlike sign SE, ... see AliDielectron |
115 | Int_t fLabel; // MC label | |
116 | ||
b2a297fa | 117 | AliKFParticle fPair; // KF particle internally used for pair calculation |
572b0139 | 118 | AliKFParticle fD1; // KF particle first daughter |
119 | AliKFParticle fD2; // KF particle1 second daughter | |
120 | ||
b2a297fa | 121 | TRef fRefD1; // Reference to first daughter |
122 | TRef fRefD2; // Reference to second daughter | |
123 | ||
572b0139 | 124 | ClassDef(AliDielectronPair,3) |
b2a297fa | 125 | }; |
126 | ||
127 | #endif |