Message: Segmentation error in TestEm5 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Segmentation error in TestEm5 

Keywords: Segmentation error in TestEm5
Forum: Event and Track Management
Date: 18 Sep, 2002
From: Emil Frlez <Emil Frlez>


 I have somewhat modified TestEm5 example to serve my purposes
 (changed the dimensions and position of the absorber, added
 non-uniform magnetic field). As I am not an expert in C++
 I tried to make minimal modifications, or modifications that
 closely imitate other examples. I was pleased that I could
 use the modified code to obtain the results I am interested in.

 The last thing I tried to do was to simulate detector TDC:
 in the, at the end, I pasted the
 following section of the code:

  // EF
  if (
      (aStep->GetTrack()->GetTrackID() == 1) &&
        (aStep->GetTrack()->GetParentID()== 0) &&
      (aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()=="World") &&
      (aStep->GetTrack()->GetNextVolume()->GetName()=="Absorber") &&
               ->GetProcessName() == "Transportation") &&
       outFile3 << setprecision(5) << evno << " " << G4endl ;  
  //     aStep->GetTrack()->GetPosition().y() << " " <<
  //     aStep->GetTrack()->GetPosition().z() << " " << 
  //     aStep->GetTrack()->GetGlobalTime() << G4endl ;      

 This "if" condition is exactly the same condition that was used
 in the same file to keep track of the electrons reflecting back from
 the planar absorber. As I wanted the timing of the positron
 hitting the absorber I just replaced the order of "World" and
 "Absorber" (so PreStep is now World and NextVolume is Absorber)
 and changed the momentum direction (so now the particle is moving
 into the absorber). I was hoping to output GlobalTime and get
 a sort of "TDC". But the code is now crashing with a segmentation 
 error. Above, I commented out the GetGlobalTime line, because I
 was thinking that I am trying to access a variable in a track that
 is not accessable. But the code still crashes, a cause is, it
 appears, the very condition in the "if" statement.

 Am I doing something really stupid?


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

1 None: Re: Segmentation error in TestEm5   (Vladimir Ivantchenko - 19 Sep, 2002)
(_ None: Re: Segmentation error in TestEm5   (Emil Frlez - 19 Sep, 2002)
(_ Agree: Re: Segmentation error in TestEm5   (Peter Gumplinger - 19 Sep, 2002)
 Add Message Add Message
to: "Segmentation error in TestEm5"

 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 ]