FlyoDoc_2011 Pisa 2011 by GmP --- 011

flyopunta/src/src_par/part3pic.cpp

00001 /***************************************************************************
00002                           part3pic.cpp  -  description
00003                              -------------------
00004     begin                : Sun May 9 2004
00005     copyright            : (C) 2004 by gmp
00006     email                : peppe@newpeppe
00007   ***************************************************************************
00008   *                                                                         *
00009   *   NA48  simulation program.                                             *
00010   *                                                                         *
00011   ***************************************************************************/
00012 
00013 #define MPIC   0.13956
00014 #define MPICQ  0.019477
00015 #define MPIO   0.13497
00016 #define MPIOQ  0.0182169
00017  
00018 #include "flyoh.h"
00019 
00020 using namespace std;
00021 //-------------------------------------------------------
00022 //        K -> pic pic2 -> 3 pic  D e c a y
00023 //-------------------------------------------------------
00024 
00025 // constructor
00026     Part3pic::Part3pic(double pant)
00027     { 
00028       // si usa questa procedura se il decadimento e'mediato dalla
00029       // risonanza virtuale pic2 che va esplicitamente scritta nella catenata
00030       // della reazione in Epc.
00031       mpadre=0.;
00032       slope=pant;
00033     }
00034 
00035 //--------------------------------------------------------------*/
00036 //       D e c P a r m   ==>   vedi PartFase::DecParm()         */
00037 //--------------------------------------------------------------*/
00038 //------------------------------------------
00039  void Part3pic::Get_PhaseParm()
00040 {
00041 //-------------------------------------------
00042 // define the particle links.....
00043    PartFase::Get_PhaseParm();
00044    if(p2->Get_Nome()!=p3->Get_Nome())
00045     { Gout<<"\n Particle error in 3 pions decay; pic2 -> "
00046           << p2->Get_Nome()<<" "<<p3->Get_Nome()
00047           <<"   not equal ..  malformed.... exit!"<<std::endl;
00048       exit(0);
00049     }
00050  }
00051 //---------------
00052  void  Part3pic::Get_MatrixParm()
00053 {
00054   // matrix element max weight  guess
00055   // for K+ and K- ...but you may define different parameters
00056   // if(strncmp(dw->Get_Nome(),"Kp,2)==0) {....} else Km {}..
00057   gslope= -0.2154;
00058   hcurv=   0.012;
00059   kcurv= -0.0101;
00060   Gout<<"\nPic2 done:  Slope= "<<setprecision(3)<<setw(8)<< slope
00061       <<" g,h,k= "<<setw(8)<<gslope
00062       <<" "<<setw(8)<<hcurv
00063       <<" "<<setw(8)<<kcurv;
00064   wmtr_max=1.+gslope*1.2+ hcurv*1.44; 
00065 }
00066 
00067 //---------------
00068  int  Part3pic::Get_MatrixValue()
00069 {
00070  double su=(mresq-s0)/MPICQ;
00071  double sv=(2.*mpadre*(e2-e1))/MPICQ;  //ricorda le energie sono e0,e1,e2
00072  prb=1.+gslope*su+hcurv*su*su + kcurv*sv*sv;
00073 //  Gout<<"\nPart3 matrix ok prb "<<setprecision(4)<<prb;
00074  if(prb>wmtr_max)
00075     {
00076        Gout<<"\n Wmtr off: Ev "
00077         <<setprecision(4)<<fixed
00078         <<setw(6)<<evento_.Gen.Event<<" iter="
00079         <<setw(4)<<itermtr<<" pb="
00080         <<setw(7)<<prb<<" pbx="
00081         <<setw(7)<<wmtr_max <<" e0="
00082         <<setprecision(2)<<fixed
00083         <<setw(6)<<e0<<" e1="
00084         <<setw(6)<<e1<<" "
00085         <<setw(25)<<SelRea->Get_Titolo()<<std::endl;  
00086       wmtr_max=prb*1.001; // aggiorno ma informo.... dovrebbe  accadere poche volte!
00087     }
00088 
00089  if( (wmtr_max*Pran()) <prb) return 1;  else return 0;
00090 }
 All Classes Namespaces Files Functions Variables