-
Notifications
You must be signed in to change notification settings - Fork 3
style: fix clang-format violations in src/GPURaytrace.h #272
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -523,10 +523,42 @@ struct SteppingAction : G4UserSteppingAction | |
| << G4endl; | ||
| return; | ||
| } | ||
| G4double SCINTILLATIONTIMECONSTANT1 = MPT->GetConstProperty(kSCINTILLATIONTIMECONSTANT1); | ||
| // G4 11.x supports up to 3 scintillation components | ||
| const G4int tcKeys[3] = {kSCINTILLATIONTIMECONSTANT1, kSCINTILLATIONTIMECONSTANT2, | ||
| kSCINTILLATIONTIMECONSTANT3}; | ||
| const G4int yieldKeys[3] = {kSCINTILLATIONYIELD1, kSCINTILLATIONYIELD2, kSCINTILLATIONYIELD3}; | ||
|
|
||
| U4::CollectGenstep_DsG4Scintillation_r4695(aTrack, aStep, fNumPhotons, 1, | ||
| SCINTILLATIONTIMECONSTANT1); | ||
| G4double tc[3] = {0, 0, 0}; | ||
| G4double yield[3] = {0, 0, 0}; | ||
| G4double yieldSum = 0; | ||
| G4int nComp = 0; | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| for (G4int c = 0; c < 3; c++) | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| if (MPT->ConstPropertyExists(tcKeys[c])) | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| tc[c] = MPT->GetConstProperty(tcKeys[c]); | ||
| yield[c] = MPT->ConstPropertyExists(yieldKeys[c]) ? MPT->GetConstProperty(yieldKeys[c]) | ||
| : (c == 0 ? 1.0 : 0.0); | ||
| yieldSum += yield[c]; | ||
| nComp = c + 1; | ||
| } | ||
| } | ||
|
|
||
| G4AutoLock lock(&genstep_mutex); | ||
| G4int nRemaining = fNumPhotons; | ||
| for (G4int c = 0; c < nComp; c++) | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| G4int nPhotComp; | ||
| if (c == nComp - 1) | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| nPhotComp = nRemaining; // last component gets remainder | ||
| else | ||
| nPhotComp = static_cast<G4int>(fNumPhotons * yield[c] / yieldSum); | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+553
to
+556
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| nRemaining -= nPhotComp; | ||
|
|
||
| if (nPhotComp > 0) | ||
| U4::CollectGenstep_DsG4Scintillation_r4695(aTrack, aStep, nPhotComp, c + 1, tc[c]); | ||
plexoos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.