// ----------------------------------------------------------------------------- // ----- g3Config.C ----- // ----- ----- // ----- created by C. Simon on 2018-03-13 ----- // ----- ----- // ----------------------------------------------------------------------------- void Config() { FairRunSim* fRun = FairRunSim::Instance(); TString* gModel = fRun->GetGeoModel(); TGeant3* geant3 = NULL; if(strncmp(gModel->Data(),"TGeo",4) == 0) { geant3 = new TGeant3TGeo("C++ Interface to Geant3"); cout << "-I- G3Config: Geant3 with TGeo has been created." << endl; } else { geant3 = new TGeant3("C++ Interface to Geant3"); cout << "-I- G3Config: Geant3 native has been created." << endl; } // create Cbm Specific Stack CbmStack *st = new CbmStack(); // Set minimum number of points to store the track // The default value is one, which means each track // needs at least 1 point in any detector // st->SetMinPoints(0); geant3->SetStack(st) ; // ******* GEANT3 specific configuration for simulated Runs ******* Int_t iTrackInfoFrequency = 0; // "GTREVE_ROOT : Transporting primary track No XXXX" Int_t iEventInfoFrequency = 1000; // " **** GTRIGI: IEVENT= XXXX IDEVT= XXXX Random Seeds = XXXX 0" geant3->SetTRIG(1); // Number of events to be processed geant3->SetSWIT(4, iTrackInfoFrequency); geant3->SetDEBU(0, 0, iEventInfoFrequency); geant3->SetAUTO(1); // Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) geant3->SetABAN(2); // Restore 3.16 behaviour for abandoned tracks geant3->SetOPTI(2); // Select optimisation level for GEANT geometry searches (0,1,2) geant3->SetERAN(5.e-7); }