How to construct a certain covering of $\mathbb P^1_{\mathbb C}$ in a weighted projective space Let $b_1, ..., b_n \in \mathbb C$ be $n \geq 2$ distinct points and $p(x) = \prod_{i=1}^n (x-b_i)$. To $p$ corresponds a $d$-fold cyclic covering $\pi\colon X \to \mathbb P^1_{\mathbb C}$.
Briefly speaking, my question is: 
How do I get/construct $X$?
More precisely: 
To complete to a covering of $P^1_{\mathbb C}$, I should homogenize the equation $y^d = p(x)$, i.e., I get an equation $$y^d = \prod_{i=1}^n (x-b_iz)z^a$$
for some $a \in \mathbb Z$. Now, such a curve is singular, so I have to normalize it to make it smooth.
From the theory of hyperelliptic curves I know that such a normalization lives in a weighted projective space. Concretely, if $d = 2, n = 2g+2, g \geq 2, a = 0$, the above equation gives a smooth curve in the weighted projective space $\mathbb P (x,y,z) = \mathbb P (1,g+1,1)$. Similary, if $d = 2, g \geq 2$ but $n = 2g+1$, I choose $a = 1$ and obtain again a smooth curve in $\mathbb P (1,g+1,1)$. 
I've always used this as a black-box, but now I want to understand if this is a principle of greater generality. So my questions are:


*

*Can a similar thing as for hyperelliptic curves be done in the greater generality described above?


The next two questions assume that the answer to question 1 is positive, which I expect it to be.


*How do I choose $a$? 

*When $a$ is chosen, is the normalization of the curve $\{y^d = \prod_{i=1}^n (x-b_iz)z^a\} \subset \mathbb P^2_{\mathbb C}$ obtained by the same equation in some weighted projective space? If so, what are the weights (I feel like $x$ and $z$ should have the same weights)? 


Thanks in advance for any answers and help, it is really appreciated.
 A: To give a $d$-fold cyclic covering of a scheme $S$ is equivalent to giving a line bundle $L$ on $S$ and a morphism $s \colon L^d \to \mathcal{O}_S$, then the zero locus of the morphism is the branch divisor of the covering. 
Indeed, given $(L,s)$ one can take
$$
X = Spec_{S}(\mathcal{O}_S \oplus L \oplus \dots \oplus L^{d-1})
$$
with the algebra structure on the right side induced by $s$. 
Conversely, given a cyclic covering $p \colon X \to S$, the sheaf $p_*\mathcal{O}_X$ has a natural structure of the regular representation of $\mu_d$ (the group of $d$-th roots of unity), hence decomposes as the direct sum
$$
p_*\mathcal{O}_X = L_0 \oplus (L_1 \otimes \chi) \oplus \dots \oplus (L_{d-1} \otimes \chi^{d-1}),
$$
where $\chi$ is the standard character of $\mu_d$. The natural algebra structure on this sheaf is $\mu_d$-equivariant, hence $L_i \cong L^i$ for $L = L_1$, and the multiplication induces the map $s$.
In your case, $S = \mathbb{P}^1$, so $L$ should be $\mathcal{O}(-k)$ for some $k$, and the $s$ is a map $\mathcal{O}(-kd) \to \mathcal{O}$. You want the points $b_i$ to be in the branch locus, hence $s$ should vanish at these points (with multiplicity one). 
If $n$ is divisible by $d$ you can take $k = n/d$, then the constructed cyclic covering $X$ will be branched only over the $b_i$, and $X$ will be smooth.
If $n$ is not divisble by $d$ you can take $k = \lceil k/d \rceil$ but then $s$ will also have to vanish at some other points of $\mathbb{P}^1$. Note that if $s$ has a multiple vanishing point, then $X$ is singular (it looks locally as $y^d = x^2$), so if you want to keep $X$ smooth and not allow any other branching points away from $\infty$, you have to assume 
$$
n \equiv 0 \bmod d
\qquad\text{or}\qquad
n \equiv 1 \bmod d.
$$
