Changeset 1196 for trunk/source/processes/hadronic/models/management/src
- Timestamp:
- Nov 25, 2009, 5:13:58 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/management/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/management/src/G4HadronicInteraction.cc
r1055 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronicInteraction.cc,v 1. 4 2009/01/24 11:56:27vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $26 // $Id: G4HadronicInteraction.cc,v 1.6 2009/08/30 16:12:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // Hadronic Interaction base class … … 39 39 40 40 G4HadronicInteraction::G4HadronicInteraction(const G4String& modelName) : 41 verboseLevel(0), theMinEnergy(0.0 *GeV), theMaxEnergy(25.0*GeV),42 isBlocked(false), theModelName(modelName)41 verboseLevel(0), theMinEnergy(0.0), theMaxEnergy(25.0*GeV), 42 isBlocked(false), recoilEnergyThreshold(0.0), theModelName(modelName) 43 43 { 44 44 G4HadronicInteractionRegistry::Instance()->RegisterMe(this); … … 48 48 { 49 49 G4HadronicInteractionRegistry::Instance()->RemoveMe(this); 50 } 51 52 G4double 53 G4HadronicInteraction::SampleInvariantT(const G4ParticleDefinition*, 54 G4double, G4int, G4int) 55 { 56 return 0.0; 50 57 } 51 58 … … 75 82 76 83 void G4HadronicInteraction::SetMinEnergy(G4double anEnergy, 77 G4Element *anElement )84 const G4Element *anElement ) 78 85 { 79 86 if( IsBlocked(anElement) ) … … 90 97 } 91 98 } 92 theMinEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));99 theMinEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement)); 93 100 } 94 101 95 102 void G4HadronicInteraction::SetMinEnergy(G4double anEnergy, 96 G4Material *aMaterial )103 const G4Material *aMaterial ) 97 104 { 98 105 if( IsBlocked(aMaterial) ) … … 109 116 } 110 117 } 111 theMinEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));118 theMinEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial)); 112 119 } 113 120 … … 116 123 { 117 124 size_t i; 118 if( IsBlocked(aMaterial) )return 0.0 *GeV;119 if( IsBlocked(anElement) )return 0.0 *GeV;125 if( IsBlocked(aMaterial) )return 0.0; 126 if( IsBlocked(anElement) )return 0.0; 120 127 for( i=0; i<theMaxEnergyListElements.size(); ++i ) 121 128 { … … 123 130 return theMaxEnergyListElements[i].first; 124 131 } 125 132 for( i=0; i<theMaxEnergyList.size(); ++i ) 126 133 { 127 134 if( aMaterial == theMaxEnergyList[i].second ) 128 135 return theMaxEnergyList[i].first; 129 136 } 130 131 if( verboseLevel > 0 )137 if(IsBlocked()) return 0.*GeV; 138 if( verboseLevel > 0 ) { 132 139 G4cout << "*** Warning from HadronicInteraction::GetMaxEnergy" << G4endl 133 140 << " material " << aMaterial->GetName() 134 141 << " not found in min energy List" << G4endl; 135 136 142 } 143 return theMaxEnergy; 137 144 } 138 145 139 146 void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy, 140 G4Element *anElement )141 { 142 if( IsBlocked(anElement) ) 147 const G4Element *anElement ) 148 { 149 if( IsBlocked(anElement) ) { 143 150 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 144 151 << "Warning: The model is not active for the Element " 145 152 << anElement->GetName() << "." << G4endl; 146 153 } 147 154 for( size_t i=0; i<theMaxEnergyListElements.size(); ++i ) 148 155 { … … 153 160 } 154 161 } 155 theMaxEnergyListElements.push_back(std::pair<G4double, G4Element *>(anEnergy, anElement));162 theMaxEnergyListElements.push_back(std::pair<G4double, const G4Element *>(anEnergy, anElement)); 156 163 } 157 164 158 165 void G4HadronicInteraction::SetMaxEnergy(G4double anEnergy, 159 G4Material *aMaterial )160 { 161 if( IsBlocked(aMaterial) ) 166 const G4Material *aMaterial ) 167 { 168 if( IsBlocked(aMaterial) ) { 162 169 G4cout << "*** Warning from HadronicInteraction::SetMaxEnergy" << G4endl 163 170 << "Warning: The model is not active for the Material " 164 171 << aMaterial->GetName() << "." << G4endl; 165 172 } 166 173 for( size_t i=0; i<theMaxEnergyList.size(); ++i ) 167 174 { 168 175 if( aMaterial == theMaxEnergyList[i].second ) 169 176 { 170 171 172 } 173 } 174 theMaxEnergyList.push_back(std::pair<G4double, G4Material *>(anEnergy, aMaterial));175 } 176 177 void G4HadronicInteraction::DeActivateFor( G4Material *aMaterial )177 theMaxEnergyList[i].first = anEnergy; 178 return; 179 } 180 } 181 theMaxEnergyList.push_back(std::pair<G4double, const G4Material *>(anEnergy, aMaterial)); 182 } 183 184 void G4HadronicInteraction::DeActivateFor( const G4Material *aMaterial ) 178 185 { 179 186 theBlockedList.push_back(aMaterial); 180 187 } 181 188 182 void G4HadronicInteraction::DeActivateFor( G4Element *anElement )189 void G4HadronicInteraction::DeActivateFor( const G4Element *anElement ) 183 190 { 184 191 theBlockedListElements.push_back(anElement); -
trunk/source/processes/hadronic/models/management/src/G4HadronicInteractionRegistry.cc
r1055 r1196 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HadronicInteractionRegistry.cc,v 1. 7 2009/02/25 16:30:18vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $26 // $Id: G4HadronicInteractionRegistry.cc,v 1.8 2009/08/30 16:12:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // 23-Jan-2009 V.Ivanchenko make the class to be a singleton … … 44 44 45 45 G4HadronicInteractionRegistry::G4HadronicInteractionRegistry() 46 { 47 nModels = 0; 48 } 46 {} 49 47 50 48 G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry() … … 56 54 { 57 55 //G4cout << "G4HadronicInteractionRegistry::Clean() start " << nModels << G4endl; 56 size_t nModels = allModels.size(); 58 57 if(0 < nModels) { 59 for ( G4int i=0; i<nModels; i++) {58 for (size_t i=0; i<nModels; ++i) { 60 59 if( allModels[i] ) { 61 60 //G4cout << "delete " << i << G4endl; … … 66 65 } 67 66 } 67 allModels.clear(); 68 68 //G4cout << "G4HadronicInteractionRegistry::Clean() is done " << G4endl; 69 nModels = 0;70 69 } 71 70 … … 73 72 RegisterMe(G4HadronicInteraction * aModel) 74 73 { 74 size_t nModels = allModels.size(); 75 75 if(nModels > 0) { 76 for ( G4int i=0; i<nModels; i++) {76 for (size_t i=0; i<nModels; ++i) { 77 77 if( aModel == allModels[i] ) return; 78 78 } 79 79 } 80 80 //G4cout << "Register model <" << aModel->GetModelName() 81 //<< "> " << nModels << G4endl;81 //<< "> " << nModels+1 << G4endl; 82 82 allModels.push_back(aModel); 83 nModels++;84 83 } 85 84 … … 87 86 RemoveMe(G4HadronicInteraction * aModel) 88 87 { 89 if(nModels > 0) { 90 for (G4int i=0; i<nModels; i++) { 91 if( aModel == allModels[i] ) { 92 //G4cout << "DeRegister model <" << aModel->GetModelName() 93 //<< "> " << i << G4endl; 94 allModels[i] = 0; 95 return; 96 } 88 size_t nModels = allModels.size(); 89 if(0 == nModels) return; 90 for (size_t i=0; i<nModels; ++i) { 91 if( aModel == allModels[i] ) { 92 //G4cout << "DeRegister model <" << aModel->GetModelName() 93 //<< "> " << i << G4endl; 94 allModels[i] = 0; 95 if(i == nModels-1) allModels.pop_back(); 96 return; 97 97 } 98 98 } -
trunk/source/processes/hadronic/models/management/src/G4InelasticInteraction.cc
r1055 r1196 25 25 // 26 26 // $Id: G4InelasticInteraction.cc,v 1.12 2009/01/24 11:56:27 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03- beta-cand-01 $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 // Hadronic Process: Inelastic Interaction -
trunk/source/processes/hadronic/models/management/src/G4V3DNucleus.cc
r1007 r1196 26 26 // 27 27 // $Id: G4V3DNucleus.cc,v 1.5 2006/06/29 20:45:59 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 #include "G4V3DNucleus.hh" -
trunk/source/processes/hadronic/models/management/src/G4VHighEnergyGenerator.cc
r1007 r1196 26 26 // 27 27 // $Id: G4VHighEnergyGenerator.cc,v 1.5 2006/06/29 20:46:03 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // G4VHighEnergyGenerator -
trunk/source/processes/hadronic/models/management/src/G4VIntraNuclearTransportModel.cc
r1007 r1196 26 26 // 27 27 // $Id: G4VIntraNuclearTransportModel.cc,v 1.5 2007/01/11 05:28:56 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // $Id: G4VIntraNuclearTransportModel.cc,v 1.0 1998/06/30 -
trunk/source/processes/hadronic/models/management/src/G4VKineticNucleon.cc
r1007 r1196 26 26 // 27 27 // $Id: G4VKineticNucleon.cc,v 1.3 2006/06/29 20:46:07 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 #include "G4VKineticNucleon.hh" -
trunk/source/processes/hadronic/models/management/src/G4VNuclearDensity.cc
r1007 r1196 26 26 // 27 27 // $Id: G4VNuclearDensity.cc,v 1.3 2006/06/29 20:46:09 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/management/src/G4VPreCompoundModel.cc
r1007 r1196 26 26 // 27 27 // $Id: G4VPreCompoundModel.cc,v 1.6 2007/01/11 05:29:10 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-0 2$28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30
Note: See TracChangeset
for help on using the changeset viewer.