Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
calypso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Charlotte Cavanagh
calypso
Commits
feb1a8dd
Commit
feb1a8dd
authored
1 year ago
by
Eric Torrence
Browse files
Options
Downloads
Plain Diff
Merge branch 'faserrec-procdev' into 'master'
p0010 patches See merge request
faser/calypso!350
parents
f2d89821
8e3317a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Control/CalypsoExample/Reconstruction/scripts/faser_reco.py
+1
-1
1 addition, 1 deletion
Control/CalypsoExample/Reconstruction/scripts/faser_reco.py
LHCData/LHCDataAlgs/src/LHCDataAlg.cxx
+58
-11
58 additions, 11 deletions
LHCData/LHCDataAlgs/src/LHCDataAlg.cxx
with
59 additions
and
12 deletions
Control/CalypsoExample/Reconstruction/scripts/faser_reco.py
+
1
−
1
View file @
feb1a8dd
...
...
@@ -210,7 +210,7 @@ if not args.isOverlay:
# Tracker clusters
from
TrackerPrepRawDataFormation.TrackerPrepRawDataFormationConfig
import
FaserSCT_ClusterizationCfg
# acc.merge(FaserSCT_ClusterizationCfg(ConfigFlags, DataObjectName="Pos_SCT_RDOs"))
acc
.
merge
(
FaserSCT_ClusterizationCfg
(
ConfigFlags
,
DataObjectName
=
"
SCT_RDOs
"
))
acc
.
merge
(
FaserSCT_ClusterizationCfg
(
ConfigFlags
,
DataObjectName
=
"
SCT_RDOs
"
,
checkBadChannels
=
True
))
#
# SpacePoints
...
...
This diff is collapsed.
Click to expand it.
LHCData/LHCDataAlgs/src/LHCDataAlg.cxx
+
58
−
11
View file @
feb1a8dd
...
...
@@ -55,6 +55,10 @@ LHCDataAlg::execute(const EventContext& ctx) const {
lhcDataHandle
->
set_numBunchBeam2
(
m_lhcTool
->
getBeam2Bunches
(
ctx
));
lhcDataHandle
->
set_numBunchColliding
(
m_lhcTool
->
getCollidingBunches
(
ctx
));
ATH_MSG_DEBUG
(
"FaserLHCData B1: "
<<
m_lhcTool
->
getBeam1Bunches
(
ctx
)
<<
" B2: "
<<
m_lhcTool
->
getBeam2Bunches
(
ctx
)
<<
" Coll: "
<<
m_lhcTool
->
getCollidingBunches
(
ctx
));
// Fill BCID information
// Get the BCID mask
...
...
@@ -64,37 +68,68 @@ LHCDataAlg::execute(const EventContext& ctx) const {
SG
::
ReadHandle
<
xAOD
::
EventInfo
>
xevt
(
m_eventInfo
,
ctx
);
unsigned
int
bcid
=
xevt
->
bcid
();
int
nearest
=
findNearest
(
bcid
,
bcid_mask
,
3
);
// Colliding beams
int
nearest
;
if
(
m_lhcTool
->
getCollidingBunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No colliding bunches, can't set nearest"
);
nearest
=
-
3564
;
}
else
{
nearest
=
findNearest
(
bcid
,
bcid_mask
,
3
);
// Colliding beams
}
lhcDataHandle
->
set_distanceToCollidingBCID
(
nearest
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
nearest
<<
" from BCID "
<<
bcid
<<
" to the nearest colliding BCID "
);
nearest
=
findNearest
(
bcid
,
bcid_mask
,
1
);
// Beam1 unpaired
if
(
m_lhcTool
->
getBeam1Bunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No beam 1 bunches, can't set nearest"
);
nearest
=
-
3564
;
}
else
{
nearest
=
findNearest
(
bcid
,
bcid_mask
,
1
);
// Beam1 unpaired
}
lhcDataHandle
->
set_distanceToUnpairedB1
(
nearest
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
nearest
<<
" from BCID "
<<
bcid
<<
" to the nearest unpaired B1 "
);
nearest
=
findNearest
(
bcid
,
bcid_mask
,
2
);
// Beam2 unpaired
if
(
m_lhcTool
->
getBeam2Bunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No beam 2 bunches, can't set nearest"
);
nearest
=
-
3564
;
}
else
{
nearest
=
findNearest
(
bcid
,
bcid_mask
,
2
);
// Beam2 unpaired
}
lhcDataHandle
->
set_distanceToUnpairedB2
(
nearest
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
nearest
<<
" from BCID "
<<
bcid
<<
" to the nearest unpaired B2 "
);
// Add 127 to current BCID to check if inbound B1 is nearby FASER
int
offset_bcid
=
(
bcid
+
127
)
%
3564
;
nearest
=
findNearest
(
offset_bcid
,
bcid_mask
,
1
);
// Inbound B1
int
nearest2
=
findNearest
(
offset_bcid
,
bcid_mask
,
3
);
// Inbound B1
if
(
abs
(
nearest2
)
<
abs
(
nearest
))
nearest
=
nearest2
;
if
(
m_lhcTool
->
getBeam1Bunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No beam 1 bunches, can't set nearest"
);
nearest
=
-
3564
;
}
else
{
int
offset_bcid
=
(
bcid
+
127
)
%
3564
;
nearest
=
findNearest
(
offset_bcid
,
bcid_mask
,
1
);
// Inbound B1
int
nearest2
=
findNearest
(
offset_bcid
,
bcid_mask
,
3
);
// Inbound B1
if
(
abs
(
nearest2
)
<
abs
(
nearest
))
nearest
=
nearest2
;
}
lhcDataHandle
->
set_distanceToInboundB1
(
nearest
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
nearest
<<
" from BCID "
<<
bcid
<<
" to the nearest inbound B1 "
);
unsigned
int
previous
;
previous
=
previousColliding
(
bcid
,
bcid_mask
);
if
(
m_lhcTool
->
getCollidingBunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No colliding bunches, can't set nearest"
);
previous
=
9999
;
}
else
{
previous
=
previousColliding
(
bcid
,
bcid_mask
);
}
lhcDataHandle
->
set_distanceToPreviousColliding
(
previous
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
previous
<<
" from BCID "
<<
bcid
<<
" to the previous colliding bunch "
);
previous
=
previousTrain
(
bcid
,
bcid_mask
);
if
(
m_lhcTool
->
getCollidingBunches
(
ctx
)
==
0
)
{
ATH_MSG_INFO
(
"No colliding bunches, can't set nearest"
);
previous
=
9999
;
}
else
{
previous
=
previousTrain
(
bcid
,
bcid_mask
);
}
lhcDataHandle
->
set_distanceToTrainStart
(
previous
);
ATH_MSG_DEBUG
(
"Found distance of "
<<
previous
<<
" from BCID "
<<
bcid
<<
" to the start of the previous train "
);
...
...
@@ -142,8 +177,20 @@ LHCDataAlg::findNearest(unsigned int bcid, const std::vector<unsigned char>& bci
// If we got to here, there was no match
// Does the BCID make sense?
ATH_MSG_WARNING
(
"Couldn't find distance from BCID "
<<
bcid
<<
" and pattern "
<<
mask
<<
"!"
);
ATH_MSG_WARNING
(
bcid_mask
);
ATH_MSG_WARNING
(
"Couldn't find distance from BCID "
<<
bcid
<<
" and pattern "
<<
int
(
mask
)
<<
"!"
);
int
b1
=
0
;
int
b2
=
0
;
int
col
=
0
;
for
(
int
i
=
0
;
i
<
3564
;
i
++
)
{
if
(
mask
&
0x01
)
b1
++
;
if
(
mask
&
0x02
)
b2
++
;
if
(
mask
&
0x03
)
col
++
;
ATH_MSG_WARNING
(
"BCID "
<<
i
<<
" - "
<<
int
(
bcid_mask
[
i
]));
}
//ATH_MSG_WARNING(bcid_mask);
ATH_MSG_WARNING
(
"Found B1: "
<<
b1
<<
" B2: "
<<
b2
<<
" Coll: "
<<
col
);
return
-
3565
;
}
...
...
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