Message: What is not correct? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question What is not correct? 

Forum: Geometry
Date: 29 Oct, 2009
From: Evgenya <Evgenya>

Good afternoon!

Excuse me for such question, but it is impossible to me and your help is necessary. I describe the detector consisting of four small detectors. I do it so:

  //create limiting volume
  G4Tubs* ar_tube = new G4Tubs("ar", 0, 70*mm, 20*mm, 0, 360*deg);
  G4LogicalVolume* ar_log = new G4LogicalVolume(ar_tube, vac, "ar");
  G4VPhysicalVolume* ar_phys = new G4PVPlacement(0, G4ThreeVector(0, 0, 60), ar_log, "ar", world_log, false, 0);

  //create first small detector
  G4Tubs* det_tube = new G4Tubs("det", 0, 25*mm, 15*mm, 0, 360*deg);
  G4LogicalVolume* det_log = new G4LogicalVolume(det_tube, detMaterial, "det");
  G4VPhysicalVolume* det_phys = new G4PVPlacement(0, G4ThreeVector(-25, -25, 0), det_log, "det", ar_log, false, 0);

  //create second small detector
  G4Tubs* deta_tube = new G4Tubs("deta", 0, 25*mm, 15*mm, 0, 360*deg);
  G4LogicalVolume* deta_log = new G4LogicalVolume(deta_tube,detMaterial, "deta");
  G4VPhysicalVolume* deta_phys = new G4PVPlacement(0, G4ThreeVector(-25, 30, 0), deta_log, "deta", ar_log, false, 0);

  //create third small detector
  G4Tubs* detb_tube = new G4Tubs("detb", 0, 25*mm, 15*mm, 0, 360*deg);
  G4LogicalVolume* detb_log = new G4LogicalVolume(detb_tube, detMaterial, "detb");
  G4VPhysicalVolume* detb_phys = new G4PVPlacement(0, G4ThreeVector(30, -25, 0), detb_log, "detb", ar_log, false, 0);

  //create fourth small detector
  G4Tubs* detc_tube = new G4Tubs("detc", 0, 25*mm, 15*mm, 0, 360*deg);
  G4LogicalVolume* detc_log = new G4LogicalVolume(detc_tube, detMaterial, "detc");
  G4VPhysicalVolume* detc_phys = new G4PVPlacement(0, G4ThreeVector(25, 30, 0), detc_log, "detc", air_log, false, 0);

  // --- sensitive detector ---
  // I register ar_log as the detector in which I will register energy left in the detector
  DetectorSD* detectorSD = new DetectorSD("DetectorSD");
  G4SDManager* sdMan = G4SDManager::GetSDMpointer();
  sdMan->AddNewDetector(detectorSD);
  ar_log->SetSensitiveDetector(detectorSD);

The problem consists in: my sensitive detector registers nothing. Where is my mistake? What do I describe not correctly?

Please, help me. I will be very grateful for the help.

Sorry, for badly written text. I do not know english very well.

P. S. 
   If I describe simply one detector that at me all works. I do it so:
   //create detector
  G4Tubs* det_tube = new G4Tubs("det", 0, 25*mm, 15*mm, 0, 360*deg);
  G4LogicalVolume* det_log = new G4LogicalVolume(det_tube, detMaterial, "det");
  G4VPhysicalVolume* det_phys = new G4PVPlacement(0, G4ThreeVector(0, 0, 5), det_log, "det", world_log, false, 0);

  // --- sensitive detector ---
  // I register det_log as the detector in which I will register energy left in the detector
  DetectorSD* detectorSD = new DetectorSD("DetectorSD");
  G4SDManager* sdMan = G4SDManager::GetSDMpointer();
  sdMan->AddNewDetector(detectorSD);
  det_log->SetSensitiveDetector(detectorSD);

Thank you, Evgenia.

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

1 Question: Re: What is not correct?   (Gabriele Cosmo - 03 Nov, 2009)
(_ Note: Re: What is not correct?   (Evgenya - 05 Nov, 2009)
 Add Message Add Message
to: "What is not correct?"

 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 ]