]>
Commit | Line | Data |
---|---|---|
d810d0de | 1 | // $Id$ |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
31989443 | 9 | // #include "EVE/Alieve/EventAlieve.h" |
84aff7a4 | 10 | // #include "TEveManager.h" |
d810d0de | 11 | // #include "AliEveCascade.h" |
31989443 | 12 | |
13 | // #include "AliESD.h" | |
14 | // #include "AliESDtrack.h" | |
15 | // #include "AliESDcascade.h" | |
16 | // #include "AliESDVertex.h" | |
17 | ||
84aff7a4 | 18 | // using namespace TEveUtil; |
31989443 | 19 | // using namespace Alieve; |
20 | ||
21 | ||
22 | ||
51346b82 | 23 | AliEveCascade* esd_make_cas(TEveTrackPropagator* rnrStyle, AliESDVertex* primVtx, |
31989443 | 24 | AliESDcascade* cas, AliESDtrack* neg, AliESDtrack* pos, |
25 | AliESDtrack* bach,Int_t i) { | |
26 | ||
d810d0de | 27 | AliEveCascade* myCas = new AliEveCascade(rnrStyle); |
31989443 | 28 | myCas->SetESDIndex(i); |
29 | ||
30 | static Double_t vx,vy,vz, px,py,pz; | |
31 | cas->GetBPxPyPz(px,py,pz); | |
32 | myCas->SetBachP(px,py,pz); | |
33 | cas->GetNPxPyPz(px,py,pz); | |
34 | myCas->SetNegP(px,py,pz); | |
35 | cas->GetPPxPyPz(px,py,pz); | |
36 | myCas->SetPosP(px,py,pz); | |
37 | ||
38 | cas->GetXYZ(vx,vy,vz); // v0 decay vertex | |
39 | myCas->SetV0vtx(vx,vy,vz); | |
40 | cas->GetXYZcascade(vx,vy,vz); // cascade decay vertex | |
41 | myCas->SetCascadeVtx(vx,vy,vz); | |
42 | ||
43 | Double_t primx = primVtx->GetXv(), | |
44 | primy = primVtx->GetYv(), | |
45 | primz = primVtx->GetZv(); | |
46 | ||
47 | myCas->SetCasCosPointingAngle( cas->GetCascadeCosineOfPointingAngle(primx,primy,primz) ); | |
48 | myCas->SetDecayLength(primx, primy, primz); | |
49 | myCas->SetDCA_v0_Bach(cas->GetDcaXiDaughters()); | |
50 | ||
51 | Float_t p = neg->GetP(), mc = neg->GetMass(); | |
52 | Float_t betaNeg = p/TMath::Sqrt(p*p + mc*mc); | |
53 | p = pos->GetP(); mc = pos->GetMass(); | |
54 | Float_t betaPos = p/TMath::Sqrt(p*p + mc*mc); | |
55 | p = bach->GetP(); mc = bach->GetMass(); | |
56 | Float_t betaBach = p/TMath::Sqrt(p*p + mc*mc); | |
57 | if (bach->GetSign()<0) betaBach = -betaBach; // sign is stored is this parameter | |
58 | ||
59 | myCas->SetBeta(betaNeg, betaPos, betaBach); | |
60 | ||
61 | return myCas; | |
62 | } | |
63 | ||
64 | ||
65 | ||
66 | ||
d810d0de | 67 | CascadeList* esd_AliEveCascade(Double_t min_pt=0.1, Double_t max_pt=100) |
31989443 | 68 | { |
84aff7a4 | 69 | printf("THIS SCRIPT DOES NOT WORK.\n" |
d810d0de | 70 | "AliEveCascade classes have been temporarily removed.\n" |
84aff7a4 | 71 | "They need to be cleaned up.\n"); |
72 | return; | |
31989443 | 73 | |
d810d0de | 74 | AliESDEvent* esd = AliEveEventManager::AssertESD(); |
31989443 | 75 | AliESDVertex* primVertex =(AliESDVertex*) esd->GetVertex(); |
76 | ||
51346b82 | 77 | CascadeList* cont = new CascadeList("ESD cascade"); |
31989443 | 78 | cont->SetMainColor(Color_t(3)); // green |
84aff7a4 | 79 | TEveTrackPropagator* rnrStyle = cont->GetPropagator(); |
31989443 | 80 | rnrStyle->SetMagField( esd->GetMagneticField() ); |
81 | ||
84aff7a4 | 82 | gEve->AddElement(cont); |
31989443 | 83 | |
84 | Int_t count = 0; | |
85 | //for (Int_t n=0; count<3; n++) { | |
86 | for (Int_t n=0; n<esd->GetNumberOfCascades(); n++) { | |
87 | ||
88 | AliESDcascade *cas = esd->GetCascade(n); | |
89 | Int_t negInd = cas->GetNindex(); | |
90 | Int_t posInd = cas->GetPindex(); | |
91 | Int_t bachInd = cas->GetBindex(); | |
92 | AliESDtrack* negTr = esd->GetTrack(negInd); | |
93 | AliESDtrack* posTr = esd->GetTrack(posInd); | |
94 | AliESDtrack* bachTr = esd->GetTrack(bachInd); | |
95 | ||
96 | if (cas) { | |
d810d0de | 97 | AliEveCascade* myCas = esd_make_cas(rnrStyle, primVertex, cas, |
31989443 | 98 | negTr, posTr, bachTr, n); |
99 | if (myCas) { | |
84aff7a4 | 100 | gEve->AddElement(myCas, cont); |
31989443 | 101 | count++; |
102 | } | |
103 | } | |
104 | } | |
105 | ||
106 | cont->SetTitle("CascadeList"); | |
107 | cont->UpdateItems(); | |
108 | ||
109 | cont->MakeCascades(); | |
84aff7a4 | 110 | gEve->Redraw3D(); |
31989443 | 111 | |
112 | return cont; | |
113 | } |