Effective dielectric constants of photonic crystal of aligned anisotropic cylinders and the optical response of a periodic array of carbon nanotubes