Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Computing
cbmroot
Commits
45374969
Commit
45374969
authored
3 years ago
by
sergeizharko
Committed by
David Emschermann
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
L1BaseStationInfo.h: fixed bugs, added new method for FieldSlice approximation coefficients
parent
a806e2a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!717
New interface for L1Algo initialization
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reco/L1/CbmL1.cxx
+56
-0
56 additions, 0 deletions
reco/L1/CbmL1.cxx
with
56 additions
and
0 deletions
reco/L1/CbmL1.cxx
+
56
−
0
View file @
45374969
...
...
@@ -766,6 +766,62 @@ InitStatus CbmL1::Init()
}
algo
->
SetL1Parameters
(
fL1Parameters
);
/********************************************************************************************************************
* *
* EXPERIMENTAL FEATURE: usage of L1InitManager for L1Algo initialization *
* *
* Stage 1: Repeat initialization steps in parallel to the original code *
* Stage 2: Compare two initialization procedures *
* Stage 3: Remove old initialization *
* *
********************************************************************************************************************/
// Get reference to the L1Algo initialization manager
L1InitManager
*
initMan
=
algo
->
GetL1InitManager
();
constexpr
double
PI
=
3.14159265358
;
// TODO: why cmath is not used?
// Fill STS info:
for
(
int
iSt
=
0
;
iSt
<
NStsStations
;
++
iSt
)
{
auto
cbmSts
=
CbmStsSetup
::
Instance
()
->
GetStation
(
iSt
);
auto
stsStation
=
new
L1BaseStationInfo
();
stsStation
->
SetStationID
(
iSt
);
stsStation
->
SetStationType
(
0
);
// STS
// Set up station geometry and material
stsStation
->
SetZ
(
cbmSts
->
GetZ
());
double
stsXmax
=
cbmSts
->
GetXmax
();
double
stsYmax
=
cbmSts
->
GetYmax
();
stsStation
->
SetXmax
(
stsXmax
);
stsStation
->
SetYmax
(
stsYmax
);
stsStation
->
SetRmin
(
0
);
stsStation
->
SetRmax
(
stsXmax
>
stsYmax
?
stsXmax
:
stsYmax
);
stsStation
->
SetMaterial
(
cbmSts
->
GetSensorD
(),
cbmSts
->
GetRadLength
());
// Set up strips geometry
// TODO: why fscal instead of double in initialization?
fscal
stsFrontPhi
=
cbmSts
->
GetSensorRotation
()
+
cbmSts
->
GetSensorStereoAngle
(
0
)
*
PI
/
180.
;
fscal
stsBackPhi
=
cbmSts
->
GetSensorRotation
()
+
cbmSts
->
GetSensorStereoAngle
(
1
)
*
PI
/
180.
;
fscal
stsFrontSigma
=
cbmSts
->
GetSensorPitch
(
0
)
/
sqrt
(
12
);
fscal
stsBackSigma
=
stsFrontSigma
;
stsStation
->
SetFrontBackStripsGeometry
(
stsFrontPhi
,
stsFrontSigma
,
stsBackPhi
,
stsBackSigma
);
// Set up magnetic field
// NOTE: Such tricky solution is needed to prevent L1Algo from FairRoot dependencies
auto
getFieldValueFcn
=
[](
const
double
(
&
inXYZ
)[
3
],
double
(
&
outB
)[
3
])
{
CbmKF
::
Instance
()
->
GetMagneticField
()
->
GetFieldValue
(
inXYZ
,
outB
);
};
stsStation
->
SetFieldSlice
(
getFieldValueFcn
);
initMan
->
AddStation
(
stsStation
);
delete
stsStation
;
}
initMan
->
PrintStations
(
/*vebosity = */
1
);
/********************************************************************************************************************
********************************************************************************************************************/
algo
->
Init
(
geo
,
fUseHitErrors
,
fTrackingMode
,
fMissingHits
);
geo
.
clear
();
...
...
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