|
FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
#include <partlepton.h>
Public Member Functions | |
| PartLepton () | |
| void | DecParm () |
| void | DecParm_Brems () |
| int | Get_Brems (Device *dev, double &path, double &rad) |
| ******************************************** bremssthralung section... | |
| double | Get_Ecut () |
| double | Get_brem () |
Public Attributes | |
| double | brems_factor |
| double | Ecut |
| double | ngam |
| double | ebrem |
| double | mbrem |
| double | mbremq |
| double | rappe |
Controlla la produzione di bremsstrhalung
Definition at line 16 of file partlepton.h.
| PartLepton::PartLepton | ( | ) |
PartLepton Controlla la produzione di bremsstrhalung dinamica, vedi anche Partgam per la pair production. La generazione di elettroni (e muoni) è attivata dall parola chiave in .epc: "bremsstrahlung " non commentata! Neldefinizione del device occorre inserire una linea con " brems xxx " dove xxx è il numero massimo di gamma generati.. Attenzione nel caso si voglia attivare la produzione di sciami elettromagnetici il numero indicato può essere alto come 100 o addirittura 500. In questo caso deve essere attivata anche la pair production da gamma con: "pairprod yyy " con yyyy simile a quello previsto per il bremsstrhalung. Nella produzione si creano automaticamente gamma e ed elettroni marcati per la produzioni di pair o brems. Il numero massimo di particelle (leptoni e gamma) creati è legato ai numeri su discussi e al valore della soglia (Ecut) definito in PartLepton(). Per esempio in un radiatore compatto e abbastanza lungo in lunghezze di radiazioni, si possono produrre numerose particelle, mille o più... 30.12.2009 gmp
Definition at line 31 of file partlepton.cpp.
{
type=Lepstar;
Ecut=0.250;
// attenzione questo taglio determina l'energia minima di soglia per la produzion del Brems.
// Nella distribuzione della energia di ionizzazione rilasciata dagli elettrini nel radiatore appare un picco
// alla stessa energia di soglia su scelta.
// Questa soglia determina anche il numero delle particelle (gamma. elettroni e positroni)
// generati nella simulazione per ciascun evento.
double mrap= ptr_Elec->Get_Massa()/massa;
brems_factor=mrap*mrap; //brems_factor=0.01;
if (Abilita_Brems) Brems_Production=1;
else Brems_Production=0;
if (evento_.Gen.Event<1)
{
Gout<<"\n Classe PartLepton : "<<nome;
if (Abilita_Brems) Gout<<"* done! with Brems_factor: "<<setprecision(6)<<brems_factor;
else Gout<<" done! ";
}
}
| int PartLepton::Get_Brems | ( | Device * | dev, |
| double & | path, | ||
| double & | rad | ||
| ) | [virtual] |
******************************************** bremssthralung section...
** attenzione ***** renormalize the rad_length, for muons o other charged particles ( no for electrons...) brems_factor is defined in the particle constructor....
Reimplemented from Particella.
Definition at line 65 of file partlepton.cpp.
{
// questa procedura e' chiamata da Device::traccia()
// se siamo qui....c' e' possibilita' di bremsstrhalung
// nell'interno o nel buco del dev..
//-----------------------------------------------
// vedi l'articolo di Y. S. Tsai, Pair Production and Bremsstrahlung of Charged Leptons,
// Rev. Moder. Phys. 46,1974
// procedura:
// 1- si accettano solo particelle con energia superiore a Ecut
// 2- in ogni intervallo dx=step=frazione di lrad si
// verifica se viene emesso un gamma
// 3- se si, se ne genera l'energia
// 4- si aggiorna l'energia della particella madre e si
// passa all step successivo.
// 5- l'energia di tutti i gamma emessi si sommano insieme
// 6- flyo poi genera un gamma di brems unico a partire
// da un punto spaziale medio
// see the blue book or the article of Tsai del 1974 Rev.Moder. Phys. 46,4
//-------------------------------------------------
double step,e,Emax, rapmx,rapmxq,rap,rapq,pmax;
double eb=0.,prob,prand;
double path_fatto,path_free,path_resta;
double rad_length=rad;
// rad deve essere > 0 !!
if (path<.1) return 0; //ritorna subito per cammini insignificanti
if (massa>0.0005) rad_length/=brems_factor;
if (path/rad_length<0.000001) return 0;
step=rad_length*0.1;
e=P.e;
if (e<Ecut) return 0; // attenzione a questo cut... vedi il costruttore Partlepton()
ebrem=mbrem=0.0;
path_fatto=0.0;
path_free=0.0;
// start loop
while (path_fatto<path)
{
path_resta=path-path_fatto;
if (step>path_resta) step=path_resta;
e-=dev->Msperdita(step); // stima della energia persa per msc.
Emax=e-massa;
rapmx= (Emax-Ecut)/e;
rapmxq=rapmx*(Emax+Ecut)/e;
pmax=(1.33333*(log(Emax/Ecut)-rapmx) + .5*rapmxq);
//test to make a brems
if (Pran()<pmax*step/rad_length) // makes a gam...
{
// get gam energy
// con eb =(Ecut+alfa(Emax-Ecut)
// rap = (eb-Ecut)/e = (Ecut+alfa(Emax-Ecut)-Ecut)/e = alfa*rapmx
prand=Pran()*pmax;
for (double alfa=0.0;alfa<1.;alfa+=0.001) // in step del permille
{
rap=alfa*rapmx;
rapq=alfa*alfa*rapmxq;
eb =Ecut+e*rap;
prob=(1.33333*(log(eb/Ecut)-rap) + .5*rapq);
if (prand<prob) break;
}
ebrem+=eb;
e-=eb;
path_free+=(path_fatto+Pran()*step)*eb;
}
if (e<=Ecut) break; // vedere meglio????
path_fatto+=step;
}
if (ebrem>0.0) // bremsstrhalung ok...
{
Brems_Production=2; // brems fatto....
fato=Decay;// si fa per dire....si fa decare?!
Ifato=-13;
path_free/=ebrem; //cammino libero prima di decadere: punto piu' probabile..
SelRea->Brem_done++;
dev->Brem_done++;
if (Debugon==1)
{
P.print( nome);
X.print(nome);
Gout<<"\n Brlm "<<evento_.Gen.Event<<" "
<<fato<< " dw "<<dw
<< " dev " << dev->Get_Nome()<<" Brem_done "<<dev->Brem_done
<< " path " <<path<<" free "<<path_free;
}
path=path_free;
// generate the new partcles: un nuovo leptone ed un gamma
// max defined into device cards...
Particella *pb,*pc;
// electron o muon test se possono fare ancora brems...
Partname=nome;
if (Abilita_Brems>0&&dev->Brem_done<=dev->maxBrems) {
pb = new PartLepton();
}
else pb= new Particella(); //no brems....
// gamma di brems...test se può fare pair production ...
Partname=Gam;
if (Abilita_Pair>0&& dev->Pair_done<=dev->maxPair) {
pc = new PartGam(); // no pair production
}
else pc= new Particella();
// links: attention here the link is broken to the older particle... but see Restore_link
// attenzione non alterare la sequenza dei link....altrimenti cambiano gli Id
dw=pb;
pb->up=this;
pb->rg=pc;
pc->lf=pb;
pc->up=this;
pb->Set_Id();
pc->Set_Id();
return -13; //brems ok
}
return 0; // no brems
}