3   if ( nStations != 3 && nStations != 4 ) {
 
    4     cout << 
"WRONG number of stations, only 3 or 4 allowed." << endl;
 
   14   OutputFile.Form(
"Gem_%dStations_%d_%dpart_n%d",nStations,pdgC,nparts,
nEvents);
 
   15   TString ParOutputFile=OutputFile;
 
   17   ParOutputFile+=
"_par.root";
 
   21   TString  MediaFile      = 
"media_pnd.geo";
 
   26   FairRunSim *
fRun = 
new FairRunSim();
 
   27   fRun->SetName(SimEngine.Data() );
 
   28   fRun->SetOutputFile(OutputFile.Data());
 
   29   fRun->SetBeamMom(BeamMomentum);
 
   30   fRun->SetMaterials(MediaFile.Data());
 
   31   FairRuntimeDb *
rtdb=fRun->GetRuntimeDb();
 
   35   FairParRootFileIo* 
output=
new FairParRootFileIo(kParameterMerged);
 
   36   output->open(ParOutputFile.Data());
 
   37   rtdb->setOutput(output);
 
   43   Cave->SetGeometryFileName(
"pndcave.geo");
 
   44   fRun->AddModule(Cave);
 
   47   Pipe->SetGeometryFileName(
"pipebeamtarget.geo");
 
   48   fRun->AddModule(Pipe);
 
   54   FairModule *dipole= 
new PndMagnet(
"MAGNET");
 
   55   dipole->SetGeometryFileName(
"dipole.geo");
 
   56   fRun->AddModule(dipole);
 
   59   Gem->SetGeometryFileName(Form(
"gem_%dStations_Tube.root",nStations));
 
   60   Gem->SetVerboseLevel(0);
 
   64   FairPrimaryGenerator* 
primGen = 
new FairPrimaryGenerator();
 
   65   fRun->SetGenerator(primGen);
 
   67   FairBoxGenerator* 
boxGen = 
new FairBoxGenerator(pdgC,nparts);
 
   68   boxGen->SetThetaRange(4,4);
 
   69   boxGen->SetPhiRange  (0.,360.);
 
   70   boxGen->SetPRange    (2.,2.);
 
   71   primGen->AddGenerator(boxGen);
 
   75   fRun->SetField(fField);
 
   79   fRun->SetStoreTraj(kFALSE);
 
   81   fRun->SetRadLenRegister(kFALSE);
 
   96   printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
 
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
FairParRootFileIo * output
FairPrimaryGenerator * primGen
Int_t gem_simBoxN(Int_t nStations, Int_t nparts, Int_t nEvents=1000, Int_t pdgC=211, int verboseLevel=0)
FairBoxGenerator * boxGen