musrMuonDecayChannel Class Reference

#include <musrMuonDecayChannel.hh>

List of all members.

Public Member Functions

 musrMuonDecayChannel (const G4String &theParentName, G4double theBR)
 ~musrMuonDecayChannel ()
void finalize ()
virtual G4DecayProducts * DecayIt (G4double)
G4double GetTheta ()
G4double GetPhi ()
G4ThreeVector GetPolarization ()
void SetPolarization (G4ThreeVector polar)
G4DecayProducts * DecayItPolarized (G4double, G4ThreeVector polar)

Static Public Member Functions

static musrMuonDecayChannelGetInstance ()

Public Attributes

HepRandomEngine * theEngine
G4ThreeVector polarization
G4ThreeVector emomdir
G4double alpha
G4double sinalpha
G4double cosalpha
G4double delta
G4double sindelta
G4double cosdelta
G4double costheta
G4double sintheta
G4double phi
G4double sinphi
G4double cosphi
G4double theta

Static Public Attributes

static musrMuonDecayChannelpointer = 0


Detailed Description

Definition at line 13 of file musrMuonDecayChannel.hh.


Constructor & Destructor Documentation

musrMuonDecayChannel::musrMuonDecayChannel const G4String &  theParentName,
G4double  theBR
 

Definition at line 16 of file musrMuonDecayChannel.cc.

References pointer, polarization, and theEngine.

00018                    :G4VDecayChannel("musr Muon Decay",1)
00019 {
00020 
00021   // set names for daughter particles
00022   if (theParentName == "mu+") {
00023     SetBR(theBR);
00024     SetParent("mu+");
00025     SetNumberOfDaughters(3);
00026     SetDaughter(0, "e+");
00027     SetDaughter(1, "nu_e");
00028     SetDaughter(2, "anti_nu_mu");
00029 
00030   } else if (theParentName == "mu-") {
00031     SetBR(theBR);
00032     SetParent("mu-");
00033     SetNumberOfDaughters(3);
00034     SetDaughter(0, "e-");
00035     SetDaughter(1, "anti_nu_e");
00036     SetDaughter(2, "nu_mu");
00037   } else {
00038 #ifdef G4VERBOSE 
00039     if (GetVerboseLevel()>0) {
00040       G4cout << "LEMuSRMuonDecayChannel:: constructor :";
00041       G4cout << " parent particle is not muon but ";
00042       G4cout << theParentName << G4endl;
00043     }
00044 #endif
00045   }
00046 
00047   // get the random number engine
00048   theEngine = HepRandom::getTheEngine();
00049 
00050   polarization=G4ThreeVector(1,0,0);
00051   pointer = this; 
00052 
00053 
00054 
00055 }

musrMuonDecayChannel::~musrMuonDecayChannel  ) 
 

Definition at line 65 of file musrMuonDecayChannel.cc.

00066 {
00067 
00068 }


Member Function Documentation

G4DecayProducts * musrMuonDecayChannel::DecayIt G4double   )  [virtual]
 

Definition at line 85 of file musrMuonDecayChannel.cc.

Referenced by DecayItPolarized().

