Message: Re: Energy_Deposition_Layer3 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Energy_Deposition_Layer3 

Forum: Event and Track Management
Re: Question Energy_Deposition_Layer3 (Ibrahim)
Date: 06 May, 2014
From: Gumplinger Peter <Gumplinger Peter>

Dear Brahim,

> G4TouchableHistory* theTouchable
>     = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
> //Collect only the energy deposition in the Layer2

>       G4VPhysicalVolume* physVol = theTouchable->GetVolume();
>       if(strcmp(physVol->GetName(),"PhyLayer3")== 0)

> Is it correct?

The answer depends on your code in DetectorConstruction.

Depending, your code could also read:

G4int copyNb = theTouchable->GetCopyNumber(); if (copyNb > 0) eventAction->addEdep(EdepStep,copyNb);


G4int copyNb = theTouchable->GetCopyNumber(0); G4int layerNum1 = theTouchable->GetCopyNumber(1);


G4LogicalVolume* logVol = theTouchable->GetVolume()->GetLogicalVolume(); if(logVol==mylogVol)


> Or should I use Layer3 as a sensitive detector?

That's one possibility but not necessary.


 Add Message Add Message
to: "Re: Energy_Deposition_Layer3"

 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 ]