Changeset 1347 for trunk/source/processes/hadronic/models/binary_cascade
- Timestamp:
- Dec 22, 2010, 3:52:27 PM (14 years ago)
- Location:
- trunk/source/processes/hadronic/models/binary_cascade
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/binary_cascade/History
r1340 r1347 13 13 * Please list in reverse chronological order (last date on top) 14 14 --------------------------------------------------------------- 15 16 11 Nov 2010, G.Folger had-binary-V09-03-05 17 - fix compilation errors and warnings in G4BinaryCascade. 18 19 10 Nov 2010, G.Folger had-binary-V09-03-04 20 - *** lower CaptureThreshold in G4GeneratorPrecompoundInterface.cc 21 from 80 to 10 MeV. 22 - G4BinaryCascade: disable G4Exception in StepParticlesOut() introduced in 23 previous tag. Need to investigate why this happens first. 24 25 3 Nov 2010, G.Folger had-binary-V09-03-03 26 - Fix coverity warnings 27 - in Propagate(), mem leak for products 28 - in StepParticlesOut, check return code of GetSphereInter.... 29 - Scatter1H1(0 always check secs 15 30 16 31 8 Sep 2010, G.Folger had-binary-V09-03-02 … … 51 66 1. Shift of particle's formation times that the min. time=0. 52 67 53 2. Including of captured particles (Due to absend of the options there 54 were 55 a large energy-non-conservation). 68 2. Including of captured particles (Due to absence of the options there 69 were a large energy-non-conservation). 56 70 57 71 3. GetExcitationEnergy() - correction for the case when all nucleons are -
trunk/source/processes/hadronic/models/binary_cascade/include/G4BinaryCascade.hh
r1228 r1347 85 85 G4int GetTotalCharge(std::vector<G4KineticTrack *> & aV) 86 86 { 87 G4cout<<"GetTotalCharge(std::vector<G4KineticTrack *> & aV)"<<G4endl; // Uzhi88 87 G4int result = 0; 89 88 std::vector<G4KineticTrack *>::iterator i; … … 91 90 { 92 91 result += G4lrint((*i)->GetDefinition()->GetPDGCharge()); 93 G4cout<<(*i)->GetDefinition()->GetParticleName()<<" "<<(*i)->GetDefinition()->GetPDGCharge()<<G4endl; // Uzhi 92 } 93 return result; 94 } 95 G4int GetTotalBaryonCharge(std::vector<G4KineticTrack *> & aV) 96 { 97 G4int result = 0; 98 std::vector<G4KineticTrack *>::iterator i; 99 for(i = aV.begin(); i != aV.end(); ++i) 100 { 101 if ( (*i)->GetDefinition()->GetBaryonNumber() != 0 ){ 102 result += G4lrint((*i)->GetDefinition()->GetPDGCharge()); 103 } 94 104 } 95 105 return result; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryCascade.cc
r1340 r1347 152 152 { 153 153 static G4int eventcounter=0; 154 155 // if ( eventcounter == 0 ) { 156 // SetEpReportLevel(3); // report non conservation with model etc. 157 // G4double relativeLevel = 1*perCent; 158 // G4double absoluteLevel = 2*MeV; 159 // SetEnergyMomentumCheckLevels(relativeLevel,absoluteLevel); 160 // } 161 154 162 //if(eventcounter == 100*(eventcounter/100) ) 155 163 eventcounter++; … … 278 286 G4cout << "G4BinaryCascade Propagate starting -------------------------------------------------------" <<G4endl; 279 287 #endif 288 289 // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply.... 290 if(nucleus->GetMassNumber() == 1) // 1H1 is special case 291 { 292 #ifdef debug_BIC_Propagate 293 G4cout << " special case 1H1.... " << G4endl; 294 #endif 295 return Propagate1H1(secondaries,nucleus); 296 } 297 280 298 G4ReactionProductVector * products = new G4ReactionProductVector; 281 299 the3DNucleus = nucleus; … … 289 307 ClearAndDestroy(&theFinalState); 290 308 std::vector<G4KineticTrack *>::iterator iter; 291 292 // *GF* FIXME ? in propagate mode this test is wrong! Could be in Apply....293 if(nucleus->GetMassNumber() == 1) // 1H1 is special case294 {295 #ifdef debug_BIC_Propagate296 G4cout << " special case 1H1.... " << G4endl;297 #endif298 return Propagate1H1(secondaries,nucleus);299 }300 309 301 310 BuildTargetList(); … … 1068 1077 PrintKTVector(&target_collection,std::string("... targets")); 1069 1078 //*GF* throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCasacde::ApplyCollision()"); 1070 #e lse1079 #endif 1071 1080 return false; 1072 #endif1073 1081 } 1074 1082 … … 1117 1125 G4KineticTrackVector * products=0; 1118 1126 products = collision->GetFinalState(); 1127 1128 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1; 1119 1129 1120 1130 #ifdef debug_BIC_ApplyCollision … … 1139 1149 PrintKTVector(&collision->GetTargetCollection(),std::string(" Target particles")); 1140 1150 } 1141 #endif1142 G4bool lateParticleCollision= (!haveTarget) && products && products->size() == 1;1143 1151 // if ( lateParticleCollision ) G4cout << " Added late particle--------------------------"<<G4endl; 1144 1152 // if ( lateParticleCollision && products ) PrintKTVector(products, " reaction products"); 1153 #endif 1145 1154 //**************************************** 1146 1155 … … 1561 1570 { 1562 1571 nsec++; 1563 G4double tStep(0), tdummy(0); 1564 ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep); 1572 G4double tStep(0), tdummy(0); 1573 G4bool intersect = 1574 ((G4RKPropagation*)thePropagator)->GetSphereIntersectionTimes(kt,tdummy,tStep); 1565 1575 #ifdef debug_BIC_StepParticlesOut 1566 1576 G4cout << " minTimeStep, tStep Particle " <<minTimeStep << " " <<tStep 1567 1577 << " " <<kt->GetDefinition()->GetParticleName() 1568 1578 << " 4mom " << kt->GetTrackingMomentum()<<G4endl; 1569 #endif 1570 if(tStep<minTimeStep && tStep> 0 ) 1579 if ( ! intersect ); 1580 { 1581 PrintKTVector(&theSecondaryList, std::string(" state ERROR.....")); 1582 throw G4HadronicException(__FILE__, __LINE__, "G4BinaryCascade::StepParticlesOut() particle not in nucleus"); 1583 } 1584 #endif 1585 if(intersect && tStep<minTimeStep && tStep> 0 ) 1571 1586 { 1572 1587 minTimeStep = tStep; … … 2462 2477 } 2463 2478 size_t current(0); 2464 for(current=0; current<secs->size(); current++)2479 for(current=0; secs && current<secs->size(); current++) 2465 2480 { 2466 2481 if((*secs)[current]->GetDefinition()->IsShortLived()) … … 2708 2723 G4KineticTrackVector * products) 2709 2724 { 2710 G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;2711 2725 2712 2726 G4KineticTrackVector debug1; … … 2716 2730 PrintKTVector(products,std::string(" Scatterer products")); 2717 2731 2732 #ifdef dontUse 2718 2733 G4double thisExcitation(0); 2719 2734 // excitation energy from this collision … … 2722 2737 G4KineticTrack * kt=collision->GetPrimary(); 2723 2738 initial += kt->Get4Momentum().e(); 2739 2740 G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator; 2724 2741 2725 2742 initial += RKprop->GetField(kt->GetDefinition()->GetPDGEncoding(),kt->GetPosition()); … … 2789 2806 << G4endl; 2790 2807 currentInitialEnergy-=final; 2791 2808 #endif 2792 2809 } 2793 2810
Note: See TracChangeset
for help on using the changeset viewer.