-void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t qTransport, Float_t maxLength, Int_t iECMethod)
+void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMethod)
{
// Initializes
// (1) The quenching model using quenching weights according to C. Salgado and U. Wiedemann
fQuenchingWeights = new AliQuenchingWeights();
fQuenchingWeights->InitMult();
- fQuenchingWeights->SetQTransport(qTransport);
+ fQuenchingWeights->SetK(k);
fQuenchingWeights->SetECMethod(AliQuenchingWeights::kECMethod(iECMethod));
- fQuenchingWeights->SetLengthMax(Int_t(maxLength));
- fQuenchingWeights->SampleEnergyLoss();
-
}
Int_t klast[4] = {-1, -1, -1, -1};
Int_t numpart = fPyjets->N;
- Double_t px = 0., py = 0., pz = 0., e = 0., m = 0., p = 0., pt = 0., theta = 0.;
+ Double_t px = 0., py = 0., pz = 0., e = 0., m = 0., p = 0., pt = 0., theta = 0., phi = 0.;
Double_t pxq[4], pyq[4], pzq[4], eq[4], yq[4], mq[4], pq[4], phiq[4], thetaq[4], ptq[4];
Bool_t quenched[4];
- Double_t phi;
Double_t zInitial[4], wjtKick[4];
Int_t nGluon[4];
-
+ Int_t qPdg[4];
Int_t imo, kst, pdg;
//
// Sore information about Primary partons
phiq[j] = TMath::Pi()+TMath::ATan2(-pyq[j], -pxq[j]);
ptq[j] = TMath::Sqrt(pxq[j] * pxq[j] + pyq[j] * pyq[j]);
thetaq[j] = TMath::ATan2(ptq[j], pzq[j]);
- phi = phiq[j];
+ qPdg[j] = fPyjets->K[1][i];
+ }
+
+ Double_t int0[4];
+ Double_t int1[4];
+
+ fGlauber->GetI0I1ForPythia(4, phiq, int0, int1, 15.);
+
+ for (Int_t j = 0; j < 4; j++) {
//
// Quench only central jets and with E > 10.
//
+
+
+ Int_t itype = (qPdg[j] == 21) ? 2 : 1;
+ Double_t eloss = fQuenchingWeights->GetELossRandomKFast(itype, int0[j], int1[j], eq[j]);
+
if (TMath::Abs(yq[j]) > 2.5 || eq[j] < 10.) {
zInitial[j] = 0.;
} else {
- pdg = fPyjets->K[1][i];
- // Get length in nucleus
- Double_t l;
- fGlauber->GetLengthsForPythia(1, &phi, &l, -1.);
- //
- // Energy loss for given length and parton type
- Int_t itype = (pdg == 21) ? 2 : 1;
-
- Double_t eloss = fQuenchingWeights->GetELossRandom(itype, l, eq[j]);
if (eq[j] > 40. && TMath::Abs(yq[j]) < 0.5) {
icall ++;
eMean += eloss;
}
-
//
// Extra pt
-
- wjtKick[j] = TMath::Sqrt(l * fQuenchingWeights->GetQTransport());
+ Double_t l = fQuenchingWeights->CalcLk(int0[j], int1[j]);
+ wjtKick[j] = TMath::Sqrt(l * fQuenchingWeights->CalcQk(int0[j], int1[j]));
//
// Fractional energy loss
zInitial[j] = eloss / eq[j];
if (zInitial[j] == 1.) zInitial[j] = 0.95;
//
// Some debug printing
+
+
printf("Initial parton # %3d, Type %3d Energy %10.3f Phi %10.3f Length %10.3f Loss %10.3f Kick %10.3f Mean: %10.3f %10.3f\n",
- j, itype, eq[j], phi, l, eloss, wjtKick[j], eMean / Float_t(icall+1), yq[j]);
+ j, itype, eq[j], phiq[j], l, eloss, wjtKick[j], eMean / Float_t(icall+1), yq[j]);
// zInitial[j] = 0.8;
// while (zInitial[j] >= 0.95) zInitial[j] = gRandom->Exp(0.2);