00086 {
00087   
00088   //              assumes the pure V-A coupling
00089   //              gives incorrect energy spectrum for neutrinos
00090   
00091 
00092   if (parent == 0) FillParent();  
00093   if (daughters == 0) FillDaughters();
00094   
00095   // parent mass
00096   G4double parentmass = parent->GetPDGMass();
00097   
00098   //daughters'mass
00099   G4double daughtermass[3]; 
00100   G4double sumofdaughtermass = 0.0;
00101   for (G4int index=0; index<3; index++){
00102     daughtermass[index] = daughters[index]->GetPDGMass();
00103     sumofdaughtermass += daughtermass[index];
00104   }
00105   
00106   //create parent G4DynamicParticle at rest
00107   G4ThreeVector dummy;
00108   G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
00109   //create G4Decayproducts
00110   G4DecayProducts *products = new G4DecayProducts(*parentparticle);
00111   delete parentparticle;
00112   
00113   
00114   //                             Calculate Positron energy
00115 
00116   G4double daughtermomentum[3];
00117   G4double energy;
00118   G4double x; // maximal positron energy is 52.831MeV
00119   G4double r;
00120   
00121   do {
00122     do {
00123       r = G4UniformRand();
00124       x = G4UniformRand();
00125     } while (r > (3.0 - 2.0*x)*x*x);    
00126     
00127     
00128     energy = x*52.831*MeV;
00129   } while (energy <0.0|| energy > 52.831);
00130   
00131   
00132   
00133   //                                Angular Distribution
00134   
00135   G4double energymax=52.831*MeV;
00136   G4double E=energy/energymax;
00137    
00138 
00139   //asymmetry factor
00140   G4double D = (2*E-1)/(3-2*E);
00141   
00142   // theta
00143   G4double K = G4UniformRand();
00144   costheta = 1/D*(-1.+ sqrt(1.-2*D*(2*K-1)+D*D));
00145   theta = acos(costheta);
00146 
00147 
00148   // phi
00149   phi  = 2.0*M_PI*G4UniformRand()*rad;
00150 
00151 
00153   //    E=energymax;
00154   //    theta=30*2*3.141592654/360;
00155   //    theta=K*M_PI*rad;
00156   //    phi=0.;
00157   //    costheta=cos(theta);
00159 
00160 
00161 
00162   sinphi = sin(phi);
00163   cosphi = cos(phi);
00164 
00165 
00166   sintheta=sin(theta);
00167 
00168 
00169   // rotation angles
00170  G4double px = sintheta*cosphi;
00171  G4double py = sintheta*sinphi;
00172  G4double pz = costheta;
00173                                                                                         
00174  G4ThreeVector direction0(px,py,pz);
00175                                                                                           
00176  direction0.rotateUz(polarization); 
00177 
00178 
00179  //    G4cout <<"e+ momentum direction: " <<  direction0 <<"\n";
00180  //   G4cout <<"energy: " <<energy <<G4endl; 
00181   
00182 
00183   daughtermomentum[0] = sqrt(energy*energy + 2.0*energy* daughtermass[0]);
00184   
00185   G4DynamicParticle * daughterparticle 
00186          = new G4DynamicParticle( daughters[0], direction0*daughtermomentum[0]);
00187   daughterparticle->SetPolarization(polarization.x(),polarization.y(),polarization.z());
00188   products->PushProducts(daughterparticle);
00189 
00190 
00191 
00192   // daughter 1 ,2 (neutrinos)
00193   // create neutrinos in the C.M frame of two neutrinos
00194   G4double energy2 = parentmass*(1.0 - x/2.0); 
00195   G4double vmass   = sqrt((energy2-daughtermomentum[0])*(energy2+daughtermomentum[0]));
00196   G4double beta = -1.0*daughtermomentum[0]/energy2;
00197   G4double costhetan = 2.*G4UniformRand()-1.0;
00198   G4double sinthetan = sqrt((1.0-costhetan)*(1.0+costhetan));
00199   G4double phin  = 2.0*M_PI*G4UniformRand()*rad;
00200   G4double sinphin = sin(phin);
00201   G4double cosphin = cos(phin);
00202 
00203   G4ThreeVector direction1(sinthetan*cosphin,sinthetan*sinphin,costhetan);
00204   G4DynamicParticle * daughterparticle1 
00205          = new G4DynamicParticle( daughters[1], direction1*(vmass/2.));
00206   G4DynamicParticle * daughterparticle2
00207          = new G4DynamicParticle( daughters[2], direction1*(-1.0*vmass/2.));
00208 
00209   // boost to the muon rest frame
00210   G4LorentzVector p4;
00211   p4 = daughterparticle1->Get4Momentum();
00212   p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
00213   daughterparticle1->Set4Momentum(p4);
00214   p4 = daughterparticle2->Get4Momentum();
00215   p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta);
00216   daughterparticle2->Set4Momentum(p4);
00217   products->PushProducts(daughterparticle1);
00218   products->PushProducts(daughterparticle2);
00219   daughtermomentum[1] = daughterparticle1->GetTotalMomentum();
00220   daughtermomentum[2] = daughterparticle2->GetTotalMomentum();
00221     
00222  // output message
00223 
00224 
00225   //    G4cout << "Theta angle: " <<theta*360/(2*3.141592654) << "\n";
00226   //    G4cout << "Phi angle: " <<phi << G4endl;
00227     
00228       //      G4cout << "  create decay products in rest frame: " <<G4endl;
00229       //      products->DumpInfo();
00230 
00231 
00232   return products;
00233 }

