Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:00

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 #ifndef G4CASCADE_COLLIDER_BASE_HH
0027 #define G4CASCADE_COLLIDER_BASE_HH
0028 //
0029 // 20100714  M. Kelsey -- Move functionality from G4VCascadeCollider, and
0030 //      provide conservation-checking here, with wrapper function
0031 //      and control flag.
0032 // 20100720  M. Kelsey -- Change G4CascadeCheckBalance to pointer member
0033 // 20100925  M. Kelsey -- Add explosion(A,Z,Eex) and explosion(G4Fragment)
0034 //      interfaces
0035 // 20110225  M. Kelsey -- Add setVerboseLevel(), calls through to members
0036 // 20110304  M. Kelsey -- Add dummy rescatter() interface here, to enforce
0037 //      consistency in subclass colliders.
0038 // 20110321  M. Kelsey -- Hide names of arguments to rescatter(), to avoid
0039 //      compiler warnings on some GCC versions.
0040 // 20130620  Address Coverity complaint about missing copy actions
0041 // 20130621  Move doConservationChecks to G4CascadeParameters; change
0042 //      explosion to use reference, add validateOutput() w/G4Fragment
0043 // 20130622  Move fragment-handling functions to G4CascadeDeexciteBase
0044 // 20140930  Change name from "const char*" to "const G4String"
0045 
0046 #include "G4VCascadeCollider.hh"
0047 
0048 #include "globals.hh"
0049 #include "G4InteractionCase.hh"
0050 #include <vector>
0051 
0052 class G4InuclElementaryParticle;
0053 class G4InuclNuclei;
0054 class G4InuclParticle;
0055 class G4CollisionOutput;
0056 class G4CascadeCheckBalance;
0057 class G4Fragment;
0058 class G4KineticTrackVector;
0059 class G4V3DNucleus;
0060 
0061 
0062 class G4CascadeColliderBase : public G4VCascadeCollider {
0063 public:
0064   G4CascadeColliderBase(const G4String& name, G4int verbose=0);
0065   virtual ~G4CascadeColliderBase();
0066 
0067   // For use with top-level Propagate to preload a set of secondaries
0068   virtual void rescatter(G4InuclParticle* /*bullet*/,
0069              G4KineticTrackVector* /*theSecondaries*/,
0070              G4V3DNucleus* /*theNucleus*/,
0071              G4CollisionOutput& /*globalOutput*/) { ; }
0072 
0073   virtual void setVerboseLevel(G4int verbose=0);
0074 
0075 protected:
0076   G4InteractionCase interCase;      // Determine bullet vs. target
0077 
0078   // Decide whether to use G4ElementaryParticleCollider or not
0079   virtual G4bool useEPCollider(G4InuclParticle* bullet, 
0080                    G4InuclParticle* target) const;
0081 
0082   // Decide whether to use G4IntraNuclearCascader or not
0083   virtual G4bool inelasticInteractionPossible(G4InuclParticle* bullet,
0084                           G4InuclParticle* target, 
0085                           G4double ekin) const;
0086 
0087   // ==> Provide same interfaces as G4CascadeCheckBalance itself
0088   G4CascadeCheckBalance* balance;
0089 
0090   // Validate output for energy, momentum conservation, etc.
0091   virtual G4bool validateOutput(G4InuclParticle* bullet,
0092                 G4InuclParticle* target,
0093                 G4CollisionOutput& output);
0094 
0095   // This is for use after de-excitation
0096   virtual G4bool validateOutput(const G4Fragment& fragment,
0097                 G4CollisionOutput& output);
0098 
0099   // This is for use with G4EPCollider
0100   virtual G4bool validateOutput(G4InuclParticle* bullet,
0101                 G4InuclParticle* target,
0102         const std::vector<G4InuclElementaryParticle>& particles);
0103 
0104 private:
0105   // Copying of modules is forbidden
0106   G4CascadeColliderBase(const G4CascadeColliderBase&);
0107   G4CascadeColliderBase& operator=(const G4CascadeColliderBase&);
0108 };        
0109 
0110 #endif  /* G4CASCADE_COLLIDER_BASE_HH */