Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4KL3DecayChannel.cc
이 파일의 문서화 페이지로 가기
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: G4KL3DecayChannel.cc 95906 2016-03-02 10:56:50Z gcosmo $
28 //
29 //
30 // ------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // History: first implementation, based on object model of
34 // 30 May 1997 H.Kurashige
35 // ------------------------------------------------------------
36 
37 #include "G4ParticleDefinition.hh"
38 #include "G4PhysicalConstants.hh"
39 #include "G4SystemOfUnits.hh"
40 #include "G4DecayProducts.hh"
41 #include "G4VDecayChannel.hh"
42 #include "G4KL3DecayChannel.hh"
43 #include "Randomize.hh"
44 #include "G4LorentzVector.hh"
45 #include "G4LorentzRotation.hh"
46 
48  :G4VDecayChannel(),
49  pLambda(0.0), pXi0(0.0)
50 {
51 }
52 
53 
55  const G4String& theParentName,
56  G4double theBR,
57  const G4String& thePionName,
58  const G4String& theLeptonName,
59  const G4String& theNutrinoName)
60  :G4VDecayChannel("KL3 Decay",theParentName,
61  theBR, 3,
62  thePionName,theLeptonName,theNutrinoName)
63 {
64  static const G4String K_plus("kaon+");
65  static const G4String K_minus("kaon-");
66  static const G4String K_L("kaon0L");
67  static const G4String Mu_plus("mu+");
68  static const G4String Mu_minus("mu-");
69  static const G4String E_plus("e+");
70  static const G4String E_minus("e-");
71 
72  // check modes
73  if ( ((theParentName == K_plus)&&(theLeptonName == E_plus)) ||
74  ((theParentName == K_minus)&&(theLeptonName == E_minus)) ) {
75  // K+- (Ke3)
76  pLambda = 0.0286;
77  pXi0 = -0.35;
78  } else if ( ((theParentName == K_plus)&&(theLeptonName == Mu_plus)) ||
79  ((theParentName == K_minus)&&(theLeptonName == Mu_minus)) ) {
80  // K+- (Kmu3)
81  pLambda = 0.033;
82  pXi0 = -0.35;
83  } else if ( (theParentName == K_L) &&
84  ((theLeptonName == E_plus) ||(theLeptonName == E_minus)) ){
85  // K0L (Ke3)
86  pLambda = 0.0300;
87  pXi0 = -0.11;
88  } else if ( (theParentName == K_L) &&
89  ((theLeptonName == Mu_plus) ||(theLeptonName == Mu_minus)) ){
90  // K0L (Kmu3)
91  pLambda = 0.034;
92  pXi0 = -0.11;
93  } else {
94 #ifdef G4VERBOSE
95  if (GetVerboseLevel()>2) {
96  G4cout << "G4KL3DecayChannel:: constructor :";
97  G4cout << "illegal arguments " << G4endl;;
98  DumpInfo();
99  }
100 #endif
101  // set values for K0L (Ke3) temporarily
102  pLambda = 0.0300;
103  pXi0 = -0.11;
104  }
105 }
106 
108 {
109 }
110 
112  G4VDecayChannel(right),
113  //massK(right.massK),
114  pLambda(right.pLambda),
115  pXi0(right.pXi0)
116 {
117 }
118 
120 {
121  if (this != &right) {
123  verboseLevel = right.verboseLevel;
124  rbranch = right.rbranch;
125 
126  // copy parent name
127  parent_name = new G4String(*right.parent_name);
128 
129  // clear daughters_name array
131 
132  // recreate array
134  if ( numberOfDaughters >0 ) {
137  //copy daughters name
138  for (G4int index=0; index < numberOfDaughters; index++) {
139  daughters_name[index] = new G4String(*right.daughters_name[index]);
140  }
141  }
142  //massK = right.massK;
143  pLambda = right.pLambda;
144  pXi0 = right.pXi0;
145  }
146  return *this;
147 }
148 
149 
151 {
152  // this version neglects muon polarization
153  // assumes the pure V-A coupling
154  // gives incorrect energy spectrum for Nutrinos
155 #ifdef G4VERBOSE
156  if (GetVerboseLevel()>1) G4cout << "G4KL3DecayChannel::DecayIt " << G4endl;
157 #endif
158 
159  // fill parent particle and its mass
161  G4double massK = G4MT_parent->GetPDGMass();
162 
163  // fill daughter particles and their mass
165  G4double daughterM[3];
166  daughterM[idPi] = G4MT_daughters[idPi]->GetPDGMass();
167  daughterM[idLepton] = G4MT_daughters[idLepton]->GetPDGMass();
168  daughterM[idNutrino] = G4MT_daughters[idNutrino]->GetPDGMass();
169 
170  // determine momentum/energy of daughters
171  // according to DalitzDensity
172  G4double daughterP[3], daughterE[3];
173  G4double w;
174  G4double r;
175  const size_t MAX_LOOP = 10000;
176  for (size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
177  r = G4UniformRand();
178  PhaseSpace(massK, &daughterM[0], &daughterE[0], &daughterP[0]);
179  w = DalitzDensity(massK,daughterE[idPi],daughterE[idLepton],daughterE[idNutrino],
180  daughterM[idPi],daughterM[idLepton],daughterM[idNutrino]);
181  if ( r <= w) break;
182  }
183 
184  // output message
185 #ifdef G4VERBOSE
186  if (GetVerboseLevel()>1) {
187  G4cout << *daughters_name[0] << ":" << daughterP[0]/GeV << "[GeV/c]" <<G4endl;
188  G4cout << *daughters_name[1] << ":" << daughterP[1]/GeV << "[GeV/c]" <<G4endl;
189  G4cout << *daughters_name[2] << ":" << daughterP[2]/GeV << "[GeV/c]" <<G4endl;
190  }
191 #endif
192  //create parent G4DynamicParticle at rest
193  G4ThreeVector* direction = new G4ThreeVector(1.0,0.0,0.0);
194  G4DynamicParticle * parentparticle = new G4DynamicParticle( G4MT_parent, *direction, 0.0);
195  delete direction;
196 
197  //create G4Decayproducts
198  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
199  delete parentparticle;
200 
201  //create daughter G4DynamicParticle
202  G4double costheta, sintheta, phi, sinphi, cosphi;
203  G4double costhetan, sinthetan, phin, sinphin, cosphin;
204 
205  // pion
206  costheta = 2.*G4UniformRand()-1.0;
207  sintheta = std::sqrt((1.0-costheta)*(1.0+costheta));
208  phi = twopi*G4UniformRand()*rad;
209  sinphi = std::sin(phi);
210  cosphi = std::cos(phi);
211  direction = new G4ThreeVector(sintheta*cosphi,sintheta*sinphi,costheta);
212  G4ThreeVector momentum0 = (*direction)*daughterP[0];
213  G4DynamicParticle * daughterparticle
214  = new G4DynamicParticle( G4MT_daughters[0], momentum0);
215  products->PushProducts(daughterparticle);
216 
217  // neutrino
218  costhetan = (daughterP[1]*daughterP[1]-daughterP[2]*daughterP[2]-daughterP[0]*daughterP[0])/(2.0*daughterP[2]*daughterP[0]);
219  sinthetan = std::sqrt((1.0-costhetan)*(1.0+costhetan));
220  phin = twopi*G4UniformRand()*rad;
221  sinphin = std::sin(phin);
222  cosphin = std::cos(phin);
223  direction->setX( sinthetan*cosphin*costheta*cosphi - sinthetan*sinphin*sinphi + costhetan*sintheta*cosphi);
224  direction->setY( sinthetan*cosphin*costheta*sinphi + sinthetan*sinphin*cosphi + costhetan*sintheta*sinphi);
225  direction->setZ( -sinthetan*cosphin*sintheta + costhetan*costheta);
226 
227  G4ThreeVector momentum2 = (*direction)*daughterP[2];
228  daughterparticle = new G4DynamicParticle( G4MT_daughters[2], momentum2);
229  products->PushProducts(daughterparticle);
230 
231  //lepton
232  G4ThreeVector momentum1 = (momentum0 + momentum2) * (-1.0);
233  daughterparticle =
234  new G4DynamicParticle( G4MT_daughters[1], momentum1);
235  products->PushProducts(daughterparticle);
236 
237 #ifdef G4VERBOSE
238  if (GetVerboseLevel()>1) {
239  G4cout << "G4KL3DecayChannel::DecayIt ";
240  G4cout << " create decay products in rest frame " <<G4endl;
241  G4cout << " decay products address=" << products << G4endl;
242  products->DumpInfo();
243  }
244 #endif
245  delete direction;
246  return products;
247 }
248 
250  const G4double* M,
251  G4double* E,
252  G4double* P )
253 // algorism of this code is originally written in GDECA3 of GEANT3
254 {
255 
256  //sum of daughters'mass
257  G4double sumofdaughtermass = 0.0;
258  G4int index;
259  const G4int N_DAUGHTER=3;
260 
261  for (index=0; index<N_DAUGHTER; index++){
262  sumofdaughtermass += M[index];
263  }
264 
265  //calculate daughter momentum
266  // Generate two
267  G4double rd1, rd2, rd;
268  G4double momentummax=0.0, momentumsum = 0.0;
270  const size_t MAX_LOOP=10000;
271  for (size_t loop_counter=0; loop_counter <MAX_LOOP; ++loop_counter){
272  rd1 = G4UniformRand();
273  rd2 = G4UniformRand();
274  if (rd2 > rd1) {
275  rd = rd1;
276  rd1 = rd2;
277  rd2 = rd;
278  }
279  momentummax = 0.0;
280  momentumsum = 0.0;
281  // daughter 0
282  energy = rd2*(parentM - sumofdaughtermass);
283  P[0] = std::sqrt(energy*energy + 2.0*energy*M[0]);
284  E[0] = energy;
285  if ( P[0] >momentummax )momentummax = P[0];
286  momentumsum += P[0];
287  // daughter 1
288  energy = (1.-rd1)*(parentM - sumofdaughtermass);
289  P[1] = std::sqrt(energy*energy + 2.0*energy*M[1]);
290  E[1] = energy;
291  if ( P[1] >momentummax )momentummax = P[1];
292  momentumsum += P[1];
293  // daughter 2
294  energy = (rd1-rd2)*(parentM - sumofdaughtermass);
295  P[2] = std::sqrt(energy*energy + 2.0*energy*M[2]);
296  E[2] = energy;
297  if ( P[2] >momentummax )momentummax = P[2];
298  momentumsum += P[2];
299  if (momentummax <= momentumsum - momentummax ) break;
300  }
301 #ifdef G4VERBOSE
302  if (GetVerboseLevel()>2) {
303  G4cout << "G4KL3DecayChannel::PhaseSpace ";
304  G4cout << "Kon mass:" << parentM/GeV << "GeV/c/c" << G4endl;
305  for (index=0; index<3; index++){
306  G4cout << index << " : " << M[index]/GeV << "GeV/c/c ";
307  G4cout << " : " << E[index]/GeV << "GeV ";
308  G4cout << " : " << P[index]/GeV << "GeV/c " << G4endl;
309  }
310  }
311 #endif
312 }
313 
314 
316  G4double massPi, G4double massL , G4double massNu )
317 {
318  // KL3 decay Dalitz Plot Density
319  // see Chounet et al Phys. Rep. 4, 201
320  // arguments
321  // Epi: kinetic enregy of pion
322  // El: kinetic enregy of lepton (e or mu)
323  // Enu: kinetic energy of nutrino
324  // constants
325  // pLambda : linear energy dependence of f+
326  // pXi0 : = f+(0)/f-
327  // pNorm : normalization factor
328  // variables
329  // Epi: total energy of pion
330  // El: total energy of lepton (e or mu)
331  // Enu: total energy of nutrino
332 
333  // calcurate total energy
334  Epi = Epi + massPi;
335  El = El + massL;
336  Enu = Enu + massNu;
337 
338  G4double Epi_max = (massK*massK+massPi*massPi-massL*massL)/2.0/massK;
339  G4double E = Epi_max - Epi;
340  G4double q2 = massK*massK + massPi*massPi - 2.0*massK*Epi;
341 
342  G4double F = 1.0 + pLambda*q2/massPi/massPi;
343  G4double Fmax = 1.0;
344  if (pLambda >0.0) Fmax = (1.0 + pLambda*(massK*massK/massPi/massPi+1.0));
345 
346  G4double Xi = pXi0*(1.0 + pLambda*q2/massPi/massPi);
347 
348  G4double coeffA = massK*(2.0*El*Enu-massK*E)+massL*massL*(E/4.0-Enu);
349  G4double coeffB = massL*massL*(Enu-E/2.0);
350  G4double coeffC = massL*massL*E/4.0;
351 
352  G4double RhoMax = (Fmax*Fmax)*(massK*massK*massK/8.0);
353 
354  G4double Rho = (F*F)*(coeffA + coeffB*Xi + coeffC*Xi*Xi);
355 
356 #ifdef G4VERBOSE
357  if (GetVerboseLevel()>2) {
358  G4cout << "G4KL3DecayChannel::DalitzDensity " <<G4endl;
359  G4cout << " Pi[" << massPi/GeV <<"GeV/c/c] :" << Epi/GeV << "GeV" <<G4endl;
360  G4cout << " L[" << massL/GeV <<"GeV/c/c] :" << El/GeV << "GeV" <<G4endl;
361  G4cout << " Nu[" << massNu/GeV <<"GeV/c/c] :" << Enu/GeV << "GeV" <<G4endl;
362  G4cout << " F :" << F << " Fmax :" << Fmax << " Xi :" << Xi << G4endl;
363  G4cout << " A :" << coeffA << " B :" << coeffB << " C :"<< coeffC <<G4endl;
364  G4cout << " Rho :" << Rho << " RhoMax :" << RhoMax << G4endl;
365  }
366 #endif
367  return (Rho/RhoMax);
368 }
369 
370 
G4int PushProducts(G4DynamicParticle *aParticle)
G4String ** daughters_name
CLHEP::Hep3Vector G4ThreeVector
G4double DalitzDensity(G4double parentmass, G4double Epi, G4double El, G4double Enu, G4double massPi, G4double massL, G4double massNu)
#define G4endl
Definition: G4ios.hh:61
G4String * parent_name
virtual G4DecayProducts * DecayIt(G4double)
G4double GetPDGMass() const
void setX(double)
double G4double
Definition: G4Types.hh:76
void setZ(double)
G4ParticleDefinition * G4MT_parent
void DumpInfo() const
#define G4UniformRand()
Definition: Randomize.hh:53
static constexpr double twopi
Definition: G4SIunits.hh:76
double energy
Definition: plottest35.C:25
G4ParticleDefinition ** G4MT_daughters
static constexpr double rad
Definition: G4SIunits.hh:149
G4String kinematics_name
G4int GetVerboseLevel() const
static double P[]
int G4int
Definition: G4Types.hh:78
void PhaseSpace(G4double Mparent, const G4double *Mdaughter, G4double *Edaughter, G4double *Pdaughter)
G4GLOB_DLL std::ostream G4cout
static constexpr double GeV
Definition: G4SIunits.hh:217
G4KL3DecayChannel & operator=(const G4KL3DecayChannel &)
void setY(double)
void CheckAndFillDaughters()