  We propose a localization formula for the chiral de Rham complex generalizing
the well-known localization procedure in topological theories. Our formula
takes into account the contribution due to the massive modes. The key to
achieve this is to view the non-linear beta-gamma system as a gauge theory. For
abelian gauge groups we are in the realm of toric geometry. Including the b-c
system, the formula reproduces the known results for the elliptic genus of
toric varieties. We compute the partition function of several models.
