1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 #include <TDatabasePDG.h>
19 #include <TParticlePDG.h>
20 #include <TParticle.h>
23 #include <TObjectTable.h>
25 #include "AliDecayerPolarized.h"
28 ClassImp(AliDecayerPolarized)
30 //____________________________________________________________
31 AliDecayerPolarized::AliDecayerPolarized()
33 // Default constructor
40 fPol = new TF1("dsigdcostheta","1.+[0]*x*x",-1.,1.);
41 fPol->SetParameter(0,fAlpha);
44 //____________________________________________________________
45 AliDecayerPolarized::AliDecayerPolarized(Double_t alpha, Polar_t systref, FinState_t decprod)
47 // Another constructor
54 fPol = new TF1("dsigdcostheta","1.+[0]*x*x",-1.,1.);
55 fPol->SetParameter(0,fAlpha);
56 if(fDecProd!=kMuon && fDecProd!=kElectron)
57 AliFatal("Only polarized decay into muons or electrons is implemented!");
60 //____________________________________________________________
61 AliDecayerPolarized::~AliDecayerPolarized()
64 if(fPol) delete fPol; fPol=0;
65 if(fMother) delete fMother; fMother=0;
66 if(fDaughter1) delete fDaughter1; fDaughter1=0;
67 if(fDaughter2) delete fDaughter2; fDaughter2=0;
69 //____________________________________________________________
70 void AliDecayerPolarized::Decay(Int_t ipart, TLorentzVector *p)
72 // Polarized 2- body decay
73 TDatabasePDG *pDataBase = TDatabasePDG::Instance();
74 if(ipart!= (pDataBase->GetParticle("J/psi")->PdgCode()) &&
75 ipart!= (pDataBase->GetParticle("psi'")->PdgCode()) &&
76 ipart!= (pDataBase->GetParticle("Upsilon")->PdgCode()) &&
77 ipart!= (pDataBase->GetParticle("Upsilon'")->PdgCode()))
78 AliFatal("Polarized decay only implemented for J/psi, psi', Upsilon and Upsilon' !");
80 TParticlePDG *d1 = 0, *d2 = 0;
82 d1 = pDataBase->GetParticle("mu-");
83 d2 = pDataBase->GetParticle("mu+");
85 else if(fDecProd==kElectron){
86 d1 = pDataBase->GetParticle("e-");
87 d2 = pDataBase->GetParticle("e+");
89 // energies and momenta in lab frame
90 Double_t e1 = p->M() / 2.;
92 Double_t p1 = TMath::Sqrt((e1 + d1->Mass())*(e1 - d1->Mass()));
94 Double_t costheta = fPol->GetRandom();
96 Double_t sintheta = TMath::Sqrt((1. + costheta)*(1. - costheta));
97 Double_t phi = 2. * TMath::Pi() * gRandom->Rndm();
98 Double_t px1 = p1 * sintheta * TMath::Cos(phi);
99 Double_t py1 = p1 * sintheta * TMath::Sin(phi);
100 Double_t pz1 = p1 * costheta;
102 TLorentzVector v1,v2, boosted1, boosted2;
103 v1.SetPxPyPzE(-px1,-py1,-pz1,e1); //in the dimuon rest frame
104 v2.SetPxPyPzE(px1,py1,pz1,e2);
106 TLorentzVector PProj, PTarg; // In the CM frame
108 PProj.SetPxPyPzE(0.,0.,-7000.,TMath::Sqrt(7000.*7000.+mp*mp)); // projectile
109 PTarg.SetPxPyPzE(0.,0.,7000.,TMath::Sqrt(7000.*7000.+mp*mp)); // target
112 betajpsicm = (-1./p->E()*p->Vect());
114 if(fSystRef == kHelicity) {
115 // polarization axis: direction of the JPsi in the CM
116 TVector3 v3jpsi = (p->Vect()).Unit();
119 } else if (fSystRef == kColSop){
120 // polarization axis: bisector of proj and target in the dimuon rest frame
121 PProj.Boost(betajpsicm); //boost proj and targ from CM to DIMU rest frame
122 PTarg.Boost(betajpsicm);
125 zaxisCS=(((PProj.Vect()).Unit())-((PTarg.Vect()).Unit())).Unit();
126 v1.RotateUz(zaxisCS);
127 v2.RotateUz(zaxisCS);
130 // printf("v1 components (mu1 with jpsi at rest)%f %f %f %f\n",v1.Px(),v1.Py(),v1.Pz(),v1.E());
131 // printf("v2 components (mu2 with jpsi at rest)%f %f %f %f\n",v2.Px(),v2.Py(),v2.Pz(),v2.E());
133 v1.Boost(-betajpsicm); //boost muons from DIMUON rest frame to CM
134 v2.Boost(-betajpsicm);
136 // printf("v1 components (mu1 in polar. ref. syst.) %f %f %f %f\n",v1.Px(),v1.Py(),v1.Pz(),v1.E());
137 // printf("v2 components (mu2 in polar. ref. syst.) %f %f %f %f\n",v2.Px(),v2.Py(),v2.Pz(),v2.E());
139 Int_t status_decayed=11;
140 Int_t status_undecayed=1;
143 fMother = new TParticle(ipart,status_decayed,0,-1,2,3,p->Px(),p->Py(),p->Pz(),p->E(),0.,0.,0.,0);
144 fDaughter1 = new TParticle(d1->PdgCode(),status_undecayed,1,-1,0,0,v1.Px(),v1.Py(),v1.Pz(),v1.E(),0.,0.,0.,0);
145 fDaughter2 = new TParticle(d2->PdgCode(),status_undecayed,1,-1,0,0,v2.Px(),v2.Py(),v2.Pz(),v2.E(),0.,0.,0.,0);
149 //____________________________________________________________
150 Int_t AliDecayerPolarized::ImportParticles(TClonesArray *part)
152 // Return array of particles
153 TClonesArray &cloneparticles = *part;
154 cloneparticles.Clear();
156 new(cloneparticles[0])TParticle(*fMother);
157 new(cloneparticles[1])TParticle(*fDaughter1);
158 new(cloneparticles[2])TParticle(*fDaughter2);
160 return part->GetEntries();
163 void AliDecayerPolarized::Copy(TObject &) const
166 // Copy *this onto AliDecayerPolarized -- not implemented
168 Fatal("Copy","Not implemented!\n");
171 void AliDecayerPolarized::SetForceDecay(Int_t)
173 // This method is dummy
176 void AliDecayerPolarized::ForceDecay()
178 // This method is dummy
179 AliWarning("Method not implemented for this class !\n");
182 Float_t AliDecayerPolarized::GetPartialBranchingRatio(Int_t)
184 // This method is dummy
188 Float_t AliDecayerPolarized::GetLifetime(Int_t)
190 // This method is dummy
191 AliWarning("Method not implemented for this class !\n");
195 void AliDecayerPolarized::ReadDecayTable()
197 // This method is dummy
198 AliWarning("Method not implemented for this class !\n");