00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // File name: G4PiMinusAbsorptionAtRest.hh 00027 // 00028 // Author: Maria Grazia Pia (pia@genova.infn.it) 00029 // 00030 // Creation date: 9 May 1998 00031 // 00032 // ------------------------------------------------------------------- 00033 00034 #ifndef G4PIMINUSABSORPTIONATREST_HH 00035 #define G4PIMINUSABSORPTIONATREST_HH 00036 00037 // Class Description: 00038 // 00039 // Alternative Process for absorption of pi- at rest. 00040 // To be used in your physics list in case you need this physics. 00041 00042 00043 #include "globals.hh" 00044 #include "G4VRestProcess.hh" 00045 #include "G4ParticleTypes.hh" 00046 #include "G4PiMinusStopMaterial.hh" 00047 #include "G4PiMinusStopAbsorption.hh" 00048 #include "G4StopDeexcitation.hh" 00049 #include "G4StopDeexcitationAlgorithm.hh" 00050 #include "G4HadronicProcessType.hh" 00051 00052 class G4DynamicParticle; 00053 00054 class G4PiMinusAbsorptionAtRest : public G4VRestProcess 00055 { 00056 00057 private: 00058 00059 // Hide assignment operator as private 00060 G4PiMinusAbsorptionAtRest& operator=(const G4PiMinusAbsorptionAtRest &right); 00061 00062 // Copy constructor 00063 G4PiMinusAbsorptionAtRest(const G4PiMinusAbsorptionAtRest& ); 00064 00065 public: 00066 00067 // Constructor 00068 G4PiMinusAbsorptionAtRest(const G4String& processName ="PiMinusAbsorptionAtRest", 00069 G4ProcessType aType = fHadronic ); 00070 00071 // Destructor 00072 ~G4PiMinusAbsorptionAtRest(); 00073 00074 G4bool IsApplicable(const G4ParticleDefinition& particle) 00075 { return ( particle == *(G4PionMinus::PionMinus()) ); } 00076 00077 void PreparePhysicsTable(const G4ParticleDefinition&); 00078 00079 void BuildPhysicsTable(const G4ParticleDefinition&); 00080 00081 G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep); 00082 00083 void SetDeexcitationAlgorithm(G4int index); 00084 00085 protected: 00086 00087 // zero mean lifetime 00088 G4double GetMeanLifeTime(const G4Track& aTrack, 00089 G4ForceCondition* ) 00090 { 00091 G4double result = 0; 00092 if(aTrack.GetMaterial()->GetNumberOfElements() == 1) 00093 if(aTrack.GetMaterial()->GetZ()<1.5) result = DBL_MAX; 00094 return result; 00095 } 00096 private: 00097 00098 // G4PiMinusStopAbsorption* _stopAbsorption; 00099 // G4StopDeexcitation* _stopDeexcitation; 00100 G4int _indexDeexcitation; 00101 00102 G4PiMinusStopMaterial* LoadAlgorithm(int Z); 00103 G4StopDeexcitationAlgorithm* LoadNucleusAlgorithm(); 00104 }; 00105 00106 00107 #endif 00108