Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:19:54

0001 #include "EpdGeomV2.h"
0002 
0003 #include <calobase/TowerInfoDefs.h>
0004 
0005 #include <phool/PHObject.h>
0006 
0007 #include <array>
0008 
0009 float EpdGeomV2::get_r(unsigned int key) const
0010 {
0011   return tile_r.at(TowerInfoDefs::get_epd_rbin(key));
0012 }
0013 
0014 float EpdGeomV2::get_z(unsigned int key) const
0015 {
0016   return tile_z.at(TowerInfoDefs::get_epd_arm(key));
0017 }
0018 
0019 float EpdGeomV2::get_phi(unsigned int key) const
0020 {
0021   if (TowerInfoDefs::get_epd_rbin(key) == 0)
0022   {
0023     return tile_phi0.at(TowerInfoDefs::get_epd_phibin(key));
0024   }
0025 
0026   return tile_phi.at(TowerInfoDefs::get_epd_phibin(key));
0027 }
0028 
0029 void EpdGeomV2::set_z(unsigned int key, float z)
0030 {
0031   tile_z.at(TowerInfoDefs::get_epd_arm(key)) = z;
0032 }
0033 
0034 void EpdGeomV2::set_r(unsigned int key, float r)
0035 {
0036   tile_r.at(TowerInfoDefs::get_epd_rbin(key)) = r;
0037 }
0038 
0039 void EpdGeomV2::set_phi(unsigned int key, float f)
0040 {
0041   tile_phi.at(TowerInfoDefs::get_epd_phibin(key)) = f;
0042 }
0043 
0044 void EpdGeomV2::set_phi0(unsigned int key, float f0)
0045 {
0046   tile_phi0.at(TowerInfoDefs::get_epd_phibin(key)) = f0;
0047 }