Geant4_10
G4MuonRadiativeDecayChannelWithSpin.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // ------------------------------------------------------------
27 // GEANT 4 class header file
28 //
29 // History:
30 // 25 July 2007 P.Gumplinger - Triumf
31 // 10 August 2011 D. Mingming - Center for HEP, Tsinghua Univ.
32 //
33 // Samples Radiative Muon Decay
34 // References:
35 // TRIUMF/TWIST Technote TN-55:
36 // "Radiative muon decay" by P. Depommier and A. Vacheret
37 // ------------------------------------------------------
38 // Yoshitaka Kuno and Yasuhiro Okada
39 // "Muon Decays and Physics Beyond the Standard Model"
40 // Rev. Mod. Phys. 73, 151 (2001)
41 //
42 // ------------------------------------------------------------
43 //
44 //
45 //
46 //
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
50 
51 #ifndef G4MuonRadiativeDecayChannelWithSpin_h
52 #define G4MuonRadiativeDecayChannelWithSpin_h 1
53 
55 
56 #include "globals.hh"
57 #include "Randomize.hh"
58 #include "G4ThreeVector.hh"
59 #include "G4VDecayChannel.hh"
60 
62 {
63  // Class Decription
64  // This class describes radiative muon decay kinemtics, but
65  // gives incorrect energy spectrum for neutrinos
66 
67  public: // With Description
68 
69  //Constructors
70  G4MuonRadiativeDecayChannelWithSpin(const G4String& theParentName,
71  G4double theBR);
72  // Destructor
74 
75  protected:
76  // Copy constructor and assignment operator
79 
80  private:
82 
83  public: // With Description
84 
86 
88  const G4ThreeVector& GetPolarization() const;
89 
90  private:
91 
92  G4ThreeVector parent_polarization;
93 
94  G4double fron(G4double Pmu, G4double x, G4double y,
95  G4double cthetaE, G4double cthetaG, G4double cthetaEG);
96 
97  // rn3dim generates random vectors, uniformly distributed over the surface
98  // of a sphere of given radius.
99  // See http://wwwinfo.cern.ch/asdoc/shortwrupsdir/v131/top.html
100 
101  void rn3dim(G4double& x, G4double& y, G4double& z, G4double xlong);
102 
103  G4double atan4(G4double x, G4double y);
104 
105 };
106 
109 {
110  parent_polarization = polar;
111 }
112 
115 {
116  return parent_polarization;
117 }
118 
119 inline void G4MuonRadiativeDecayChannelWithSpin::rn3dim(G4double& x,
120  G4double& y,
121  G4double& z,
122  G4double xlong)
123 {
124  G4double a = 0.; G4double b = 0.; G4double c = 0.; G4double r = 0.;
125 
126  do {
127  a = G4UniformRand() - 0.5;
128  b = G4UniformRand() - 0.5;
129  c = G4UniformRand() - 0.5;
130  r = a*a + b*b + c*c;
131  } while (r > 0.25);
132 
133  G4double rinv = xlong/(std::sqrt(r));
134  x = a * rinv;
135  y = b * rinv;
136  z = c * rinv;
137 
138  return;
139 }
140 
141 inline G4double G4MuonRadiativeDecayChannelWithSpin::atan4(G4double x,
142  G4double y)
143 {
144  G4double phi = 0.;
145 
146  if (x==0. && y>0.){
147  phi = 0.5*CLHEP::pi;
148  } else if (x==0. && y<0.){
149  phi = 1.5*CLHEP::pi;
150  } else if (y==0. && x>0.){
151  phi = 0.;
152  } else if (y==0. && x<0.){
153  phi = CLHEP::pi;
154  } else if (x>0. ){
155  phi = std::atan(y/x);
156  } else if (x<0. ){
157  phi = std::atan(y/x) + CLHEP::pi;
158  }
159 
160  return phi;
161 }
162 
163 #endif
tuple a
Definition: test.py:11
tuple x
Definition: test.py:50
Double_t y
Definition: plot.C:279
G4MuonRadiativeDecayChannelWithSpin & operator=(const G4MuonRadiativeDecayChannelWithSpin &)
tuple b
Definition: test.py:12
#define G4UniformRand()
Definition: Randomize.hh:87
jump r
Definition: plot.C:36
tuple z
Definition: test.py:28
double G4double
Definition: G4Types.hh:76
tuple c
Definition: test.py:13