Modified 17.12.08 by M. Al-Turany The hit producing is added to the simulation session, so that the EmcHits are produced on the fly during the simulation 
   15   gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
 
   18   FairRunSim *
fRun = 
new FairRunSim();
 
   28    fRun->SetName(
"TGeant4");
 
   32   transportModel = fRun->GetName();
 
   33   cout<<
"transport model = "<<transportModel <<endl;
 
   35   fRun->SetOutputFile(
"emc_complete_corr.root");
 
   41   emcDigiFile += 
"/macro/params/";
 
   44   FairRuntimeDb* 
rtdb = fRun->GetRuntimeDb();
 
   45   FairParAsciiFileIo* 
parIo1 = 
new FairParAsciiFileIo();
 
   46   parIo1->open(emcDigiFile.Data(),
"in");
 
   47   rtdb->setFirstInput(parIo1);        
 
   51   FairParRootFileIo* 
output=
new FairParRootFileIo(kParameterMerged);
 
   52   output->open(
"simparams.root");
 
   53   rtdb->setOutput(output);
 
   58   fRun->SetMaterials(
"media_pnd.geo");
 
   63   Cave->SetGeometryFileName(
"pndcave.geo");
 
   64   fRun->AddModule(Cave); 
 
   67   Magnet->SetGeometryFileName(
"magnet.geo");
 
   68   fRun->AddModule(Magnet);
 
   71   Pipe->SetGeometryFileName(
"pipe.geo");
 
   72   fRun->AddModule(Pipe);
 
   84   FairPrimaryGenerator* 
primGen = 
new FairPrimaryGenerator();
 
   85   fRun->SetGenerator(primGen);
 
   88   cout <<
" part = "<< part<<endl;
 
   89   TDatabasePDG *pdg = 
new TDatabasePDG();
 
   90   Int_t part_pid = pdg->GetParticle(part)->PdgCode();
 
   92   cout <<
"pid == "<< part_pid<<endl;
 
   95   FairBoxGenerator* 
boxGen = 
new FairBoxGenerator(part_pid, 5); 
 
   98   boxGen->SetPRange(1.,1.); 
 
  100   boxGen->SetPhiRange(0., 360.); 
 
  101   boxGen->SetThetaRange(0., 180.); 
 
  102   boxGen->SetXYZ(0., 0., 0.); 
 
  103   primGen->AddGenerator(boxGen);  
 
  106   fRun->SetBeamMom(15); 
 
  109   fRun->SetField(fField);
 
  116   fRun->AddTask(emcHitProd);
 
  122   fRun->AddTask(emcHitsToWaveform);  
 
  123   fRun->AddTask(emcWaveformToDigi);  
 
  127   fRun->AddTask(emcMakeCluster);
 
  130   fRun->AddTask(emcHdrFiller); 
 
  134   fRun->AddTask(emcMakeBump);
 
  137   fRun->AddTask(emcMakeRecoHit);
 
  139    cout<< 
"emc_complete.C --> BEFORE corrections "<<endl;
 
  143    fRun->AddTask(emcCorrection);
 
  153   Par->setInputVersion(fRun->GetRunId(),1);
 
  162   cout <<
" nEvents == "<<
nEvents<<endl;
 
  164   cout <<
" ***done == "<<endl;
 
  169   printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
 
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not. 
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
Create PndEmcRecoHit from PndEmcBump. 
PndEmcHitsToWaveform * emcHitsToWaveform
void SetParameters(FairField *field)
creates PndEmcHits from PndEmcPoints 
void SetStorageOfData(Bool_t val)
PndEmcMakeBump * emcMakeBump
FairParRootFileIo * output
FairPrimaryGenerator * primGen
PndEmcHdrFiller * emcHdrFiller
void SetStorageOfData(Bool_t val)
PndEmcMakeCluster * emcMakeCluster
virtual void SetGeometryVersion(const Int_t GeoNumber)
void SetStorageOfData(Bool_t val)
Method to specify whether bumps are stored or not. 
Takes clusters and slits them up into bumps. 
PndEmcWaveformToDigi * emcWaveformToDigi
FairParAsciiFileIo * parIo1
FairBoxGenerator * boxGen
Task to cluster PndEmcDigis. 
void SetStorageOfData(Bool_t val)
Task to create Emc header.