Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GeoModelDev
GeoModel
Commits
df3d9a80
Commit
df3d9a80
authored
1 year ago
by
nnitika
Browse files
Options
Downloads
Patches
Plain Diff
modified for DeltaChord and StepMax
parent
059532de
Branches
Branches containing commit
No related tags found
1 merge request
!200
Draft: Mag field opt
Pipeline
#6376746
failed
1 year ago
Stage: step-A
Stage: step-B
Stage: step-C
Stage: step-D
Stage: step-E
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FullSimLight/src/FSLDetectorMessenger.cc
+19
-13
19 additions, 13 deletions
FullSimLight/src/FSLDetectorMessenger.cc
with
19 additions
and
13 deletions
FullSimLight/src/FSLDetectorMessenger.cc
+
19
−
13
View file @
df3d9a80
...
...
@@ -17,7 +17,8 @@
#include
"G4UIcommand.hh"
#include
"G4UIcontrolMessenger.hh"
#include
"G4UIbatch.hh"
#include
"G4StepLimiter.hh"
#include
"G4UserLimits.hh"
#include
"G4RunManager.hh"
FSLDetectorMessenger
::
FSLDetectorMessenger
(
FSLDetectorConstruction
*
FSLDet
)
...
...
@@ -75,6 +76,15 @@ FSLDetectorMessenger::FSLDetectorMessenger(FSLDetectorConstruction* FSLDet)
theDeltaChordCommand
->
SetGuidance
(
" -> in unit of [millimeter]"
);
theDeltaChordCommand
->
SetUnitCategory
(
"Length"
);
theDeltaChordCommand
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
theStepMaxCommand
=
new
G4UIcmdWithADoubleAndUnit
(
"/FSLdet/StepMax"
,
this
);
theStepMaxCommand
->
SetGuidance
(
"Define a step max"
);
theStepMaxCommand
->
SetParameterName
(
"StepMax"
,
false
);
// Changed "theStepMax" to "StepMax"
theStepMaxCommand
->
SetUnitCategory
(
"Length"
);
theStepMaxCommand
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
}
FSLDetectorMessenger
::~
FSLDetectorMessenger
()
...
...
@@ -87,6 +97,7 @@ FSLDetectorMessenger::~FSLDetectorMessenger()
delete
theEpsilonMinCommand
;
delete
theEpsilonMaxCommand
;
delete
theDeltaChordCommand
;
delete
theStepMaxCommand
;
}
////////////////////////////////////////////////////////////////
//
...
...
@@ -101,7 +112,12 @@ void FSLDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
if
(
command
==
theRegionCommand
)
{
theDetector
->
SetAddRegions
(
true
);
}
if
(
command
==
theStepMaxCommand
)
{
// G4double newStepMax = theStepMaxCommand->GetNewDoubleValue(newValue);
//theDetector->SetStepMax(newStepMax);
theDetector
->
SetStepMax
(
theStepMaxCommand
->
GetNewDoubleValue
(
newValue
));
}
//////////Adding cmd//////
G4FieldManager
*
fieldMgr
=
G4TransportationManager
::
GetTransportationManager
()
->
GetFieldManager
();
...
...
@@ -118,21 +134,11 @@ void FSLDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
if
(
command
==
theEpsilonMaxCommand
)
{
fieldMgr
->
SetMaximumEpsilonStep
(
theEpsilonMaxCommand
->
GetNewDoubleValue
(
newValue
));
}
G4ChordFinder
*
fChordFinder
=
fieldMgr
->
GetChordFinder
();
if
(
fChordFinder
!=
nullptr
)
{
if
(
command
==
theDeltaChordCommand
)
fieldMgr
->
GetChordFinder
()
->
SetDeltaChord
(
theDeltaChordCommand
->
GetNewDoubleValue
(
newValue
));
//fieldMgr->GetChordFinder()->SetDeltaChord( fDeltaChord);
//fieldMgr->fDeltaChord = theDeltaChordCommand->GetNewDoubleValue(newValue);
//fChordFinder->SetDeltaChord(fDeltaChord);
//G4ChordFinder* fChordFinder = fieldMgr->GetChordFinder();
// if (fChordFinder != nullptr) {
// if (command == theDeltaChordCommand)
// fChordFinder->SetDeltaChord(theDeltaChordCommand->GetNewDoubleValue(newValue));
// fChordFinder->SetDeltaChord(theDeltaChordCommand->GetNewDoubleValue(newValue));
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment