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 | // $Id: G4MuonDecayChannel.cc,v 1.17 2006/06/29 19:25:34 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | // |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class header file |
---|
33 | // |
---|
34 | // History: first implementation, based on object model of |
---|
35 | // 30 May 1997 H.Kurashige |
---|
36 | // |
---|
37 | // Fix bug in calcuration of electron energy in DecayIt 28 Feb. 01 H.Kurashige |
---|
38 | //2005 |
---|
39 | // M. Melissas ( melissas AT cppm.in2p3.fr) |
---|
40 | // J. Brunner ( brunner AT cppm.in2p3.fr) |
---|
41 | // Adding V-A fluxes for neutrinos using a new algortithm : |
---|
42 | // ------------------------------------------------------------ |
---|
43 | |
---|
44 | #include "G4ParticleDefinition.hh" |
---|
45 | #include "G4DecayProducts.hh" |
---|
46 | #include "G4VDecayChannel.hh" |
---|
47 | #include "G4MuonDecayChannel.hh" |
---|
48 | #include "Randomize.hh" |
---|
49 | #include "G4LorentzVector.hh" |
---|
50 | #include "G4LorentzRotation.hh" |
---|
51 | #include "G4RotationMatrix.hh" |
---|
52 | |
---|
53 | |
---|
54 | G4MuonDecayChannel::G4MuonDecayChannel(const G4String& theParentName, |
---|
55 | G4double theBR) |
---|
56 | :G4VDecayChannel("Muon Decay",1) |
---|
57 | { |
---|
58 | // set names for daughter particles |
---|
59 | if (theParentName == "mu+") { |
---|
60 | SetBR(theBR); |
---|
61 | SetParent("mu+"); |
---|
62 | SetNumberOfDaughters(3); |
---|
63 | SetDaughter(0, "e+"); |
---|
64 | SetDaughter(1, "nu_e"); |
---|
65 | SetDaughter(2, "anti_nu_mu"); |
---|
66 | } else if (theParentName == "mu-") { |
---|
67 | SetBR(theBR); |
---|
68 | SetParent("mu-"); |
---|
69 | SetNumberOfDaughters(3); |
---|
70 | SetDaughter(0, "e-"); |
---|
71 | SetDaughter(1, "anti_nu_e"); |
---|
72 | SetDaughter(2, "nu_mu"); |
---|
73 | } else { |
---|
74 | #ifdef G4VERBOSE |
---|
75 | if (GetVerboseLevel()>0) { |
---|
76 | G4cout << "G4MuonDecayChannel:: constructor :"; |
---|
77 | G4cout << " parent particle is not muon but "; |
---|
78 | G4cout << theParentName << G4endl; |
---|
79 | } |
---|
80 | #endif |
---|
81 | } |
---|
82 | } |
---|
83 | |
---|
84 | G4MuonDecayChannel::~G4MuonDecayChannel() |
---|
85 | { |
---|
86 | } |
---|
87 | |
---|
88 | G4DecayProducts *G4MuonDecayChannel::DecayIt(G4double) |
---|
89 | { |
---|
90 | // this version neglects muon polarization,and electron mass |
---|
91 | // assumes the pure V-A coupling |
---|
92 | // the Neutrinos are correctly V-A. |
---|
93 | #ifdef G4VERBOSE |
---|
94 | if (GetVerboseLevel()>1) G4cout << "G4MuonDecayChannel::DecayIt "; |
---|
95 | #endif |
---|
96 | |
---|
97 | if (parent == 0) FillParent(); |
---|
98 | if (daughters == 0) FillDaughters(); |
---|
99 | |
---|
100 | // parent mass |
---|
101 | G4double parentmass = parent->GetPDGMass(); |
---|
102 | |
---|
103 | //daughters'mass |
---|
104 | G4double daughtermass[3]; |
---|
105 | G4double sumofdaughtermass = 0.0; |
---|
106 | for (G4int index=0; index<3; index++){ |
---|
107 | daughtermass[index] = daughters[index]->GetPDGMass(); |
---|
108 | sumofdaughtermass += daughtermass[index]; |
---|
109 | } |
---|
110 | |
---|
111 | //create parent G4DynamicParticle at rest |
---|
112 | G4ThreeVector dummy; |
---|
113 | G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0); |
---|
114 | //create G4Decayproducts |
---|
115 | G4DecayProducts *products = new G4DecayProducts(*parentparticle); |
---|
116 | delete parentparticle; |
---|
117 | |
---|
118 | // calculate daughter momentum |
---|
119 | G4double daughtermomentum[3]; |
---|
120 | // calcurate electron energy |
---|
121 | G4double xmax = (1.0+daughtermass[0]*daughtermass[0]/parentmass/parentmass); |
---|
122 | G4double x; |
---|
123 | |
---|
124 | G4double Ee,Ene; |
---|
125 | |
---|
126 | G4double gam; |
---|
127 | G4double EMax=parentmass/2-daughtermass[0]; |
---|
128 | |
---|
129 | |
---|
130 | //Generating Random Energy |
---|
131 | do { |
---|
132 | Ee=G4UniformRand(); |
---|
133 | do{ |
---|
134 | x=xmax*G4UniformRand(); |
---|
135 | gam=G4UniformRand(); |
---|
136 | }while (gam >x*(1.-x)); |
---|
137 | Ene=x; |
---|
138 | } while ( Ene < (1.-Ee)); |
---|
139 | G4double Enm=(2.-Ee-Ene); |
---|
140 | |
---|
141 | |
---|
142 | //initialisation of rotation parameters |
---|
143 | |
---|
144 | G4double costheta,sintheta,rphi,rtheta,rpsi; |
---|
145 | costheta= 1.-2./Ee-2./Ene+2./Ene/Ee; |
---|
146 | sintheta=std::sqrt(1.-costheta*costheta); |
---|
147 | |
---|
148 | |
---|
149 | rphi=twopi*G4UniformRand()*rad; |
---|
150 | rtheta=(std::acos(2.*G4UniformRand()-1.)); |
---|
151 | rpsi=twopi*G4UniformRand()*rad; |
---|
152 | |
---|
153 | G4RotationMatrix rot; |
---|
154 | rot.set(rphi,rtheta,rpsi); |
---|
155 | |
---|
156 | //electron 0 |
---|
157 | daughtermomentum[0]=std::sqrt(Ee*Ee*EMax*EMax+2.0*Ee*EMax * daughtermass[0]); |
---|
158 | G4ThreeVector direction0(0.0,0.0,1.0); |
---|
159 | |
---|
160 | direction0 *= rot; |
---|
161 | |
---|
162 | G4DynamicParticle * daughterparticle = new G4DynamicParticle ( daughters[0], direction0 * daughtermomentum[0]); |
---|
163 | |
---|
164 | products->PushProducts(daughterparticle); |
---|
165 | |
---|
166 | //electronic neutrino 1 |
---|
167 | |
---|
168 | daughtermomentum[1]=std::sqrt(Ene*Ene*EMax*EMax+2.0*Ene*EMax * daughtermass[1]); |
---|
169 | G4ThreeVector direction1(sintheta,0.0,costheta); |
---|
170 | |
---|
171 | direction1 *= rot; |
---|
172 | |
---|
173 | G4DynamicParticle * daughterparticle1 = new G4DynamicParticle ( daughters[1], direction1 * daughtermomentum[1]); |
---|
174 | products->PushProducts(daughterparticle1); |
---|
175 | |
---|
176 | //muonnic neutrino 2 |
---|
177 | |
---|
178 | daughtermomentum[2]=std::sqrt(Enm*Enm*EMax*EMax +2.0*Enm*EMax*daughtermass[2]); |
---|
179 | G4ThreeVector direction2(-Ene/Enm*sintheta,0,-Ee/Enm-Ene/Enm*costheta); |
---|
180 | |
---|
181 | direction2 *= rot; |
---|
182 | |
---|
183 | G4DynamicParticle * daughterparticle2 = new G4DynamicParticle ( daughters[2], |
---|
184 | direction2 * daughtermomentum[2]); |
---|
185 | products->PushProducts(daughterparticle2); |
---|
186 | |
---|
187 | |
---|
188 | |
---|
189 | |
---|
190 | // output message |
---|
191 | #ifdef G4VERBOSE |
---|
192 | if (GetVerboseLevel()>1) { |
---|
193 | G4cout << "G4MuonDecayChannel::DecayIt "; |
---|
194 | G4cout << " create decay products in rest frame " <<G4endl; |
---|
195 | products->DumpInfo(); |
---|
196 | } |
---|
197 | #endif |
---|
198 | return products; |
---|
199 | } |
---|
200 | |
---|
201 | |
---|
202 | |
---|
203 | |
---|
204 | |
---|
205 | |
---|