Commit 0cf7a290 authored by Valentina Fioretti's avatar Valentina Fioretti
Browse files

Phys parameter names changed

parent 293cfefb
Loading
Loading
Loading
Loading
+0 −117
Original line number Diff line number Diff line
@@ -85,76 +85,7 @@ BoGEMMSApplication::~BoGEMMSApplication() {}

void BoGEMMSApplication::DefinePhysicList(G4RunManager * runManager) {

 /*
    switch(gm.physVersion) {
 
#if defined(GEANT4_11_1)
        case 800: {
            
            ///AREMBES
            AREMBESPhys *physList = new AREMBESPhys;
            runManager->SetUserInitialization(physList);
            G4String hadronname;
            gm.config->readInto(hadronname, "HADRONPHYS.NAME");
            physList->AddPhysicsList(hadronname);
        }
            break;
            
        case 410: {
            
            ///COSI
            G4VModularPhysicsList* physicsList = new FTFP_BERT;
            physicsList->ReplacePhysics(new G4EmLivermorePolarizedPhysics());
 
            G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
            auto opticalParams               = G4OpticalParameters::Instance();

            //opticalParams->SetScintEnhancedTimeConstants(true);
            //opticalParams->SetScintFiniteRiseTime(true); // for the rise time
            opticalParams->SetScintTrackSecondariesFirst(true); // default
            
            opticalParams->SetWLSTimeProfile("delta"); // default

            opticalParams->SetCerenkovMaxPhotonsPerStep(100);
            opticalParams->SetCerenkovMaxBetaChange(10.0);
            opticalParams->SetCerenkovTrackSecondariesFirst(true);
            
            
            physicsList->RegisterPhysics(opticalPhysics);
            runManager->SetUserInitialization(physicsList);
             
        }
            break;
        
        case 420: {

            ///COSI (2)
            G4VModularPhysicsList* physicsList = new G4VModularPhysicsList();
            physicsList->RegisterPhysics(new G4EmStandardPhysics());
            physicsList->RegisterPhysics(new G4OpticalPhysics());
            runManager->SetUserInitialization(physicsList);
        }
	    break;

        case 430: {
            // COSI (3)
            G4VModularPhysicsList* physicsList = new FTFP_BERT;
            physicsList->ReplacePhysics(new G4EmLivermorePolarizedPhysics());
 
            runManager->SetUserInitialization(physicsList);
        }
        break;
            
#endif
	default: {
		cout << "Physic list version wrong: " << gm.physVersion << endl;
		exit(1);
	}
	break;
    }

    cout << "physics list ID " << gm.physVersion << endl;
  */
    
    cout << "Physics class activated: " << gm.physVersion << endl;
    auto obj = PhysClassFactory::createInstance(gm.physVersion);
@@ -170,54 +101,6 @@ void BoGEMMSApplication::DefinePhysicList(G4RunManager * runManager) {

G4VPhysicalVolume* BoGEMMSApplication::Construct() {
    
    /*
    //geometry definition
    switch(gm.geomVersion) {

    #if defined(GEANT4_11_1)
    case 22: {
            cout << "Build EXACRAD experiment" << endl;
            EXACRAD* detector = new EXACRAD();
            World_phys = detector->Construct();
    }
    break;
    case 29: {
            cout << "Build COSI" << endl;
            GeometryCOSI* detector = new GeometryCOSI();
            World_phys = detector->Construct();
        }
        break;
    case 32: {
            cout << "Build COSI ACS" << endl;
            GeometryCOSI_ACS* detector = new GeometryCOSI_ACS();
            World_phys = detector->Construct();
        }
        break;
    case 40: {
            cout << "Build GDML reader" << endl;
            GDMLread* detector = new GDMLread();
            World_phys = detector->Construct();
        }
        break;
    #endif

    default:
        cout << "Geometry version wrong: " << gm.geomVersion << endl;
        exit(1);
    }*/

    /*
    ClassFactory::registerClass<EXACRAD>("EXACRAD");

    auto obj = ClassFactory::create("EXACRAD");
    if (obj) {
        World_phys = obj->Construct();
    } else {
        std::cout << "Class not found." << std::endl;
    }
     
     */
    
    cout << "Geometry class activated: " << gm.geomVersion << endl;
    
    auto obj = GeoClassFactory::createInstance(gm.geomVersion);
+2 −2
Original line number Diff line number Diff line
@@ -97,9 +97,9 @@ void BoGEMMSGlobalMemory::OpenConfigFile() {
    cout << "IO.FILETYPE.MONGODB " << enableWriteMONGODB << endl;
    cout << "IO.FILE.XYZ " << enableWriteXYZ << endl;
    config->readInto(geomVersion, "GEOM.VERSION");
    config->readInto(physVersion, "ENERGYPROCESS.VERSION");
    config->readInto(physVersion, "PHYS.VERSION");
    cout << "GEOM.VERSION " << geomVersion << endl;
    cout << "ENERGYPROCESS.VERSION " << physVersion << endl;
    cout << "PHYS.VERSION " << physVersion << endl;

}

+11 −12
Original line number Diff line number Diff line
@@ -78,10 +78,12 @@ AREMBESPhys::AREMBESPhys() : fMessenger(nullptr), emAREMBESPhys(nullptr), decARE
    fMessenger = new PhysicsListMessenger(this);
    verboseLevel    = 1;
    
    G4String prefix = gm.physVersion;
    
    //cut off
    G4double inputCutValue = 1.*mm;
    gm.config->readInto(inputCutValue, "PHYS.DEFAULT.CUT");
    G4cout << "PHYS.DEFAULT.CUT: " << inputCutValue << G4endl;
    gm.config->readInto(inputCutValue, prefix + ".DEFAULT.CUT");
    G4cout << prefix + ".DEFAULT.CUT: " << inputCutValue << G4endl;
    
    G4double defaultCutValue = inputCutValue*mm;
    cutForGamma     = defaultCutValue;
@@ -94,33 +96,30 @@ AREMBESPhys::AREMBESPhys() : fMessenger(nullptr), emAREMBESPhys(nullptr), decARE

    // Decay physics and all particles
    // Particles
    G4cout << "1 - Defining DecayPhysics" << G4endl;
    decAREMBESPhys = new G4DecayPhysics("decays");

    // Radioactive decay
    G4cout << "2 - Defining RadioactiveDecayPhysics" << G4endl;
    RegisterPhysics(new G4RadioactiveDecayPhysics());
 
    gm.config->readInto(stepLimiterEnabled, "STEPLIMITER.ACTIVATE");
    G4cout << "STEPLIMITER.ACTIVATE: " << stepLimiterEnabled << G4endl;
    gm.config->readInto(stepLimiterEnabled, prefix + ".STEPLIMITER.ACTIVATE");
    G4cout << prefix + ".STEPLIMITER.ACTIVATE: " << stepLimiterEnabled << G4endl;

    if (stepLimiterEnabled) {
        steplimitAREMBESPhys = new G4StepLimiterPhysics();
    }
    
    // EM physics
    G4cout << "3 - Defining Standard em" << G4endl;
    fEmName = G4String("opt4");
    emAREMBESPhys = new G4EmStandardPhysics_option4();
    
    G4String hadronname;
    gm.config->readInto(hadronname, "HADRONPHYS.NAME");
    G4String listname;
    gm.config->readInto(listname, prefix + ".PHYSLIST");
    
    AddPhysicsList(hadronname);
    AddPhysicsList(listname);
    
    // activating specific parameters for the SS physics list
    gm.config->readInto(SS_physics, "AREMBESPhys.SSPHYS.ACTIVATE");
    G4cout << "AREMBESPhys.SSPHYS.ACTIVATE: " << SS_physics << G4endl;
    gm.config->readInto(SS_physics, prefix + ".SSPHYS.ACTIVATE");
    G4cout << prefix + ".SSPHYS.ACTIVATE: " << SS_physics << G4endl;

}

+6 −18
Original line number Diff line number Diff line
@@ -84,10 +84,12 @@ OPTPhys::OPTPhys()
    G4LossTableManager::Instance();
    verboseLevel    = 1;
    
    G4String prefix = gm.physVersion;
    
    //cut off
    G4double inputCutValue = 1.*mm;
    gm.config->readInto(inputCutValue, "PHYS.DEFAULT.CUT");
    G4cout << "PHYS.DEFAULT.CUT: " << inputCutValue << G4endl;
    gm.config->readInto(inputCutValue, prefix + ".DEFAULT.CUT");
    G4cout << prefix + ".DEFAULT.CUT: " << inputCutValue << G4endl;
    
    G4double defaultCutValue = inputCutValue*mm;
    
@@ -119,15 +121,13 @@ OPTPhys::OPTPhys()

    /* optical physics */
    G4int setOptPhys = 1;
    gm.config->readInto(setOptPhys, "PHYS.COSI.OPT.ACTIVATE");
    G4cout << "PHYS.COSI.OPT.ACTIVATE: " << setOptPhys << G4endl;
    gm.config->readInto(setOptPhys, prefix + ".OPT.PARAM.LIST");
    G4cout << prefix + ".OPT.PARAM.LIST: " << setOptPhys << G4endl;

    if (setOptPhys == 1) {
        G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
        auto opticalParams               = G4OpticalParameters::Instance();

        //opticalParams->SetScintEnhancedTimeConstants(true);
        //opticalParams->SetScintFiniteRiseTime(true); // for the rise time
        opticalParams->SetScintTrackSecondariesFirst(true); // default
        
        opticalParams->SetWLSTimeProfile("delta"); // default
@@ -139,18 +139,6 @@ OPTPhys::OPTPhys()
        RegisterPhysics(opticalPhysics);
    }
    
    /*
    ///COSI (2)
    G4VModularPhysicsList* physicsList = new G4VModularPhysicsList();
    physicsList->RegisterPhysics(new G4EmStandardPhysics());
    physicsList->RegisterPhysics(new G4OpticalPhysics());
    runManager->SetUserInitialization(physicsList);
     
    // COSI (3)
    G4VModularPhysicsList* physicsList = new FTFP_BERT;
    physicsList->ReplacePhysics(new G4EmLivermorePolarizedPhysics());
    runManager->SetUserInitialization(physicsList);
    */

}