FlyoDoc_2011 Pisa 2011 by GmP --- 011

flyopunta/src/src_dev/devytax.cpp

00001 /***************************************************************************
00002                           devytax.cpp  -  description
00003                              -------------------
00004     begin                : Mon Jul 30 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 "devytax.h"
00014 #include "evento.h"
00015 
00016 
00017 
00018 DevYTax::DevYTax(){
00019    devtype=TypDevYTax;
00020    devclass="Y_Tax";
00021    if(Lin[0]>Lin[1])
00022      {Rtaxq=Lin[0]*Lin[0];}
00023    else  Rtaxq=Lin[1]*Lin[1]; 
00024 }
00025 DevYTax::~DevYTax(){
00026 }
00027 
00028 //======================================================
00029 //----------------- -----P o s i z i o n e ---
00030 int DevYTax::Posizione()
00031 {
00032   int posto;
00033   posto=DevRtRt::Posizione();
00034   if(posto==-1)
00035   {
00036  // qui e' nel buco
00037  // verifico se e' all'interno dei due archi di cerchio
00038  // che delimitano il buco
00039  // mi riferisco al centro dell'arco superiore
00040  //  P_Cin.print("P_Cin");
00041    
00042    gvet Dist=P_Cin;Dist[2]=0;Dist.Norma();
00043    if(Dist.normaq>Rtaxq) return 0;
00044 //  double dxq=P_Cin[0]*P_Cin[0];
00045 //  double dy=P_Cin[1]-Lin[1]+Lin[0];
00046 //
00047 //  if(dy>0.&&(dy*dy+dxq)>Rtaxq) return 0;
00048 //
00049 // // ora mi riferisco al centro dell'arco inferiore
00050 //  dy=P_Cin[1]+Lin[1]-Lin[0];
00051 //  if(dy<0.&&(dy*dy+dxq)>Rtaxq) return 0;
00052 
00053 // e' interno al buco
00054 
00055 //   Dist.print("dist");
00056 
00057    return -1;
00058    }
00059   else  return posto;
00060 
00061 }
00062 //----------------- --------
00063 void DevYTax::Prgeom()
00064  {
00065 
00066   Gout<<"==================  R i v e l a t o r e =================";
00067   Gout<<"\n --> < "<<nome <<" >  [ "<<fun
00068   <<" ]  Y_tax Rettang. con buco rettang+arco agli estremi.";
00069   Device::Prgeom();
00070   Gout<<std::endl;
00071 }
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
 All Classes Namespaces Files Functions Variables