FlyoDoc_2011 Pisa 2011 by GmP --- 011

flyopunta/src/src_dev48/devhac.cpp

00001 /***************************************************************************
00002                           devhac.cpp  -  description
00003                              -------------------
00004     begin                : Tue Jul 31 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 "evento.h"
00014 #include "devhac.h"
00015 #include "particella.h"
00016 #include "triggerbox.h"
00017 
00018 DevHac::DevHac()
00019 {
00020         devtype=TypDevHac;
00021   devclass="Hadron_Cal";
00022 }
00023 DevHac::~DevHac()
00024 {}
00025 //----------------- --------
00026 void DevHac::Prgeom()
00027 {
00028 
00029         Gout<<"==================  R i v e l a t o r e =================";
00030         Gout<<"\n --> < "<<nome <<" >  [ "<<fun
00031         <<" ]  Hadron Calorimeter:  Rettang. con buco cilindrico "<<std::endl;
00032         Device::Prgeom();
00033 }
00034 //=======-----------------------------------
00035 void DevHac::DataSmear()
00036 {
00038         double xh,yh,ep,norma;
00039         emDev=0.0;
00040         int i=0;
00041         sepm=120.;
00042         while ( i<=nhit )
00043         {
00044 
00045                 xh=M_Hits[i].Xdev.x;
00046                 yh=M_Hits[i].Xdev.y;
00047                 norma=sqrt ( xh*xh+yh*yh );
00048                 // distanza minima dal centro
00049                 if ( norma<sepm ) sepm=norma;
00050                 //  calcolo degli errori per il calorimetro    da rivedere.
00051                 ep=M_Hits[i].e_rivela;
00052                 if ( ep>0.0 )
00053                 {
00054                         double err=20./sqrt ( ep );  // energy error for hac
00055                         emDev+=M_Hits[i].e_rivela =Pgauss ( err,ep );
00056                 }
00057                 i++;
00058         }
00059 
00060 }
 All Classes Namespaces Files Functions Variables