Message: Re: Change detector setup (refractive index of the grease) between runs. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Change detector setup (refractive index of the grease) between runs. 

Forum: Event and Track Management
Re: Question Change detector setup (refractive index of the grease) between runs. (Bogdan Sikach)
Re: Idea Re: Change detector setup (refractive index of the grease) between runs. (Michael H. Kelsey)
Date: Mar 27, 01:58
From: Bogdan Sikach <Bogdan Sikach>

Hi, Michael.

I already succeeded with the approach which resembles your suggestion.

I added public methods in my `DetectorConstruction` and `RunAction` classes.

But there is a difference between where I call `ReinitializeGeometry` funtion. I do it in `main()`:

<code>

    //here is main() function

    ...

    G4RunManager* runManager = new G4RunManager();

          DetectorConstruction* detector = new DetectorConstruction();
          runManager->SetUserInitialization( detector );

          runManager->SetUserInitialization( new PhysicsList() );

          runManager->SetUserAction( new PrimaryGeneratorAction() );

          RunAction* runAction           = new RunAction();
          runManager->SetUserAction( runAction );

          EventAction* eventAction = new EventAction();
          runManager->SetUserAction( eventAction );

          runManager->Initialize()

    ...

          G4String pathToDataDir = "/home/lrdprdx/BINP/g4work/LightCollection/data/reflectivity";
          for( G4int i = 0; i < 100; i++ )
          {
              detector->SetReflectivity( G4double(i) / 100.);
              runAction->SetFileName( pathToDataDir + "/ref" + std::to_string(i) );
  //
              runManager->ReinitializeGeometry();
              runManager->BeamOn( cs::nEvents );

          }
</code>

I am wondering if it is OK too.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Change detector setup (refractive index of the grease) between runs.   (Mike Kelsey - Mar 27, 07:13)
 Add Message Add Message
to: "Re: Change detector setup (refractive index of the grease) between runs."

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]