FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Giuseppe Pierazzini Pisa 20.02.05 * 00003 * pierazzini@unipi.it * 00004 * F l y o * 00005 * Epsi/NA48 * 00006 ***************************************************************************/ 00007 00008 #include "flyoh.h" 00009 #include "anakpovv.h" 00010 00011 00012 00013 AnaKpovv::AnaKpovv() 00014 : Analisi() 00015 { 00016 tipo=26;nfit=1;titol="Kl--> pi0 nu nu " ;nome="Kpovv"; 00017 Gout<<"\n Attivato il fit di "<<titol; 00018 } 00019 00020 AnaKpovv::~AnaKpovv() {} 00021 00022 int AnaKpovv::Fisica() 00023 { 00024 00025 if ( count_call==0 ) 00026 { 00027 00028 /* contatori da incrementarese occorre.... 00029 getta_ch; 00030 getta_char; 00031 getta_en; 00032 */ 00033 00034 00035 } 00036 count_call++; 00037 00038 // se vuoi buttare e non analizzare.... 00039 // if(Veto->mhit>0) return 0; 00040 00041 00042 // 00043 double xx,yy,ee,et; 00044 cogx=cogy=cog=xx=yy=ee=et=0.0; 00045 np=lkry->mhit; 00046 int hit=lkry->mhit-1; 00047 while ( hit>-1 ) 00048 { 00049 xpw[hit]=xx=lkry->M_Hits[hit].Xdev.x; 00050 ypw[hit]=yy=lkry->M_Hits[hit].Xdev.y; 00051 zpw[hit]=lkry->M_Hits[hit].Xdev.z; 00052 epw[hit]=ee=lkry->M_Hits[hit].e_rivela; 00053 et+=ee; 00054 cogx+=ee*xx; 00055 cogy+=ee*yy; 00056 hit--; 00057 } 00058 if ( et>0.0 ) 00059 { 00060 cogx/=et; 00061 cogy/=et; 00062 cog=sqrt ( cogx*cogx+cogy*cogy ); 00063 } 00064 00065 00066 00067 // questo metodo va riempito.... 00068 // si esce con 1 se ok, con 0 se analisi non ok. 00069 00070 00071 np=1; 00072 count_wnt++; 00073 return 1; // qui adesso sempre ok!? 00074 00075 } 00076 //---------------------------------------------------- 00077 void AnaKpovv::print_scale() 00078 { 00079 Gout<<"\n -----> "<<titol<<" Analysis Summary <-------\n"; 00080 Gout<<"\n Fit entries "<<count_call; 00081 Gout<<"\n Too many tracks "<<getta_ch; 00082 Gout<<"\n Wrong charge "<<getta_char; 00083 Gout<<"\n Killed by energy "<<getta_en; 00084 Gout<<"\n Good events "<<count_wnt; 00085 Gout<<"\n\n ======> d o n e <============ "<<std::endl; 00086 }