Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:21:50

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 /*
0027  * =============================================================================
0028  *
0029  *       Filename:  CexmcPhysicsManager.hh
0030  *
0031  *    Description:  interface for external access to physics aspects
0032  *
0033  *        Version:  1.0
0034  *        Created:  27.10.2009 23:10:31
0035  *       Revision:  none
0036  *       Compiler:  gcc
0037  *
0038  *         Author:  Alexey Radkov (), 
0039  *        Company:  PNPI
0040  *
0041  * =============================================================================
0042  */
0043 
0044 #ifndef CEXMC_PHYSICS_MANAGER_HH
0045 #define CEXMC_PHYSICS_MANAGER_HH
0046 
0047 #include <G4Types.hh>
0048 #include <G4ThreeVector.hh>
0049 
0050 class  G4ParticleDefinition;
0051 class  G4Track;
0052 class  G4StepPoint;
0053 class  CexmcProductionModel;
0054 class  CexmcSetup;
0055 class  CexmcPhysicsManagerMessenger;
0056 
0057 
0058 class  CexmcPhysicsManager
0059 {
0060     public:
0061         CexmcPhysicsManager();
0062 
0063         virtual ~CexmcPhysicsManager();
0064 
0065     public:
0066         virtual CexmcProductionModel *  GetProductionModel( void ) = 0;
0067 
0068         virtual G4bool  IsStudiedProcessAllowed( void ) const = 0;
0069 
0070         virtual void    ResampleTrackLengthInTarget( const G4Track *  track,
0071                                     const G4StepPoint *  stepPoint = NULL ) = 0;
0072 
0073         virtual void    SetupConstructionHook( const CexmcSetup *  setup ) = 0;
0074 
0075     public:
0076         G4bool    OnlyBeamParticleCanTriggerStudiedProcess( void ) const;
0077 
0078         void      IncrementNumberOfTriggeredStudiedInteractions( void );
0079 
0080         void      ResetNumberOfTriggeredStudiedInteractions( void );
0081 
0082         G4double  GetProposedMaxIL( void ) const;
0083 
0084         void      SetMaxIL( const G4ThreeVector &  direction );
0085 
0086         void      SetMaxILCorrection( G4double  value );
0087 
0088         void      SetProposedMaxIL( G4double  value );
0089 
0090     protected:
0091         virtual void    CalculateBasicMaxIL(
0092                                         const G4ThreeVector &  direction ) = 0;
0093 
0094     protected:
0095         G4double  basicMaxIL;
0096 
0097         G4double  maxILCorrection;
0098 
0099         G4double  proposedMaxIL;
0100 
0101         G4int     numberOfTriggeredStudiedInteractions;
0102 
0103         G4bool    onlyBeamParticleCanTriggerStudiedProcess;
0104 
0105     private:
0106         CexmcPhysicsManagerMessenger *  messenger;
0107 };
0108 
0109 
0110 inline G4bool  CexmcPhysicsManager::OnlyBeamParticleCanTriggerStudiedProcess(
0111                                                                     void ) const
0112 {
0113     return onlyBeamParticleCanTriggerStudiedProcess;
0114 }
0115 
0116 
0117 inline void  CexmcPhysicsManager::IncrementNumberOfTriggeredStudiedInteractions(
0118                                                                         void )
0119 {
0120     ++numberOfTriggeredStudiedInteractions;
0121 }
0122 
0123 
0124 inline void  CexmcPhysicsManager::ResetNumberOfTriggeredStudiedInteractions(
0125                                                                         void )
0126 {
0127     numberOfTriggeredStudiedInteractions = 0;
0128 }
0129 
0130 
0131 inline G4double  CexmcPhysicsManager::GetProposedMaxIL( void ) const
0132 {
0133     return proposedMaxIL;
0134 }
0135 
0136 
0137 inline void  CexmcPhysicsManager::SetMaxIL( const G4ThreeVector &  direction )
0138 {
0139     CalculateBasicMaxIL( direction );
0140     proposedMaxIL = basicMaxIL + maxILCorrection;
0141 }
0142 
0143 
0144 inline void  CexmcPhysicsManager::SetMaxILCorrection( G4double  value )
0145 {
0146     maxILCorrection = value;
0147     proposedMaxIL = basicMaxIL + maxILCorrection;
0148 }
0149 
0150 
0151 inline void  CexmcPhysicsManager::SetProposedMaxIL( G4double  value )
0152 {
0153     proposedMaxIL = value;
0154 }
0155 
0156 
0157 #endif
0158