$Id: History,v 1.90 2010/06/08 06:34:43 stesting Exp $ ------------------------------------------------------------------- ========================================================== Geant4 - an Object-Oriented Toolkit for Physics Simulation ========================================================== History file for hadronic/models/cascade ---------------------------------------- This file should be used to summarize modifications introduced in the code and to keep track of all tags. --------------------------------------------------------------- * Please list in reverse chronological order (last date on top) --------------------------------------------------------------- 08 June 2010 Gunter Folger (hadr-casc-V09-03-42) - trivial fix for compiler warning on gcc43 on empty body in for(...) in cascade/include/G4CascadeInterpolator.icc:67 01 June 2010 Michael Kelsey (hadr-casc-V09-03-41) ------------------------------------------------- - paraMaker.cc: Fix vector initialization for Windows crash. 26 May 2010 Dennis Wright (hadr-casc-V09-03-40) ----------------------------------------------- - G4NucleiModel: remove conversion to fm, and conversion of cross sections to fm**2 21 May 2010 Michael Kelsey (hadr-casc-V09-03-39) ------------------------------------------------ Final tag for inclusion in GEANT 4.9.4-beta. Will be validated internal and included in global Hadronics tag. - G4CascadeSampler.icc: Activate time-saving checks on single bins. - G4ElementaryParticleCollider.cc: Remove special case for nucleon elastic scattering. 21 May 2010 Michael Kelsey (kelsey-20100521c) --------------------------------------------- - G4CascadeInterface, G4PreCompoundCascadeInterface, G4InuclEvaporation: Simplify code: fetch G4DynamicParticle out of outgoing G4InuclParticles, rather than creating new ones. Remove all of the *Collider data members (instantiated within G4InuclCollider). Move final state rotations to G4CollisionOutput. - G4InuclParticle: Provide accessor to return G4DynamicParticle. - G4CollisionOutput: Add function to apply LorentzRotation to both lists; used by G4CascadeInterface. - G4ElementaryParticleCollider: Avoid memory churn with G4LorentzVector temporaries. 21 May 2010 Michael Kelsey (kelsey-20100521b) --------------------------------------------- - G4VCascadeCollider: New base class for all Colliders. Carries verboseLevel data member and set-function. ::collide() is pure virtual. Additional protected member functions will be defined to include all code shared across multiple Colliders. - Migrate all of the "Collider" factories to use new base class, removing common member functions, and replace passed-in sibling colliders with local data members (pointers for now). Since none of these classes have persistent (state preserving) data members, the cost of more than one instantiation is minimal. G4BigBanger G4ElementaryParticleCollider G4EquilibriumEvaporator G4EvaporationInuclCollider G4Fissioner G4IntraNucleiCascader G4InuclCollider G4NonEquilibriumEvaporator G4PreCompoundInuclCollider - G4CascadeInterface.cc, G4InuclEvaporation.cc, G4PreCompoundCascadeInterface.cc: Remove siblings from constructors for the Colliders. - G4InteractionCase.hh: Eliminate unnecessary copying of std::pair<>'s, use initializers in ctors, add clear() function to reset to 0-0-0. Move evaluation of bullet vs. target to new set() function, replacing separate bulletTargetSetter() in the colliders. Add boolean accessors to avoid hard-coding inter_case values. Change code numbers so nucleus collisions are negative, and positive codes refer to the "is" or "rtype" numbers. - G4ElementaryParticleCollider.cc: Use G4InteractionCase to compute "is", instead of hardwiring the meaning. - G4Collider.hh: Remove empty and never-used file. - G4EvaporationInuclCollider.cc: Eliminate unnecessary creation of duplicate G4InuclNuclei: pass input through to G4EquilibriumEvaporator. - G4LorentzConvertor: Add interfaces to pass G4InuclParticles directly. 21 May 2010 Michael Kelsey (kelsey-20100521a) --------------------------------------------- Replace hand-coded interpolation of arrays with use of G4CascadeInterpolator. In all cases, local arrays are replaced with static const, and the interpolator object itself is declared static, to reduce memory churn. G4NucleiModel::totalCrossSection() G4EquilibriumEvaporator::getQF() G4InuclSpecialFunctions::paraMaker[Truncated]() (in paraMaker.cc) - G4CascadSpecialFunctions: Remove. totalCrossSection() redundant with G4NucleiModel. Move absorptionCrossSection() to G4NucleiModel. - G4CascadeInterpolator.icc: Bug fix to catch special case of exact upper bin edge (occurs when !doExtrapolation). If index == last + 0., just return upper edge value, without calculation. - G4NucleiModel.cc: Use G4Cascade{Pi*}Channel and G4Cascade{NN,NP,PP}Channel classes to get total cross-sections for pi-N and N-N scattering. Arrays for kaon and hyperon scattering should be migrated as well, once binning is resolved. Move absorptionCrossSection() here from SpecialFunctions. 20 May 2010 Michael Kelsey (kelsey-20100521) -------------------------------------------- - G4CascadeInterpolator.icc: Two bug fixes involving values at array edges. 19 May 2010 Michael Kelsey, Dennis Wright ----------------------------------------- - G4BertiniData.hh,.cc: Remove unused and unnecessary class. - G4NucleiModel.cc: convert nuclear radii to fm and cross sections to fm**2. Use six-zone model for A > 99, and make alpha a 1-zone nucleus. - G4CascadSpecialFunctions: convert pion absorption cross sections from mb to fm**2, correct spelling of method absorptionCrossSection 17 May 2010 Michael Kelsey (hadr-casc-V09-03-38) ------------------------------------------------ - paraMaker.cc (G4InuclSpecialFunctions::paraMaker[Truncated]): Upper edge of interpolation array not properly handled. Should be "if (Z >= 70.0)". This affects G4NonEquilibriumEvaporator output. 17 May 2010 Michael Kelsey (hadr-casc-V09-03-37) ------------------------------------------------ Bug fixes for compiler warnings (not seen on MacOSX, even with g++ -Wall) - G4CascadeData.hh: Dummy arrays needed double-braces for initialization. - G4CascadeInterpolator.icc: Extraneous decimal point in "for (i=0.;". - G4CascadeKzeroBarNChannel.cc: Left three "old" arrays in place during conversion. 14 May 2010 Michael Kelsey (hadr-casc-V09-03-36) ------------------------------------------------ Remove obsolete files following reorganization of two-body scattering lookup tables. G4CascadeElasticInterface.hh,.cc G4ElasticCascadeInterface.hh,.cc G4FinalStateSampler.hh,.cc G4NucleonSampler.hh,.cc G4PionSampler.hh,.cc - G4CascadeChannel.hh,.cc: All functionality removed, replaced with namespace containing only getQnums and CheckQnums validation functions. 14 May 2010 Michael Kelsey (hadr-casc-V09-03-35) ------------------------------------------------ Replace independent parallel samplers with templated base class and single implementation. This completes the reorganization of the channel tables. - G4CascadeSampler: Redefine as templated base, taking binning array as constructor argument. Move implementation file from .cc to .icc. NOTE: G4CascadeSampler.cc is removed, since not consistent with new .hh. - G4PionNucSampler: Subclass of G4CascadeSampler<30>, replaces G4FinalStateSampler, using bins array from there. - G4KaonNucSampler: Sublcass of G4CascadeSampler<31>, replaces previous G4CascadeSampler, using bins array from there. - G4Cascade*Channel.hh: Change all typedefs to pass appropriate of two new samplers in template. - G4ElementaryParticleCollider.cc: Replace long "if (is==)"-cascades with switch blocks. Move all getOutgoing calls (for pions and nucleons) into one function, and call it from outside multiplicity checks. Use G4CascadeInterpolator for angular distributions. Set modelID=3 in all G4InuclParticle constructions. 14 May 2010 Michael Kelsey (hadr-casc-V09-03-34) ------------------------------------------------ Extract lookup tables from G4PionSampler and G4NucleonSampler into individual "classes" defined and initialized with G4CascadeData. - G4CascadePi{Plus,Minus,Zero}{P,N}Channel.hh: Six new typedefs defined as with the existing G4CascadeXXXChannel, to replace G4PionSampler. - G4CascadeT33piNChannel.cc: Lookup tables for both PiPlusP and PiMinusN, implemented as with existing G4CascadeXXXChannel, from G4PionSampler.cc. - G4CascadeT31piNChannel.cc: Lookup tables for both PiMinusP and PiPlusN, implemented as with existing G4CascadeXXXChannel, from G4PionSampler.cc - G4CascadeT11pizNChannel.cc: Lookup tables for both PiZeroP and PiZeroN, implemented as with existing G4CascadeXXXChannel, from G4PionSampler.cc - G4Cascade{PP,NP,NN}Channel.hh: Three new typedefs defined as with the existing G4CascadeXXXChannel, to replace G4NucleonSampler. - G4CascadeT1NNChannel.cc: Lookup tables for both p-p and n-n scattering, implemented as with existing G4CascadeXXXChannel, from G4NucleonSampler.cc - G4CascadeT0npChannel.cc: Lookup tables for p-n scattering, implemented as with existing G4CascadeXXXChannel, from G4NucleonSampler.cc - G4CascadeFunctions.hh, .icc: Pass std::vector as non-const argument to getOutgoingParticleTypes() instead of returning internal buffer. - G4CascadeSampler.cc, G4FinalStateSampler.cc: Add some checks in findFinalStateIndex, fillSigmaBuffer, and sampleFlat(), such that single-entry ranges don't go through the analysis, just return index 0. - G4ElementaryParticleCollider.cc: Follow change to getOutgoingParticleTypes() in generateStrangeChannelPartTypes(). Replace all uses of G4PionSampler and G4NucleonSampler with new channel "classes". 14 May 2010 Michael Kelsey (hadr-casc-V09-03-33) ------------------------------------------------ Continue consolidation of two-body collision lookup tables. Unify interfaces between pion/nucleon and kaon/hyperon samplers. - G4CascadeData: Many changes to support use as data class for both kaon/hyperon and pion/nucleon tables (migration will be next tag): 1) Add new first argument to template with number of bins in energy interpolation. This replaces the (temporary) use of G4CascadeSampler::energyBins within the class definition. 2) Add two additional template arguments, N8 and N9, with default values of zero. These will be used by the pion/nucleon tables, but not by the existing kaon/hyperon tables. 3) Define additional arrays for 8- and 9-body final states, using conditional dimensioning (e.g., if N8==0, use [1]). Define second 9-body constructor to accept and initialize the new arrays. 4) Eliminate static intialization of index[], moving it into initialize(). Template specialization can't be used with data! 5) Add separate "sum" (summed N-body cross-sections) and "tot" arrays (measured inclusive xsec). Latter is a const-ref, initialized to "sum" if not provided as ctor argument, with two new ctors as needed. 6) Add accessor to return maximum multiplicity (NM+1). - G4CascadeFunctions.hh: Add second template argument to specify which "final state sampler" is the base class. Use both T::data.tot and T::data.sum in GetMultiplicity(), to support sum/tot comparisons in pion/nucleon channels. Extend GetOutputParticleTypes() to support up to multiplicity 9. - G4CascadeFunctions.icc: Implementations of template class functions. - G4CascadeXXXChannel.hh: Add "31," as initial template argument for Data. Add G4CascadeSampler as second template argument in G4CascadeXXXChannel typedef. 14 May 2010 Michael Kelsey (hadr-casc-V09-03-32) ------------------------------------------------ Continue revisions to two-body collision lookup tables. Make the kaon and hyperon channels compatible with the pion/nucleon samplers, before the next stage of unifying the structure. - G4CascadeSampler: NEW class, parallel to G4FinalStateSampler but with a different energy binning. Used as base class to G4CascadeFunctions, from which the cross-section and other arrays are passed. Implement findMultiplicity (cf. G4CascadeFunctions::getMultiplicity) to return the true value, not the array index. This class replaces functionality of G4CascadeChannel, which is redundant. - G4CascadeChannel: Remove all interpolation code, leaving only getQnums(). - G4CascadeFunctions: Inherit from G4CascadeSampler for interpolations, except for final-state extraction (where FS type arrays are dealt with locally, not passed). Public static functions rely on private instantiated version of class to do work, so that G4CascadeSampler gets instantiated. - G4CascadeData: Remove final template argument (total number of indices), as redundant with simple sum of multplicity indices. Use template args to dimension data member arrays (const references), and to statically initialize the start-stop index table. Make large cross-sections table G4double, not G4float. Define ctor to pass in array refs for initialization. Reduce index array to single dimension (start=index[i], stop=index[i+1]). - G4CascadeXXXChannel: All of the initial-state channel "classes" (typedef names) modified to follow G4CascadeData rewrite. In .cc file, the explicit lookup tables are static, and passed by const-ref to G4CascadeData. The "initializer" struct is dropped; with the static "data" object initialized by ctor here. - G4ElementaryParticleCollider.cc: In ::generateMultiplicity(), eliminate extra "+2" and "-2" applied to local "mul" variables. With change above, all functions return return true multiplicity, not array index. - G4FinalStateSampler: Add findFinalStateIndex() function, to make interface match G4CascadeSampler exactly. Reduce index array to single dimension. - G4PionSampler.cc, G4NucleonSampler.cc: Use new findFinalStateIndex() function in GetFSPartTypesXXX() functions. Reduce index array to single dimension (start=index[i], stop=index[i+1]). 14 May 2010 Michael Kelsey (hadr-casc-V09-03-31) ------------------------------------------------ Begin revisions to two-body collision lookup tables. This will be a major reorganization, splitting the G4PionSampler and G4NucleonSampler into separate little "classes" (typedefs) for each initial state, in the same way that the kaon and hyperon states are done now. The underlying templated and base classes will be unified across all of the channels. - G4CascadeInterpolator: NEW class to encapsulate interpolation procedure. Uses C-style arrays passed by dimensioned reference, to allow compile-time array bounds checking. Template argument is array dimension, and array of energy bins is saved by ctor. User array to be interpolated is passed as function argument. Last value interpolated, along with result, is saved, to allow fast multiple interpolations. This class is substantially more lightweight than G4PhysicsVector. - G4FinalStateSampler: Replace manual interpolation with G4CascadeInterpolator. Remove redundant sampleFlat(...) function with argument. Rename member functions in anticipation of merging with G4CascadeFunctions. - G4PionSampler.cc, G4NucleonSampler.cc: Follow use of G4CascadeInterpolator above, and drop local caching of interpolation results. Reduce offset list for cross-sections to one dimension (start=index[i], stop=index[i+1]). 11 May 2010 Michael Kelsey (hadr-casc-V09-03-30) ------------------------------------------------ Bug fixes in the two-body scattering code. - G4PionSampler.cc, G4NucleonSampler.cc: Fix long-standing bug with offset indices computed for cross-section tables. XXXindex[m][0] (start) and XXXindex[m][1] (stop) are computed in initChannels() as [start,stop] inclusive range (i.e., "for (i=start; i<=stop; i++)"), but used with G4FinalStateSampler::fillSigmaBuffer (and its predecessor code) as [start,stop) exclusive range (i.e., normal C style "for (i=start; i via const-references: G4CascadeInterface.cc G4EquilibriumEvaporator.cc G4IBertini.cc G4InuclCollier.cc G4NucleiModel.cc G4PreCompoundCascadeInterface.cc - G4CollisionOutput: Add new function to boost output lists to lab frame. 14 April 2010 Michael Kelsey (hadr-casc-V09-03-22) -------------------------------------------------- - G4CascadeInterface.cc, G4IBertini.cc, G4PreCompoundCascadeInterface.cc: In ::ApplyYourself(), do the check on K0L/K0S _before_ passing G4PartDefn to G4InuclElemPart::type(). This avoids unnecessary warning message. 14 April 2010 Michael Kelsey (temporary: kelsey-memClean3) ---------------------------------------------------------- All changes below within "cascade/" subdirectory: - G4FinalStateSampler: Replace "sigma" argument for sampling with data member, add functions to fill sigma buffer by passing in array references. Provide typedef for interpolator, and function to apply interpolation. - G4PionSampler, G4NucleonSampler: Follow changes to base class, eliminating much of the copy-and-paste code blocks via function calls. Replace G4float arrays with G4double, to support passing into functions. 13 April 2010 Michael Kelsey (hadr-casc-V09-03-21) -------------------------------------------------- All changes below within "cascade/" subdirectory: - G4InuclSpecialFunctions.hh, paraMaker.cc, paraMakerTruncated.cc: Drop return-by-value from paraMaker() and paraMakerTruncated(). Add second argument with non-const reference to output buffer for return. - G4EquilibriumEvaporator.cc: Follow changes above to paraMaker(), use references to address parms.first and parms.second, instead of copying. - G4NonEquilibriumEvaporator.cc: Follow changes above to paraMakerTruncaed(), use references to address parms.first and parms.second, instead of copying. - G4Dineutron, G4Diproton, G4UnboundPN: Inherit from G4VShortLivedParticle, per Kurashige. Thought it would eliminate G4ElectronOccupancy churn, but did not. 12 April 2010 Michael Kelsey (hadr-casc-V09-03-20) -------------------------------------------------- All changes below within "cascade/" subdirectory: - G4NucleiModel: Move function implementations from .hh to .cc. Replace manual sorting (inefficient O(N^2)) with std::sort() and simple "less-than" function for std::pair<> "partners". - G4CollisionOutput: Move function implementations from .hh to .cc. Use std::vevtor<>::insert() to add vectors together. - Replace return-by-value G4CollisionOutput with non-const reference buffer passed into xxx::collide(), in the following classes: G4BigBanger G4CascadeElasticInterface G4CascadeInterface G4ElasticCascadeInterface G4ElementaryParticleCollider G4EquilibriumEvaporator G4EvaporationInuclCollider G4Fissioner G4IBertini G4IntraNucleiCascader G4InuclCollider G4InuclEvaporation G4NonEquilibriumEvaporator G4NucleiModel G4PreCompoundCascadeInterface G4PreCompoundInuclCollider Note that some places where internal G4CollisionOutput buffers are being used (and their contents appended to the global output) have not been cleaned up yet. These will require some rearrangement of the algorithms, or/and elimination of debugging output. 09 April 2010 Michael Kelsey (hadr-casc-V09-03-16-01) ----------------------------------------------------- This modification is included in a pseudo-patch of hadr-casc-V09-03-16, without brining in any of the -17 through -19 modifications. - G4LorentzVector.cc: Protect two instances of sqrt() against tiny negative arguments (due to tiny-tiny subtractions). 09 April 2010 Michael Kelsey (hadr-casc-V09-03-19) -------------------------------------------------- All changes below within "cascade/" subdirectory: - G4InuclParticle, G4InuclElementaryParticle, G4InuclNuclei: Eliminate unused G4String ctor argument, introduced in hadr-casc-V09-03-01. Causes a lot of pointless memory churn. - G4BigBanger.cc: Fix type conversion warning I introduced by mistake. 08 April 2010 Michael Kelsey (hadr-casc-V09-03-18) -------------------------------------------------- All changes below within "cascade/" subdirectory: - G4PionSampler, G4NucleonSampler: For all ::GetFSPartTypes*() functions, eliminate return-by-value std::vector<>, and pass in non-const reference for filling in situ. Buffer is cleared. - G4ElementaryParticleCollider.cc: Follow changes above for Sampler calls. 07 April 2010 Michael Kelsey (hadr-casc-V09-03-17) -------------------------------------------------- All changes below within "cascade/" subdirectory: Replace return-by-value std::vector<> with either const-ref returns, or with use of an internal buffer which can be reused, to reduce memory churn due to copying, allocation, and resizing. - G4BigBanger: Create data buffer for lists of secondaries and momenta. Fill buffers in ::generateBangInSCM() and ::generateMomentumModules(), which are now non-const. Reference buffers in ::collide(). - G4CascadeFunctions::getOutgoingParticleTypes(): Make "kinds" a static variable (buffer), and return it by const-ref. - G4ElementaryParticleCollider: Eliminate return-by-value std::vector<> on the functions listed below, by creating data buffers for particles, momenta, and particle types. The functions become non-const and void: ::generateSCMfinalState(), ::generateMomModules() ::generateStrangeChannelPartTypes(), ::generateSCMpionAbsorption() Also, in ::generateStrangeChannelPartTypes(), use a switch statement instead of the long cascade of if-else-else. - G4NucleiModel: Several member functions have different modifications: ::initializeCascad(bullet,target) -- Replace return value with a passed-in (non-const reference) buffer to be filled. The calling code can pass in a data member, local variable, or whatever. ::generateParticleFate() -- Replace local "thePartners" variable with data member, filled below. Move "outgouing_cparticles" to data member (fix the spelling!), and return by const-ref. ::generateInteractionPartners() -- Eliminate return value; fill data member instead, to be used by ::generateParticleFate(). - G4IntraNucleiCascader.cc: Follow changes to initializeCascad() above. - G4NucleonSampler, G4PionSampler: ** DON'T KNOW WHAT TO DO HERE ** - G4WatcherGun: Return const-ref to list of watchers, instead of copy. Replace all uses of std::vector<>::resize(0) with ::clear(). The former causes deallocation/reallocation/resizing cycles, while clear() just removes content, preserving the allocated buffer. include/G4CollisionOutput.hh src/G4ElementaryParticleCollider.cc src/G4NucleiModel.cc src/G4WatcherGun.cc 07 April 2010 Dennis Wright (hadr-casc-V09-03-16) ------------------------------------------------- - fix negative energy bug in G4BigBanger, and switch to using G4NucleiProperties::GetBindingEnergy 07 April 2010 Michael Kelsey (hadr-casc-V09-03-15) -------------------------------------------------- All changes below within "cascade/" subdirectory: 1) Systematically replace pass-by-value function arguments with const-refs. This is the first step in reducing unnecessary memory churn, to be followed by replacing return-by-value std::vector<> with non-const argument buffers. include/G4CascadeChannel.hh include/G4FinalStateSampler.hh include/G4InuclEvaporation.hh include/G4NuclWatcher.hh src/G4CascadeChannel.cc src/G4FinalStateSampler.cc src/G4InuclEvaporation.cc src/G4NuclWatcher.cc 2) Fix constness on some operator== and operator!= definitions. include/G4CascadeElasticInterface.hh include/G4CascadeInterface.hh include/G4ElasticCascadeInterface.hh include/G4IBertini.hh include/G4PreCompoundCascadeInterface.hh 07 Apr 2010 Michael Kelsey (hadr-casc-V09-03-14) ------------------------------------------------ - G4Dineutron.hh, G4Diproton.hh, G4UnboundPN.hh: Reset static "theInstance" pointer to zero in (now virtual) destructor. - G4Dineutron.cc, G4Diproton.cc, G4UnboundPN.cc: Implement constructor to do the G4Ions initialization, rather than in ::Definition(). Drop use of G4ParticleTable; just monitor static pointer. Set "ShortLived" flag in G4Ions initialization, to avoid interactions with ProcessManager. - G4InuclNuclei.cc: In ::makeNuclearFragment(), set "ShortLived" flag for G4Ions, to avoid interactions with ProcessManager. 26 Mar 2010 Dennis Wright (hadr-casc-V09-03-13) ----------------------------------------------- - G4EquilibriumEvaporator.cc: remove line #include "G4types.hh" (file doesn't exist) 20 Mar 2010 Michael Kelsey (hadr-casc-V09-03-12) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4EquilibriumEvaporator.cc: Move subtraction of Q1[i] outside new GetBindingEnergy() call. - G4InuclNuclei.cc::makeNuclearFragment(): Add message warning users about non-physical creation. Use new GetBindingEnergy() function here as well (V09-03-05 didn't have this function, so wasn't included in migration). 19 Mar 2010 Michael Kelsey (hadr-casc-V09-03-11) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4InuclSpecialFunctions: Two new functions: ::generateWithRandomAngles() to encapsulate random-direction generation. This function and existing generateWithFixedTheta() take optional mass argument to produce proper four-vector. Replace duplicated random angle code with new function above, and use new optional mass argument where available: G4BigBanger.cc G4ElementaryParticleCollider.cc G4EquilibriumEvaporator.cc G4Fissioner.cc G4NonEquilibriumEvaporator.cc G4NucleiModel.cc ::G4cbrt(): Define cube-root in terms of log and exp, rather than pow(). Note that "cbrt()" can't be used, as it conflicts with on Linux. Eliminate unnecessary uses of std::pow() with fixed arguments. For example, "pow(x,3)" -> "x*x*x", "pow(x,1/3)" -> G4cbrt(x): G4BertiniRegionModel.cc G4EquilibriumEvaporator.cc G4EvaporationInuclCollider.cc G4Fissioner.cc G4IntraNucleiCascader.cc G4InuclCollider.cc G4NonEquilibriumEvaporator.cc G4NucleiModel.cc G4PreCompoundInuclCollider.cc G4RegionModel.cc bindingEnergyAsymptotic.cc bindingEnergyKummel.cc WARNING! In G4IntraNucleiCascader.cc, the Coulomb barrier was calculated using "std::pow(A, 0.333)", rather than the "exact" 1./3. This leads to per-mil differences in the value, and occasional differences in wheter an outgoing particle tunnels through. The new code is exact to double precision, and therefore fixes a bug. - Move "using" directive from all .hh files to corresponding .cc, along with some unnecessary #includes: G4BigBanger.hh, .cc G4ElementaryParticleCollider.hh, .cc G4EquilibriumEvaporator.hh, .cc G4EvaporationInuclCollider.hh, .cc G4Fissioner.hh, .cc G4IntraNucleiCascader.hh, .cc G4InuclCollider.hh G4InuclNuclei.hh G4NonEquilibriumEvaporator.hh, .cc G4NucleiModel.hh, .cc G4PreCompoundInuclCollider.hh, .cc - G4NuclWatcher.hh and .cc (new): Move implementation code from .hh to .cc. 18 March 2010 Michael Kelsey (hadr-casc-V09-03-10) -------------------------------------------------- All changes below within "cascade/" subdirectory: Missed one bug in repairs below, found when testing 4 GeV pi -> Pb. - G4Fissioner.cc: Replace incorrect G4LorentzVector ctor arguments (G4ThreeVector,m) with call to G4LV::setVectM(). 17 March 2010 Dennis Wright (hadr-casc-V09-03-09) ------------------------------------------------- Fix warning in G4InuclNuclei.cc: G4Ions:G4Ions was being called with a double (a) in its 13th argument, when an integer is required. Use G4lrint to convert. 16 March 2010 Michael Kelsey (hadr-casc-V09-03-08) -------------------------------------------------- All changes below within "cascade/" subdirectory: Fix bugs introduced during migration from G4CascadeMomentum to G4LorentzVector (see hadr-casc-V09-03-03). With these bug fixes, 2000 events generated with "ppi4GeV" test executable are equivalent to production output (GEANT 4.9.3), allowing for differences in hardwired nucleon masses. When compared with hadr-casc-V09-03-02 (which uses G4ParticleDefinition for all the particle masses) the 2000-event results are identical within floating point precision. - G4BigBanger.cc: Line 72, fix unit conversion bug, GeV/MeV vs. MeV/GeV. Replace incorrectly introduced cross-product with original vector manipulation, written with G4LorentzVector accessors. - G4CollisionOutput::selectPairToTune(): Test on "i3>0" not appropriate with G4LorentzVector indexing. Replace with failure-test on "i3<0". Also simplify final if-cascade for readability. - G4EquilibriumEvaporator.cc: Replace incorrect G4LorentzVector ctor arguments (px,py,pz,m) with call to G4LV::setVectM(). - G4IntraNuclearCascader.cc: Replace leftover momentum_out[0] with .e(). - G4InuclNuclei.cc,hh: Add new function ::makeNuclearFragment(a,z,exc), which "manually" construct a G4Ions object for cases where A/Z is not a valid stable or unstable nucleus. These unphysical objects are passed back from G4IntraNuclearCascader.cc and immediately passed to G4BigBanger for conversion to nucleons. A future change should move this action into G4INCascader and eliminate the need for unphysical nuclei. - G4LorentzConvertor::toTheTargetRestFrame(): Remove local declaration of scm_momentum, restoring access to data member with that name. - G4NucleiModel::generateQuasiDeutron(): Undo consolidation of dmom with local variables for each of the nucleon momenta. Stack corruption led to differences in unbound p-n state relative to pp and nn states. Minor updates: Changed all the "verboseLevel()" initializers to (0), via a shell script. This allows making the code uniformly verbose or quiet. include/G4NucleiModel.hh src/G4Analyser.cc src/G4CollisionOutput.cc src/G4ElementaryParticleCollider.cc src/G4FissionStore.cc src/G4Fissioner.cc src/G4IntraNucleiCascader.cc src/G4NonEquilibriumEvaporator.cc src/G4NucleiModel.cc src/G4WatcherGun.cc 16 March 2010 Michael Kelsey (hadr-casc-V09-03-DO-NOT-USE) -------------------------------------------------- All changes below within "cascade/" subdirectory: Restore version hadr-casc-V09-03-05 to HEAD of CVS in order to apply bug fixes and re-deploy migration from G4CascadeMomentum to G4LorentzVector. This reversion is tagged as a checkpoint only, and should not be used for testing or running (since it restores the known bugs in V09-03-03). The update to G4InteractionCase.hh by Gabriele Cosmo in hadr-casc-V09-03-07 is not touched by this reversion! The following CVS commands were used to perform the reversion: cvs update -j1.13 -j1.12 cascade/include/G4CascadParticle.hh cvs update -j1.4 -j1.3 cascade/include/G4CascadeMomentum.hh cvs update -j1.15 -j1.14 cascade/include/G4CollisionOutput.hh cvs update -j1.23 -j1.22 cascade/include/G4ElementaryParticleCollider.hh cvs update -j1.9 -j1.8 cascade/include/G4InuclCollider.hh cvs update -j1.19 -j1.18 cascade/include/G4InuclElementaryParticle.hh cvs update -j1.12 -j1.11 cascade/include/G4InuclNuclei.hh cvs update -j1.16 -j1.15 cascade/include/G4InuclParticle.hh cvs update -j1.13 -j1.12 cascade/include/G4InuclSpecialFunctions.hh cvs update -j1.13 -j1.12 cascade/include/G4LorentzConvertor.hh cvs update -j1.4 -j1.3 cascade/include/G4ParticleLargerBeta.hh cvs update -j1.9 -j1.8 cascade/include/G4ParticleLargerEkin.hh cvs update -j1.20 -j1.19 cascade/src/G4BigBanger.cc cvs update -j1.13 -j1.12 cascade/src/G4CascadParticle.cc cvs update -j1.6 -j1.5 cascade/src/G4CascadeElasticInterface.cc cvs update -j1.68 -j1.67 cascade/src/G4CascadeInterface.cc cvs update -j1.18 -j1.17 cascade/src/G4CollisionOutput.cc cvs update -j1.7 -j1.6 cascade/src/G4ElasticCascadeInterface.cc cvs update -j1.6 -j1.5 cascade/src/G4EvaporationInuclCollider.cc cvs update -j1.5 -j1.4 cascade/src/G4IBertini.cc cvs update -j1.3 -j1.2 cascade/src/G4InuclElementaryParticle.cc cvs update -j1.10 -j1.9 cascade/src/G4InuclEvaporation.cc cvs update -j1.3 -j1.2 cascade/src/G4InuclNuclei.cc cvs update -j1.4 -j1.3 cascade/src/G4InuclParticle.cc cvs update -j1.17 -j1.16 cascade/src/G4InuclSpecialFunctions.cc cvs update -j1.19 -j1.18 cascade/src/G4LorentzConvertor.cc cvs update -j1.5 -j1.4 cascade/src/G4PreCompoundCascadeInterface.cc cvs update -j1.4 -j1.3 cascade/src/G4PreCompoundInuclCollider.cc Intermediate versions below had bindingEnergy changes from -05 re-applied cvs update -j1.23 -j1.21 cascade/src/G4EquilibriumEvaporator.cc cvs update -j1.22 -j1.20 cascade/src/G4Fissioner.cc cvs update -j1.29 -j1.27 cascade/src/G4IntraNucleiCascader.cc cvs update -j1.24 -j1.22 cascade/src/G4InuclCollider.cc cvs update -j1.23 -j1.21 cascade/src/G4NonEquilibriumEvaporator.cc cvs update -j1.38 -j1.36 cascade/src/G4NucleiModel.cc G4ElementaryParticleCollider::particleSCMmomentumFor2to2: Restore new parametrization of elastic scattering added by D.Write in hadr-casc-V09-03-06 cvs update -j1.47 -j1.45 cascade/src/G4ElementaryParticleCollider.cc + editing 05 Mar 2010 Gabriele Cosmo (hadr-casc-V09-03-07) ------------------------------------------------ - Reinstated fix in G4InteractionCase.hh for initialisation in constructor to allow for porting on C++0x Standard. 07 Feb 2010 Dennis Wright (hadr-casc-V09-03-06) ----------------------------------------------- - back out changes from tags V09-03-00 to V00-03-05 by restoring HEAD to V09-02-11, and keeping the di-nucleon classes - replace Bertini method bindingEnergy() with G4NucleiProperties::GetBindingEnergy() in classes G4IntraNuclearCascader, G4InuclCollider, G4NucleiModel, G4EquilibriumModel, G4NonEquilibriumModel, G4Fissioner. Note that G4Fissioner still uses the Bertini method bindingEnergyAsymptotic. - G4ElementaryParticleCollider::particleSCMmomentumFor2to2 replace original (incorrect) pp, pn, nn 2-body to 2-body scattering angular distributions with a new parameterization of elastic scattering data using the sum of two exponentials 02 Feb 2010 Dennis Wright (hadr-casc-V09-03-05) ----------------------------------------------- - replace all uses of bindingEnergy (local Bertini method) with the Geant4 standard G4NucleiProperties::GetBindingEnergy(A,Z) files modified: G4IntraNucleiCascader.cc G4InuclCollider.cc G4NucleiModel.cc G4EquilibriumEvaporator.cc G4NonEquilibriumEvaporator.cc G4Fissioner.cc - note that G4Fissioner still uses Bertini method bindingEnergyAsymptotic 28 Jan 2010 Dennis Wright (hadr-casc-V09-03-04) ----------------------------------------------- - fix unused variable warnings in G4InuclParticle.hh, .cc and G4NonEquilibriumEvaporator.cc 26 Jan 2010 Michael Kelsey (hadr-casc-V09-03-03) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4ParticleLargerBeta.hh: Fix to use of CVS "Name" tag; no code changes. - G4CascadParticle: Replace the position std::vector<> with G4ThreeVector. - G4NucleiModel: Replace all std::vector<> coordinates with G4ThreeVector, and use vector math for computations. Remove all use of G4CascadeMomentum (a simple container with a C-style four-element array) with G4LorentzVector. This is a fairly invasive change, since G4CascMom was used for all of the three- and four-vector operations throughout the Bertini code: include/G4CascadParticle.hh include/G4CollisionOutput.hh include/G4ElementaryParticleCollider.hh include/G4InuclCollider.hh include/G4InuclElementaryParticle.hh include/G4InuclNuclei.hh include/G4InuclParticle.hh include/G4InuclSpecialFunctions.hh include/G4LorentzConvertor.hh src/G4BigBanger.cc src/G4CascadParticle.cc src/G4CascadeElasticInterface.cc src/G4CascadeInterface.cc src/G4CollisionOutput.cc src/G4ElasticCascadeInterface.cc src/G4ElementaryParticleCollider.cc src/G4EquilibriumEvaporator.cc src/G4EvaporationInuclCollider.cc src/G4Fissioner.cc src/G4IBertini.cc src/G4IntraNucleiCascader.cc src/G4InuclCollider.cc src/G4InuclElementaryParticle.cc src/G4InuclEvaporation.cc src/G4InuclNuclei.cc src/G4InuclParticle.cc src/G4InuclSpecialFunctions.cc src/G4LorentzConvertor.cc src/G4NonEquilibriumEvaporator.cc src/G4NucleiModel.cc src/G4PreCompoundCascadeInterface.cc src/G4PreCompoundInuclCollider.cc The new code is not yet entirely "correct," since Bertini also does a lot of operations by way of three-momentum, imposing masses (and hence energy conservation) separately, after the fact. 20 Jan 2010 Gabriele Cosmo -------------------------- - G4InteractionCase.hh: Minor fix in initialisation in constructor to allow for porting on C++0x Standard. 20 Jan 2010 Michael Kelsey (hadr-casc-V09-03-02) ------------------------------------------------ - G4LorentzConvertor.hh: Fix scm_momentum data member to be G4ThreeVector (as used in previous versions) rather than G4LorentzVector. NOTE: I have *retagged* cascade/include/G4LorentzConverter.hh and this History file, rather than creating a new tag, since these are private development only, not public releases. 12 Jan 2010 Michael Kelsey (hadr-casc-V09-03-02) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4CascadeMomentum: Replace use of static G4LV variables within functions with mutable data member of object; this does introduce more memory thrashing, but the plan is to get rid of the whole thing anyway. Improve implicit casting and add assignment from G4LV. - G4LorentzConverter: Change function signatures to accept G4LV as input, using implicit cast to convert existing G4CascadeMomentum argument passing. Use G4LV internally throughout, again using implicit cast to return G4CascMom values. This substantially increases (temporarily!) memory thrashing. Simplify ::rotate() functions to use G4LV and G4ThreeVec operations rather than array index gymnastics. Move some function implementations out of .hh file into .cc. - G4ParticleLargerEkin.hh: Fix use of CVS "Name" tag. No code changes. 12 Jan 2010 Michael Kelsey (hadr-casc-V09-03-01) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4ParticleLargerBeta, G4ParticleLargerEkin: Add additional operator() which takes pointers (for future mods to reduce ctor/dtor cycling), and fix ordering bug in beta sorting. Add debugging printout togged with preprocessor flag. - G4InuclParticle, G4InuclNuclei, G4InuclElementaryParticle: Rewrite to carry G4DynamicParticle data member, and to instantiate particle properties via G4ParticleDefinition subclasses. This is first stage in eventually eliminating the G4InuclParticle stuff entirely in favor of direct use of G4DynamicParticle for internal propagation. These changes have been testing using debugging output on the production (4.9.3) code compared to the above changes. |diff| shows mostly identical results, with occasional ~1e-5 floating point differences. 08 Jan 2010 Michael Kelsey (hadr-casc-V09-03-00) ------------------------------------------------ All changes below within "cascade/" subdirectory: - G4BertiniNuclearModel: REMOVE this class from the HEAD, and hopefully all future tags. It is redundant with the G4NuclearModel class, and is not used anywhere in the G4 distribtion; the latter is referenced in both regular G4 code and in examples. - G4Diproton, G4Dineutron, G4UnboundPN: New G4ParticleDefinition subclasses, which implement the Bertini-specific dibaryon states. These are not used anywhere as yet, but will be used in future modifications to the G4InuclParticle subclasses. - G4CascadeMomentum: Add interface to create from and cast to G4LorentzVector. Will be used (in future) by G4InuclParticle modifications, and provides a transition to eliminating this class entirely. 1 Dec 2009 Dennis Wright (hadr-casc-V09-02-11) ---------------------------------------------- - G4PionSampler, G4NucleonSampler: change loop variable in ctor from i to j in order to satisfy Windows compiler 11 Nov 2009 Dennis Wright (hadr-casc-V09-02-10) ----------------------------------------------- - G4CascadParticle, G4InuclElementaryParticle: add integer argument to ctor to indicate which generation cascade particle belongs to. Also change G4NucleiModel and G4BertiniNucleiModel to use this. 8 Oct 2009 Dennis Wright (hadr-casc-V09-02-09) ----------------------------------------------- - G4PionSampler: use charge exchange cross section for pi0-p, go back original Bertini pi0-p elastic partial cs. Update pi0 total cross section accordingly. Improve fits to pi-p partial cs and update pi- total cross sections. - G4NucleiModel: update pi- and pi0 total cross sections 24 Sep 2009 Dennis Wright (hadr-casc-V09-02-08) ----------------------------------------------- - add class G4NucleonSampler which replaces old pp, pn, and nn partial and total cross sections also modify other classes which use them - move large arrays which are instantiated at every call of frequently used methods. They are now initialized once in constructors. - G4CascadSpecialFunctions: put copy of total cross section method in G4NucleiModel, also remove unneeded energy scale arrays (now replaced with a new one) - G4CascadeInterface: move instantiation of various collider classes outside of loop, and put on stack instead of heap - G4ElementaryParticleCollider: re-design to use G4NucleonSampler and remove instantiation of large arrays from within loops in code - G4NucleiModel: remove instatiation of large arrays from with loops, add new total cross section sampling, remove use of all but one energy scale 17 Sep 2009 Dennis Wright (hadr-casc-V09-02-07) ----------------------------------------------- - G4PionSampler: remove large static arrays - G4FinalStateSampler: remove static array pointer to G4 particle types - G4ElementaryParticleCollider: clean up 4 Sep 2009 Dennis Wright (hadr-casc-V09-02-06) ---------------------------------------------- - add assignment operator to class G4CollisionOutput 31 Aug 2009 Dennis Wright (hadr-casc-V09-02-05) ----------------------------------------------- - add class G4FinalStateSampler which was accidentally omitted from the previous tag 25 Aug 2009 Dennis Wright (hadr-casc-V09-02-04) ----------------------------------------------- - correct bug in particle ordering in G4PionSampler - clean up dead code in G4NucleiModel and G4ElementaryParticleCollider 20 Aug 2009 Dennis Wright (hadr-casc-V09-02-03) ----------------------------------------------- - create class G4PionSampler: samples partial cross sections, multiplicities and final state particle types required for pi+, pi- and pi0 scattering within a nucleus. This class uses re-evaluated pion partial cross sections and includes production of strange particle pairs. - G4CascadeSigmaPlusNChannel: correct sigma plus cross sections - G4CascadSpecialFunctions: move pion, kaon, hyperon total cross sections to this class - G4ElementaryParticleCollider: re-write to use G4PionSampler class for cross sections and multiplicities, remove method reChargering (now redundant) 15 Apr 2009 Dennis Wright (hadr-casc-V09-02-02) ----------------------------------------------- - previous tag no longer used. Bring hadr-casc-V09-02-00 back to HEAD and re-tag 21 Feb 2009 Dennis Wright (hadr-casc-V09-02-01) ----------------------------------------------- - add printCrossSection method to G4CascadSpecialFunctions - in GeElementaryParticleCollider, add high energy flag to distinguish "string-like" behavior - G4IntraNucleiCascader.cc - allow secondaries from HE interaction to leave nucleus without interacting - G4NucleiModel - get high_energy_interaction flag value from G4ElementaryParticleCollider 11 Feb 2009 V.Ivanchenko (hadr-casc-V09-02-00) ----------------------------------------------- - set absorption coefficient 1.0 instead of 0.2 inside G4CascadSpecialFunctions (D.Wright) 25 Nov 2008 Dennis Wright (hadr-casc-V09-01-10) ----------------------------------------------- - fix multiplicity sampling in G4ElementaryParticleCollider::generateMultiplicity(). Now partial cross sections are normalized to the total cross section instead of just the sum of 2-body to 6-body final state cross sections. Also fix 2-body cross sections above 7 GeV where they were too small. Fix the same cross sections which appear in G4CascadSpecialFunctions.cc 21 Nov 2008 Dennis Wright (hadr-casc-V09-01-09) ----------------------------------------------- - add some comments to cross section tables in G4CascadSpecialFunctions.cc and G4ElementaryParticleCollider.cc 24 Oct 2008 Dennis Wright (hadr-casc-V09-01-08) ----------------------------------------------- - replace GetAtomicMass() with GetNuclearMass() in cascade/G4InuclEvaporation and evaporation/G4BertiniEvaporation - V. Ivantchenko added name to G4CascadeInterface ("Bertini Cascade") 17 Oct 2008 Dennis Wright (hadr-casc-V09-01-07) ----------------------------------------------- - added Coulomb barrier plus barrier penetration in G4IntraNucleiCascader.cc 27 Sep 2008 Dennis Wright (hadr-casc-V09-01-06) ----------------------------------------------- - Fixed 4.3 compiler warnings for G4InuclElementaryParticle.hh by providing initializers for particle type and mass - Remove unused variables totscm, totlab in G4BigBanger.cc, G4ElementaryParticleCollider.cc, and unused mom1 from G4InuclSpecialFunctions.cc 22 Sep 2008 Gabriele Cosmo (hadr-casc-V09-01-05) ------------------------------------------------ - Introduced simple wrapper class G4CascadeMomentum meant to replace usage of std::vector in the cascade code, to reduce memory allocations. Courtesy of P.Elmer (princeton Univ.). - Modified cascade code to make use of G4CascadeMomentum. 3 Sep 2008 Dennis Wright (hadr-casc-V09-01-04) ----------------------------------------------- - G4ElementaryParticleCollider.cc: in method generateMultiplicity, remove large_cut which increases multiplicity from 3 to 4 abruptly at 4 GeV and above. This caused a sharp drop-off in the single pion spectra from pH reactions. The effect in heavier nuclei is small. 29 Jun 2008 Dennis Wright (hadr-casc-V09-01-03) ----------------------------------------------- - add changes made by M. Paterno, J. Kowalkowski, and M. Fischler (FNAL) to speed up code. All G4Cascade***Channel classes and related code changed. 5 May 2008 Dennis Wright (hadr-casc-V09-01-02) ----------------------------------------------- - retag hadr-casc-V09-csbug as hadr-casc-V09-01-02 30 Apr 2008 Dennis Wright (hadr-casc-V09-csbug) ----------------------------------------------- - fix cross section bug in G4CascadSpecialFunctions that returned low or zero total cross sections for pi-p, pi+n, np, and pi0 interactions 29 Apr 2008 Dennis Wright (hadr-casc-V09-01-01) ----------------------------------------------- - bring tag hadr-casc-V09-01-coula to HEAD, make official tag 22 Apr 2008 Dennis Wright (hadr-casc-V09-01-param) -------------------------------------------------- - changed pp, nn total cross section parameterization in G4CascadSpecialFunctions to more closely reflect the PDG values (old one was off by as much as a factor of 3. 3 Apr 2008 Dennis Wright (hadr-casc-V09-01-coula) ------------------------------------------------- - removed Coulomb barrier from G4IntraNucleiCascader.cc (causes unphysical spike) 3 Apr 2008 Dennis Wright (hadr-casc-V09-01-coul) ------------------------------------------------ - Added Coulomb barrier in G4EquilibriumEvaporator.cc, G4IntraNucleiCascader.cc 17 Nov 2007 Dennis Wright (hadr-casc-V09-00-02) ----------------------------------------------- - Fix angular distribution for nucleon-nucleon elastic scattering above 2.8 GeV, by modifying G4ElementaryParticleCollider::getElasticCase 25 May 2007 Dennis Wright for Aatos Heikkinen (hadr-casc-V08-03-00) ------------------------------------------------------------------- - implemented interfaces for pre-equilibrium and equilbrium evaporation models 04 May 2007 Aatos Heikkinen (hadr-casc-V08-02-00) ------------------------------------------------- - Added protection in G4ElementaryParticleCollider against negative value to sqrt(). 08 May 2006 Dennis Wright (hadr-casc-V08-00-00) ----------------------------------------------- - cascade: remove G4BERTINI_KAON conditional assembly flags. Files affected: G4ElementaryParticleCollider.hh, cc G4InuclElementaryParticle.hh G4NucleiModel.hh, cc G4CascadeInterface.cc G4IntraNucleiCascader.cc - cascade (Pekka Kaitaniemi): G4ElasticCascadeInterface: derive from G4VIntraNuclearTransportModel instead of G4HadronElastic. Check for case when no elastic scattering occurs. If so, return original bullet and target. 24 Nov 2005 Dennis Wright (hadr-casc-V07-01-00) ---------------------------------------------- - cascade (bertini-V07-01-00 by Aatos Heikkinen) elastic scattering interface added: G4ElasticCascadeInterface.hh, .cc added G4CascadeInterface.hh modified