Wrong Cs spectrum

Hello everyone!
I am trying to simulate the 137Cs spectrum of a CdZnTe detector and what I am getting is the following picture which is not right since the Cs peak is too small comparing with the Compton peak.

I added the following code in the EvenAction file in order to have a .dat output file:
void EventAction::EndOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
//printing survey
//
if (evtNb%fPrintModulo == 0)
G4cout << “\n end of event " << std::setw(6) << evtNb
<< " :” + fDecayChain << G4endl;

// G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();

FILE *opf1 = fopen(“out.dat”,“a”);
if (fTotalEnergyDeposit>0. ) {
fprintf(opf1,"%d %e \n", evt->GetEventID()+1, fTotalEnergyDeposit/MeV);
}
fclose(opf1);

And then I am using an another code to plot the histogram which is the following:
{
gROOT->Reset();
#include “Riostream.h”

ifstream in;
in.open(“out2.dat”);
Double_t x, sum, evt;
sum =0;
Int_t nlines=0;
TH1F *h1 = new TH1F(“h1”,“x distribution”,2047,0.,1.511);

TRandom3 r;
while(!in.eof()){
in >> evt>> x;
x=r.Gaus(x,0.007);
h1->Fill(x);
nlines++;

}
in.close();

h1->SetTitle(";Energy (MeV);Counts");

TPaveStats *canv = new TPaveStats();
gStyle->SetOptStat(1111111);
//Background Removal
// a = h1->ShowBackground(20,“nocompton”);
// h1->Add(a,-1);
// c1->SetLogy(1);
h1->Draw();
// h1.Print(“all”);
// h1->SaveAs(“h1.C”);
for (int i=0;i<2047;i++)
printf("%g %g\n",h1->GetBinCenter(i),h1->GetBinContent(i));

}

Could someone help me and tell me what I am doing wrong and I cannot extract a correct Cs spectrum?

Thank you very much!!!