Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -23,33 +23,25 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History:
|
||||
// 25 July 2007 P.Gumplinger - Triumf
|
||||
// 10 August 2011 D. Mingming - Center for HEP, Tsinghua Univ.
|
||||
//
|
||||
// Samples Radiative Muon Decay
|
||||
// References:
|
||||
// TRIUMF/TWIST Technote TN-55:
|
||||
// "Radiative muon decay" by P. Depommier and A. Vacheret
|
||||
// ------------------------------------------------------
|
||||
// Yoshitaka Kuno and Yasuhiro Okada
|
||||
// "Muon Decays and Physics Beyond the Standard Model"
|
||||
// Rev. Mod. Phys. 73, 151 (2001)
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// G4MuonRadiativeDecayChannelWithSpin
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This class describes radiative muon decay kinematics, but
|
||||
// gives incorrect energy spectrum for neutrinos.
|
||||
// Samples Radiative Muon Decay.
|
||||
// References:
|
||||
// - TRIUMF/TWIST Technote TN-55:
|
||||
// "Radiative muon decay" by P. Depommier and A. Vacheret
|
||||
// - Yoshitaka Kuno and Yasuhiro Okada
|
||||
// "Muon Decays and Physics Beyond the Standard Model"
|
||||
// Rev. Mod. Phys. 73, 151 (2001)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4MuonRadiativeDecayChannelWithSpin_h
|
||||
#define G4MuonRadiativeDecayChannelWithSpin_h 1
|
||||
// Author: P.Gumplinger - Triumf, 25 July 2007
|
||||
// Revision: D. Mingming - Center for HEP, Tsinghua Univ., 10 August 2011
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4MuonRadiativeDecayChannelWithSpin_hh
|
||||
#define G4MuonRadiativeDecayChannelWithSpin_hh 1
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
@@ -60,87 +52,81 @@
|
||||
|
||||
class G4MuonRadiativeDecayChannelWithSpin : public G4VDecayChannel
|
||||
{
|
||||
// Class Decription
|
||||
// This class describes radiative muon decay kinemtics, but
|
||||
// gives incorrect energy spectrum for neutrinos
|
||||
public:
|
||||
|
||||
public: // With Description
|
||||
|
||||
//Constructors
|
||||
G4MuonRadiativeDecayChannelWithSpin(const G4String& theParentName,
|
||||
G4double theBR);
|
||||
// Destructor
|
||||
G4double theBR);
|
||||
virtual ~G4MuonRadiativeDecayChannelWithSpin();
|
||||
|
||||
virtual G4DecayProducts* DecayIt(G4double);
|
||||
|
||||
protected:
|
||||
// Copy constructor and assignment operator
|
||||
G4MuonRadiativeDecayChannelWithSpin(const G4MuonRadiativeDecayChannelWithSpin &);
|
||||
G4MuonRadiativeDecayChannelWithSpin & operator=(const G4MuonRadiativeDecayChannelWithSpin &);
|
||||
|
||||
G4MuonRadiativeDecayChannelWithSpin(const G4MuonRadiativeDecayChannelWithSpin&);
|
||||
G4MuonRadiativeDecayChannelWithSpin& operator=(const G4MuonRadiativeDecayChannelWithSpin&);
|
||||
// Copy constructor and assignment operator
|
||||
|
||||
private:
|
||||
|
||||
G4MuonRadiativeDecayChannelWithSpin();
|
||||
|
||||
public: // With Description
|
||||
|
||||
virtual G4DecayProducts *DecayIt(G4double);
|
||||
|
||||
private:
|
||||
|
||||
G4double fron(G4double Pmu, G4double x, G4double y,
|
||||
G4double cthetaE, G4double cthetaG, G4double cthetaEG);
|
||||
|
||||
// rn3dim generates random vectors, uniformly distributed over the surface
|
||||
// of a sphere of given radius.
|
||||
// See http://wwwinfo.cern.ch/asdoc/shortwrupsdir/v131/top.html
|
||||
|
||||
void rn3dim(G4double& x, G4double& y, G4double& z, G4double xlong);
|
||||
// Generates random vectors, uniformly distributed over the surface
|
||||
// of a sphere of given radius
|
||||
|
||||
G4double atan4(G4double x, G4double y);
|
||||
|
||||
};
|
||||
|
||||
// ------------------------
|
||||
// Inline methods
|
||||
// ------------------------
|
||||
|
||||
inline void G4MuonRadiativeDecayChannelWithSpin::rn3dim(G4double& x,
|
||||
G4double& y,
|
||||
G4double& z,
|
||||
G4double xlong)
|
||||
{
|
||||
G4double a = 0.; G4double b = 0.; G4double c = 0.; G4double r = 0.;
|
||||
G4double a = 0.; G4double b = 0.; G4double c = 0.; G4double r = 0.;
|
||||
|
||||
do {
|
||||
a = G4UniformRand() - 0.5;
|
||||
b = G4UniformRand() - 0.5;
|
||||
c = G4UniformRand() - 0.5;
|
||||
r = a*a + b*b + c*c;
|
||||
} while (r > 0.25);// Loop checking, 09.08.2015, K.Kurashige
|
||||
do
|
||||
{
|
||||
a = G4UniformRand() - 0.5;
|
||||
b = G4UniformRand() - 0.5;
|
||||
c = G4UniformRand() - 0.5;
|
||||
r = a*a + b*b + c*c;
|
||||
} while (r > 0.25); // Loop checking, 09.08.2015, K.Kurashige
|
||||
|
||||
G4double rinv = xlong/(std::sqrt(r));
|
||||
x = a * rinv;
|
||||
y = b * rinv;
|
||||
z = c * rinv;
|
||||
G4double rinv = xlong/(std::sqrt(r));
|
||||
x = a * rinv;
|
||||
y = b * rinv;
|
||||
z = c * rinv;
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
inline G4double G4MuonRadiativeDecayChannelWithSpin::atan4(G4double x,
|
||||
G4double y)
|
||||
{
|
||||
G4double phi = 0.;
|
||||
G4double phi = 0.;
|
||||
|
||||
if (x==0. && y>0.){
|
||||
phi = 0.5*CLHEP::pi;
|
||||
} else if (x==0. && y<0.){
|
||||
phi = 1.5*CLHEP::pi;
|
||||
} else if (y==0. && x>0.){
|
||||
phi = 0.;
|
||||
} else if (y==0. && x<0.){
|
||||
phi = CLHEP::pi;
|
||||
} else if (x>0. ){
|
||||
phi = std::atan(y/x);
|
||||
} else if (x<0. ){
|
||||
phi = std::atan(y/x) + CLHEP::pi;
|
||||
}
|
||||
if (x==0. && y>0.){
|
||||
phi = 0.5*CLHEP::pi;
|
||||
} else if (x==0. && y<0.){
|
||||
phi = 1.5*CLHEP::pi;
|
||||
} else if (y==0. && x>0.){
|
||||
phi = 0.;
|
||||
} else if (y==0. && x<0.){
|
||||
phi = CLHEP::pi;
|
||||
} else if (x>0. ){
|
||||
phi = std::atan(y/x);
|
||||
} else if (x<0. ){
|
||||
phi = std::atan(y/x) + CLHEP::pi;
|
||||
}
|
||||
|
||||
return phi;
|
||||
return phi;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user