]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenCorrHF.cxx
AliDecayers will return particles coordinates,time in cm,sec. Generators
[u/mrichter/AliRoot.git] / EVGEN / AliGenCorrHF.cxx
index 49e48eb50e0ec6e5945d23677791168d0e3549ac..51b56cdf21d473212f653a08c77d99dc8d766213 100644 (file)
@@ -38,6 +38,7 @@
 // Quarks, hadrons and decay particles are loaded in the stack outside the loop
 // of HF-hadrons, when the cuts on their children are satisfied (L. Manceau)
 // Oct 11: added Pb-Pb at 2.76 TeV (S. Grigoryan)
+// June 12: added p-Pb & Pb-p at 5 TeV (S. Grigoryan)
 // 
 //-------------------------------------------------------------------------
 // How it works (for the given flavor and p-p energy):
@@ -172,6 +173,8 @@ AliGenCorrHF::AliGenCorrHF(Int_t npart, Int_t idquark, Int_t energy):
           fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/BeautyPbPb276PythiaMNR.root";
       else if (fEnergy == 4)
           fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/BeautyPbPb394PythiaMNR.root";
+      else if (fEnergy == 5 || fEnergy == -5)
+          fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/BeautyPPb5PythiaMNR.root";
       else if (fEnergy == 9 || fEnergy == -9)
           fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/BeautyPPb88PythiaMNR.root";
       else fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/BeautyPbPb394PythiaMNR.root";
@@ -188,6 +191,8 @@ AliGenCorrHF::AliGenCorrHF(Int_t npart, Int_t idquark, Int_t energy):
            fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/CharmPbPb276PythiaMNR.root";
       else if (fEnergy == 4)
            fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/CharmPbPb394PythiaMNR.root";
+      else if (fEnergy == 5 || fEnergy == -5)
+           fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/CharmPPb5PythiaMNR.root";
       else if (fEnergy == 9 || fEnergy == -9)
            fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/CharmPPb88PythiaMNR.root";
       else fFileName = "$ALICE_ROOT/EVGEN/dataCorrHF/CharmPbPb394PythiaMNR.root";
@@ -319,13 +324,17 @@ void AliGenCorrHF::Generate()
   TDatabasePDG *pDataBase = TDatabasePDG::Instance();
 
   // Calculating vertex position per event
-  for (i=0;i<2;i++){
-    for (j=0;j<3;j++) origin0[i][j]=fOrigin[j];
-    if (fVertexSmear==kPerEvent) {
-      Vertex();
+  if (fVertexSmear==kPerEvent) {
+    Vertex();
+    for (i=0;i<2;i++){
       for (j=0;j<3;j++) origin0[i][j]=fVertex[j];
     }
   }
+  else {
+    for (i=0;i<2;i++){
+      for (j=0;j<3;j++) origin0[i][j]=fOrigin[j];
+    }
+  }
   
   ipa  = 0;
   ipa1 = 0;
@@ -340,7 +349,8 @@ void AliGenCorrHF::Generate()
     
     GetHadronPair(fFile, fQuark, yq[0], yq[1], ptq[0], ptq[1], ihadron[0], ihadron[1], plh[0], plh[1], pth[0], pth[1]);
     
-    if (fEnergy == 9 || fEnergy == -9) {      // boost particles from c.m.s. to ALICE lab frame
+    // Boost particles from c.m.s. to ALICE lab frame for p-Pb & Pb-p collisions
+    if (fEnergy == 5 || fEnergy == -5 || fEnergy == 9 || fEnergy == -9) {
       Double_t dyBoost = 0.47;
       Double_t beta  = TMath::TanH(dyBoost);
       Double_t gamma = 1./TMath::Sqrt((1.-beta)*(1.+beta));
@@ -349,7 +359,7 @@ void AliGenCorrHF::Generate()
       yq[1] += dyBoost;
       plh[0] = gb * TMath::Sqrt(plh[0]*plh[0] + pth[0]*pth[0]) + gamma * plh[0];
       plh[1] = gb * TMath::Sqrt(plh[1]*plh[1] + pth[1]*pth[1]) + gamma * plh[1];
-      if (fEnergy == 9) {
+      if (fEnergy == 5 || fEnergy == 9) {
        yq[0] *= -1;
        yq[1] *= -1;
        plh[0] *= -1;
@@ -800,10 +810,10 @@ void AliGenCorrHF::LoadTracks(Int_t iquark, Float_t *pq,
        TParticle* iparticle = (TParticle *) particles->At(i);
        Int_t kf  = iparticle->GetPdgCode();
        Int_t jpa = iparticle->GetFirstMother()-1;
-
-       och[0] = origin0[0]+iparticle->Vx()/10;
-       och[1] = origin0[1]+iparticle->Vy()/10;
-       och[2] = origin0[2]+iparticle->Vz()/10;
+       // RS: note, the conversion mm->cm is done now in the decayer. The time is ignored here!
+       och[0] = origin0[0]+iparticle->Vx();
+       och[1] = origin0[1]+iparticle->Vy();
+       och[2] = origin0[2]+iparticle->Vz();
        pc[0]  = iparticle->Px();
        pc[1]  = iparticle->Py();
        pc[2]  = iparticle->Pz();