| Message: Sensitive Detector Problem | Not Logged In (login) |
|
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: | Outline Depth: | Add message: |
|
to: |