/////////////////////////////////////////////////////////////////////////////// // // The Modular physics list for RAT. Can use commands like // /rat/physics_list/SelectEMPhysicsList penelope to set different // physics lists - see the PhysicsListMessenger. // // Author: p.jones22@physics.ox.ac.uk // // REVISION HISTORY: // 25/02/2011 : P G Jones - New File, based on GLG4PhysicsList and // the modular examples in geant. // 31/08/2011 : P G Jones - Major update, can select hadronic physics // as well. Also better naming. // 10/09/2012 : P G Jones - Cerenkov process selection, default or // SNOMAN. // 07/05/2013 : C R Jones - Major update to the physics list commands // there are additional commands to omit muonic, hadronic, boundary, attenuation // cerenkov and remove all physics from the hadronic physics list (only) // (email: christopher.jones@physics.ox.ac.uk). // /////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_PhysicsList_hh__ #define __RAT_PhysicsList_hh__ #include #include class G4VPhysicsConstructor; namespace RAT { class PhysicsListMessenger; class PhysicsList: public G4VModularPhysicsList { public: // Construct the physics list, creates the messenger PhysicsList(); // Destroy the physics list and messenger ~PhysicsList(); // Register the particles that will be simulated void ConstructParticle(); // Construct the processes that can affect the particles void ConstructProcess(); // Add decay processes, i.e. allow particles (not neutron + something states) to decay void AddDecay(); // Add attenuation and Cerenkov processes, RAT has specialist versions void AddAttenuationAndCerenkov(); // Add Electro nuclear interactions void AddENuclear(); // Add Parameterised physics, e.g. the specialist PMT simulation void AddParameterisation(); // Set the range cuts (stop wasting CPU on particles that do nothing) void SetCuts(); // Select which EM Physics list to use // // name: name of the em physics list void SelectEMPhysicsList( const G4String& name ); // Select which Hadronic Physics list to use // // name: name of the hadronic physics list void SelectHadronicPhysicsList( const G4String& name ); // Select which Cerenkov process to use // // name: name of the Cerenkov process (SNOMAN or RAT) void SelectCerenkovProcess( const G4String& name ); // Select which OpRayleigh process to use // // name: name of the OpRayleigh process (SNOMAN or RAT) void SelectOpRayleighProcess( const G4String& name ); // Set a cut by name // // cutName: e.g. gamma // value: value of the cut in G4 units void SetCut( const G4String& cutName, const double value ); // Set the verbosity level void SetVerbosity( const int verbosity ); // Omits processes by name // // processName: e.g. absorption void OmitProcesses( G4String processName, bool omit=true ); // Check the hadronic simulation flag // // returns true if hadronic simulation is omitted. static bool OmitHadronic() { return fsOmitHadronic; } // Check the muonic simulation flag // // returns true if muonic simulation is omitted. static bool OmitMuonic() { return fsOmitMuonic; } private: G4String fEMName; // Name of the em physics list G4String fHadronicName; // Name of the hadronic physics list G4String fCerenkovName; // Name of the Cerenkov process G4String fOpRayleighName; // Name of the OpRayleigh process double fTimeCut; // Maximum global time cut double fGammaCut; // Cut for gammas double fElectronCut; // Cut for electrons double fPositronCut; // Cut for positrons double fProtonCut; // Cut for protons double fMuonCut; // Cut for muons G4VPhysicsConstructor* fEMPhysicsList; // The EM Physics List G4VPhysicsConstructor* fHadronicPhysicsList; // The Hadronic Physics List PhysicsListMessenger* fPhyListMessenger; // The messenger static bool fsOmitHadronic; // Omit hadronic all processes? Quicker to run... static bool fsOmitMuonic; // Omit muonic processes? Quicker to run... bool fOmitAll; // Omit the entire physics list (for reprocessing NOT simulation) bool fOmitOpticalAttenuation; // Omit Optical Attenuation bool fOmitOpticalAbsorption; // Omit absorption only bool fOmitOpticalRayleigh; // Omit Rayleigh scattering only bool fOmitOpticalMie; // Omit Mie scattering only bool fOmitHadronicListOnly; // Omit processes contained witin the Hadronic Physics List bool fOmitCerenkov; // Omit Cerenkov processes bool fOmitOpticalBoundaryEffects; // Omits Optical Boundary effects (i.e. reflection/refraction) }; inline void PhysicsList::SelectCerenkovProcess( const G4String& name ) { fCerenkovName = name; } inline void PhysicsList::SelectOpRayleighProcess( const G4String& name ) { fOpRayleighName = name; } } // namespace RAT #endif // __RAT_PhysicsList__