G4DNAMolecularDecay.hh

Go to the documentation of this file.
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 // $Id: G4DNAMolecularDecay.hh 65022 2012-11-12 16:43:12Z gcosmo $
00027 //
00028 // Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr) 
00029 //
00030 // WARNING : This class is released as a prototype.
00031 // It might strongly evolve or even disapear in the next releases.
00032 //
00033 // History:
00034 // -----------
00035 // 10 Oct 2011 M.Karamitros created
00036 //
00037 // -------------------------------------------------------------------
00038 
00039 #ifndef G4MOLECULARDECAYPROCESS_HH
00040 #define G4MOLECULARDECAYPROCESS_HH
00041 
00042 #include "G4VITRestProcess.hh"
00043 #include <map>
00044 
00045 class G4ParticleChange;
00046 class G4VMolecularDecayDisplacer;
00047 class G4MoleculeDefinition;
00048 
00056 class G4DNAMolecularDecay: public G4VITRestProcess
00057 {
00058 public:
00059     G4DNAMolecularDecay(const G4String& processName = "DNAMolecularDecay",
00060                             G4ProcessType type = fDecay);
00061 
00062     virtual ~G4DNAMolecularDecay();
00063 
00064     G4IT_ADD_CLONE(G4VITProcess, G4DNAMolecularDecay)
00065 
00066     virtual G4bool IsApplicable(const G4ParticleDefinition&);
00067 
00068     inline G4double AtRestGetPhysicalInteractionLength(
00069         const G4Track& track,
00070         G4ForceCondition* condition
00071         );
00072     inline G4VParticleChange* AtRestDoIt(
00073         const G4Track& track,
00074         const G4Step& step
00075         );
00076 
00077     inline void SetVerbose(G4int);
00078 
00079     //__________________________________________________________________
00080     void SetDecayDisplacer(const G4ParticleDefinition*, G4VMolecularDecayDisplacer*);
00081     G4VMolecularDecayDisplacer* GetDecayDisplacer(const G4ParticleDefinition*);
00082 
00083 protected:
00084     //__________________________________________________________________
00085     // Make the decay
00086     virtual G4VParticleChange* DecayIt(const G4Track& ,const G4Step&);
00087     virtual G4double GetMeanLifeTime(const G4Track&,G4ForceCondition*);
00088 
00089 private:
00090     G4DNAMolecularDecay();
00091     G4DNAMolecularDecay(const G4DNAMolecularDecay &right);
00092     G4DNAMolecularDecay & operator=(const G4DNAMolecularDecay &right);
00093 
00094 private:
00095     G4bool fDecayAtFixedTime ;
00096 
00097     typedef std::map<const G4ParticleDefinition*, G4VMolecularDecayDisplacer*>  DecayDisplacementMap;
00098     DecayDisplacementMap fDecayDisplacementMap;
00099 
00100     G4int fVerbose;
00101 };
00102 
00103 inline void G4DNAMolecularDecay::SetVerbose(G4int verbose)
00104 {
00105     fVerbose = verbose ;
00106 }
00107 
00108 inline G4double G4DNAMolecularDecay::AtRestGetPhysicalInteractionLength(
00109     const G4Track& track,
00110     G4ForceCondition* condition)
00111 {
00112     if(fDecayAtFixedTime)
00113     {
00114         return GetMeanLifeTime(track, condition);
00115     }
00116 
00117     return G4VITRestProcess::AtRestGetPhysicalInteractionLength(track, condition);
00118 }
00119 
00120 inline G4VParticleChange* G4DNAMolecularDecay::AtRestDoIt(
00121     const G4Track& track,
00122     const G4Step& step
00123     )
00124 {
00125     ClearNumberOfInteractionLengthLeft();
00126     ClearInteractionTimeLeft();
00127     return DecayIt(track, step);
00128 }
00129 
00130 
00131 #endif /* G4MOLECULARDECAYPROCESS_HH */

Generated on Mon May 27 17:48:03 2013 for Geant4 by  doxygen 1.4.7