Please follow the steps as described in Example 1 and Example 2 of the ATLAS Analysis on the Grid Tutorial