FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 partres4.cpp - description 00003 ------------------- 00004 begin : Mon Jun 18 2001 00005 copyright : (C) 2001 by Giuseppe Pierazzini 00006 email : peppe@unipi.it 00007 *************************************************************************** 00008 * * 00009 * NA48 simulation program. * 00010 * * 00011 ***************************************************************************/ 00012 00013 00014 #include "flyoh.h" 00015 #include "fase3max.h" 00016 using namespace std; 00023 Partres4::Partres4() 00024 {p1=p2=p3=p4=p5=0; 00025 Gout<<"\n Class Partres4 : "<<nome<<" done!"; 00026 } 00027 00028 00029 void Partres4::DecParm() 00030 { 00031 // skip.. if p1 allready defined.... 00032 00033 if(p1==0) 00034 { 00035 // define the pointer to the four particles; 00036 // and the decay parameters 00037 Get_PhaseParm(); 00038 // Get_MatrixParm(); 00039 00040 } 00041 00042 //------------------------ 00043 // get the invariant values... 00044 Get_PhaseSpace(); 00045 00046 // define the resonace particle parameters..masse... 00047 // 00048 // res 1 == this 00049 Set_Massa (mres); 00050 P.Riposo (mres); 00051 // res 2 00052 pr2->Set_Massa(mres2); 00053 pr2->P.Riposo (mres2); 00054 00055 00056 00057 } 00058 00059 00060 void Partres4::Get_PhaseParm() 00061 { 00062 /*------------------------------------------- 00063 Four bodies decay k -> a b c d in phase space.. 00064 the decay is via the Res3 resonance 00065 generated in the decay chain automatilly...see Make_list 00066 ----- 00067 the chain is K->a Res3 00068 ->b Res 00069 ->c d 00070 ----- 00071 Phase space weight 00072 w = F(padre,Res3,a)*F(Res3,Res,b)*F(Res,c,d) 00073 ------------ 00074 Note: imput pattern like K = a b c d ( esempio:e v pi0 pi0) 00075 gives the following pointer matching 00076 p1->a, p2->b, p3->c, p4->d 00077 pr1->Res3, pr2->Res, 00078 00079 if you change the pattern the chain changes automatically... 00080 00081 -------- here 00082 -define the pointers to the particles; 00083 -the decay parameters 00084 -the wfase_max 00085 --------------------------------------------------*/ 00086 00087 if(p1!=0) return; 00088 p1=lf; 00089 p2=dw; 00090 p3=dw->rg->dw; 00091 p4=p3->rg; 00092 00093 //resonances... generate come particelle 00094 pr1=this; 00095 pr2=dw; 00096 // particle parameters 00097 mpadre=up->Get_Massa(); mpadreq=mpadre*mpadre; 00098 mfrate=p1->Get_Massa(); mfrateq=mfrate*mfrate; //mchd1=mfrate 00099 mchd2 =p2->Get_Massa(); mchd2q=mchd2*mchd2; 00100 mchd3 =p3->Get_Massa(); mchd3q=mchd3*mchd3; 00101 mchd4 =p4->Get_Massa(); mchd4q=mchd4*mchd4; 00102 00103 // massimi e minimi valori delle risonanze 00104 mmin =mchd2+mchd3+mchd4; mminq =mmin*mmin; 00105 mmin2= mchd3+mchd4; mminq2=mmin2*mmin2; 00106 mmax=mpadre-mfrate; mmaxq =mmax*mmax; 00107 mmax2=mmax-mchd2; mmaxq2=mmax2*mmax2; 00108 dmq =mmaxq-mminq; 00109 dmq2=mmaxq2-mminq2; 00110 00111 // nota Fase 00112 00113 int p_id[6]= {up->Get_Idm(),p1->Get_Idm(),p2->Get_Idm(),p3->Get_Idm(),p4->Get_Idm(),0}; 00114 if ( Fasemx!=0 ) 00115 { 00116 double wmx=Fasemx->Get_Wmax ( p_id); 00117 if ( wmx>0. ) 00118 { 00119 wfase_max=wmx; 00120 // Gout<<"\n Ev "<<Eventi_Fatti<<" F.S. trovato "<<up->Get_Nome() <<" "<<nome<<"=> "<<p1->Get_Nome() 00121 // <<" "<<p2->Get_Nome() <<" "<<p3->Get_Nome()<<" "<<p4->Get_Nome(); 00122 return; 00123 } 00124 } 00125 00126 00127 00128 00129 double pass1=dmq/100.; 00130 double pass2=dmq2/100.; 00131 double w1; 00132 00133 // cout<<"\n mass "<<mminq<<" "<<mmaxq<<" "<<pr2->mminq<<" "<<pr2->mmaxq<<" "<<pr3->mminq<<" "<<pr3->mmaxq; 00134 00135 // define the wfase_max for p.s. normalizazion 00136 wfase_max=0.0; 00137 for( mresq=mminq; mresq<mmaxq; mresq+=pass1) 00138 {mres=sqrt(mresq); 00139 w1=Fspace(mpadre,mres,mfrate); 00140 for( mresq2=mminq2; mresq2<mmaxq2; mresq2+=pass2) 00141 {mres2=sqrt(mresq2); 00142 w=Fspace(mres,mres2,mchd2)*Fspace(mres2,mchd3,mchd4); 00143 if(w>wfase_max)wfase_max=w; 00144 }} 00145 Gout<<"\n Phase-Space:w="<<wfase_max<<" done for " <<up->Get_Nome()<<" ==> "<<p1->Get_Nome()<<" "<<p2->Get_Nome() 00146 <<" "<<p3->Get_Nome()<<" "<<p4->Get_Nome(); 00147 00148 new Fase3Max ( p_id,wfase_max ); 00149 } 00150 00151 void Partres4::Get_PhaseSpace() 00152 { 00153 iterfs=0; w=0.5; 00154 00155 while(iterfs++<300) 00156 { 00157 // resonance mass selection... 00158 mres =sqrt((mresq =mminq+Pran() *dmq)); 00159 mres2 =sqrt((mresq2=mminq2+Pran()*dmq2)); 00160 if(mres2+mchd2>mres) continue; 00161 w = Fspace(mpadre, mres,mfrate)*Fspace(mres, mres2,mchd2); 00162 w*= Fspace(mres2,mchd3,mchd4); 00163 if(w >wfase_max) 00164 { 00165 Gout<<"\n Wfas off: Ev "<<evento_.Gen.Event<<" iter="<<iterfs<<" prb="<<w 00166 <<" prbmax"<<wfase_max<<" "<<SelRea->Get_Titolo(); 00167 wfase_max=w+0.000001; 00168 // aggiorna wfase_max memorizzato nella lista 00169 int p_id[6]= {up->Get_Idm(),p1->Get_Idm(),p2->Get_Idm(),p3->Get_Idm(), p4->Get_Idm(),0}; 00170 Fasemx->Set_Wmax ( p_id, wfase_max ); 00171 } 00172 00173 if(Pran()<w/wfase_max) break; 00174 00175 } 00176 if(iterfs>300) 00177 Gout<<"\nPartRes5 iter="<<iterfs<<" Risonaze: m234="<<mres<<" m34="<<mres2; 00178 00179 } 00180