Message: Sensitive Detector Problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Sensitive Detector Problem 

Forum: Hits, Digitization and Pileup
Date: 29 May, 2009
From: Antonio Magalhaes <Antonio Magalhaes>

I created a detector and when I try to make it sensitive, compilation goes wrong

My codes:

Geometry: 
-----------------
G4Sphere*
  sCasca = new G4Sphere("Casca", pRmin, pRmax, pSPhi, pDPhi, pSTheta, pDTheta);
  G4LogicalVolume*
  lCasca = new G4LogicalVolume (sCasca, Air, "Casca");
  pCasca = new G4PVPlacement (Cascarot, G4ThreeVector(0.*cm, -70.765*cm, 0.*cm), lCasca, "Casca", lWorld, 0, false, 0);
-----------------
Sensitive Detector:

-----------------
G4SDManager* SDman = G4SDManager::GetSDMpointer();  
  G4String SDname;
  Casca = new RxCalorimeterSD(SDname="rx2/RxCalorimeterSD", this);
  SDman->AddNewDetector(Casca);
  lCasca->SetSensitiveDetector(Casca);
-----------------
Compilation ERROR:
-----------------
src/DetectorConstruction.cc: In member function ‘G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()’:
src/DetectorConstruction.cc:181: error: invalid use of incomplete type ‘struct RxCalorimeterSD’
include/DetectorConstruction.hh:17: error: forward declaration of ‘struct RxCalorimeterSD’
src/DetectorConstruction.cc:182: error: no matching function for call to ‘G4SDManager::AddNewDetector(RxCalorimeterSD*&)’
/home/antonio/geant4/geant4.9.2/source/digits_hits/detector/include/G4SDManager.hh:66: note: candidates are: void G4SDManager::AddNewDetector(G4VSensitiveDetector*)
src/DetectorConstruction.cc:183: error: no matching function for call to ‘G4LogicalVolume::SetSensitiveDetector(RxCalorimeterSD*&)’
/home/antonio/geant4/geant4.9.2/source/geometry/management/include/G4LogicalVolume.icc:269: note: candidates are: void G4LogicalVolume::SetSensitiveDetector(G4VSensitiveDetector*)

My Files: DetectorConstruction, RxCalorimeterSD and RxCalorHit (From E.g. AnaEx01).

Any sugestions?? Thanks!!

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

1 None: Re: Sensitive Detector Problem   (Paul Nicholas Colin Gloster - 29 May, 2009)
 Add Message Add Message
to: "Sensitive Detector Problem"

 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 ]