Re: [VMC] Crash in g3track_

From: Andrei Gheata (Andrei.Gheata@cern.ch)
Date: Thu Jul 08 2004 - 09:30:42 MEST


Hi Laurent,

It looks like the materials/media you defined are not known by G3. Make 
sure that in your MyMCApplication::ConstructGeometry() you do the folowing:
 - set a top volume in your geometry: gGeoManager->SetTopVolume(top);
- close the geometry:  gGeoManager->CloseGeometry()
- notify TGeant3 that you want to plug in your geometry: 
gMC->SetRootGeometry();

Regards,
Andrei

Laurent Aphecetche wrote:

> Hi (again ;-) )
>
> I now have a sample VMC application (based for the moment on TGeant3, 
> compiled with -DWITHROOT).
> Geometry seems ok, but as soon as I try to throw particles (Geantinos) 
> in there, I get a crash :
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1085118976 (LWP 29109)]
> 0x4017853d in g3track_ () at gtrak/gtrack.F:118
> 118                    CUTS(I) = Q(JTMN+I)
> Current language:  auto; currently fortran
> (gdb) print I
> $1 = 1
> (gdb) print JTMN
> $2 = 16744448
>
> As far as I understand, this is linked to the media/materials parameters.
> So I assume my materials are ill-defined in some way.
>
> Any hint on the possible cause ?
>
> Thanks,
>
> PS: Here's the way I define my materials/media (inspired from E01 ; I 
> assume the negative parameters means Geant3 will compute them 
> automatically, is that correct ?) :
>
>   TGeoManager* gm = ...
>
>   Double_t a2[2] = { 14.01, 16.00};
>   Double_t z2[2] = {  7.0,   8.0};
>   Double_t w2[2] = {  0.7,   0.3};
>   Double_t density = 1.29e-03;
>   int imatair = 15;
>
>   gm->Mixture("Air", a2, z2, density, 2, w2, imatair);
>
>   int isvol = 0; // not a sensitive volume
>   Int_t ifield = 2;         // User defined magnetic field
>   Double_t fieldm = 5.;     // Maximum field value (in kiloGauss)
>   Double_t epsil  = .001;    // Tracking precision,
>   Double_t stemax = -0.01;   // Maximum displacement for multiple scat
>   Double_t tmaxfd = -20.;    // Maximum angle due to field deflection
>   Double_t deemax = -.3;     // Maximum fractional energy loss, DLS
>   Double_t stmin  = -.8;
>
>   fImedAIRF = 19;
>   fImedAIRLOWF = 18;
>
>   // AIR, High Magnetic Field
>   gm->Medium("AIRF",fImedAIRF,imatair,isvol,
>          ifield, fieldm, tmaxfd, stemax,
>          deemax, epsil, stmin);
>                
>
>   // AIR, Low Magnetic Field
>   fieldm = 1.0;
>   gm->Medium("AIRLOWF",fImedAIRLOWF,imatair,isvol,
>          ifield, fieldm, tmaxfd, stemax,
>          deemax, epsil, stmin);
>



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 11:25:00 MET