5   gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
 
    9   TFile *fout = 
new TFile(outputfile,
"RECREATE");
 
   12   TChain mych(
"pndsim");
 
   29   mych.Add(
"/s/olaf/test.root");
 
   34   Long64_t nentries = (Long64_t)mych.GetEntries();
 
   47   cout << 
"we have " << nentries << 
" events" << endl;
 
   49   TClonesArray *fRadMapPoint = 
new TClonesArray(
"FairRadMapPoint");
 
   51   mych.SetBranchAddress(
"RadMap",&fRadMapPoint);
 
   58   TH2D *histo = 
new TH2D(
"histo",
"histo",400,-100.,300.,150,0.,150.);
 
   60   TH2D *his2  = 
new TH2D(
"his2",
"his2",1000,-300.,700.,300,0.,300.);
 
   62   TH2D *his3 = 
new TH2D(
"his3",
"his3",400,-100.,300.,150,0.,150.);
 
   64   TH2D *his4 = 
new TH2D(
"his4",
"his4",2300,-100.,130.,1000,0.,50.);
 
   66   TH2D *spezial = 
new TH2D(
"spezial",
"spezial",100,125.,135.,100,45.,55.);
 
   68   TH2D *his5 = 
new TH2D(
"his5",
"his5",120,-60.,60.,120,-60.,60.);
 
   80   cout << 
"you requested " << nevreq << 
" events" << endl;
 
   88   if(nevents>nentries) nevents=nentries;
 
   94   for (Long64_t 
i=0; 
i<nevents; 
i++) {
 
   96     cout << 
"event " << 
i << endl;
 
  109     npoints = fRadMapPoint->GetEntries();
 
  116     for (Int_t ii=0; ii < 
npoints; ii++) {
 
  120       FairRadMapPoint *
p= (FairRadMapPoint *) fRadMapPoint->At(ii);
 
  125       dSL = p->GetDoseSL();
 
  126       if(dose<=0) 
continue;
 
  129       VolID=p->GetDetectorID(); 
 
  135       r= 
sqrt(pow(p->GetXOut(),2)+pow(p->GetYOut(),2));
 
  139       histo->Fill(z,r,dose);
 
  140       his2->Fill(z,r,dose);
 
  141       his4->Fill(z,r,dose);
 
  148       spezial->Fill(z,r,dose);
 
  151         his3->Fill(z,r,dose); 
 
  166   spezial->Scale(scale);
 
  170   fout->Write(
"histo");
 
  175   fout->Write(
"spezial");
 
  177   cout << 
"total no. of points: " << sumofpoints << endl;
 
friend F32vec4 sqrt(const F32vec4 &a)
int plot_radmap(Long64_t nevreq, TString outputfile="RadMap_Out.root")