r1 - 07 Apr 2009 - 03:27:58 - SeoKonKangYou are here: KoreaCmsWiki >  Main Web > TWikiUsers > SeoKonKang > LogBooks > DailyLogBook > 2009 > 20090401 > MySim_cc
#include<iostream>
#include<cstdlib>
#include"MySD.hh"
#include"RunAction.hh"
using namespace std;

int main()
{
 extern MySD *aSD;

 char SD_name[15] = "SDX123Y123Z123"; // at SteppingAction
 // SD_name=aStep->GetPhysicalName();

 cout << "Full name is " << SD_name << endl;

 RunAction *aRun = new RunAction;
 aRun->BeginOfRunAction(aSD);

 for(int i=0;i<10;i++){

        // MySD *aSD = new MySD;

         int Nx = aSD->GetVoxelXID(SD_name);
         int Ny = aSD->GetVoxelYID(SD_name);
         int Nz = aSD->GetVoxelZID(SD_name);

         cout << "DepE["<< Nx <<"]["<< Ny << "][" <<Nz << "]=";
         double aStep_dep = i*1.1; // at SteppingAction
         // aStep_dep = aStep->GetDepositEnegy();

         aSD->SumDepE(Nx,Ny,Nz,aStep_dep);
         aSD->ShowDepE(Nx,Ny,Nz);

 }

 aRun->EndOfRunAction(aSD);

 return 0;

}

-- SeoKonKang - 07 Apr 2009

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
KOREA-CMS
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding KoreaCmsWiki? Send feedback