Message: segmentation fault for sensitive detector Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question segmentation fault for sensitive detector 

Keywords: segmentation fault for sensitive detector
Forum: Hits, Digitization and Pileup
Date: 02 Feb, 2005
From: Petr Mikes <>

Hello Everybody, I modified example N03 to be sensitive for hits. I used code from example N05. I changed geometry for one segment...

solidGap   = new G4Box("solidGap", GapThickness/2, CalorSizeYZ/2, CalorSizeYZ/2);
logicGap   = new G4LogicalVolume(solidGap,GapMaterial, "logicGap", 0,0,0);
physiGap   = new G4PVPlacement(0,

  G4int nY = 4;											//Pocet Detekcnich bloku Y
  G4int nZ = 4;											//Pocet Detekcnich bloku Z

  G4double CrystalX = AbsorberThickness/2;
  G4double CrystalY = CalorSizeYZ/(nY);
  G4double CrystalZ = CalorSizeYZ/(nZ);
  solidAbsorber     = new G4Box("solidAbsorber", CrystalX, CrystalY/2, CrystalZ/2);
  logicAbsorber     = new G4LogicalVolume(solidAbsorber,AbsorberMaterial,
					    "logicAbsorber", 0, 0, 0);

  G4String tName1("Crystal");	// Allow all target physicals to share

  // -- and placements inside the calorimeter:
  G4PVPlacement *physiAbsorber;
  G4int copyNo=0;
  G4double yTlate, zTlate;
  for (G4int j = 0; j < nZ; j++)
      zTlate =-CalorSizeYZ/2+CrystalZ/2+j*CrystalZ;
     for (G4int i = 0; i < nY; i++)
	  yTlate =-CalorSizeYZ/2+CrystalY/2+i*CrystalY;
	  physiAbsorber = new G4PVPlacement(0,G4ThreeVector(10,yTlate,zTlate),

It works for one segment. But when I changed nY and nZ for more than 1 it will show me segmention fault but geometry is ok. Does somebody help me where I can loo for a mistake.

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

1 None: Re: segmentation fault for sensitive detector   (Makoto Asai - 02 Feb, 2005)
(_ None: Re: segmentation fault for sensitive detector   (Petr Mikes - 04 Feb, 2005)
 Add Message Add Message
to: "segmentation fault for sensitive detector"

 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 ]