Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:37

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