X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=EVGEN%2FAliGenCorrHF.cxx;h=707271dbd55d92ad15df20127b8235a8811839db;hp=b222e73da05aa2a946553bf1fc39abb321fba712;hb=4c1110674aeb1890b6a8ec344a34c7d8ba05a060;hpb=84555c939395f467b14b36bd587f7cac8084834c diff --git a/EVGEN/AliGenCorrHF.cxx b/EVGEN/AliGenCorrHF.cxx index b222e73da05..707271dbd55 100644 --- a/EVGEN/AliGenCorrHF.cxx +++ b/EVGEN/AliGenCorrHF.cxx @@ -224,16 +224,10 @@ void AliGenCorrHF::Init() void AliGenCorrHF::Generate() { // -// Generate 'npart' of light and heavy mesons (J/Psi, upsilon or phi, Pion, -// Kaons, Etas, Omegas) and Baryons (proton, antiprotons, neutrons and -// antineutrons in the the desired theta, phi and momentum windows; -// Gaussian smearing on the vertex is done if selected. -// The decay of heavy mesons is done using lujet, -// and the childern particle are tracked by GEANT -// However, light mesons are directly tracked by GEANT -// setting fForceDecay = nodecay (SetForceDecay(nodecay)) -// +// Generate fNpart of correlated HF hadron pairs per event +// in the the desired theta and momentum windows (phi = 0 - 2pi). // + // Reinitialize decayer fDecayer->SetForceDecay(fForceDecay); @@ -249,7 +243,7 @@ void AliGenCorrHF::Generate() Float_t wgtp, wgtch, random[6]; Float_t pq[2][3]; // Momenta of the two quarks Int_t ntq[2] = {-1, -1}; - Float_t tanhy, qm; + Double_t tanhy2, qm = 0; Double_t dphi=0, ptq[2], yq[2], pth[2], plh[2], ph[2], phih[2], phiq[2]; for (i=0; i<2; i++) { @@ -263,6 +257,10 @@ void AliGenCorrHF::Generate() iquark[i] =0; } + // same quarks mass as in the fragmentation functions + if (fQuark == 4) qm = 1.20; + else qm = 4.75; + static TClonesArray *particles; // if(!particles) particles = new TClonesArray("TParticle",1000); @@ -328,20 +326,14 @@ void AliGenCorrHF::Generate() pq[1][1] = qvect2.Py(); // pz - tanhy = TMath::TanH(yq[0]); - qm = pDataBase->GetParticle(iquark[0])->Mass(); - pq[0][2] = TMath::Sqrt((ptq[0]*ptq[0]+qm*qm)*tanhy/(1-tanhy)); - tanhy = TMath::TanH(yq[1]); - qm = pDataBase->GetParticle(iquark[1])->Mass(); - pq[1][2] = TMath::Sqrt((ptq[1]*ptq[1]+qm*qm)*tanhy/(1-tanhy)); - - // set special value shift to have a signature of this generator - pq[0][0] += 1000000.0; - pq[0][1] += 1000000.0; - pq[0][2] += 1000000.0; - pq[1][0] += 1000000.0; - pq[1][1] += 1000000.0; - pq[1][2] += 1000000.0; + tanhy2 = TMath::TanH(yq[0]); + tanhy2 *= tanhy2; + pq[0][2] = TMath::Sqrt((ptq[0]*ptq[0]+qm*qm)*tanhy2/(1-tanhy2)); + pq[0][2] = TMath::Sign((Double_t)pq[0][2],yq[0]); + tanhy2 = TMath::TanH(yq[1]); + tanhy2 *= tanhy2; + pq[1][2] = TMath::Sqrt((ptq[1]*ptq[1]+qm*qm)*tanhy2/(1-tanhy2)); + pq[1][2] = TMath::Sign((Double_t)pq[1][2],yq[1]); // Here we assume that |phi_H1 - phi_H2| = |phi_Q1 - phi_Q2| = dphi // which is a good approximation for heavy flavors in Pythia @@ -478,13 +470,11 @@ void AliGenCorrHF::Generate() PushTrack(0, -1, iquark[ihad], pq[ihad], origin0, polar, 0, kPPrimary, nt, wgtp); KeepTrack(nt); ntq[ihad] = nt; - //printf("PushTrack: Q \t%5d trackit %1d part %8d name %10s \t from %3d \n",nt,0,iquark[ihad],pDataBase->GetParticle(iquark[ihad])->GetName(),-1); // hadron PushTrack(0, ntq[ihad], iPart, p, origin0, polar, 0, kPDecay, nt, wgtp); pParent[0] = nt; KeepTrack(nt); fNprimaries++; - //printf("PushTrack: P \t%5d trackit %1d part %8d name %10s \t from %3d \n",nt,0,iPart,pDataBase->GetParticle(iPart)->GetName(),ntq[ihad]); // // Decay Products @@ -511,7 +501,6 @@ void AliGenCorrHF::Generate() PushTrack(fTrackIt*trackIt[i], iparent, kf, pc, och, polar, 0, kPDecay, nt, wgtch); - //printf("PushTrack: DD \t%5d trackit %1d part %8d name %10s \t from %3d \n",nt,fTrackIt*trackIt[i],kf,pDataBase->GetParticle(kf)->GetName(),iparent); pParent[i] = nt; KeepTrack(nt); fNprimaries++; @@ -538,7 +527,7 @@ void AliGenCorrHF::Generate() SetHighWaterMark(nt); - AliGenEventHeader* header = new AliGenEventHeader("PARAM"); + AliGenEventHeader* header = new AliGenEventHeader("CorrHF"); header->SetPrimaryVertex(fVertex); header->SetNProduced(fNprimaries); AddHeader(header); @@ -603,9 +592,9 @@ Int_t AliGenCorrHF::IpBeauty(TRandom* ran) Double_t AliGenCorrHF::ComputeIntegral(TFile* fG) // needed by GetQuarkPair { // Read QQbar kinematical 5D grid's cell occupancy weights - Int_t* cell = new Int_t[6]; // cell[6]={wght,iy1,iy2,ipt1,ipt2,idph} + Int_t cell[6]; // cell[6]={wght,iy1,iy2,ipt1,ipt2,idph} TTree* tG = (TTree*) fG->Get("tGqq"); - tG->GetBranch("cell")->SetAddress(cell); + tG->GetBranch("cell")->SetAddress(&cell); Int_t nbins = tG->GetEntries(); // delete previously computed integral (if any) @@ -632,9 +621,9 @@ void AliGenCorrHF::GetQuarkPair(TFile* fG, Double_t* fInt, Double_t &y1, Double_ // modification of ROOT's TH3::GetRandom3 for 5D { // Read QQbar kinematical 5D grid's cell coordinates - Int_t* cell = new Int_t[6]; // cell[6]={wght,iy1,iy2,ipt1,ipt2,idph} + Int_t cell[6]; // cell[6]={wght,iy1,iy2,ipt1,ipt2,idph} TTree* tG = (TTree*) fG->Get("tGqq"); - tG->GetBranch("cell")->SetAddress(cell); + tG->GetBranch("cell")->SetAddress(&cell); Int_t nbins = tG->GetEntries(); Double_t rand[6]; gRandom->RndmArray(6,rand);