TITLE: Are root stacks characterized by their divisor multiplicities?
QUESTION [12 upvotes]: Definitions/Background
Suppose $S$ is a scheme and $D\subseteq S$ is an irreducible effective Cartier divisor. Then $D$ induces a morphism from $S$ to the stack $[\mathbb A^1/\mathbb G_m]$ (a morphism to this stack is the data of a line bundle and a global section of the line bundle, modulo scaling). For a positive integer $k$, the root stack $\sqrt[k]{D/S}$ is defined as the fiber product
$\begin{matrix}
 \sqrt[k]{D/S} & \longrightarrow & [\mathbb A^1/\mathbb G_m] \\
  p\downarrow & & \downarrow \wedge k \\
  S & \longrightarrow & [\mathbb A^1/\mathbb G_m]
\end{matrix}$
where the map $\wedge k: [\mathbb A^1/\mathbb G_m]\to [\mathbb A^1/\mathbb G_m]$ is induced by the maps $x\mapsto x^k$ (on $\mathbb A^1$) and $t\mapsto t^k$ (on $\mathbb G_m$). The morphism $p:\sqrt[k]{D/S}\to S$ is a coarse moduli space and is an isomorphism over $S\smallsetminus D$. Moreover, there is a divisor $D'$ on $\sqrt[k]{D/S}$ such that $p^*D$ is $kD'$.
The data of a morphism from $T$ to $\sqrt[k]{D/S}$ is equivalent to the data a morphism $f:T\to S$ and a divisor $E$ on $T$ such that $f^*D = kE$.
The question

Suppose $\mathcal X$ is a DM stack, that $f:\mathcal X\to S$ is a coarse moduli space, that $f$ is an isomorphism over $S\smallsetminus D$, and that $f^*D = kE$ for an irreducible Cartier divisor $E$ on $\mathcal X$. Is the induced morphism $\mathcal X\to \sqrt[k]{D/S}$ an isomorphism?

I get the strong impression that the answer should be "yes", at least if additional conditions are placed on $\mathcal X$.
A counterexample
Here's a counterexample to show that some additional condition needs to be put on $\mathcal X$. Take $G$ to be $\mathbb A^1$ with a doubled origin, viewed as a group scheme over $\mathbb A^1$. Then $\mathcal X=[\mathbb A^1/G]\to \mathbb A^1$ is a coarse moduli space ("there's a $B(\mathbb Z/2)$ at the origin"). If we take $D\subseteq \mathbb A^1$ to be the origin, then the pullback to $\mathcal X$ is the closed $B(\mathbb Z/2)$ with multiplicity 1. Yet the induced morphism from $\mathcal X$ to $\sqrt[1]{D/\mathbb A^1}\cong \mathbb A^1$ is not an isomorphism.
In this case, $\mathcal X$ is a smooth DM stack, but has non-separated diagonal.

REPLY [10 votes]: What do you mean by an irreducible Cartier divisor? Assume that $S$ and $D$ are regular, that $\mathcal X$ is normal and has finite inertia, and that $f^*D = kE$ for a reduced divisor $E$ on $\mathcal X$. Also assume that $\mathcal X$ is tame in codimension 1. Then the induced morphism $\mathcal X\to \sqrt[k]{D/S}$ is proper, because both stacks are proper over $S$. It is also birational. I claim that is representable in codimension 1; this follows from the fact that $\mathcal X$ is ramified of degree $k$ at the generic point of each irreducible component of $D$ (this can be done, for example, by taking the strict henselization of $S$ at the generic point of such a component, thus reducing to the case that $S$ is an henselian trait, which is easy, using the tameness hypothesis). Thus $\mathcal X\to \sqrt[k]{D/S}$ is a proper morphism with finite fibers, $\mathcal X$ is normal, $\sqrt[k]{D/S}$ is regular, and is an isomorphism in codimension 1. By purity of branch locus, it must be étale; and then it must be an isomorphism.
I think that all of the hypotheses are necessary. For example, already when $D$ is a nodal curve on a smooth surface $S$ there are counterexamples: there is a smooth stacks having $S$ as its moduli space, which is ramified of order $k$ along $D$ (this is different from $\sqrt[k]{D/S}$, because the latter is singular). For example, when $D$ is the union of two smooth curves intersecting transversally, you take the fiber product of the root stacks of the two curves. There are also counterexamples when $\mathcal X$ is not normal, or when it is not tame.