Files
geant4/source/processes/electromagnetic/standard/include/G4eplusAnnihilation.hh
T
2016-06-09 14:36:02 +02:00

134 lines
4.7 KiB
C++

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4eplusAnnihilation.hh,v 1.18 2005/12/05 16:44:43 maire Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4eplusAnnihilation
//
// Author: Vladimir Ivanchenko on base of Michel Maire code
//
// Creation date: 02.08.2004
//
// Modifications:
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko)
// 15-03-05 Update interface according to changings in G4VEmProcess (V.Ivanchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
// 04-05-05 Make class to be default (V.Ivanchenko)
// 04-12-05 SetProposedKineticEnergy(0.) for annihilated positron (mma)
//
//
// Class Description:
//
// This class manages the process of e+ annihilation into 2 gammas
//
// -------------------------------------------------------------------
//
#ifndef G4eplusAnnihilation_h
#define G4eplusAnnihilation_h 1
#include "G4VEmProcess.hh"
#include "G4Positron.hh"
#include "G4VEmModel.hh"
class G4eplusAnnihilation : public G4VEmProcess
{
public:
G4eplusAnnihilation(const G4String& name = "annihil");
virtual ~G4eplusAnnihilation();
virtual G4bool IsApplicable(const G4ParticleDefinition& p);
virtual G4VParticleChange* AtRestDoIt(
const G4Track& track,
const G4Step& stepData);
G4double AtRestGetPhysicalInteractionLength(
const G4Track& track,
G4ForceCondition* condition
);
// Print out of the class parameters
virtual void PrintInfo();
protected:
virtual void InitialiseProcess(const G4ParticleDefinition*);
std::vector<G4DynamicParticle*>* SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*);
private:
// hide assignment operator
G4eplusAnnihilation & operator=(const G4eplusAnnihilation &right);
G4eplusAnnihilation(const G4eplusAnnihilation&);
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p)
{
return (&p == G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(
const G4Track&, G4ForceCondition* condition)
{
*condition = NotForced;
return 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline std::vector<G4DynamicParticle*>* G4eplusAnnihilation::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp)
{
fParticleChange.SetProposedKineticEnergy(0.);
fParticleChange.ProposeTrackStatus(fStopAndKill);
return model->SampleSecondaries(couple, dp);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif