| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // $Id: G4FTFParticipants.cc,v 1.15 2009/10/25 10:50:54 vuzhinsk Exp $
|
|---|
| 28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $
|
|---|
| 29 | //
|
|---|
| 30 | // ------------------------------------------------------------
|
|---|
| 31 | // GEANT 4 class implementation file
|
|---|
| 32 | //
|
|---|
| 33 | // ---------------- G4FTFParticipants----------------
|
|---|
| 34 | // by Gunter Folger, June 1998.
|
|---|
| 35 | // class finding colliding particles in FTFPartonStringModel
|
|---|
| 36 | // Changed in a part by V. Uzhinsky in oder to put in correcpondence
|
|---|
| 37 | // with original FRITIOF mode. November - December 2006.
|
|---|
| 38 | // ------------------------------------------------------------
|
|---|
| 39 |
|
|---|
| 40 | #include "G4FTFParameters.hh" // Uzhi 29.03.08
|
|---|
| 41 | #include "G4FTFParticipants.hh"
|
|---|
| 42 | #include "G4DiffractiveSplitableHadron.hh"
|
|---|
| 43 | #include "G4VSplitableHadron.hh"
|
|---|
| 44 | #include "Randomize.hh"
|
|---|
| 45 | #include <utility> // Uzhi 29.03.08
|
|---|
| 46 |
|
|---|
| 47 | // Class G4FTFParticipants
|
|---|
| 48 |
|
|---|
| 49 | G4FTFParticipants::G4FTFParticipants()
|
|---|
| 50 | {
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | G4FTFParticipants::G4FTFParticipants(const G4FTFParticipants &): G4VParticipants()
|
|---|
| 54 | {
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 | G4FTFParticipants::~G4FTFParticipants()
|
|---|
| 59 | {
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | //const G4FTFParticipants & G4FTFParticipants::operator=(const G4FTFParticipants &right)
|
|---|
| 64 | //{}
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | //int G4FTFParticipants::operator==(const G4FTFParticipants &right) const
|
|---|
| 68 | //{}
|
|---|
| 69 |
|
|---|
| 70 | //int G4FTFParticipants::operator!=(const G4FTFParticipants &right) const
|
|---|
| 71 | //{}
|
|---|
| 72 |
|
|---|
| 73 | void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary,
|
|---|
| 74 | G4FTFParameters *theParameters) // Uzhi 29.03.08
|
|---|
| 75 | {
|
|---|
| 76 |
|
|---|
| 77 | StartLoop(); // reset Loop over Interactions
|
|---|
| 78 |
|
|---|
| 79 | for(unsigned int i=0; i<theInteractions.size(); i++) delete theInteractions[i];
|
|---|
| 80 | theInteractions.clear();
|
|---|
| 81 |
|
|---|
| 82 | G4double deltaxy=2 * fermi; // Extra nuclear radius
|
|---|
| 83 |
|
|---|
| 84 | G4VSplitableHadron * primarySplitable=new G4DiffractiveSplitableHadron(thePrimary);
|
|---|
| 85 |
|
|---|
| 86 | G4double xyradius;
|
|---|
| 87 | xyradius =theNucleus->GetOuterRadius() + deltaxy; // Impact parameter sampling
|
|---|
| 88 | // radius
|
|---|
| 89 | // G4bool nucleusNeedsShift = true; // Uzhi 20 July 2009
|
|---|
| 90 |
|
|---|
| 91 | while ( theInteractions.size() == 0 )
|
|---|
| 92 | {
|
|---|
| 93 | std::pair<G4double, G4double> theImpactParameter;
|
|---|
| 94 | theImpactParameter = theNucleus->ChooseImpactXandY(xyradius);
|
|---|
| 95 | G4double impactX = theImpactParameter.first;
|
|---|
| 96 | G4double impactY = theImpactParameter.second;
|
|---|
| 97 |
|
|---|
| 98 | G4ThreeVector thePosition(impactX, impactY, -DBL_MAX); //Uzhi 24 July 09
|
|---|
| 99 | primarySplitable->SetPosition(thePosition); //Uzhi 24 July 09
|
|---|
| 100 |
|
|---|
| 101 | theNucleus->StartLoop();
|
|---|
| 102 | G4Nucleon * nucleon;
|
|---|
| 103 | //G4int InterNumber=0; // Uzhi
|
|---|
| 104 | G4int NucleonNumber(0); // Uzhi
|
|---|
| 105 | //while ( (nucleon=theNucleus->GetNextNucleon())&& (InterNumber < 1) ) // Uzhi
|
|---|
| 106 | while ( (nucleon=theNucleus->GetNextNucleon()) ) // Uzhi
|
|---|
| 107 | {
|
|---|
| 108 | //G4cout<<"Nucl# "<<NucleonNumber<<G4endl; // Vova
|
|---|
| 109 | G4double impact2= sqr(impactX - nucleon->GetPosition().x()) +
|
|---|
| 110 | sqr(impactY - nucleon->GetPosition().y());
|
|---|
| 111 |
|
|---|
| 112 | // if ( theParameters->GetInelasticProbability(impact2/fermi/fermi) // Uzhi 29.03.08
|
|---|
| 113 | if ( theParameters->GetProbabilityOfInteraction(impact2/fermi/fermi) // Uzhi 29.03.08
|
|---|
| 114 | > G4UniformRand() )
|
|---|
| 115 | {
|
|---|
| 116 | //InterNumber++;
|
|---|
| 117 | /* // Uzhi 20 July 2009
|
|---|
| 118 | if ( nucleusNeedsShift )
|
|---|
| 119 | { // on the first hit, shift nucleus
|
|---|
| 120 | nucleusNeedsShift = false;
|
|---|
| 121 | theNucleus->DoTranslation(G4ThreeVector(-1*impactX,-1*impactY,0.));
|
|---|
| 122 | impactX=0;
|
|---|
| 123 | impactY=0;
|
|---|
| 124 | }
|
|---|
| 125 | */ // Uzhi 20 July 2009
|
|---|
| 126 | //G4cout<<" Interact"<<G4endl;
|
|---|
| 127 | primarySplitable->SetStatus(1); // It takes part in the interaction
|
|---|
| 128 |
|
|---|
| 129 | G4VSplitableHadron * targetSplitable=0;
|
|---|
| 130 | if ( ! nucleon->AreYouHit() )
|
|---|
| 131 | {
|
|---|
| 132 | //G4cout<<"Part "<<nucleon->Get4Momentum()<<G4endl;
|
|---|
| 133 | targetSplitable= new G4DiffractiveSplitableHadron(*nucleon);
|
|---|
| 134 | nucleon->Hit(targetSplitable);
|
|---|
| 135 | nucleon->SetBindingEnergy(3.*nucleon->GetBindingEnergy()); // Uzhi 5.10.09
|
|---|
| 136 | targetSplitable->SetStatus(1); // It takes part in the interaction
|
|---|
| 137 | }
|
|---|
| 138 | G4InteractionContent * aInteraction =
|
|---|
| 139 | new G4InteractionContent(primarySplitable);
|
|---|
| 140 | aInteraction->SetTarget(targetSplitable);
|
|---|
| 141 | aInteraction->SetTargetNucleon(nucleon); // Uzhi 16.07.09
|
|---|
| 142 | theInteractions.push_back(aInteraction);
|
|---|
| 143 | }
|
|---|
| 144 | NucleonNumber++; // Uzhi
|
|---|
| 145 | }
|
|---|
| 146 | // // Uzhi
|
|---|
| 147 | // G4cout << "Number of Hit nucleons " << theInteractions.size()<<G4endl; // entries()
|
|---|
| 148 | // << "\t" << impactX/fermi << "\t"<<impactY/fermi
|
|---|
| 149 | // << "\t" << std::sqrt(sqr(impactX)+sqr(impactY))/fermi <<G4endl;
|
|---|
| 150 | // // Uzhi
|
|---|
| 151 | }
|
|---|
| 152 |
|
|---|
| 153 | }
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 | // Implementation (private) methods
|
|---|