A one dimensional photochemical model for the dayside ionosphere of Mars has been developed for calculating the density profiles of ions and electrons under steady state photochemical equilibrium condition. The study focuses on the Deep Dip campaigns of the Mars Atmosphere and Volatile EvolutioN mission (MAVEN) and used the in-situ measurements of neutral density profiles, solar flux and electron temperatures from instruments onboard MAVEN as input to the model. An energy deposition model is employed for calculating the attenuated photon flux and photoelectron flux at different altitudes in the ionosphere. The Analytical Yield Spectrum approach is used for calculating the photoelectron fluxes. Volume production rates of major primary ions, CO2+, CO+, O+, C+, N2+, and N+, due to photon and photoelectron impact are calculated and used as input to the model in which ion-neutral chemistry in the dayside ionosphere is simulated. The modeled ion profiles are compared with the ion mode observations of Neutral Gas Ion Mass Spectrometer (NGIMS) and electron density estimates from Langmuir Probe and Waves (LPW). The model could reproduce the observed structure of the major ion profiles O2+, CO2+, and electron density reasonably well. However, when the magnitudes are compared, the modeled values are roughly a factor of 2 larger than observation. By reducing the neutral CO2 density, the model outputs and the observed ion profiles and electron density profile can become closer. The model also calculated the densities of 11 other ions, viz. N+, C+, O+, NO+, N2H+, HCO+, N2+, CO+, OCOH+, HNO+, and OH+. Profiles of each of these ions are compared with the NGIMS observations during the respective orbits and are discussed in detail. Such a comparison for the deep dip periods is reported for the first time, which showcases the level of the current understanding of the ion chemistry in the Martian ionosphere.