]>
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 | ||
27de2dfb | 6 | /* $Id$ */ |
7 | ||
b2a297fa | 8 | //############################################################# |
9 | //# # | |
10 | //# AliDielectronPair # | |
11 | //# Class to store pair information # | |
12 | //# # | |
13 | //# # | |
14 | //# Authors: # | |
15 | //# Anton Andronic, GSI / A.Andronic@gsi.de # | |
16 | //# Ionut C. Arsene, GSI / I.C.Arsene@gsi.de # | |
17 | //# Julian Book, Uni Ffm / Julian.Book@cern.ch # | |
18 | //# Frederick Kramer, Uni Ffm, / Frederick.Kramer@cern.ch # | |
19 | //# Magnus Mager, CERN / Magnus.Mager@cern.ch # | |
20 | //# WooJin J. Park, GSI / W.J.Park@gsi.de # | |
21 | //# Jens Wiechula, Uni HD / Jens.Wiechula@cern.ch # | |
22 | //# # | |
23 | //############################################################# | |
24 | ||
25 | #include <TMath.h> | |
26 | #include <TRef.h> | |
27 | #include <TLorentzVector.h> | |
28 | ||
29 | #include <AliKFParticle.h> | |
30 | #include <AliVParticle.h> | |
31 | ||
32 | class AliVTrack; | |
33 | ||
34 | //TODO | |
35 | //TODO: Should we inherit from AliVTrack in order to built another AliDielectronPair of KF with it? | |
36 | //TODO | |
37 | class AliDielectronPair : public AliVParticle { | |
38 | public: | |
39 | AliDielectronPair(); | |
40 | virtual ~AliDielectronPair(); | |
41 | ||
42 | AliDielectronPair(AliVTrack * const particle1, Int_t pid1, | |
43 | AliVTrack * const particle2, Int_t pid2, Char_t type); | |
44 | ||
45 | //TODO: copy constructor + assignment operator | |
46 | ||
47 | void SetTracks(AliVTrack * const particle1, Int_t pid1, | |
48 | AliVTrack * const particle2, Int_t pid2); | |
49 | ||
50 | //AliVParticle interface | |
51 | // kinematics | |
52 | virtual Double_t Px() const { return fPair.GetPx(); } | |
53 | virtual Double_t Py() const { return fPair.GetPy(); } | |
54 | virtual Double_t Pz() const { return fPair.GetPz(); } | |
55 | virtual Double_t Pt() const { return fPair.GetPt(); } | |
56 | virtual Double_t P() const { return fPair.GetP(); } | |
57 | virtual Bool_t PxPyPz(Double_t p[3]) const { p[0]=Px(); p[1]=Py(); p[2]=Pz(); return kTRUE; } | |
58 | ||
59 | virtual Double_t Xv() const { return fPair.GetX(); } | |
60 | virtual Double_t Yv() const { return fPair.GetY(); } | |
61 | virtual Double_t Zv() const { return fPair.GetZ(); } | |
61d106d3 | 62 | virtual Bool_t XvYvZv(Double_t x[3]) const { x[0]=Xv(); x[1]=Yv(); x[2]=Zv(); return kTRUE; } |
b2a297fa | 63 | |
64 | virtual Double_t OneOverPt() const { return Pt()>0.?1./Pt():0.; } //TODO: check | |
65 | virtual Double_t Phi() const { return fPair.GetPhi();} | |
66 | virtual Double_t Theta() const { return Pz()!=0?TMath::ATan(Pt()/Pz()):0.; } //TODO: check | |
67 | ||
68 | ||
69 | virtual Double_t E() const { return fPair.GetE(); } | |
70 | virtual Double_t M() const { return fPair.GetMass(); } | |
71 | ||
72 | virtual Double_t Eta() const { return fPair.GetEta();} | |
8df8e382 | 73 | virtual Double_t Y() const { |
74 | if((E()*E()-Px()*Px()-Py()*Py()-Pz()*Pz())>0.) return TLorentzVector(Px(),Py(),Pz(),E()).Rapidity(); | |
75 | else return -1111.; | |
76 | } | |
b2a297fa | 77 | |
78 | virtual Short_t Charge() const { return fPair.GetQ();} | |
a655b716 | 79 | virtual Int_t GetLabel() const { return fLabel; } |
b2a297fa | 80 | // PID |
81 | virtual const Double_t *PID() const { return 0;} //TODO: check | |
a655b716 | 82 | // Dummy |
83 | Int_t PdgCode() const {return 0;} | |
572b0139 | 84 | |
b2a297fa | 85 | |
86 | UChar_t GetType() const { return fType; } | |
87 | void SetType(Char_t type) { fType=type; } | |
a655b716 | 88 | |
89 | void SetLabel(Int_t label) {fLabel=label;} | |
572b0139 | 90 | |
91 | //inter leg information | |
61d106d3 | 92 | Double_t OpeningAngle() const { return fD1.GetAngle(fD2); } |
93 | Double_t DistanceDaughters() const { return fD1.GetDistanceFromParticle(fD2); } | |
94 | Double_t DistanceDaughtersXY() const { return fD1.GetDistanceFromParticleXY(fD2); } | |
95 | Double_t DeviationDaughters() const { return fD1.GetDeviationFromParticle(fD2); } | |
96 | Double_t DeviationDaughtersXY() const { return fD1.GetDeviationFromParticleXY(fD2); } | |
97 | Double_t DeltaEta() const { return TMath::Abs(fD1.GetEta()-fD2.GetEta()); } | |
98 | Double_t DeltaPhi() const { Double_t dphi=TMath::Abs(fD1.GetPhi()-fD2.GetPhi()); | |
99 | return (dphi>TMath::Pi())?dphi-TMath::Pi():dphi; } | |
8df8e382 | 100 | // calculate cos(theta*) and phi* in HE and CS pictures |
61d106d3 | 101 | void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const; |
102 | ||
8df8e382 | 103 | Double_t ThetaPhiCM(Bool_t isHE, Bool_t isTheta) const; |
104 | static Double_t ThetaPhiCM(const AliVParticle* d1, const AliVParticle* d2, | |
61d106d3 | 105 | const Bool_t isHE, const Bool_t isTheta); |
b2a297fa | 106 | // internal KF particle |
572b0139 | 107 | const AliKFParticle& GetKFParticle() const { return fPair; } |
108 | const AliKFParticle& GetKFFirstDaughter() const { return fD1; } | |
109 | const AliKFParticle& GetKFSecondDaughter() const { return fD2; } | |
110 | ||
b2a297fa | 111 | // daughter references |
8df8e382 | 112 | void SetRefFirstDaughter(AliVParticle * const track) {fRefD1 = track;} |
113 | void SetRefSecondDaughter(AliVParticle * const track) {fRefD2 = track;} | |
114 | ||
b2a297fa | 115 | AliVParticle* GetFirstDaughter() const { return dynamic_cast<AliVParticle*>(fRefD1.GetObject()); } |
116 | AliVParticle* GetSecondDaughter() const { return dynamic_cast<AliVParticle*>(fRefD2.GetObject()); } | |
a655b716 | 117 | |
b2a297fa | 118 | |
119 | private: | |
a655b716 | 120 | Char_t fType; // type of the pair e.g. like sign SE, unlike sign SE, ... see AliDielectron |
121 | Int_t fLabel; // MC label | |
122 | ||
b2a297fa | 123 | AliKFParticle fPair; // KF particle internally used for pair calculation |
572b0139 | 124 | AliKFParticle fD1; // KF particle first daughter |
125 | AliKFParticle fD2; // KF particle1 second daughter | |
126 | ||
b2a297fa | 127 | TRef fRefD1; // Reference to first daughter |
128 | TRef fRefD2; // Reference to second daughter | |
129 | ||
572b0139 | 130 | ClassDef(AliDielectronPair,3) |
b2a297fa | 131 | }; |
132 | ||
133 | #endif |