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
e33ca193
Commit
e33ca193
authored
1 year ago
by
nnitika
Browse files
Options
Downloads
Patches
Plain Diff
ATLFM
parent
3faefed9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FullSimLight/include/ATLFieldManager.hh
+19
-25
19 additions, 25 deletions
FullSimLight/include/ATLFieldManager.hh
with
19 additions
and
25 deletions
FullSimLight/include/ATLFieldManager.hh
+
19
−
25
View file @
e33ca193
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
#define ATLFieldManager_h 1
#define ATLFieldManager_h 1
#include
"G4FieldManager.hh"
#include
"G4FieldManager.hh"
#include
"FSLDetectorConstruction.hh"
#include
"FSLDetectorMessenger.hh"
#include
<string>
#include
<string>
#include
<unordered_map>
#include
<unordered_map>
#include
<memory>
// Add this include for std::unique_ptr
#include
<memory>
// Add this include for std::unique_ptr
...
@@ -67,33 +68,26 @@ public:
...
@@ -67,33 +68,26 @@ public:
:
parameters
(
params
)
{}
:
parameters
(
params
)
{}
double
getDoubleParameter
(
const
std
::
string
&
key
)
const
{
double
getDoubleParameter
(
const
std
::
string
&
key
)
const
{
auto
it
=
parameters
.
find
(
key
);
auto
it
=
parameters
.
find
(
key
);
return
(
it
!=
parameters
.
end
())
?
it
->
second
:
0.0
;
return
(
it
!=
parameters
.
end
())
?
it
->
second
:
0.0
;
}
}
std
::
string
getStringParameter
(
const
std
::
string
&
key
)
const
{
std
::
string
getStringParameter
(
const
std
::
string
&
key
)
const
{
return
parameters
.
count
(
key
)
?
std
::
to_string
(
parameters
.
at
(
key
))
:
""
;
return
parameters
.
count
(
key
)
?
std
::
to_string
(
parameters
.
at
(
key
))
:
""
;
}
}
template
<
typename
T
>
template
<
typename
T
>
T
getParameter
(
const
std
::
string
&
key
)
const
;
T
getParameter
(
const
std
::
string
&
key
)
const
;
private
:
private
:
std
::
unordered_map
<
std
::
string
,
double
>
parameters
;
std
::
unordered_map
<
std
::
string
,
double
>
parameters
;
};
};
template
<
>
template
<
typename
T
>
std
::
vector
<
std
::
string
>
ParameterSet
::
getParameter
<
std
::
vector
<
std
::
string
>>
(
const
std
::
string
&
key
)
const
{
T
ParameterSet
::
getParameter
(
const
std
::
string
&
key
)
const
{
std
::
vector
<
std
::
string
>
result
;
auto
it
=
parameters
.
find
(
key
);
if
(
parameters
.
count
(
key
))
{
return
(
it
!=
parameters
.
end
())
?
static_cast
<
T
>
(
it
->
second
)
:
T
{};
std
::
istringstream
iss
(
getStringParameter
(
key
));
}
std
::
copy
(
std
::
istream_iterator
<
std
::
string
>
(
iss
),
std
::
istream_iterator
<
std
::
string
>
(),
std
::
back_inserter
(
result
)
);
}
return
result
;
};
// Define ParameterSet class
// Define ParameterSet class
/*
/*
...
@@ -131,28 +125,28 @@ public:
...
@@ -131,28 +125,28 @@ public:
void
InitialiseForVolume
(
const
ParameterSet
&
params
,
void
InitialiseForVolume
(
const
ParameterSet
&
params
,
atl
::
Field
*
field
,
atl
::
Field
*
field
,
G4ChordFinder
*
cfDefault
,
G4ChordFinder
*
cfDefault
,
// G4ChordFinder* cfMonopole,
G4ChordFinder
*
cfTracker
,
G4ChordFinder
*
cfBeamPipe
,
const
std
::
string
&
vol
,
const
std
::
string
&
vol
,
const
std
::
string
&
fieldType
,
const
std
::
string
&
fieldType
,
const
std
::
string
&
stepperName
,
const
std
::
string
&
stepperName
,
double
delta
,
double
delta
,
G4PropagatorInField
*
);
G4PropagatorInField
*
);
void
setMonopoleTracking
(
G4bool
);
private:
private:
bool
isInside
Vacuum
(
const
G4Track
*
);
bool
isInside
Beampipe
(
const
G4Track
*
);
bool
isInsideTracker
(
const
G4Track
*
);
bool
isInsideTracker
(
const
G4Track
*
);
void
setDefaultChordFinder
();
void
setDefaultChordFinder
();
void
setChordFinderForTracker
();
void
setChordFinderForTracker
();
void
setChordFinderForBeampipe
();
void
setChordFinderForBeampipe
();
void
ConfigureForTrack
(
const
G4Track
*
)
;
void
ConfigureForTrack
(
const
G4Track
*
)
;
//
void
InitialiseForVolume(
);
void
printParameters
(
const
std
::
string
&
region
);
std
::
unique_ptr
<
atl
::
Field
>
theField
;
std
::
unique_ptr
<
atl
::
Field
>
theField
;
G4ChordFinder
*
m_currChordFinder
;
G4ChordFinder
*
m_currChordFinder
;
G4ChordFinder
*
m_chordFinder
;
G4ChordFinder
*
m_chordFinder
;
G4ChordFinder
*
m_chordFinderMonopole
;
G4ChordFinder
*
m_chordFinderTracker
;
G4ChordFinder
*
m_chordFinderBeamPipe
;
G4PropagatorInField
*
m_propagator
;
G4PropagatorInField
*
m_propagator
;
std
::
vector
<
const
G4Region
*>
m_regions
;
std
::
vector
<
const
G4Region
*>
m_regions
;
...
...
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