/*
$Log$
+Revision 1.2 2007/10/23 09:27:16 hristov
+Adding dependence on the dip angle (Marek)
+
+Revision 1.1 2007/06/24 20:53:11 hristov
+New generator for the krypton runs of TPC (Marek)
+
*/
//
//
for(Int_t i=0;i<nelectron;i++){
rnd=gRandom->Rndm();
- phi=TMath::TwoPi()*rnd;
- ptot=TMath::Sqrt(eelectron[i]*(eelectron[i]+2.*me));
- p[0]=ptot*TMath::Cos(phi);
- p[1]=ptot*TMath::Sin(phi);
+ phi=TMath::TwoPi()*rnd;
rnd=gRandom->Rndm();
- p[2]=ptot*TMath::Cos(TMath::Pi()*rnd);
+ Double_t theta = TMath::Pi()*rnd;
+ ptot=TMath::Sqrt(eelectron[i]*(eelectron[i]+2.*me));
+ p[0]=ptot*TMath::Cos(phi)*TMath::Sin(theta);
+ p[1]=ptot*TMath::Sin(phi)*TMath::Sin(theta);
+ p[2]=ptot*TMath::Cos(theta);
//
// her push particle
//
// gammas
//
for(Int_t i=0;i<ngamma;i++){
+ rnd=gRandom->Rndm();
+ Double_t theta = TMath::Pi()*rnd;
rnd=gRandom->Rndm();
phi=TMath::TwoPi()*rnd;
ptot=egamma[i];
- p[0]=ptot*TMath::Cos(phi);
- p[1]=ptot*TMath::Sin(phi);
- rnd=gRandom->Rndm();
- p[2]=ptot*TMath::Cos(TMath::Pi()*rnd);
+ p[0]=ptot*TMath::Cos(phi)*TMath::Sin(theta);
+ p[1]=ptot*TMath::Sin(phi)*TMath::Sin(theta);
+ p[2]=ptot*TMath::Cos(theta);
//
// her push particle
//
//
// first decay - 32 keV
//
- if(rnd < prob1[0]) {
+ if(rnd < prob1[0]) {
// 2 electrons
nelectron = 2;
eelectron[0]=30.e-6;
ngamma++;
egamma[ngamma-1]=9.e-6;
}
+
+
}
//________________________________________________________________________