G4DecayProducts * musrMuonDecayChannel::DecayItPolarized G4double  ,
G4ThreeVector  polar
 

Definition at line 71 of file musrMuonDecayChannel.cc.

References DecayIt(), polarization, and SetPolarization().

00072 {
00073   SetPolarization( polar);
00074 
00075 #ifdef G4VERBOSE 
00076   if (GetVerboseLevel()>2) {
00077   G4cout << "musrMuonDecayChannel:: polarization is" <<polarization  <<G4endl;
00078   }
00079 #endif
00080   return DecayIt(mass);
00081 }

void musrMuonDecayChannel::finalize  ) 
 

musrMuonDecayChannel * musrMuonDecayChannel::GetInstance  )  [static]
 

Definition at line 58 of file musrMuonDecayChannel.cc.

References pointer.

00059 {
00060   return pointer;
00061 } 

G4double musrMuonDecayChannel::GetPhi  )  [inline]
 

Definition at line 38 of file musrMuonDecayChannel.hh.

References phi.

00038 {return phi;};

G4ThreeVector musrMuonDecayChannel::GetPolarization  )  [inline]
 

Definition at line 39 of file musrMuonDecayChannel.hh.

References polarization.

00039 {return polarization;};

G4double musrMuonDecayChannel::GetTheta  )  [inline]
 

Definition at line 37 of file musrMuonDecayChannel.hh.

References theta.

00037 {return theta;};

void musrMuonDecayChannel::SetPolarization G4ThreeVector  polar  )  [inline]
 

Definition at line 40 of file musrMuonDecayChannel.hh.

References polarization.

Referenced by DecayItPolarized().

00040 {polarization=polar;};


Member Data Documentation

G4double musrMuonDecayChannel::alpha
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::cosalpha
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::cosdelta
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::cosphi
 

Definition at line 35 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::costheta
 

Definition at line 35 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::delta
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4ThreeVector musrMuonDecayChannel::emomdir
 

Definition at line 32 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::phi
 

Definition at line 35 of file musrMuonDecayChannel.hh.

Referenced by GetPhi().

musrMuonDecayChannel * musrMuonDecayChannel::pointer = 0 [static]
 

Definition at line 23 of file musrMuonDecayChannel.hh.

Referenced by GetInstance(), and musrMuonDecayChannel().

G4ThreeVector musrMuonDecayChannel::polarization
 

Definition at line 32 of file musrMuonDecayChannel.hh.

Referenced by DecayItPolarized(), GetPolarization(), musrMuonDecayChannel(), and SetPolarization().

G4double musrMuonDecayChannel::sinalpha
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::sindelta
 

Definition at line 34 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::sinphi
 

Definition at line 35 of file musrMuonDecayChannel.hh.

G4double musrMuonDecayChannel::sintheta
 

Definition at line 35 of file musrMuonDecayChannel.hh.

HepRandomEngine* musrMuonDecayChannel::theEngine
 

Definition at line 31 of file musrMuonDecayChannel.hh.

Referenced by musrMuonDecayChannel().

G4double musrMuonDecayChannel::theta
 

Definition at line 35 of file musrMuonDecayChannel.hh.

Referenced by GetTheta().


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 12:19:54 2006 for MUSR by  doxygen 1.4.6