Message: Problems with SteppingAction.cc Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Problems with SteppingAction.cc 

Forum: Event and Track Management
Date: 29 Mar, 2011
From: Chaw <Chaw>

Hello,

I have several problems. In my SteppingAction.cc, I make a loop for each pixels. When I read my file .root, in my tree I found 4 branches (E, track ID, PDG, pixel). I don't understand why I don't have a branch for pixel1, pixel2, pixel3... Another problem: I attached my histogram matching my energy. I don't understand why I obtain this histo. Can you help me, please?

void SteppingAction::UserSteppingAction(const G4Step* aStep)
  {
    TString detName="";

    int pixel=0;

    for (int i=0;i<4;i++)
    { 
    	pixel=i+1;

     	detName = TString(Form("Gebox%d",i+1));

   	 if ( aStep->GetTrack()->GetVolume()->GetName() == detName.Data()) 
      	 {

	  if ( !fHasEnteredTheDetector )
	  {
	      fHasEnteredTheDetector = true ; 

fEventAction->SettotE(aStep->GetTotalEnergyDeposit()) ;

fEventAction->SetTrackID (aStep->GetTrack()->GetTrackID());

fEventAction->SetPDG (aStep->GetTrack()->GetDefinition()->GetPDGEncoding()) ;

fEventAction->Setpixel (pixel) ;

	  }
         }
      }

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2011/03/29/02.44-6257-energy.pdf

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

1 None: Re: Problems with SteppingAction.cc   (Chaw - 30 Mar, 2011)
(_ News: Re: Problems with SteppingAction.cc   (Chaw - 05 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Makoto Asai - 05 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Chaw - 05 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Makoto Asai - 05 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Chaw - 05 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Marc Verderi - 11 Apr, 2011)
(_ None: Re: Problems with SteppingAction.cc   (Chaw - 11 Apr, 2011)
 Add Message Add Message
to: "Problems with SteppingAction.cc"

 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 ]