Message: no matching function for call to ‘G4PVReplica::G4PVReplica(const char [7], G4LogicalVolume*&, G4LogicalVolume*&, G4doubl Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question no matching function for call to ‘G4PVReplica::G4PVReplica(const char [7], G4LogicalVolume*&, G4LogicalVolume*&, G4doubl 

Forum: Geometry
Date: 11 Jul, 2014
From: Maluba Vernon <Maluba Vernon>

Hi All, I am trying to build slices in a cylinder both along the z-axis as well as it's radius, here is the replication part of my code:

  //                                 
  // Rings from centre of mother
  //
  G4VSolid* RSlices 
    = new G4Tubs("RSlice",           // its name
                 0.,SliceThicknessR,phantomZ/2,0.*deg, 360.*deg); // its size

  G4LogicalVolume* RSlicesLV
    = new G4LogicalVolume(RSlices,           // its solid
                          phantomMaterial,   // its material
                         "RSlice",0,0,0);    // its name

  new G4PVReplica("RSlice",          // its name
                 RSlicesLV,          // its logical volume
                 phantomLV,          // its mother logical volume
                 phantomR,           // axis of replication
                 NofSlicesAlongR,        // number of replica
                 SliceThicknessR);  // witdth of replica
                 //offset = 0);

  //                                 
  // Rings along Z-axis
  //
  G4VSolid* ZSlices 
    = new G4Tubs("ZSlice",           // its name
                 0.,SliceThicknessR,SliceThicknessZ,0.*deg, 360.*deg); // its size

  G4LogicalVolume* ZSlicesLV
    = new G4LogicalVolume(ZSlices,           // its solid
                          phantomMaterial,  // its material
                         "ZSlice",0,0,0);         // its name

  new G4PVReplica("ZSlice",          // its name
                  ZSlicesLV,          // its logical volume
                  &RSlicesLV,          // placed inside other replica
                  phantomZ,           // axis of replication
                  NofSlicesAlongZ,        // number of replica
                  SliceThicknessZ);  // witdth of replica
                  //offset = 0);

When I try building it I get this error:

error: no matching function for call to ‘G4PVReplica::G4PVReplica(const char [7], G4LogicalVolume*&, G4LogicalVolume*&, G4double&, G4int&, G4double&)’ /home/richard/Geant4.10-work/VJHadrontherapy/vernon/src/HDetectorConstruction.cc:232:34: note: candidates are: /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:200:5: note: G4PVReplica::G4PVReplica(const G4PVReplica&) /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:200:5: note: candidate expects 1 argument, 6 provided /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:141:5: note: G4PVReplica::G4PVReplica(__void__&) /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:141:5: note: candidate expects 1 argument, 6 provided /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:133:5: note: G4PVReplica::G4PVReplica(const G4String&, G4LogicalVolume*, G4VPhysicalVolume*, EAxis, G4int, G4double, G4double) /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:133:5: note: no known conversion for argument 3 from ‘G4LogicalVolume*’ to ‘G4VPhysicalVolume*’ /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:123:5: note: G4PVReplica::G4PVReplica(const G4String&, G4LogicalVolume*, G4LogicalVolume*, EAxis, G4int, G4double, G4double) /home/richard/Geant4.10-work/geant4.10.00-install/include/Geant4/G4PVReplica.hh:123:5: note: no known conversion for argument 4 from ‘G4double {aka double}’ to ‘EAxis’ X2(for both parts where G4PVReplica is called)

If you have an idea on how to solve this kind of problem, please, I will appreciate.

Thanks, maluba

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

1 More: Re: no matching function for call to ‘G4PVReplica::G4PVReplica(const char [7], G4LogicalVolume*&, G4LogicalVolume*&, G4doubl   (Gabriele Cosmo - 15 Jul, 2014)
 Add Message Add Message
to: "no matching function for call to ‘G4PVReplica::G4PVReplica(const char [7], G4LogicalVolume*&, G4LogicalVolume*&, G4doubl"

 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 ]