// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // #include "G4ios.hh" //**************************************************************************************************************** template G4QGSModel::G4QGSModel() { G4VPartonStringModel::SetThisPointer(this); } template G4QGSModel::G4QGSModel(const G4QGSModel &right) { G4VPartonStringModel::SetThisPointer(this); } template G4QGSModel::~G4QGSModel() { } template void G4QGSModel::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile) { // clean-up and consistency with design, HPW Feb 1999 theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt()); theCurrentVelocity.setX(0); theCurrentVelocity.setY(0); // HPW Feb 1999 // this is an approximation, neglecting the motion of nucleons in the nucleus & p,n mass differences. @@@ // G4double vz_old = aProjectile.Get4Momentum().pz()/ // (aProjectile.Get4Momentum().e() + G4Proton::Proton()->GetPDGMass()); G4double nCons = 1; if(std::abs(aProjectile.GetDefinition()->GetBaryonNumber()) !=0) { nCons = std::abs(aProjectile.GetDefinition()->GetBaryonNumber()); } G4double pz_per_projectile = aProjectile.Get4Momentum().pz()/nCons; // G4double e_per_projectile = aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect(); // e_per_projectile /=nCons*nCons; // e_per_projectile += G4Proton::Proton()->GetPDGMass()*G4Proton::Proton()->GetPDGMass(); G4double e_per_projectile = aProjectile.Get4Momentum()*aProjectile.Get4Momentum(); e_per_projectile += aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect(); e_per_projectile /=nCons*nCons; e_per_projectile = std::sqrt(e_per_projectile); e_per_projectile += G4Proton::Proton()->GetPDGMass(); G4double vz = pz_per_projectile/e_per_projectile; //--DEBUG-- G4cout << "IncomingMomentum - vz "<DoLorentzBoost(theCurrentVelocity); } template G4ExcitedStringVector * G4QGSModel::GetStrings() { // clean-up and consistancy with design, HPW Feb 1999 // also fixing a memory leak, removing unnecessary caching, and // streamlining of logic G4PartonPair* aPair; G4ExcitedStringVector* theStrings = new G4ExcitedStringVector; G4ExcitedString * aString; while( (aPair = theParticipants.GetNextPartonPair()) ) { if (aPair->GetCollisionType() == G4PartonPair::DIFFRACTIVE) { aString = theDiffractiveStringBuilder.BuildString(aPair); // G4cout << "diffractive "<Get4Momentum()<Get4Momentum()<Boost(theCurrentVelocity); theStrings->push_back(aString); delete aPair; } //--DEBUG-- G4cout << G4endl; // for(G4int i=0; isize(); i++) // { // G4cout << "String = "<operator[](i)->Get4Momentum()< G4V3DNucleus* G4QGSModel::GetWoundedNucleus() const { return theParticipants.GetWoundedNucleus(); } //*********************************************************************************************************************