-
Notifications
You must be signed in to change notification settings - Fork 0
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
Torch test #77
Conversation
Added environment variables used for torch.
There was a problem hiding this 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
#include "SysRap/SEvt.hh" | ||
#include "SysRap/SGenerate.h" |
There was a problem hiding this comment.
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" | ||
|
||
|
There was a problem hiding this comment.
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
int idx_arg = event->GetEventID() ; | ||
NP* gs = SEvent::MakeTorchGenstep(idx_arg) ; | ||
NP* ph = SGenerate::GeneratePhotons(gs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format suggestion
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 ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format suggestion
delete ph ; | |
delete ph; |
src/g4app.h
Outdated
gx->simulate(eventID, false); | ||
cudaDeviceSynchronize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format suggestion
gx->simulate(eventID, false); | |
cudaDeviceSynchronize(); | |
gx->simulate(eventID, false); | |
cudaDeviceSynchronize(); |
src/g4app.h
Outdated
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format suggestion
} | |
}; | |
} | |
}; |
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.