Message: RE: About TrackID Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: About TrackID 

Forum: Event and Track Management
Re: None About TrackID (Evgenya)
Date: 30 Jun, 2010
From: Makoto Asai <Makoto Asai>

Hi,

Your sensitive detector code is invoked for every step.
Thus, one primary gamma track may appear more than once.

Makoto

> -----Original Message-----
> From: Evgenya [mailto:korol_86@bk.ru]
> Sent: Wednesday, June 30, 2010 4:23 AM
> To: eventtrackmanage-g4hn
> Subject: About TrackID
> 
> 
> *** Discussion title: Event and Track Management
> 
> Hello!
>  I've got a detector NaI, which is placed in polystyrene. I want to
> calculate the energy release in the detector from the direct gamma
> radiation. Here's a piece of code where I describe NaI in
> polystyrene(DetectorConstruction.cc):
> 
>    G4VSolid* hr_box = new G4Trap("hr", 50.0*mm, 0*deg, 0*deg, 7.5*mm,
> 51.96*mm, 43.3*mm, 0*deg, 7.5*mm, 51.96*mm, 43.3*mm, 0*deg);
>    G4RotationMatrix* wm = new G4RotationMatrix;
>    wm->rotateZ(90*deg);
>    G4VSolid* lr_box = new G4DisplacedSolid("lr", hr_box, wm,
> G4ThreeVector(-81.5, 0.5, 0.));
>    G4LogicalVolume* lr_log = new G4LogicalVolume(lr_box, polMaterial,
> "lr");
>    G4VPhysicalVolume* lr_phys = new G4PVPlacement(0, G4ThreeVector(0, 0,
> 78), lr_log, "lr", world_log, false, 0);
> 
>    G4VSolid* nb_tube = new G4Tubs("nb", 0, 33.75*mm, 2.5*mm, 0,
> 360*deg);
>    G4RotationMatrix* om = new G4RotationMatrix;
>    om->rotateY(90*deg);
>    G4LogicalVolume* nb_log = new G4LogicalVolume(nb_tube, scintMaterial,
> "nb");
>    G4VPhysicalVolume* nb_phys = new G4PVPlacement(om, G4ThreeVector(-77,
> 0, -3.5), nb_log, "nb", lr_log, false, 0);
> 
>  and a piece of code DetectorSD:
> 
>   G4String volume = step->GetTrack()->GetVolume()->GetName();
>   G4Track* track = step->GetTrack();
>   if ((volume=="nb") || (track->GetParentID() == 0))
>    {
>     G4double ed = step->GetTotalEnergyDeposit();
>     ndetEnergy += ed;
>    }
> 
>  What am I mistaken?
> 
> I have a number of detected gamma rays more than the number fell to
> detector.
> 
> Thanks any help, Evgenia.
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or
> unsubscribe) at:
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanag
> e/939.html

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

1 None: Re: RE: About TrackID   (Evgenya - 30 Jun, 2010)
(_ Feedback: Re: RE: About TrackID   (Gumplinger Peter - 30 Jun, 2010)
(_ None: Re: RE: About TrackID   (Evgenya - 01 Jul, 2010)
(_ Question: Re: RE: About TrackID   (Evgenya - 01 Jul, 2010)
 Add Message Add Message
to: "RE: About TrackID"

 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 ]