Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing PullRequest comments related to Geant4 #691

Merged
merged 5 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions news/PR-0691.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Added:** None

**Changed:**
- adressing comment by from PullRequest-Agent related to src/geant4 files

**Deprecated:** None

**Removed:** None

**Fixed:** None

**Security:** None
19 changes: 0 additions & 19 deletions src/geant4/DagSolid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

//#include "G4TessellatedSolid.hh"
#include "DagSolid.hh"
#include "globals.hh"
#include "Randomize.hh"
Expand Down Expand Up @@ -84,11 +83,6 @@ DagSolid::DagSolid()
yMaxExtent = -kInfinity;
zMinExtent = kInfinity;
zMaxExtent = -kInfinity;
//G4TessellatedSolid
// SetRandomVectors();

// SetRndVectors();

}


Expand Down Expand Up @@ -129,27 +123,21 @@ DagSolid::DagSolid(const G4String& name, DagMC* dagmc, int volID)
moab->get_child_meshsets(fvolEntity, surfs, 1);

if (plot) {
// G4cout<<"please wait for visualization... "<<G4endl;
for (unsigned i = 0 ; i < surfs.size() ; i++) {
My_sulf_hit = surfs[i];
moab->get_number_entities_by_type(surfs[i], MBTRI, num_entities);
//G4cout<<"Number of triangles = "<<num_entities<<" in surface index: "<<fdagmc->index_by_handle(surfs[i])<<G4endl;
//G4cout<<"please wait for visualization... "<<G4endl;

moab->get_entities_by_type(surfs[i], MBTRI, tris);

for (unsigned j = 0 ; j < tris.size() ; j++) {
moab->get_connectivity(tris[j], tri_conn, n_verts);
moab->get_coords(tri_conn, n_verts, coords[0].array());

// G4cout<<"add facet for vis = "<<coords[0]<<" "<<coords[1]<<" "<<coords[2]<<G4endl;

vertex[0] = G4ThreeVector(coords[0][0] * cm, coords[0][1] * cm, coords[0][2] * cm);
vertex[1] = G4ThreeVector(coords[1][0] * cm, coords[1][1] * cm, coords[1][2] * cm);
vertex[2] = G4ThreeVector(coords[2][0] * cm, coords[2][1] * cm, coords[2][2] * cm);

G4TriangularFacet* facet = new G4TriangularFacet(vertex[0], vertex[1], vertex[2], ABSOLUTE);
// G4cout << vertex[0] << " " << vertex[1] << " " << vertex[2] << G4endl;
AddFacet((G4VFacet*)facet);

for (G4int k = 0 ; k < 3 ; k++) {
Expand All @@ -171,14 +159,8 @@ DagSolid::DagSolid(const G4String& name, DagMC* dagmc, int volID)
}
}

//SetRandomVectorSet();

SetSolidClosed(true);

// G4cout<<"Number Of Facets = "<<GetNumberOfFacets() <<G4endl;
// G4cout <<"maximum point = "<< xMinExtent <<" "<< yMinExtent <<" "<< zMinExtent << G4endl
// <<"minimum point = "<< xMaxExtent <<" "<< yMaxExtent <<" "<< zMaxExtent << G4endl;

}


Expand All @@ -194,7 +176,6 @@ DagSolid::DagSolid(__void__& a)
xMinExtent(0.), xMaxExtent(0.),
yMinExtent(0.), yMaxExtent(0.),
zMinExtent(0.), zMaxExtent(0.) {
//SetRandomVectorSet();
}


Expand Down
13 changes: 0 additions & 13 deletions src/geant4/DagSolid.hh
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ class DagSolid : public G4TessellatedSolid {
G4double& pMin, G4double& pMax) const;
virtual std::ostream& StreamInfo(std::ostream& os) const;



// virtual void ComputeDimensions (G4VPVParameterisation* p, const G4int n,
// const G4VPhysicalVolume* pRep);


virtual G4double GetCubicVolume();
virtual G4double GetSurfaceArea();
G4double GetMinXExtent() const;
Expand All @@ -117,26 +111,20 @@ class DagSolid : public G4TessellatedSolid {

virtual void DescribeYourselfTo(G4VGraphicsScene& scene) const;



public: // without description

DagSolid(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.



protected: // with description

void DeleteObjects();
void CopyObjects(const DagSolid& s);


private:


G4GeometryType geometryType;
G4double cubicVolume;
G4double surfaceArea;
Expand All @@ -147,7 +135,6 @@ class DagSolid : public G4TessellatedSolid {
G4double zMinExtent;
G4double zMaxExtent;


G4String Myname;

DagMC* fdagmc;
Expand Down
9 changes: 0 additions & 9 deletions src/geant4/app/include/ExN01DetectorConstruction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ class ExN01DetectorConstruction : public G4VUserDetectorConstruction {

UWUW* workflow_data;

// DAG Logical volumes
// G4LogicalVolume* dag_vol_log;

// Physical volumes
//
// G4VPhysicalVolume* world_volume_phys;
// DAG Physical volumes


};

#endif
15 changes: 2 additions & 13 deletions src/geant4/app/include/ExN01DetectorHit.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ class ExN01DetectorHit : public G4VHit {
void SetTrackID(G4int track) {
fTrackID = track;
};
/*
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
void SetEdep (G4double de) { fEdep = de; };
void SetPos (G4ThreeVector xyz){ fPos = xyz; };
*/

void SetParticleEnergy(G4double ke) {
fKe = ke;
};
Expand All @@ -62,11 +58,7 @@ class ExN01DetectorHit : public G4VHit {
G4int GetTrackID() const {
return fTrackID;
};
/*
G4int GetChamberNb() const { return fChamberNb; };
G4double GetEdep() const { return fEdep; };
G4ThreeVector GetPos() const { return fPos; };
*/

G4double GetKE() const {
return fKe;
};
Expand All @@ -86,9 +78,6 @@ class ExN01DetectorHit : public G4VHit {
private:

G4int fTrackID;
// G4int fChamberNb;
// G4double fEdep;
// G4ThreeVector fPos;
G4double fKe;
G4double fTl;
G4double fWeight;
Expand Down
1 change: 0 additions & 1 deletion src/geant4/app/include/ExN01PrimaryGeneratorAction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ExN01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
void GeneratePrimaries(G4Event* anEvent);

private:
// G4ParticleGun* particleGun;
G4GeneralParticleSource* fParticleGun;
};

Expand Down
1 change: 0 additions & 1 deletion src/geant4/app/src/DagSolidTally.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ std::map<std::string, pyne::Tally> load_uwuw_tallies(std::string filepath) {
std::cout << filepath << std::endl;
while (!end) {
pyne::Tally tally; // from file
std::cout << i << std::endl;
tally.from_hdf5(filepath, "/tally", i++);
if (tally_library.count(tally.tally_name)) {
end = true;
Expand Down
Loading