return;
}
- fMCApp=new AliMC(GetName(),GetTitle());
+ if (!fMCApp)
+ fMCApp=new AliMC(GetName(),GetTitle());
gROOT->LoadMacro(setup);
gInterpreter->ProcessLine(fConfigFunction.Data());
fNdets = fModules->GetLast()+1;
- // Added also after in case of interactive initialisation of modules
- fNdets = fModules->GetLast()+1;
-
TIter next(fModules);
for(Int_t i=0; i<fNdets; ++i)
{
else AliConfig::Instance()->Add(mod,fRunLoader->GetEventFolder()->GetName());
Modules()->Add(mod);
+
+ fNdets++;
}
// Exclude detectors with temporary problem
iCRT = 0;
iEMCAL = 0;
- iFMD = 0;
// END OF ONLY FOR GEANT4
{
//=================== SHIL parameters ============================
- AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
+ AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
}
AliTPC *TPC = new AliTPCv2("TPC", "Default");
// All sectors included
- TPC->SetSecAL(-1);
TPC->SetSecAU(-1);
+ TPC->SetSecAL(-1);
}
if (iRICH)
{
//=================== RICH parameters ===========================
- AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
+ AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
}
else
AliRunConfiguration::SwitchHoles(kFALSE);
}
+
+ cout << "End of g4ConfigCommon.C" << endl;
}
Float_t EtaToTheta(Float_t arg){
menu->AddButton("Run", "gAlice->Run()", "Process Alice run");
menu->AddButton("Geant4", "CreateGeant4()", "Create Geant4 only (without initializing AliRun)");
menu->AddButton("Geant4UI", "StartGeant4UI()","Go to Geant4 Interactive session");
+ menu->AddButton("XML", "GenerateXML()","Generate XML (AGDD) file with geometry description");
+ menu->AddButton("Quit", "Quit()", "Quit aliroot");
gROOT->SaveContext();
menu->Show();
}
else {
cout << "Monte Carlo has not been yet created." << endl;
}
+}
+
+void GenerateXML()
+{
+ if (gMC) {
+ // release Root terminal control
+
+ // go into non-raw term mode
+ //Getlinem(kCleanUp, 0);
+
+ // add test if gMC is TGeant4
+ TGeant4* g4 = (TGeant4*)gMC;
+
+ g4->ProcessGeantCommand("/xml/generateAGDD");
+
+ // new Root prompt
+ //Getlinem(kInit, ((TRint*)gROOT->GetApplication())->GetPrompt());
+ }
+ else {
+ cout << "Monte Carlo has not been yet created." << endl;
+ }
+}
+
+void Quit()
+{
+ delete gAlice->GetRunLoader();
+ delete gAlice;
+
+ exit(0);
}