Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
maxt@ihep.ac.cn
CEPCSW
Commits
0655a0be
Commit
0655a0be
authored
2 years ago
by
FU Chengdong
Browse files
Options
Downloads
Patches
Plain Diff
fix hardcode fit-direction & memory leak
parent
39bfb2d4
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
Service/TrackSystemSvc/src/MarlinTrkUtils.cc
+13
-7
13 additions, 7 deletions
Service/TrackSystemSvc/src/MarlinTrkUtils.cc
with
13 additions
and
7 deletions
Service/TrackSystemSvc/src/MarlinTrkUtils.cc
+
13
−
7
View file @
0655a0be
...
...
@@ -258,7 +258,9 @@ namespace MarlinTrk {
// set the initial track parameters
///////////////////////////////////////////////////////
return_error
=
marlinTrk
->
initialise
(
*
pre_fit
,
bfield_z
,
IMarlinTrack
::
backward
)
;
//return_error = marlinTrk->initialise( *pre_fit, bfield_z, IMarlinTrack::backward ) ;
// fucd: previous fixed as IMarlinTrack::backward, can not change? using input value now
return_error
=
marlinTrk
->
initialise
(
*
pre_fit
,
bfield_z
,
fit_backwards
)
;
if
(
return_error
!=
IMarlinTrack
::
success
)
{
std
::
cout
<<
"MarlinTrk::createFit Initialisation of track fit failed with error : "
<<
return_error
<<
std
::
endl
;
...
...
@@ -388,10 +390,10 @@ namespace MarlinTrk {
return_error
=
marlintrk
->
getNDF
(
ndf
);
if
(
return_error
!=
IMarlinTrack
::
success
)
{
//st
reamlog_out(DEBUG3)
<< "MarlinTrk::finaliseLCIOTrack: getNDF returns " << return_error << std::endl;
//st
d::cout
<< "MarlinTrk::finaliseLCIOTrack: getNDF returns " << return_error << std::endl;
return
return_error
;
}
else
if
(
ndf
<
0
)
{
//st
reamlog_out(DEBUG2)
<< "MarlinTrk::finaliseLCIOTrack: number of degrees of freedom less than 0 track dropped : NDF = " << ndf << std::endl;
//st
d::cout
<< "MarlinTrk::finaliseLCIOTrack: number of degrees of freedom less than 0 track dropped : NDF = " << ndf << std::endl;
return
IMarlinTrack
::
error
;
}
else
{
//streamlog_out(DEBUG1) << "MarlinTrk::finaliseLCIOTrack: NDF = " << ndf << std::endl;
...
...
@@ -543,7 +545,6 @@ namespace MarlinTrk {
track
->
addToTrackStates
(
*
trkStateAtFirstHit
);
}
else
{
//streamlog_out( WARNING ) << " >>>>>>>>>>> MarlinTrk::finaliseLCIOTrack: could not get TrackState at First Hit " << firstHit << std::endl ;
delete
trkStateAtFirstHit
;
}
double
r_first
=
firstHit
.
getPosition
()[
0
]
*
firstHit
.
getPosition
()[
0
]
+
firstHit
.
getPosition
()[
1
]
*
firstHit
.
getPosition
()[
1
];
...
...
@@ -569,7 +570,7 @@ namespace MarlinTrk {
track
->
addToTrackStates
(
*
trkStateAtLastHit
);
}
else
{
std
::
cout
<<
"ERROR>>>>>>>>>>> MarlinTrk::finaliseLCIOTrack: could not get TrackState at Last Hit "
<<
last_constrained_hit
.
id
()
<<
std
::
endl
;
delete
trkStateAtLastHit
;
//
delete trkStateAtLastHit;
}
// const EVENT::FloatVec& ma = trkStateAtLastHit->getCovMatrix();
...
...
@@ -587,17 +588,22 @@ namespace MarlinTrk {
// return_error = createTrackStateAtCaloFace(marlintrk, trkStateCalo, lastHit, tanL_is_positive);
if
(
return_error
==
0
)
{
//std::cout << "fucdout referencePoint " << trkStateCalo.referencePoint << std::endl;
trkStateCalo
.
location
=
MarlinTrk
::
Location
::
AtCalorimeter
;
track
->
addToTrackStates
(
trkStateCalo
);
}
else
{
//streamlog_out( WARNING )
<< " >>>>>>>>>>> MarlinTrk::finaliseLCIOTrack: could not get TrackState at Calo Face " << std::endl ;
std
::
cout
<<
" >>>>>>>>>>> MarlinTrk::finaliseLCIOTrack: could not get TrackState at Calo Face "
<<
std
::
endl
;
//delete trkStateCalo;
}
}
else
{
track
->
addToTrackStates
(
*
atLastHit
);
track
->
addToTrackStates
(
*
atCaloFace
);
//delete trkStateAtLastHit;
}
if
(
trkStateAtFirstHit
)
delete
trkStateAtFirstHit
;
if
(
trkStateAtLastHit
)
delete
trkStateAtLastHit
;
if
(
trkStateIP
)
delete
trkStateIP
;
///////////////////////////////////////////////////////
// done
///////////////////////////////////////////////////////
...
...
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