FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 devchod.cpp - description 00003 ------------------- 00004 begin : Sat Jul 28 2001 00005 copyright : (C) 2001 by Giuseppe Pierazzini 00006 email : peppe@unipi.it 00007 *************************************************************************** 00008 * * 00009 * NA48 simulation program. * 00010 * * 00011 ***************************************************************************/ 00012 #include "parm.h" 00013 #include "devchod.h" 00014 #include "evento.h" 00015 #include "triggerbox.h" 00016 00017 DevChod::DevChod() 00018 { 00019 devtype=TypDevChod; 00020 devclass="Charged Anti"; 00021 Gout<<"\n\n < "<<nome <<" > Dev Id "<<idev<<" Device type <"<<devclass<<"> typ "<<devtype; 00022 } 00023 DevChod::~DevChod() 00024 { 00025 } 00026 //====================================================== 00027 //----------------- -----P o s i z i o n e --- 00028 int DevChod::SimulaDev() 00029 { 00030 00031 // tutto da rifare secondo quanto si deciderà..... 00032 00033 00035 // Verifico quale quadrante 00036 // e' stato toccato 00037 // escludo una banda ombra del buco, in x e y 00038 Q1=Q2=Q3=Q4=Qx=0; 00039 if ( mhit<1 ) return nhit; 00040 double rag=Lin[0]; 00041 int ht=mhit; 00042 while ( ht>0 ) 00043 { 00044 x= M_Hits[ht].Xdev.x; 00045 y= M_Hits[ht].Xdev.y; 00046 if ( x>-rag&&y>-rag ) Q1=1; 00047 if ( x>-rag&&y< rag ) Q2=1; 00048 if ( x< rag&&y< rag ) Q3=1; 00049 if ( x< rag&&y>-rag ) Q4=1; 00050 ht--; 00051 } 00052 00053 00054 // Gout"\n Hodo %2d,%2d,%2d,%2d,%2d",Q1,Q2,Q3,Q4,Qx/////; 00055 00056 return nhit; 00057 }