Message: Re: Retrieve dosis in each absorber in testem11 Not Logged In (login)

## Re: Retrieve dosis in each absorber in testem11

Forum: Documentation and Examples
Re: Retrieve dosis in each absorber in testem11 (azzeddine)
Re: Re: Retrieve dosis in each absorber in testem11 (michel maire)
Date: 09 Jan, 2016
From: azzeddine <azzeddine>

 ` first of all thank you dear michel for your reply ,in testem7 i have that :` ```/print dose in tallies // G4int tallyNumber = fDetector->GetTallyNumber(); if (tallyNumber > 0) { G4double Ebeam = fKinematic->GetEbeamCumul(); G4cout << "\n---------------------------------------------------------\n"; G4cout << " Cumulated Doses : \tEdep \tEdep/Ebeam \tDose" << G4endl; for (G4int j=1; j <= tallyNumber; j++) { G4double Edep = fTallyEdep[j], ratio = 100*Edep/Ebeam; G4double tallyMass = fDetector->GetTallyMass(j); G4double Dose = Edep/tallyMass; G4cout << " tally " << j << ": \t \t" << G4BestUnit(Edep,"Energy") << "\t" << ratio << " % \t" << G4BestUnit(Dose,"Dose") << G4endl; } G4cout << "\n---------------------------------------------------------\n"; G4cout << G4endl;``` if i want to do the same thing in testem11 , i have to create an array as you said to me : ```in class run exactly in method compute satistic : G4int NbOfAbsor = fDetector->GetNbOfAbsor(); if (NbOfAbsor > 0) { G4double Ebeam = fKinematic->GetEbeamCumul(); G4cout << "\n---------------------------------------------------------\n"; G4cout << " Cumulated Doses : \tEdep \tEdep/Ebeam \tDose" << G4endl; for (G4int j=1; j <=NbOfAbsor; j++) { G4double Edep = fAbsorEdep[j], ratio = 100*Edep/Ebeam; G4double AbsorMass = fDetector->GetAbsorMass(j); G4double Dose = Edep/tallyMass; G4cout << " tally " << j << ": \t \t" << G4BestUnit(Edep,"Energy") << "\t" << ratio << " % \t" << G4BestUnit(Dose,"Dose") << G4endl; } G4cout << "\n---------------------------------------------------------\n"; G4cout << G4endl;``` My questions are : i have change PrimaryGeneratorAction by definition of Getebeamcumul() ? ``` what about dose , as we know is edep/ mass ...i have to define also AbsorMass ```

 Inline Depth: Outline Depth: Add message:

1 Re: Retrieve dosis in each absorber in testem11   (michel maire - 10 Jan, 2016)
 to: "Re: Retrieve dosis in each absorber in testem11"
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 ]