| 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.7 2007/04/24 10:33:00 gunter Exp $
|
|---|
| 28 | // GEANT4 tag $Name: geant4-09-01-patch-02 $
|
|---|
| 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 "G4FTFParticipants.hh"
|
|---|
| 41 | #include "G4DiffractiveSplitableHadron.hh"
|
|---|
| 42 | #include "G4VSplitableHadron.hh"
|
|---|
| 43 | //#include "G4PomeronCrossSection.hh" // Uzhi
|
|---|
| 44 | #include "G4FTFCrossSection.hh" // Uzhi
|
|---|
| 45 | #include "Randomize.hh"
|
|---|
| 46 | #include <utility>
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | // Class G4FTFParticipants
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 | G4FTFParticipants::G4FTFParticipants()
|
|---|
| 54 | {
|
|---|
| 55 | }
|
|---|
| 56 |
|
|---|
| 57 | G4FTFParticipants::G4FTFParticipants(const G4FTFParticipants &): G4VParticipants()
|
|---|
| 58 | {
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | G4FTFParticipants::~G4FTFParticipants()
|
|---|
| 63 | {
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | //const G4FTFParticipants & G4FTFParticipants::operator=(const G4FTFParticipants &right)
|
|---|
| 68 | //{}
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | //int G4FTFParticipants::operator==(const G4FTFParticipants &right) const
|
|---|
| 72 | //{}
|
|---|
| 73 |
|
|---|
| 74 | //int G4FTFParticipants::operator!=(const G4FTFParticipants &right) const
|
|---|
| 75 | //{}
|
|---|
| 76 |
|
|---|
| 77 | void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
|---|
| 78 | {
|
|---|
| 79 |
|
|---|
| 80 | StartLoop(); // reset Loop over Interactions
|
|---|
| 81 |
|
|---|
| 82 | for(unsigned int i=0; i<theInteractions.size(); i++) delete theInteractions[i];
|
|---|
| 83 | theInteractions.clear();
|
|---|
| 84 |
|
|---|
| 85 | // --- cms energy
|
|---|
| 86 |
|
|---|
| 87 | G4double s = sqr( thePrimary.GetMass() ) +
|
|---|
| 88 | sqr( G4Proton::Proton()->GetPDGMass() ) +
|
|---|
| 89 | 2*thePrimary.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass();
|
|---|
| 90 |
|
|---|
| 91 | // G4cout << " primary Total E (GeV): " << thePrimary.GetTotalEnergy()/GeV << G4endl;
|
|---|
| 92 | // G4cout << " primary Mass (GeV): " << thePrimary.GetMass() /GeV << G4endl;
|
|---|
| 93 | // G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl;
|
|---|
| 94 |
|
|---|
| 95 | // G4PomeronCrossSection theCrossSection(thePrimary.GetDefinition()); // Uzhi
|
|---|
| 96 | G4FTFCrossSection theCrossSection(thePrimary.GetDefinition(),s); // Uzhi
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 | G4double deltaxy=2 * fermi;
|
|---|
| 100 |
|
|---|
| 101 | G4VSplitableHadron * primarySplitable=new G4DiffractiveSplitableHadron(thePrimary);
|
|---|
| 102 |
|
|---|
| 103 | G4double xyradius;
|
|---|
| 104 | xyradius =theNucleus->GetOuterRadius() + deltaxy;
|
|---|
| 105 |
|
|---|
| 106 | G4bool nucleusNeedsShift = true;
|
|---|
| 107 |
|
|---|
| 108 | while ( theInteractions.size() == 0 )
|
|---|
| 109 | {
|
|---|
| 110 | std::pair<G4double, G4double> theImpactParameter;
|
|---|
| 111 | theImpactParameter = theNucleus->ChooseImpactXandY(xyradius);
|
|---|
| 112 | G4double impactX = theImpactParameter.first;
|
|---|
| 113 | G4double impactY = theImpactParameter.second;
|
|---|
| 114 |
|
|---|
| 115 | theNucleus->StartLoop();
|
|---|
| 116 | G4Nucleon * nucleon;
|
|---|
| 117 | while ( (nucleon=theNucleus->GetNextNucleon()) )
|
|---|
| 118 | {
|
|---|
| 119 | G4double impact2= sqr(impactX - nucleon->GetPosition().x()) +
|
|---|
| 120 | sqr(impactY - nucleon->GetPosition().y());
|
|---|
| 121 | // if ( theCrossSection.GetInelasticProbability(s,impact2) // Uzhi
|
|---|
| 122 | if ( theCrossSection.GetInelasticProbability( impact2/fermi/fermi) // Uzhi
|
|---|
| 123 | > G4UniformRand() )
|
|---|
| 124 | {
|
|---|
| 125 | if ( nucleusNeedsShift )
|
|---|
| 126 | { // on the first hit, shift nucleus
|
|---|
| 127 | nucleusNeedsShift = false;
|
|---|
| 128 | theNucleus->DoTranslation(G4ThreeVector(-1*impactX,-1*impactY,0.));
|
|---|
| 129 | impactX=0;
|
|---|
| 130 | impactY=0;
|
|---|
| 131 | }
|
|---|
| 132 | G4VSplitableHadron * targetSplitable;
|
|---|
| 133 | if ( (targetSplitable=nucleon->GetSplitableHadron()) == NULL )
|
|---|
| 134 | {
|
|---|
| 135 | targetSplitable= new G4DiffractiveSplitableHadron(*nucleon);
|
|---|
| 136 | nucleon->Hit(targetSplitable);
|
|---|
| 137 | }
|
|---|
| 138 | G4InteractionContent * aInteraction = new G4InteractionContent(primarySplitable);
|
|---|
| 139 | aInteraction->SetTarget(targetSplitable);
|
|---|
| 140 | theInteractions.push_back(aInteraction);
|
|---|
| 141 | }
|
|---|
| 142 | }
|
|---|
| 143 |
|
|---|
| 144 | // G4cout << "Number of Hit nucleons " << theInteractions.size() // entries()
|
|---|
| 145 | // << "\t" << impactX/fermi << "\t"<<impactY/fermi
|
|---|
| 146 | // << "\t" << std::sqrt(sqr(impactX)+sqr(impactY))/fermi <<G4endl;
|
|---|
| 147 |
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|
| 150 | }
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 | // Implementation (private) methods
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
|
|---|