Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/cascade/cascade/include/G4ElementaryParticleCollider.hh

    r1196 r1315  
    2323// * acceptance of all terms of the Geant4 Software license.          *
    2424// ********************************************************************
     25// $Id: G4ElementaryParticleCollider.hh,v 1.31 2010/05/21 17:56:34 mkelsey Exp $
     26// Geant4 tag: $Name: geant4-09-04-beta-cand-01 $
    2527//
     28// 20100114  M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
     29// 20100315  M. Kelsey -- Remove "using" directive and unnecessary #includes.
     30// 20100407  M. Kelsey -- Eliminate return-by-value std::vector<> by creating
     31//              three data buffers for particles, momenta, and particle types.
     32//              The following functions now return void and are non-const:
     33//                ::generateSCMfinalState()
     34//                ::generateMomModules() (also remove input vector)
     35//                ::generateStrangeChannelPartTypes()
     36//                ::generateSCMpionAbsorption()
     37// 20100413  M. Kelsey -- Pass G4CollisionOutput by ref to ::collide(); merge
     38//              public vs. private ::collide() functions.
     39// 20100511  M. Kelsey -- Remove G4PionSampler and G4NucleonSampler.  Expand
     40//              particle-types selector to all modes, not just strangeness.
     41// 20100517  M. Kelsey -- Inherit from common base class, make arrays static
     42
    2643#ifndef G4ELEMENTARY_PARTICLE_COLLIDER_HH
    2744#define G4ELEMENTARY_PARTICLE_COLLIDER_HH
    2845
    29 #include "G4Collider.hh"
     46#include "G4VCascadeCollider.hh"
    3047#include "G4InuclElementaryParticle.hh"
    31 #include "G4InuclSpecialFunctions.hh"
    32 #include "G4CascadSpecialFunctions.hh"
    33 #include "G4LorentzConvertor.hh"
    34 #include "G4NucleonSampler.hh"
    35 #include "G4PionSampler.hh"
     48#include "G4LorentzVector.hh"
     49#include <vector>
    3650
    37  
    38 using namespace G4InuclSpecialFunctions;
    39 using namespace G4CascadSpecialFunctions;
     51class G4LorentzConvertor;
     52class G4CollisionOutput;
    4053
    4154
    42 class G4ElementaryParticleCollider {
    43 
     55class G4ElementaryParticleCollider : public G4VCascadeCollider {
    4456public:
    45 
    4657  G4ElementaryParticleCollider();
    47 
    48   G4CollisionOutput collide(G4InuclParticle* bullet,
    49                             G4InuclParticle* target);
     58  virtual ~G4ElementaryParticleCollider() {};
     59 
     60  void collide(G4InuclParticle* bullet, G4InuclParticle* target,
     61               G4CollisionOutput& output);
    5062
    5163private:
    52 
    53   G4int verboseLevel;
    54 
    5564  void initializeArrays();
    5665
    5766  G4int generateMultiplicity(G4int is, G4double ekin) const;
    5867
    59   void collide(G4InuclElementaryParticle* bullet,
    60                G4InuclElementaryParticle* target,
    61                G4CollisionOutput& output);
     68  void generateOutgoingPartTypes(G4int is, G4int mult, G4double ekin);
    6269
    63      
    64   std::vector<G4InuclElementaryParticle>
    65   generateSCMfinalState(G4double ekin, G4double etot_scm, G4double pscm,             
    66                         G4InuclElementaryParticle* particle1,
    67                         G4InuclElementaryParticle* particle2,
    68                         G4LorentzConvertor* toSCM) const;
     70  void generateSCMfinalState(G4double ekin, G4double etot_scm, G4double pscm,
     71                             G4InuclElementaryParticle* particle1,
     72                             G4InuclElementaryParticle* particle2,
     73                             G4LorentzConvertor* toSCM);
     74
     75  void generateSCMpionAbsorption(G4double etot_scm,
     76                                 G4InuclElementaryParticle* particle1,
     77                                 G4InuclElementaryParticle* particle2);
     78
     79  void generateMomModules(G4int mult, G4int is, G4double ekin,
     80                          G4double etot_cm);
     81
     82  // Samples the CM momentum for elastic and charge exchange scattering
     83  //
     84  G4LorentzVector
     85  sampleCMmomentumFor2to2(G4int is, G4int kw, G4double ekin,
     86                          G4double pscm) const;
    6987
    7088
    71   std::vector<G4double>
    72   generateMomModules(const std::vector<G4int>& kinds, G4int mult,
    73                      G4int is, G4double ekin, G4double etot_cm) const;
     89  // Samples cos(theta) in the CM for elastic and charge exchange scattering
     90  //
     91  G4double sampleCMcosFor2to2(G4double pscm, G4double pFrac,
     92                              G4double pA, G4double pC, G4double pCos) const;
    7493
    7594
    76   G4CascadeMomentum
    77   particleSCMmomentumFor2to2(G4int is, G4int kw, G4double ekin,
    78                              G4double pscm) const;
    79 
    80 
    81   G4int getElasticCase(G4int is, G4int kw, G4double ekin) const;
    82 
    83 
    84   std::vector<G4int>
    85   generateStrangeChannelPartTypes(G4int is, G4int mult,
    86                                   G4double ekin) const;
    87 
    88 
    89   G4double
    90   getMomModuleFor2toMany(G4int is, G4int mult, G4int knd,
    91                          G4double ekin) const;
     95  G4double getMomModuleFor2toMany(G4int is, G4int mult, G4int knd,
     96                                  G4double ekin) const;
    9297
    9398
    9499  G4bool satisfyTriangle(const std::vector<G4double>& modules) const;
    95100       
    96   G4CascadeMomentum
     101  G4LorentzVector
    97102  particleSCMmomentumFor2to3(G4int is, G4int knd, G4double ekin,
    98103                             G4double pmod) const;
    99104
    100 
    101   std::pair<G4double, G4double>
    102   adjustIntervalForElastic(G4double ekin, G4double ak, G4double ae,
    103                            G4int k, G4int l, const std::vector<G4double>& ssv,
    104                            G4double st) const;
    105  
    106   std::vector<G4InuclElementaryParticle>
    107   generateSCMpionAbsorption(G4double etot_scm,
    108                             G4InuclElementaryParticle* particle1,
    109                             G4InuclElementaryParticle* particle2) const;
    110 
    111   G4NucleonSampler nucSampler;
    112   G4PionSampler piSampler;
     105  // Internal buffers for lists of secondaries
     106  std::vector<G4InuclElementaryParticle> particles;
     107  std::vector<G4double> modules;
     108  std::vector<G4int> particle_kinds;
    113109
    114110  // Parameter arrays
    115 
    116   G4double rmn[14][10][2];   
    117   G4double ang[4][4][13];
    118   G4double abn[4][4][4];
    119 
     111  static const G4double rmn[14][10][2];   
     112  static const G4double abn[4][4][4];
    120113};
    121114
    122 #endif // G4ELEMENTARY_PARTICLE_COLLIDER_HH
     115#endif  /* G4ELEMENTARY_PARTICLE_COLLIDER_HH */
    123116
    124117
Note: See TracChangeset for help on using the changeset viewer.