]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/Hconfig.C
Charge of the pad saturates at ADC of 12bits (range 0-4095)
[u/mrichter/AliRoot.git] / HMPID / Hconfig.C
index 997aaf85abe09ae0f3c5fba93f1829bc1794bc8c..7a96665e44f92c4b59bea1a1b304070b0a3ec80d 100644 (file)
@@ -639,10 +639,10 @@ void HmpConfig::WriteBatch()
   if(fDetBG->GetButton(kTRD  )->GetState())  det+="TRD ";
   if(fDetBG->GetButton(kTOF  )->GetState())  det+="TOF ";
   if(!fVerBG->GetButton(kNo)->GetState())    det+="HMPID ";
-  char *sBatchName="Hbatch";
-  FILE *fp=fopen(Form("%s.C",sBatchName),"w"); if(!fp){Info("CreateBatch","Cannot open output file: %s.C",sBatchName);return;}
+  char *sBatchName="sim";
+  FILE *fp=fopen(Form("%s.C",sBatchName),"w"); if(!fp){Info("CreateSim","Cannot open output file: %s.C",sBatchName);return;}
   
-                                                    fprintf(fp,"void %s(Int_t iNevt,Bool_t isDbg,char *sCfg)\n{\n",sBatchName);
+                                                    fprintf(fp,"void %s(Int_t iNevt=1,Bool_t isDbg=kFALSE,char *sCfg=\"Config.C\")\n{\n",sBatchName);
                                                     fprintf(fp,"  gSystem->Exec(\"rm -rf hlt hough gphysi* fort* ZZZ* raw*\");  //remove garbage\n"); 
                                                     fprintf(fp,"  gBenchmark->Start(\"ALICE\"); TDatime time;      //start benchmarking\n\n");
                                                        
@@ -668,11 +668,25 @@ void HmpConfig::WriteBatch()
     else if(fRawBG->GetButton(kRoo)->GetState())    fprintf(fp,"  pSim->SetWriteRawData(\"%s\",\"raw.root\");     //raw data as ROOT\n",det.Data());
 
                                                     fprintf(fp,"  pSim->SetRunHLT(\"\");                           //no HLT stuff\n");   
-                                                    fprintf(fp,"  pSim->Run(iNevt);                              //run iNevt events\n  delete pSim;\n\n");
+                                                    fprintf(fp,"  pSim->SetQA(kFALSE);                             //no QA\n");
+                                                    fprintf(fp,"  pSim->Run(iNevt);                                //run iNevt events\n  delete pSim;\n\n");
   }//sim section
+                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <sim.C>: Start time: \";time.Print();\n");
+                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <sim.C>: Stop  time: \";time.Set();  time.Print();\n");
+                                                    fprintf(fp,"  gBenchmark->Show(\"ALICE\");\n");
+  
+                                                    fprintf(fp,"  gSystem->Exec(\"touch ZZZ______finished_______SSS\");\n}\n");
+                                                    fprintf(fp,"  gSystem->Exec(\"aliroot rec.C\");\n");
+  fclose(fp);  
+  char *sBatchName="rec";
+  FILE *fp=fopen(Form("%s.C",sBatchName),"w"); if(!fp){Info("CreateRec","Cannot open output file: %s.C",sBatchName);return;}
+  
+                                                    fprintf(fp,"void %s()\n{\n",sBatchName);
+                                                    fprintf(fp,"  gSystem->Exec(\"rm -rf RRR* \");  //remove garbage\n"); 
 
   if(fRecB->GetState()){
                                                     fprintf(fp,"  AliReconstruction *pRec=new AliReconstruction;\n");
+                                                    fprintf(fp,"  gBenchmark->Start(\"ALICE\"); TDatime time;      //start benchmarking\n\n");
                                                     
     //---------------------------------------------
     if     (fTrkBG->GetButton(kRecoPar)->GetState())
@@ -710,11 +724,11 @@ void HmpConfig::WriteBatch()
                                                     fprintf(fp,"  pRec->Run();delete pRec;\n\n");         
   }//rec part                                                       
 //benchmarks  
-                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <my/Batch.C>: Start time: \";time.Print();\n");
-                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <my/Batch.C>: Stop  time: \";time.Set();  time.Print();\n");
+                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <rec.C>: Start time: \";time.Print();\n");
+                                                    fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <rec.C>: Stop  time: \";time.Set();  time.Print();\n");
                                                     fprintf(fp,"  gBenchmark->Show(\"ALICE\");\n");
   
-                                                    fprintf(fp,"  gSystem->Exec(\"touch ZZZ______finished_______ZZZ\");\n}\n");
+                                                    fprintf(fp,"  gSystem->Exec(\"touch ZZZ______finished_______RRR\");\n}\n");
   fclose(fp);  
 }//WriteBatch()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -745,7 +759,11 @@ void HmpConfig::WriteConfig()
   fprintf(pF,"  pAL->SetNumberOfEventsPerFile(1000);\n");
   fprintf(pF,"  gAlice->SetRunLoader(pAL);\n\n");
 //Decayer  
-  if(fDecayerB->GetState()==kButtonDown){   
+  if(fDecayerB->GetState()==kButtonDown){
+    fprintf(pF,"  gSystem->Load(\"liblhapdf.so\"); // Parton density functions \n");
+    fprintf(pF,"  gSystem->Load(\"libEGPythia6.so\");   // TGenerator interface \n");
+    fprintf(pF,"  gSystem->Load(\"libpythia6.so\");   // Pythia \n");
+    fprintf(pF,"  gSystem->Load(\"libAliPythia6.so\");   // ALICE specifics implementations \n\n");
     fprintf(pF,"  AliDecayer *pDecayer=new AliDecayerPythia();\n");
     fprintf(pF,"  pDecayer->SetForceDecay(kAll);\n"); 
     fprintf(pF,"  pDecayer->Init();\n");