There are several options, depending on exactly what you want to do.
Let $\hat{d}$ be the unit ($\lVert\hat{d}\rVert = 1$) direction vector,
$$\hat{d} = \frac{\vec{d}}{\lVert\vec{d}\rVert} \tag{1}\label{NA1}$$
Let $\hat{u}$ be an unit vector perpendicular to $\hat{d}$; essentially, the direction perpendicular to the spray for which $\varphi = 0$.
If your spray is radially symmetric, then you can pick $\hat{u}$ freely. One way to pick it is to calculate $\hat{e}_x \cdot \hat{d}$, $\hat{e}_y \cdot \hat{d}$, and $\hat{e}_z \cdot \hat{d}$ (the $\hat{e}$ unit vectors being the axis vectors, i.e. $\hat{e}_x = \left [ \begin{matrix} 1 \\ 0 \\ 0 \end{matrix} \right ]$), and let $\hat{e}$ be $\hat{e}_x$, $\hat{e}_y$, or $\hat{e}_z$, depending on which one was closest to zero, then
$$\vec{u} = \hat{e} - \hat{e} \left ( \hat{e} \cdot \hat{d} \right ), \quad
\hat{u} = \frac{\vec{u}}{\lVert\vec{u}\rVert} \tag{2}\label{NA2}$$
If you let
$$
\hat{d} = \left [ \begin{matrix} d_x \\ d_y \\ d_z \end{matrix} \right ], \quad
\hat{u} = \left [ \begin{matrix} u_x \\ u_y \\ u_z \end{matrix} \right ],
\quad
\hat{v} = \hat{d} \times \hat{u} = \left [ \begin{matrix} v_x \\ v_y \\ v_z \end{matrix} \right ] = \left [ \begin{matrix} d_y u_z - d_z u_y \\ d_z u_x - d_x u_z \\ d_x u_y - d_y u_x \end{matrix} \right ]
$$
then the rotation matrix $\mathbf{R}$ that rotates $z$ axis towards $\hat{d}$, $x$ axis towards $\hat{u}$, and $y$ axis towards $\hat{v}$, is
$$
\mathbf{R} = \left [ \begin{matrix}
u_x & v_x & d_x \\
u_y & v_y & d_y \\
u_z & v_z & d_z \\
\end{matrix} \right ] \tag{3a}\label{NA3a}
$$
Because $\mathbf{R}$ is an orthonormal matrix, the inverse rotation is
$$
\mathbf{R}^{-1} = \mathbf{R}^T = \left [ \begin{matrix}
u_x & u_y & u_z \\
v_x & v_y & v_z \\
d_x & d_y & d_z \\
\end{matrix} \right ] \tag{3b}\label{NA3b}
$$
This means that if you have a vector $\vec{p}$ in the coordinate system where the spray is along the positive $z$ axis and $\varphi = 0$ along positive $x$ axis, then
$$\vec{q} = \mathbf{R}\vec{p} \quad \iff \quad \vec{p} = \mathbf{R}^T \vec{q} \tag{4}\label{NA4}$$
i.e. vector $\vec{q}$ is the corresponding vector in the coordinate system where the spray is along $\hat{d}$, and $\varphi = 0$ along $\hat{u}$.
Let's say you want to use spherical coordinates $(r ,\, \varphi ,\, \theta)$ where $r$ is the distance from the nozzle, $\theta$ is the angle to the spray direction vector $\vec{d}$, and $\varphi$ is an angle around the axis of the direction.
Let's say the unit vector $\hat{d}$ describes the spray axis, and $\hat{u}$ describes the direction where $\varphi = 0$, both perpendicular to each other ($\hat{d} \perp \hat{u}$; $\hat{d} \cdot \hat{u} = 0$; $\hat{v} = \hat{d} \times \hat{u}$; $\hat{v} \perp \hat{u}$; and $\hat{v} \perp \hat{d}$).
You do not need to use the rotation matrix $\mathbf{R}$ to generate a vector given $r$ (length), $\theta$ (angle to axis of spray), and $\varphi$ (rotation around axis of spray). The result $\vec{q} = \mathbf{R}\vec{p}$ is equal to
$$
\vec{q}(r, \varphi, \theta) = r \cos(\theta) \hat{d} + r \sin(\theta) \cos(\varphi) \hat{u} + r \sin(\theta) \sin(\varphi) \hat{v}
\tag{5}\label{NA5}
$$
To test whether vector $\vec{p}$ is within the right circular cone that has the apex at origin, axis $\vec{d}$, and aperture $2\theta$, use
$$\vec{p} \cdot \vec{d} \le \lVert \vec{p} \rVert \lVert \vec{d} \rVert \cos(\theta) \tag{6}\label{NA6}$$
Note that when the dot products equal the product of their norms, the two vectors are parallel,
$$\vec{p} \cdot \vec{d} = \lVert \vec{p} \rVert \lVert \vec{d} \rVert \quad \iff \quad \vec{p} \parallel \vec{d}$$
and at the limit,
$$\vec{p} \cdot \vec{d} = \lVert \vec{p} \rVert \lVert \vec{d} \rVert \cos(\theta)$$
the vector is at the surface of the right circular cone.