]>
Commit | Line | Data |
---|---|---|
31989443 | 1 | // #include "EVE/Alieve/EventAlieve.h" |
2 | // #include "Reve/RGTopFrame.h" | |
3 | // #include "Reve/Cascade.h" | |
4 | ||
5 | // #include "AliESD.h" | |
6 | // #include "AliESDtrack.h" | |
7 | // #include "AliESDcascade.h" | |
8 | // #include "AliESDVertex.h" | |
9 | ||
10 | // using namespace Reve; | |
11 | // using namespace Alieve; | |
12 | ||
13 | ||
14 | ||
15 | Reve::Cascade* esd_make_cas(Reve::TrackRnrStyle* rnrStyle, AliESDVertex* primVtx, | |
16 | AliESDcascade* cas, AliESDtrack* neg, AliESDtrack* pos, | |
17 | AliESDtrack* bach,Int_t i) { | |
18 | ||
19 | Reve::Cascade* myCas = new Reve::Cascade(rnrStyle); | |
20 | myCas->SetESDIndex(i); | |
21 | ||
22 | static Double_t vx,vy,vz, px,py,pz; | |
23 | cas->GetBPxPyPz(px,py,pz); | |
24 | myCas->SetBachP(px,py,pz); | |
25 | cas->GetNPxPyPz(px,py,pz); | |
26 | myCas->SetNegP(px,py,pz); | |
27 | cas->GetPPxPyPz(px,py,pz); | |
28 | myCas->SetPosP(px,py,pz); | |
29 | ||
30 | cas->GetXYZ(vx,vy,vz); // v0 decay vertex | |
31 | myCas->SetV0vtx(vx,vy,vz); | |
32 | cas->GetXYZcascade(vx,vy,vz); // cascade decay vertex | |
33 | myCas->SetCascadeVtx(vx,vy,vz); | |
34 | ||
35 | Double_t primx = primVtx->GetXv(), | |
36 | primy = primVtx->GetYv(), | |
37 | primz = primVtx->GetZv(); | |
38 | ||
39 | myCas->SetCasCosPointingAngle( cas->GetCascadeCosineOfPointingAngle(primx,primy,primz) ); | |
40 | myCas->SetDecayLength(primx, primy, primz); | |
41 | myCas->SetDCA_v0_Bach(cas->GetDcaXiDaughters()); | |
42 | ||
43 | Float_t p = neg->GetP(), mc = neg->GetMass(); | |
44 | Float_t betaNeg = p/TMath::Sqrt(p*p + mc*mc); | |
45 | p = pos->GetP(); mc = pos->GetMass(); | |
46 | Float_t betaPos = p/TMath::Sqrt(p*p + mc*mc); | |
47 | p = bach->GetP(); mc = bach->GetMass(); | |
48 | Float_t betaBach = p/TMath::Sqrt(p*p + mc*mc); | |
49 | if (bach->GetSign()<0) betaBach = -betaBach; // sign is stored is this parameter | |
50 | ||
51 | myCas->SetBeta(betaNeg, betaPos, betaBach); | |
52 | ||
53 | return myCas; | |
54 | } | |
55 | ||
56 | ||
57 | ||
58 | ||
59 | Reve::CascadeList* esd_Cascade(Double_t min_pt=0.1, Double_t max_pt=100) | |
60 | { | |
61 | ||
62 | AliESD* esd = Alieve::Event::AssertESD(); | |
63 | AliESDVertex* primVertex =(AliESDVertex*) esd->GetVertex(); | |
64 | ||
65 | Reve::CascadeList* cont = new Reve::CascadeList("ESD cascade"); | |
66 | cont->SetMainColor(Color_t(3)); // green | |
67 | Reve::TrackRnrStyle* rnrStyle = cont->GetRnrStyle(); | |
68 | rnrStyle->SetMagField( esd->GetMagneticField() ); | |
69 | ||
70 | gReve->AddRenderElement(cont); | |
71 | ||
72 | Int_t count = 0; | |
73 | //for (Int_t n=0; count<3; n++) { | |
74 | for (Int_t n=0; n<esd->GetNumberOfCascades(); n++) { | |
75 | ||
76 | AliESDcascade *cas = esd->GetCascade(n); | |
77 | Int_t negInd = cas->GetNindex(); | |
78 | Int_t posInd = cas->GetPindex(); | |
79 | Int_t bachInd = cas->GetBindex(); | |
80 | AliESDtrack* negTr = esd->GetTrack(negInd); | |
81 | AliESDtrack* posTr = esd->GetTrack(posInd); | |
82 | AliESDtrack* bachTr = esd->GetTrack(bachInd); | |
83 | ||
84 | if (cas) { | |
85 | Reve::Cascade* myCas = esd_make_cas(rnrStyle, primVertex, cas, | |
86 | negTr, posTr, bachTr, n); | |
87 | if (myCas) { | |
88 | gReve->AddRenderElement(cont, myCas); | |
89 | count++; | |
90 | } | |
91 | } | |
92 | } | |
93 | ||
94 | cont->SetTitle("CascadeList"); | |
95 | cont->UpdateItems(); | |
96 | ||
97 | cont->MakeCascades(); | |
98 | gReve->Redraw3D(); | |
99 | ||
100 | return cont; | |
101 | } |