Message: Re: use G4PSDoseDeposit class together with variance deduction techniques Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: use G4PSDoseDeposit class together with variance deduction techniques 

Keywords: Dose, sensitive detector
Forum: Hits, Digitization and Pileup
Re: None use G4PSDoseDeposit class together with variance deduction techniques (long)
Re: None Re: use G4PSDoseDeposit class together with variance deduction techniques (Tsukasa Aso)
Date: 10 Aug, 2007
From: long <long>

Tsukasa Aso,
   Thank you for your reply. Here some more information on my test results. 
  Result without variance deduction:
   G4PSDoseDeposit: 4.18e-8 gray   , UserStepping: 4.18e-8 gray
  Result with variance deduction(splitNuclei):
   G4PSDoseDeposit: 1.38e-4 gray   , UserStepping: 4.3*e-8 gray
   The following code is my user-defined scorer. I hope it could be useful
for you.     
  with best regards!
long

//-------------------------------------------------------------------
void my1SteppingAction::UserSteppingAction(const G4Step* pStep) 
{
  CallAddDoseRate(pStep); // only in detector plane 
  CallAddSpectrum(pStep);
  CallAddIsotope(pStep);
  CallEnergyDistribution(pStep);
  CallAddEmittedParticle(pStep);
  //CallAddLostPrimaryParticle(pStep);

#if OUTPUT_FILES
  CallAddNeutron(pStep);// only output to regular file,not through AIDA
#endif
}

void my1SteppingAction::CallAddDoseRate(const G4Step* pStep) 
{
#ifdef G4ANALYSIS_USE
 G4String CurrentVolumeName = pStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume()->GetName();
  if (CurrentVolumeName == "physDetCell")
    {
      if (pStep->GetTotalEnergyDeposit() ) 
	{
	  G4Track* pTrack = pStep->GetTrack();  //G4Track* G4Step::GetTrack() const
	  G4ThreeVector prePoint = pStep->GetPreStepPoint()->GetPosition();
	  G4double time = pStep->GetPreStepPoint()->GetGlobalTime() ;
	  // - pStep->GetPreStepPoint()->GetLocalTime(); 
	  //    G4double time = pStep->GetPreStepPoint()->GetLocalTime(); // time since the track was created
	  G4double edep = pStep->GetTotalEnergyDeposit();
	  G4double weight = pStep->GetPreStepPoint()->GetWeight() ; 
	  G4String ParticleName = pTrack->GetDefinition()->GetParticleName();
	  const G4VTouchable *pTouchable = pStep->GetPreStepPoint()->GetTouchable();
	  G4int iy=pTouchable->GetReplicaNumber(2);  // topest level =2
	  G4int ix=pTouchable->GetReplicaNumber(1);
	  G4int iz=pTouchable->GetReplicaNumber(0);

	  // debug code --Begin
	  //	  if(time <= 0*s || time >=3600*24*7*s) 
	  //  {
	  //    G4cout << "ParticleName: "<<ParticleName <<"   "<<"time: "<<time/s<<G4endl;
	  //  }
          // debug code --end
	  // all the geometryical information should be taken from preStepPoint

	  my1AnalysisManager::GetInstance()->AddDoseRate(ix,iy,iz,ParticleName,edep,weight,time);
 	}
    }
#endif
}

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

 Add Message Add Message
to: "Re: use G4PSDoseDeposit class together with variance deduction techniques"

 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 ]