Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

Location:
trunk/source/processes/hadronic/models/parton_string/hadronization/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4ExcitedStringDecay.cc

    r819 r1055  
    134134      }
    135135    }
    136    
     136#ifdef debug_G4ExcitedStringDecay    
    137137    if(!success)
    138138    {
     
    144144//       throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay failed to correct...");
    145145    }
    146 
     146#endif     
    147147    // Compute c.m.s. interaction velocity and KTV back boost   
    148148    Beta = TotalCollisionMom.boostVector();
  • trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4HadronBuilder.cc,v 1.7 2008/04/25 14:20:14 vuzhinsk Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4HadronBuilder.cc,v 1.10 2009/05/22 16:34:31 gunter Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030// -----------------------------------------------------------------------------
     
    147147           if( (IsUp && IsAnti ) || (!IsUp && !IsAnti ) )
    148148              PDGEncoding = - PDGEncoding;
    149         }
     149        }
    150150           
    151151           
  • trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4LundStringFragmentation.cc,v 1.13 2008/06/23 09:17:10 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $ 1.8
     27// $Id: G4LundStringFragmentation.cc,v 1.14 2009/05/22 16:36:46 gunter Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 1.8
    2929//
    3030// -----------------------------------------------------------------------------
     
    508508   {
    509509      do                                                                     
    510       {                                                                     
    511          Pt=SampleQuarkPt(); Pt.setZ(0); G4double Pt2=Pt.mag2();             
     510      { 
     511         // GF 22-May-09, limit sampled pt to allowed range
     512         
     513         G4double termD = InitialMass*InitialMass -Mass*Mass - AntiMass*AntiMass;
     514         G4double termab = 4*sqr(Mass*AntiMass);
     515         G4double termN = 2*termD + 4*Mass*Mass + 4*AntiMass*AntiMass;
     516         G4double pt2max=(termD*termD - termab )/ termN ;
     517         
     518//       G4cout << " termD, ab, N " << termD << "  " << termab << "  " << termN
     519//              <<  "   pt2max= " << pt2max ;
     520                                                                                         
     521         Pt=SampleQuarkPt(sqrt(pt2max)); Pt.setZ(0); G4double Pt2=Pt.mag2();
     522
     523         
     524//       G4cout << " sampled Pt2 = " << Pt2 << "  " << pt2max-Pt2 << G4endl;             
     525         // end.. GF
    512526
    513527//G4cout<<"Sample4Momentum Pt x y "<<Pt.getX()<<" "<<Pt.getY()<<G4endl;
     
    521535                         4.*MassMt2*AntiMassMt2;                               
    522536      }                                                                     
    523       while(AvailablePz2 < 0.);                                              
     537      while(AvailablePz2 < 0.);     // GF will occur only for numerical precision problem with limit in sampled pt                                              
    524538                                                                           
    525539      AvailablePz2 /=(4.*InitialMass*InitialMass);                           
  • trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc

    r1007 r1055  
    2525//
    2626//
    27 // $Id: G4VLongitudinalStringDecay.cc,v 1.13 2008/06/23 08:35:55 vuzhinsk Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4VLongitudinalStringDecay.cc,v 1.14 2009/05/22 16:35:47 gunter Exp $
     28// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2929//
    3030// -----------------------------------------------------------------------------
     
    485485//    }
    486486
    487 G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt()
     487G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt(G4double ptMax)
    488488   {
    489    G4double Pt = -std::log(G4UniformRand());
     489   G4double Pt;
     490   if ( ptMax < 0 ) {
     491      // sample full gaussian
     492      Pt = -std::log(G4UniformRand());
     493   } else {
     494      // sample in limited range
     495      Pt = -std::log(CLHEP::RandFlat::shoot(exp(-sqr(ptMax)/sqr(SigmaQT)), 1.));
     496   }
    490497   Pt = SigmaQT * std::sqrt(Pt);
    491498   G4double phi = 2.*pi*G4UniformRand();
Note: See TracChangeset for help on using the changeset viewer.