Skip to content
Snippets Groups Projects
Commit 70ac7ed9 authored by Marilena Bandieramonte's avatar Marilena Bandieramonte
Browse files

Fix compiling issues

parent 1f227b6a
No related tags found
No related merge requests found
Pipeline #1398854 failed
...@@ -40,13 +40,12 @@ public: ...@@ -40,13 +40,12 @@ public:
double DistanceToOut(const GeoTrf::Vector3D& p, double DistanceToOut(const GeoTrf::Vector3D& p,
const GeoTrf::Vector3D& v, const GeoTrf::Vector3D& v,
const bool calcNorm=bool(false), const bool calcNorm=(false),
bool *validNorm=0, bool *validNorm=0,
GeoTrf::Vector3D *n=0) const; GeoTrf::Vector3D *n=0) const;
double DistanceToOut(const GeoTrf::Vector3D& p) const; double DistanceToOut(const GeoTrf::Vector3D& p) const;
GeoTrf::Vector3D GetPointOnSurface() const; GeoTrf::Vector3D GetPointOnSurface() const;
GeoTrf::Vector3D ApproxSurfaceNormal(const GeoTrf::Vector3D& p) const;
private: private:
G4ShiftedCone* fG4ShiftedCone; G4ShiftedCone* fG4ShiftedCone;
......
...@@ -11,21 +11,14 @@ ...@@ -11,21 +11,14 @@
#include <stdio.h> #include <stdio.h>
#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoDefinitions.h"
#include "GeoModel2G4/LArWheelSliceSolid"
#include "CLHEP/Vector/ThreeVector.h" #include "CLHEP/Vector/ThreeVector.h"
#include "GeoModel2G4/LArWheelSliceSolid.h"
class LArWheelSliceSolid; class LArWheelSliceSolid;
class LArWheelSliceSolid_wrapper class LArWheelSliceSolid_wrapper
{ {
public: public:
LArWheelSliceSolid_wrapper(const std::string& pName, LArWheelSliceSolid_wrapper();
double pZ1, double pZ2,
double pRmin1, double pRmax1,
double pRmin2, double pRmax2);
// double pSPhi, double pDPhi);
//
// Constructs a cone with the given name and dimensions
~LArWheelSliceSolid_wrapper() ; ~LArWheelSliceSolid_wrapper() ;
enum EInside {kOutside,kSurface,kInside}; enum EInside {kOutside,kSurface,kInside};
...@@ -46,13 +39,11 @@ public: ...@@ -46,13 +39,11 @@ public:
GeoTrf::Vector3D *n=0) const; GeoTrf::Vector3D *n=0) const;
double DistanceToOut(const GeoTrf::Vector3D& p) const;\ double DistanceToOut(const GeoTrf::Vector3D& p) const;\
GeoTrf::Vector3D SurfaceNormal (const GeoTrf::Vector3D&) const;
GeoTrf::Vector3D GetPointOnSurface(void) const; GeoTrf::Vector3D GetPointOnSurface(void) const;
GeoTrf::Vector3D ApproxSurfaceNormal(const GeoTrf::Vector3D& p) const;
private: private:
G4ShiftedCone* fG4ShiftedCone; LArWheelSliceSolid* fLArWheelSliceSolid;
}; };
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Created by Marilena Bandieramonte on 07.02.20. // Created by Marilena Bandieramonte on 07.02.20.
// //
#include "G4ShiftedCone_wrapper.h" #include "GeoModel2G4/G4ShiftedCone_wrapper.h"
G4ShiftedCone_wrapper::G4ShiftedCone_wrapper(const std::string& pName, G4ShiftedCone_wrapper::G4ShiftedCone_wrapper(const std::string& pName,
...@@ -59,17 +59,13 @@ double G4ShiftedCone_wrapper::DistanceToIn (const GeoTrf::Vector3D& p) const{ ...@@ -59,17 +59,13 @@ double G4ShiftedCone_wrapper::DistanceToIn (const GeoTrf::Vector3D& p) const{
return fG4ShiftedCone->DistanceToIn(lp); return fG4ShiftedCone->DistanceToIn(lp);
} }
double G4ShiftedCone_wrapper::DistanceToOut(const GeoTrf::Vector3D& p, double G4ShiftedCone_wrapper::DistanceToOut(const GeoTrf::Vector3D& ,
const GeoTrf::Vector3D& v, const GeoTrf::Vector3D& ,
const bool calcNorm=false, const bool ,
bool *validNorm=0, bool *,
GeoTrf::Vector3D *n=0) const{ GeoTrf::Vector3D *) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2));
CLHEP::Hep3Vector lv (v(0), v(1), v(2));
CLHEP::Hep3Vector ln (n(0), n(1), n(2));
fG4ShiftedCone->DistanceToOut(lp, lv,calcNorm,validNorm,ln);
} }
double G4ShiftedCone_wrapper::DistanceToOut(const GeoTrf::Vector3D& p) const{ double G4ShiftedCone_wrapper::DistanceToOut(const GeoTrf::Vector3D& p) const{
...@@ -87,13 +83,4 @@ GeoTrf::Vector3D G4ShiftedCone_wrapper::GetPointOnSurface() const{ ...@@ -87,13 +83,4 @@ GeoTrf::Vector3D G4ShiftedCone_wrapper::GetPointOnSurface() const{
reigen(2) = rclhep.z(); reigen(2) = rclhep.z();
return reigen; return reigen;
} }
GeoTrf::Vector3D G4ShiftedCone_wrapper::ApproxSurfaceNormal(const GeoTrf::Vector3D& p) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2));
CLHEP::Hep3Vector rclhep = fG4ShiftedCone->ApproxSurfaceNormal(lp);
GeoTrf::Vector3D reigen;
reigen(0) = rclhep.x();
reigen(1) = rclhep.y();
reigen(2) = rclhep.z();
return reigen;
}
...@@ -5,18 +5,14 @@ ...@@ -5,18 +5,14 @@
// Created by Marilena Bandieramonte on 07.02.20. // Created by Marilena Bandieramonte on 07.02.20.
// //
#include "LArWheelSliceSolid_wrapper.h" #include "GeoModel2G4/LArWheelSliceSolid_wrapper.h"
LArWheelSliceSolid_wrapper::LArWheelSliceSolid_wrapper(const std::string& pName, LArWheelSliceSolid_wrapper::LArWheelSliceSolid_wrapper()
double pZ1, double pZ2,
double pRmin1, double pRmax1,
double pRmin2, double pRmax2)
{ {
fG4ShiftedCone = new G4ShiftedCone(pName, pZ1, pZ2, pRmin1, pRmax1,pRmin2, pRmax2);
} }
LArWheelSliceSolid_wrapper::~LArWheelSliceSolid_wrapper(){ LArWheelSliceSolid_wrapper::~LArWheelSliceSolid_wrapper(){
if (fG4ShiftedCone) delete fG4ShiftedCone; if (fLArWheelSliceSolid) delete fLArWheelSliceSolid;
} }
void LArWheelSliceSolid_wrapper::BoundingLimits(GeoTrf::Vector3D& pMin, GeoTrf::Vector3D& pMax) const{ void LArWheelSliceSolid_wrapper::BoundingLimits(GeoTrf::Vector3D& pMin, GeoTrf::Vector3D& pMax) const{
...@@ -24,75 +20,52 @@ void LArWheelSliceSolid_wrapper::BoundingLimits(GeoTrf::Vector3D& pMin, GeoTrf:: ...@@ -24,75 +20,52 @@ void LArWheelSliceSolid_wrapper::BoundingLimits(GeoTrf::Vector3D& pMin, GeoTrf::
CLHEP::Hep3Vector lpMin(pMin(0), pMin(1), pMin(2)); CLHEP::Hep3Vector lpMin(pMin(0), pMin(1), pMin(2));
CLHEP::Hep3Vector lpMax (pMax(0), pMax(1), pMax(2)); CLHEP::Hep3Vector lpMax (pMax(0), pMax(1), pMax(2));
fG4ShiftedCone->BoundingLimits (lpMin, lpMax); fLArWheelSliceSolid->BoundingLimits (lpMin, lpMax);
} }
LArWheelSliceSolid_wrapper::EInside G4ShiftedCone_wrapper::Inside( const GeoTrf::Vector3D& p ) const{ LArWheelSliceSolid_wrapper::EInside LArWheelSliceSolid_wrapper::Inside( const GeoTrf::Vector3D& p ) const{
CLHEP::Hep3Vector lp(p(0), p(1), p(2)); CLHEP::Hep3Vector lp(p(0), p(1), p(2));
return (G4ShiftedCone_wrapper::EInside)fG4ShiftedCone->Inside(lp); return (LArWheelSliceSolid_wrapper::EInside)fLArWheelSliceSolid->Inside(lp);
} }
GeoTrf::Vector3D LArWheelSliceSolid_wrapper::SurfaceNormal( const GeoTrf::Vector3D& p ) const{
CLHEP::Hep3Vector lp(p(0), p(1), p(2));
CLHEP::Hep3Vector rclhep = fG4ShiftedCone->SurfaceNormal(lp);
GeoTrf::Vector3D reigen;
reigen(0) = rclhep.x();
reigen(1) = rclhep.y();
reigen(2) = rclhep.z();
return reigen;
}
double LArWheelSliceSolid_wrapper::DistanceToIn (const GeoTrf::Vector3D& p, double LArWheelSliceSolid_wrapper::DistanceToIn (const GeoTrf::Vector3D& p,
const GeoTrf::Vector3D& v) const{ const GeoTrf::Vector3D& v) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2)); CLHEP::Hep3Vector lp (p(0), p(1), p(2));
CLHEP::Hep3Vector lv (v(0), v(1), v(2)); CLHEP::Hep3Vector lv (v(0), v(1), v(2));
return fG4ShiftedCone->DistanceToIn(lp,lv); return fLArWheelSliceSolid->DistanceToIn(lp,lv);
} }
double LArWheelSliceSolid_wrapper::DistanceToIn (const GeoTrf::Vector3D& p) const{ double LArWheelSliceSolid_wrapper::DistanceToIn (const GeoTrf::Vector3D& p) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2)); CLHEP::Hep3Vector lp (p(0), p(1), p(2));
return fG4ShiftedCone->DistanceToIn(lp); return fLArWheelSliceSolid->DistanceToIn(lp);
} }
double LArWheelSliceSolid_wrapper::DistanceToOut(const GeoTrf::Vector3D& p, double LArWheelSliceSolid_wrapper::DistanceToOut(const GeoTrf::Vector3D&,
const GeoTrf::Vector3D& v, const GeoTrf::Vector3D& ,
const bool calcNorm=false, const bool ,
bool *validNorm=0, bool *,
GeoTrf::Vector3D *n=0) const{ GeoTrf::Vector3D *) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2));
CLHEP::Hep3Vector lv (v(0), v(1), v(2));
CLHEP::Hep3Vector ln (n(0), n(1), n(2));
fG4ShiftedCone->DistanceToOut(lp, lv,calcNorm,validNorm,ln);
double temp = 0;
return temp;
} }
double LArWheelSliceSolid_wrapper::DistanceToOut(const GeoTrf::Vector3D& p) const{ double LArWheelSliceSolid_wrapper::DistanceToOut(const GeoTrf::Vector3D& p) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2)); CLHEP::Hep3Vector lp (p(0), p(1), p(2));
return fG4ShiftedCone->DistanceToOut(lp); return fLArWheelSliceSolid->DistanceToOut(lp);
} }
GeoTrf::Vector3D LArWheelSliceSolid_wrapper::GetPointOnSurface() const{ GeoTrf::Vector3D LArWheelSliceSolid_wrapper::GetPointOnSurface() const{
CLHEP::Hep3Vector rclhep = fG4ShiftedCone->GetPointOnSurface(); CLHEP::Hep3Vector rclhep = fLArWheelSliceSolid->GetPointOnSurface();
GeoTrf::Vector3D reigen;
reigen(0) = rclhep.x();
reigen(1) = rclhep.y();
reigen(2) = rclhep.z();
return reigen;
}
GeoTrf::Vector3D LArWheelSliceSolid_wrapper::ApproxSurfaceNormal(const GeoTrf::Vector3D& p) const{
CLHEP::Hep3Vector lp (p(0), p(1), p(2));
CLHEP::Hep3Vector rclhep = fG4ShiftedCone->ApproxSurfaceNormal(lp);
GeoTrf::Vector3D reigen; GeoTrf::Vector3D reigen;
reigen(0) = rclhep.x(); reigen(0) = rclhep.x();
reigen(1) = rclhep.y(); reigen(1) = rclhep.y();
reigen(2) = rclhep.z(); reigen(2) = rclhep.z();
return reigen; return reigen;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment