G4MuonRadiativeDecayChannelWithSpin.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 // ------------------------------------------------------------
00027 //      GEANT 4 class header file
00028 //
00029 //      History:
00030 //               25 July 2007   P.Gumplinger - Triumf
00031 //               10 August 2011 D. Mingming - Center for HEP, Tsinghua Univ.
00032 //
00033 //               Samples Radiative Muon Decay
00034 //               References:
00035 //                    TRIUMF/TWIST Technote TN-55:
00036 //                    "Radiative muon decay" by P. Depommier and A. Vacheret
00037 //                    ------------------------------------------------------
00038 //                    Yoshitaka Kuno and Yasuhiro Okada
00039 //                    "Muon Decays and Physics Beyond the Standard Model"
00040 //                    Rev. Mod. Phys. 73, 151 (2001)
00041 //
00042 // ------------------------------------------------------------
00043 //
00044 //
00045 //
00046 //
00047 
00048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00050 
00051 #ifndef G4MuonRadiativeDecayChannelWithSpin_h
00052 #define G4MuonRadiativeDecayChannelWithSpin_h 1
00053 
00054 #include <CLHEP/Units/PhysicalConstants.h>
00055 
00056 #include "globals.hh"
00057 #include "Randomize.hh"
00058 #include "G4ThreeVector.hh"
00059 #include "G4VDecayChannel.hh"
00060 
00061 class G4MuonRadiativeDecayChannelWithSpin : public G4VDecayChannel
00062 {
00063   // Class Decription
00064   // This class describes radiative muon decay kinemtics, but
00065   // gives incorrect energy spectrum for neutrinos
00066 
00067   public:  // With Description
00068 
00069     //Constructors
00070     G4MuonRadiativeDecayChannelWithSpin(const G4String& theParentName,
00071                                         G4double        theBR);
00072     //  Destructor
00073     virtual ~G4MuonRadiativeDecayChannelWithSpin();
00074 
00075   protected:
00076     // Copy constructor and assignment operator
00077     G4MuonRadiativeDecayChannelWithSpin(const G4MuonRadiativeDecayChannelWithSpin &);
00078     G4MuonRadiativeDecayChannelWithSpin & operator=(const G4MuonRadiativeDecayChannelWithSpin &);
00079   
00080   private:
00081     G4MuonRadiativeDecayChannelWithSpin();
00082 
00083   public:  // With Description
00084 
00085     virtual G4DecayProducts *DecayIt(G4double);
00086 
00087     void SetPolarization(G4ThreeVector);
00088     const G4ThreeVector& GetPolarization() const;
00089 
00090   private:
00091 
00092     G4ThreeVector parent_polarization;
00093 
00094     G4double fron(G4double Pmu, G4double x, G4double y,
00095                   G4double cthetaE, G4double cthetaG, G4double cthetaEG);
00096 
00097     // rn3dim generates random vectors, uniformly distributed over the surface 
00098     // of a sphere of given radius.
00099     // See http://wwwinfo.cern.ch/asdoc/shortwrupsdir/v131/top.html
00100 
00101     void rn3dim(G4double& x, G4double& y, G4double& z, G4double xlong);
00102 
00103     G4double atan4(G4double x, G4double y);
00104 
00105 };
00106 
00107 inline void G4MuonRadiativeDecayChannelWithSpin::
00108                                         SetPolarization(G4ThreeVector polar)
00109 {
00110   parent_polarization = polar;
00111 }
00112 
00113 inline const G4ThreeVector& G4MuonRadiativeDecayChannelWithSpin::
00114                                         GetPolarization() const
00115 {
00116   return parent_polarization;
00117 }
00118 
00119 inline void G4MuonRadiativeDecayChannelWithSpin::rn3dim(G4double& x,
00120                                                         G4double& y,
00121                                                         G4double& z,
00122                                                         G4double xlong)
00123 {
00124       G4double a = 0.; G4double b = 0.; G4double c = 0.; G4double r = 0.;
00125 
00126       do {
00127          a = G4UniformRand() - 0.5;
00128          b = G4UniformRand() - 0.5;
00129          c = G4UniformRand() - 0.5;
00130          r = a*a + b*b + c*c;
00131       } while (r > 0.25);
00132 
00133       G4double rinv = xlong/(std::sqrt(r)); 
00134       x = a * rinv;
00135       y = b * rinv;
00136       z = c * rinv;
00137 
00138       return;
00139 }
00140 
00141 inline G4double G4MuonRadiativeDecayChannelWithSpin::atan4(G4double x,
00142                                                            G4double y)
00143 {
00144       G4double phi = 0.;
00145 
00146       if        (x==0. && y>0.){
00147          phi = 0.5*CLHEP::pi;
00148       } else if (x==0. && y<0.){
00149          phi = 1.5*CLHEP::pi;
00150       } else if (y==0. && x>0.){
00151          phi = 0.;
00152       } else if (y==0. && x<0.){
00153          phi = CLHEP::pi;
00154       } else if (x>0.         ){
00155          phi = std::atan(y/x);
00156       } else if (x<0.         ){
00157          phi = std::atan(y/x) + CLHEP::pi;
00158       }
00159 
00160       return phi;
00161 }
00162 
00163 #endif

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