Message: Re: Reduce Processing time Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Reduce Processing time 

Forum: Processes Involving Optical Photons
Re: Question Reduce Processing time (JungEun Elena Suh)
Re: Idea Re: Reduce Processing time (JungEun Elena Suh)
Re: Feedback Re: Reduce Processing time (Gumplinger Peter)
Date: 02 Jul, 2014
From: JungEun Elena Suh <JungEun Elena Suh>

Dear Gumplinger Peter

Hello!
Thanks for your reply.

I found another way to reduce time so now it takes around 1 hour for 1000 events.
It's enough for me. :-)
Actually I didn't studied that problem concerning accumulation.
Last time I added lines below in the EventAction.cc file, and saved data when the name of next volume is what I wanted.
(At first time, I used it for visualizing only the selected rays)

-----
 void OpNoviceEventAction::EndOfEventAction(const G4Event* evt) {

  G4TrajectoryContainer* TC = evt->GetTrajectoryContainer();
  if(!TC) return;

  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
  if(!pVVisManager) return;

  static const G4String requiredAttName = "PostVPath";
  static const G4String requiredAttValue = "PhotonDet";
  pVVisManager->BeginDraw();
  for (G4int iT = 0; iT < TC->entries(); iT++) {
    G4VTrajectory* trajectory = (*TC)[iT];
    if(!trajectory) continue;
    for(G4int iPoint = 0; iPoint < trajectory->GetPointEntries(); iPoint++) {
      G4VTrajectoryPoint* point = trajectory->GetPoint(iPoint);
      if(!point) continue;
      std::vector<G4AttValue>* attValues = point->CreateAttValues();
      std::vector<G4AttValue>::const_iterator iAtt;
      for(iAtt = attValues->begin(); iAtt != attValues->end(); ++iAtt) {
	if(iAtt->GetName() == requiredAttName && iAtt->GetValue().contains(requiredAttValue)) break;
      }
      if(iAtt != attValues->end()) {
	pVVisManager->Draw(*trajectory);
      }
      delete attValues;
    }
  }
  pVVisManager->EndDraw();

} 
-----

Rather than that, now I just put save data command in SteppingAction.cc file. Without those many loops.

That accumulation problem, I'll study it sooner or later.

Thank you so much!

 Add Message Add Message
to: "Re: Reduce Processing time"

 Subscribe Subscribe

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