Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
p348-daq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
P348
p348-daq
Commits
8d99f200
Commit
8d99f200
authored
1 week ago
by
Andrea Celentano
Browse files
Options
Downloads
Patches
Plain Diff
Update file MManager.h
parent
21c31e6a
Loading
Loading
1 merge request
!563
Resolve "SimpleTrackingMM method - checks in CanTrack"
Pipeline
#11070387
failed
1 week ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p348reco/MManager.h
+25
-12
25 additions, 12 deletions
p348reco/MManager.h
with
25 additions
and
12 deletions
p348reco/MManager.h
+
25
−
12
View file @
8d99f200
...
@@ -69,8 +69,8 @@ struct MManager
...
@@ -69,8 +69,8 @@ struct MManager
void
AddEvent
(
const
RecoEvent
&
);
void
AddEvent
(
const
RecoEvent
&
);
void
AddEvent
(
const
RecoEvent
&
,
const
MMcond
);
void
AddEvent
(
const
RecoEvent
&
,
const
MMcond
);
bool
UpStreamOK
()
const
;
bool
UpStreamOK
()
const
;
bool
DownStreamOK
(
bool
requireAtLeastTwo
)
const
;
bool
CanTrackSimpleTracking
(
)
const
;
bool
CanTrack
(
bool
requireAtLeastTwoDownstream
=
false
)
const
;
bool
CanTrack
DeflectionOrGenfit
(
)
const
;
SimpleTrack
SimpleTrackingMM
();
SimpleTrack
SimpleTrackingMM
();
SimpleTrack
PointDeflectionTracking
();
SimpleTrack
PointDeflectionTracking
();
double
GetAngleSimple
();
double
GetAngleSimple
();
...
@@ -94,6 +94,8 @@ private:
...
@@ -94,6 +94,8 @@ private:
TVector3
mm3
;
TVector3
mm3
;
TVector3
mm4
;
TVector3
mm4
;
bool
DownStreamOK
(
const
int
NMin
)
const
;
// EventDisplay crash on machines with Intel graphics, workaround:
// EventDisplay crash on machines with Intel graphics, workaround:
// $ export LIBGL_ALWAYS_INDIRECT=1
// $ export LIBGL_ALWAYS_INDIRECT=1
// https://root.cern.ch/phpBB3/viewtopic.php?t=21274
// https://root.cern.ch/phpBB3/viewtopic.php?t=21274
...
@@ -188,20 +190,26 @@ bool MManager::UpStreamOK() const
...
@@ -188,20 +190,26 @@ bool MManager::UpStreamOK() const
}
}
bool
MManager
::
DownStreamOK
(
bool
requireAtLeastTwo
)
const
bool
MManager
::
DownStreamOK
(
const
int
NMin
)
const
{
{
const
unsigned
int
Nup
=
downstream
.
size
();
const
unsigned
int
Nup
=
downstream
.
size
();
const
unsigned
int
NupMIN
=
requireAtLeastTwo
?
2
:
1
;
if
(
Nup
<
NMin
)
return
false
;
//TODO: in theory is possible with just one
if
(
Nup
<
NupMIN
)
return
false
;
//TODO: in theory is possible with just one
else
return
true
;
else
return
true
;
}
}
bool
MManager
::
CanTrack
(
bool
requireAtLeastTwoDownstream
)
const
bool
MManager
::
CanTrackSimpleTracking
()
const
{
//if(!UpStreamOK())cout << "not enough hit upstream" << endl;
//if(!DownStreamOK())cout << "not enough hit downstream" << endl;
return
UpStreamOK
()
&&
DownStreamOK
(
2
);
}
bool
MManager
::
CanTrackDeflectionOrGenfit
()
const
{
{
//if(!UpStreamOK())cout << "not enough hit upstream" << endl;
//if(!UpStreamOK())cout << "not enough hit upstream" << endl;
//if(!DownStreamOK())cout << "not enough hit downstream" << endl;
//if(!DownStreamOK())cout << "not enough hit downstream" << endl;
return
UpStreamOK
()
&&
DownStreamOK
(
requireAtLeastTwoDownstream
);
return
UpStreamOK
()
&&
DownStreamOK
(
1
);
}
}
void
MManager
::
CollectPointsSimple
(
const
vector
<
const
Micromega
*>&
vec
,
TVector3
&
mmup
,
TVector3
&
mmdown
)
void
MManager
::
CollectPointsSimple
(
const
vector
<
const
Micromega
*>&
vec
,
TVector3
&
mmup
,
TVector3
&
mmdown
)
...
@@ -231,7 +239,7 @@ SimpleTrack MManager::SimpleTrackingMM()
...
@@ -231,7 +239,7 @@ SimpleTrack MManager::SimpleTrackingMM()
SimpleTrack
st
;
SimpleTrack
st
;
if
(
!
CanTrack
(
true
))
if
(
!
CanTrack
SimpleTracking
(
))
return
st
;
return
st
;
///ELSE:simple tracking algorithm for the MM
///ELSE:simple tracking algorithm for the MM
...
@@ -254,7 +262,7 @@ SimpleTrack MManager::PointDeflectionTracking()
...
@@ -254,7 +262,7 @@ SimpleTrack MManager::PointDeflectionTracking()
//define track
//define track
SimpleTrack
st
;
SimpleTrack
st
;
if
(
!
CanTrack
())
if
(
!
CanTrack
DeflectionOrGenfit
())
return
st
;
return
st
;
//use all point downstream and upstream to have an estimate on momentum reconstruction
//use all point downstream and upstream to have an estimate on momentum reconstruction
...
@@ -295,11 +303,16 @@ double MManager::GetAngleSimple()
...
@@ -295,11 +303,16 @@ double MManager::GetAngleSimple()
void
MManager
::
PrintMM
(
unsigned
int
verbose
=
3
)
void
MManager
::
PrintMM
(
unsigned
int
verbose
=
3
)
{
{
if
(
CanTrack
()
&&
verbose
>
1
)
if
(
CanTrack
SimpleTracking
()
&&
verbose
>
1
)
cout
<<
"THIS EVENT TRACKING IS POSSIBLE"
<<
endl
;
cout
<<
"THIS EVENT
SIMPLE
TRACKING IS POSSIBLE"
<<
endl
;
else
if
(
verbose
>
1
)
else
if
(
verbose
>
1
)
cout
<<
"THIS EVENT TRACKING IS NOT POSSIBLE"
<<
endl
;
cout
<<
"THIS EVENT TRACKING IS NOT POSSIBLE"
<<
endl
;
if
(
CanTrackDeflectionOrGenfit
()
&&
verbose
>
1
)
cout
<<
"THIS EVENT GENFIT TRACKING IS POSSIBLE"
<<
endl
;
else
if
(
verbose
>
1
)
cout
<<
"THIS EVENT GENFIT TRACKING IS NOT POSSIBLE"
<<
endl
;
cout
<<
"MM with hits upstream "
<<
endl
;
cout
<<
"MM with hits upstream "
<<
endl
;
for
(
auto
it
=
upstream
.
begin
();
it
!=
upstream
.
end
();
++
it
)
for
(
auto
it
=
upstream
.
begin
();
it
!=
upstream
.
end
();
++
it
)
{
{
...
@@ -369,7 +382,7 @@ void MManager::GenfitInit(const TString geofile)
...
@@ -369,7 +382,7 @@ void MManager::GenfitInit(const TString geofile)
void
MManager
::
GenfitTrack
()
void
MManager
::
GenfitTrack
()
{
{
if
(
!
CanTrack
())
if
(
!
CanTrack
DeflectionOrGenfit
())
return
;
return
;
typedef
genfit
::
MeasurementProducer
<
genfit
::
mySpacepointDetectorHit
,
genfit
::
mySpacepointMeasurement
>
MyMeasurementProducer
;
typedef
genfit
::
MeasurementProducer
<
genfit
::
mySpacepointDetectorHit
,
genfit
::
mySpacepointMeasurement
>
MyMeasurementProducer
;
...
...
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