- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- Location:
- trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/History
r1315 r1340 12 12 * Please list in reverse chronological order (last date on top) 13 13 --------------------------------------------------------------- 14 15 13-Sep-2010 A. Dotti (hadr-chips-inter-V09-03-01) 16 --------------------------------------------------------------------------- 17 - Fix in G4ChiralInvariantPhaseSpace to catch previously un-handled exceptions 18 produced when a 'chipolino' pseudo-particle is produced by the model and 19 thrown by Q4QEnvironment::Fragment, retrying the interaction; handles the 20 case in which Q4QEnvironment returns a 90000000 fragment, and converts it 21 to a gamma. Addressing problem report #1138. 14 22 15 23 25-May-2010 M.Kosov (hadr-chips-inter-V09-03-00) -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4ElectroNuclearReaction.hh
r1337 r1340 25 25 // 26 26 // $Id: G4ElectroNuclearReaction.hh,v 1.27 2009/02/23 09:49:24 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 28 28 // 29 29 // GEANT4 physics class: G4ElectroNuclearReaction -- header file for CHIPS -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4GammaNuclearReaction.hh
r1337 r1340 26 26 // 27 27 // $Id: G4GammaNuclearReaction.hh,v 1.15 2009/02/23 09:49:24 mkossov Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01$28 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QHadronElasticDataSet.hh
r1337 r1340 25 25 // 26 26 // $Id: G4QHadronElasticDataSet.hh,v 1.2 2010/02/16 07:53:05 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 28 28 // 29 29 // GEANT4 physics class: G4QHadronElasticDataSet -- header file -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/include/G4QHadronInelasticDataSet.hh
r1337 r1340 25 25 // 26 26 // $Id: G4QHadronInelasticDataSet.hh,v 1.2 2010/01/22 17:02:49 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 28 28 // 29 29 // GEANT4 physics class: G4QHadronInelasticDataSet -- header file -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4ChiralInvariantPhaseSpace.cc
r1055 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // Created: H.-P. Wellicsh: GHAD model wrapper for the CHIPS model (1997) 26 27 // Modified: 28 // 24.08.10 A. Dotti (andrea.dotti@cern.ch) handle exceptions 29 // thrown by Q4QEnvironment::Fragment retying interaction 30 // 17.06.10 A. Dotti (andrea.dotti@cern.ch) handle case in which 31 // Q4QEnvironment returns a 90000000 fragment (see code comments) 32 33 // Created: 28 34 // 16.01.08 V.Ivanchenko use initialization similar to other CHIPS models 29 35 // … … 35 41 #include "G4IonTable.hh" 36 42 #include "G4Neutron.hh" 43 #include "G4Gamma.hh" 37 44 38 45 G4ChiralInvariantPhaseSpace::G4ChiralInvariantPhaseSpace() … … 95 102 etaToEtaPrime); 96 103 // G4QEnvironment::SetParameters(solidAngle); 97 98 99 100 101 104 // G4cout << "Input info "<< projectilePDGCode << " " 105 // << targetPDGCode <<" " 106 // << 1./MeV*proj4Mom<<" " 107 // << 1./MeV*targ4Mom << " " 108 // << nop << G4endl; 102 109 G4QHadronVector projHV; 103 110 G4QHadron* iH = new G4QHadron(projectilePDGCode, 1./MeV*proj4Mom); 104 111 projHV.push_back(iH); 105 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 106 //G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode, 107 // 1./MeV*proj4Mom, 1./MeV*targ4Mom, nop); 112 113 //AND 114 //A. Dotti 24 Aug. : Trying to handle situation when G4QEnvironment::Fragment throws an exception 115 // Seen by ATLAS for gamma+Nuclear interaction for Gamma@2.4GeV on Al 116 // The poor-man solution here is to re-try interaction if a G4QException is catched 117 // Warning: G4QExcpetion does NOT inherit from base class G4HadException 108 118 G4QHadronVector* output=0; 109 try 110 { 111 output = pan->Fragment(); 112 } 113 catch(G4HadronicException & aR) 114 { 115 G4cerr << "Exception thrown passing through G4ChiralInvariantPhaseSpace "<<G4endl; 116 G4cerr << " targetPDGCode = "<< targetPDGCode <<G4endl; 117 G4cerr << " Dumping the information in the pojectile list"<<G4endl; 118 for(size_t i=0; i< projHV.size(); i++) 119 { 120 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 121 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl; 122 } 123 throw; 124 } 125 std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); 126 projHV.clear(); 127 delete pan; 119 120 bool retry=true; 121 int retryes=0; 122 int maxretries=10; 123 124 while ( retry && retryes < maxretries ) 125 { 126 G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode); 127 128 try 129 { 130 ++retryes; 131 output = pan->Fragment(); 132 retry=false;//If here, Fragment did not throw! (AND) 133 } 134 catch( ... ) 135 { 136 G4cerr << "***WARNING*** Exception thrown passing through G4ChiralInvariantPhaseSpace "<<G4endl; 137 G4cerr << " targetPDGCode = "<< targetPDGCode <<G4endl; 138 G4cerr << " Dumping the information in the pojectile list"<<G4endl; 139 for(size_t i=0; i< projHV.size(); i++) 140 { 141 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 142 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl; 143 } 144 G4cerr << "Retrying interaction "<<G4endl; //AND 145 //throw; //AND 146 } 147 delete pan; 148 } //AND 149 if ( retryes >= maxretries ) //AND 150 { 151 G4cerr << "***ERROR*** Maximum number of retries ("<<maxretries<<") reached for G4QEnvironment::Fragment(), exception is being thrown" << G4endl; 152 throw G4HadronicException(__FILE__,__LINE__,"G4ChiralInvariantPhaseSpace::ApplyYourself(...) - Maximum number of re-tries reached, abandon interaction"); 153 } 128 154 129 155 // Fill the particle change. … … 133 159 <<output->size()<<G4endl; 134 160 #endif 161 162 135 163 unsigned int particle; 136 164 for( particle = 0; particle < output->size(); particle++) … … 160 188 if(aZ == 0 && anN == 1) theDefinition = G4Neutron::Neutron(); 161 189 } 190 //AND 191 else if ( pdgCode == 90000000 && output->operator[](particle)->Get4Momentum().m()<1*MeV ) 192 { 193 //A. Dotti: 194 //We cure the case the model returns a (A,Z)=0,0 G4QHadron with a very small mass 195 //We convert this to a gamma. According to the author of the model this is the 196 //correct thing to do and it is done also in other parts of the CHIPS package 197 theDefinition = G4Gamma::Gamma(); 198 } 199 //AND 162 200 else 163 201 { … … 165 203 ->FindParticle(output->operator[](particle)->GetPDGCode()); 166 204 } 205 206 //AND 207 //A. Dotti: Handle problematic cases in which one of the products has not been recognized 208 // This should never happen but we want to add an extra-protection 209 if ( theDefinition == NULL ) 210 { 211 //If we arrived here something bad really happened. We do not know how to handle the products of the interaction, we give up, resetting the 212 //result and keeping the primary alive. 213 G4cerr<<"**WARNING*** G4ChiralInvariantPhaseSpace::ApplyYourself(...) : G4QEnvironment::Fragment() returns an invalid fragment\n with fourMom(MeV)="; 214 G4cerr<<output->operator[](particle)->Get4Momentum()<<" and mass(MeV)="<<output->operator[](particle)->Get4Momentum().m(); 215 G4cerr<<". Offending PDG is:"<<pdgCode<<" abandon interaction. \n Taget PDG was:"<<targetPDGCode<<" \n Dumping the information in the projectile list:\n"; 216 for(size_t i=0; i< projHV.size(); i++) 217 { 218 G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: " 219 <<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<"\n"; 220 } 221 G4cerr<<"\n Please report as bug \n***END OF MESSAGE***"<<G4endl; 222 223 for ( unsigned int cparticle=0 ; cparticle<output->size();++cparticle) 224 delete output->operator[](cparticle); 225 delete output; 226 std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); 227 projHV.clear(); 228 229 aResult->Clear(); 230 aResult->SetStatusChange(isAlive); 231 aResult->SetEnergyChange(aTrack.GetKineticEnergy()); 232 aResult->SetMomentumChange(aTrack.Get4Momentum().vect().unit()); 233 return aResult; 234 } 235 //AND 236 237 167 238 theSec->SetDefinition(theDefinition); 168 239 theSec->SetMomentum(output->operator[](particle)->Get4Momentum().vect()); … … 171 242 } 172 243 delete output; 244 std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); 245 projHV.clear(); 173 246 return aResult; 174 247 } -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QHadronElasticDataSet.cc
r1337 r1340 25 25 // 26 26 // $Id: G4QHadronElasticDataSet.cc,v 1.3 2010/05/26 12:19:06 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 28 28 // 29 29 // GEANT4 physics class: G4QHadronElasticDataSet -- header file -
trunk/source/processes/hadronic/models/chiral_inv_phase_space/interface/src/G4QHadronInelasticDataSet.cc
r1337 r1340 25 25 // 26 26 // $Id: G4QHadronInelasticDataSet.cc,v 1.2 2010/05/26 12:19:06 mkossov Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-chips-V09-03-08 $ 28 28 // 29 29 // GEANT4 physics class: G4QHadronInelasticDataSet -- header file
Note: See TracChangeset
for help on using the changeset viewer.