Message: I want to extract "KE:" Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question I want to extract "KE:" 

Forum: Biasing and Scoring
Date: Nov 21, 21:26
From: Kyuwon Jung <Kyuwon Jung>

Dear All experts,

Hi. I am trying to extract "KE:" on a output data and I wrote the code like

> #include "SensitiveDetector.hh"
>
> SensitiveDetector::SensitiveDetector(G4String name)
> :G4VSensitiveDetector(name)
> {
> }
>
> SensitiveDetector::~SensitiveDetector()
> {
> }
>
> void SensitiveDetector::Initialize(G4HCofThisEvent*)
> {
> }
>
> G4bool SensitiveDetector::ProcessHits(G4Step* aStep, G4TouchableHistory*)
> {
>    G4double KE = aStep->GetPreStepPoint()->GetKineticEnergy();
>    G4cout << "KE:" << KE/MeV << G4endl;
> }
>
> void SensitiveDetector::EndOfEvent(G4HCofThisEvent*)
> {
> }

and when I write 'make', the message

"warning: declaration of 'KE' shadows a member of 'this' [-Wshadow]
   G4double KE = aStep->GetPreStepPoint()->GetKineticEnergy();"

is popped up.

And then when I run '/control/execute run.mac' there is no "KE:" on the output data.

How can I extract "KE:" on the data?

I need all your helps and sorry for my bad English,

Kyuwon Jung

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

1 None: Re: I want to extract   (Marc Verderi - Nov 22, 07:26)
(_ Ok: Re: I want to extract   (Kyuwon Jung - Nov 22, 23:07)
 Add Message Add Message
to: "I want to extract "KE:""

 Subscribe Subscribe

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