  We analyze geometry of the second order differential operators, having in
mind applications to Batalin--Vilkovisky formalism in quantum field theory. As
we show, an exhaustive picture can be obtained by considering pencils of
differential operators acting on densities of all weights simultaneously. The
algebra of densities, which we introduce here, has a natural invariant scalar
product. Using it, we prove that there is a one-to-one correspondence between
second-order operators in this algebra and the corresponding brackets. A
bracket on densities incorporates a bracket on functions, an ``upper
connection'' in the bundle of volume forms, and a term similar to the
``Brans--Dicke field'' of the Kaluza--Klein formalism. These results are valid
for even operators on a usual manifold as well as for odd operators on a
supermanifold. For an odd operator $\Delta$ we show that conditions on the
order of the operator $\Delta^2$ give an hierarchy of properties such as
flatness of the upper connection and the Batalin--Vilkovisky master equation.
In particular, we obtain a complete description of generating operators for an
arbitrary odd Poisson bracket.
