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

Torch test #77

Closed
wants to merge 4 commits into from
Closed

Torch test #77

wants to merge 4 commits into from

Conversation

ggalgoczi
Copy link
Collaborator

A branch for testing the "torch" photon generation without saving photons and reading them in.

By running the commands in the readme file I get the following results:

PhotonSD::EndOfEvent Number of PhotonHits: 22
Opticks: NumCollected: 1
Opticks: NumCollected: 100
Opticks: NumHits: 25

One can see that there are Opticks and G4 Hits too.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v12.0.1

Only 6 out of 7 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/g4app.h b/src/g4app.h
index 69eb8fc..68e03ac 100644
--- a/src/g4app.h
+++ b/src/g4app.h
@@ -28,0 +29 @@
+#include "SysRap/SGenerate.h"
@@ -36,2 +36,0 @@
-#include "SysRap/SEvt.hh"
-#include "SysRap/SGenerate.h"
@@ -40 +38,0 @@
-
@@ -287,3 +285,3 @@ struct PrimaryGenerator : G4VUserPrimaryGeneratorAction
-	int idx_arg = event->GetEventID() ;
-        NP* gs = SEvent::MakeTorchGenstep(idx_arg) ;
-        NP* ph = SGenerate::GeneratePhotons(gs);
+        int idx_arg = event->GetEventID();
+        NP *gs = SEvent::MakeTorchGenstep(idx_arg);
+        NP *ph = SGenerate::GeneratePhotons(gs);
@@ -291 +289 @@ struct PrimaryGenerator : G4VUserPrimaryGeneratorAction
-        delete ph ;
+        delete ph;
@@ -315,2 +313,2 @@ struct EventAction : G4UserEventAction
-	gx->simulate(eventID, false);
-	cudaDeviceSynchronize();
+        gx->simulate(eventID, false);
+        cudaDeviceSynchronize();
@@ -354,2 +352,2 @@ struct SteppingAction : G4UserSteppingAction
-    	}
-    };
+    }
+};

Have any feedback or feature suggestions? Share it here.

src/g4app.h Outdated
Comment on lines 36 to 37
#include "SysRap/SEvt.hh"
#include "SysRap/SGenerate.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Please remove the line(s)

  • 36
  • 37

src/g4app.h Outdated
#include "SysRap/SEvt.hh"
#include "SysRap/SGenerate.h"
#include "U4/U4VPrimaryGenerator.h"


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Please remove the line(s)

  • 40

src/g4app.h Outdated
Comment on lines 287 to 289
int idx_arg = event->GetEventID() ;
NP* gs = SEvent::MakeTorchGenstep(idx_arg) ;
NP* ph = SGenerate::GeneratePhotons(gs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
int idx_arg = event->GetEventID() ;
NP* gs = SEvent::MakeTorchGenstep(idx_arg) ;
NP* ph = SGenerate::GeneratePhotons(gs);
int idx_arg = event->GetEventID();
NP *gs = SEvent::MakeTorchGenstep(idx_arg);
NP *ph = SGenerate::GeneratePhotons(gs);

src/g4app.h Outdated
NP* gs = SEvent::MakeTorchGenstep(idx_arg) ;
NP* ph = SGenerate::GeneratePhotons(gs);
U4VPrimaryGenerator::GeneratePrimaries_From_Photons(event, ph);
delete ph ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
delete ph ;
delete ph;

src/g4app.h Outdated
Comment on lines 315 to 316
gx->simulate(eventID, false);
cudaDeviceSynchronize();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
gx->simulate(eventID, false);
cudaDeviceSynchronize();
gx->simulate(eventID, false);
cudaDeviceSynchronize();

src/g4app.h Outdated
Comment on lines 354 to 355
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
}
};
}
};

@ggalgoczi ggalgoczi closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant