Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Guillermo Nicolas Hamity
athena
Commits
ef34a097
Commit
ef34a097
authored
2 years ago
by
Petr Balek
Committed by
Julien Maurer
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
swapping ToF channels for trains 0 and 3
swapping ToF channels for trains 0 and 3
parent
ab2bc4f3
No related branches found
Branches containing commit
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx
+28
-78
28 additions, 78 deletions
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h
+14
-0
14 additions, 0 deletions
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h
with
42 additions
and
78 deletions
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx
+
28
−
78
View file @
ef34a097
...
...
@@ -195,86 +195,36 @@ void AFP_Raw2DigiTool::setBarAndTrainID(xAOD::AFPToFHit* tofHit, const EventCont
const
int
hptdcChannel
=
tofHit
->
hptdcChannel
();
const
int
hptdcID
=
tofHit
->
hptdcID
();
int
Run
=
(
ctx
.
eventID
().
run_number
()
>
370000
?
3
:
2
);
int
swapTrain
=
(
Run
==
3
?
1
:
0
);
if
((
hptdcChannel
<
0
||
hptdcChannel
>=
12
)
||
(
hptdcID
<=
0
||
hptdcID
>=
3
))
{
ATH_MSG_WARNING
(
"Invalid hptdcID "
<<
hptdcID
<<
", or hptdcChannel "
<<
hptdcChannel
);
return
;
}
if
(
hptdcID
==
1
)
{
switch
(
hptdcChannel
)
{
case
0
:
tofHit
->
setTrainID
(
0
+
swapTrain
);
tofHit
->
setBarInTrainID
(
0
);
break
;
case
2
:
tofHit
->
setTrainID
(
1
-
swapTrain
);
tofHit
->
setBarInTrainID
(
2
);
break
;
case
3
:
tofHit
->
setTrainID
(
0
+
swapTrain
);
tofHit
->
setBarInTrainID
(
3
);
break
;
case
5
:
tofHit
->
setTrainID
(
1
-
swapTrain
);
tofHit
->
setBarInTrainID
(
1
);
break
;
case
6
:
tofHit
->
setTrainID
(
0
+
swapTrain
);
tofHit
->
setBarInTrainID
(
2
);
break
;
case
8
:
tofHit
->
setTrainID
(
1
-
swapTrain
);
tofHit
->
setBarInTrainID
(
0
);
break
;
case
9
:
tofHit
->
setTrainID
(
0
+
swapTrain
);
tofHit
->
setBarInTrainID
(
1
);
break
;
case
11
:
tofHit
->
setTrainID
(
1
-
swapTrain
);
tofHit
->
setBarInTrainID
(
3
);
break
;
default:
if
(
Run
==
2
&&
(
hptdcChannel
==
1
||
hptdcChannel
==
4
))
ATH_MSG_DEBUG
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
else
ATH_MSG_WARNING
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
}
int
RunID
=
(
ctx
.
eventID
().
run_number
()
>
370000
?
(
ctx
.
eventID
().
run_number
()
>
436657
?
2
:
1
)
:
0
);
int
trainID
=
m_channel2train
[
RunID
][
hptdcID
-
1
][
hptdcChannel
];
int
barID
=
m_channel2bar
[
RunID
][
hptdcID
-
1
][
hptdcChannel
];
if
(
trainID
>=
0
&&
barID
>=
0
)
{
tofHit
->
setTrainID
(
trainID
);
tofHit
->
setBarInTrainID
(
barID
);
}
else
if
(
hptdcID
==
2
)
{
switch
(
hptdcChannel
)
{
case
0
:
tofHit
->
setTrainID
(
2
+
swapTrain
);
tofHit
->
setBarInTrainID
(
0
);
break
;
case
2
:
tofHit
->
setTrainID
(
3
-
swapTrain
);
tofHit
->
setBarInTrainID
(
2
);
break
;
case
3
:
tofHit
->
setTrainID
(
2
+
swapTrain
);
tofHit
->
setBarInTrainID
(
3
);
break
;
case
5
:
tofHit
->
setTrainID
(
3
-
swapTrain
);
tofHit
->
setBarInTrainID
(
1
);
break
;
case
6
:
tofHit
->
setTrainID
(
2
+
swapTrain
);
tofHit
->
setBarInTrainID
(
2
);
break
;
case
8
:
tofHit
->
setTrainID
(
3
-
swapTrain
);
tofHit
->
setBarInTrainID
(
0
);
break
;
case
9
:
tofHit
->
setTrainID
(
2
+
swapTrain
);
tofHit
->
setBarInTrainID
(
1
);
break
;
case
11
:
tofHit
->
setTrainID
(
3
-
swapTrain
);
tofHit
->
setBarInTrainID
(
3
);
break
;
default:
if
(
Run
==
2
&&
(
hptdcChannel
==
1
||
hptdcChannel
==
4
))
ATH_MSG_DEBUG
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
else
ATH_MSG_WARNING
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
}
else
if
(
trainID
==-
2
&&
barID
==-
2
)
{
// this is known problem for Run2, channels 1 and 4
ATH_MSG_DEBUG
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
}
else
if
(
trainID
==-
1
&&
barID
==-
1
)
{
// this is not known
ATH_MSG_WARNING
(
"Unrecognised hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
}
else
{
// this shouldn't happen
ATH_MSG_WARNING
(
"Unrecognised trainID "
<<
trainID
<<
" or barID "
<<
barID
<<
"; run "
<<
ctx
.
eventID
().
run_number
()
<<
", hptdcChannel "
<<
hptdcChannel
<<
", hptdcID "
<<
hptdcID
);
}
}
...
...
This diff is collapsed.
Click to expand it.
ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h
+
14
−
0
View file @
ef34a097
...
...
@@ -75,5 +75,19 @@ protected:
/// tofHit passed as argument. Mapping is implemented according to
/// https://twiki.cern.ch/twiki/bin/view/Atlas/AFPHPTDC#Channel_Mapping
void
setBarAndTrainID
(
xAOD
::
AFPToFHit
*
tofHit
,
const
EventContext
&
ctx
)
const
;
private
:
// TODO: this should go to the database at some moment
// @brief mapping of channels to trainID and barID
//
// indices are: runID (Run2, Run3 till 12 Oct 2002, Run3 since 12 Oct 2022); hptdcID (1,2); channel (0...11)
// channels 1,4,7,10 shouldn't exist; Run2 data has channels 1 and 4 as well, this is a known problem
const
int
m_channel2train
[
3
][
2
][
12
]
=
{{{
0
,
-
2
,
1
,
0
,
-
2
,
1
,
0
,
-
1
,
1
,
0
,
-
1
,
1
},
{
2
,
-
2
,
3
,
2
,
-
2
,
3
,
2
,
-
1
,
3
,
2
,
-
1
,
3
}},
{{
1
,
-
1
,
0
,
1
,
-
1
,
0
,
1
,
-
1
,
0
,
1
,
-
1
,
0
},
{
3
,
-
1
,
2
,
3
,
-
1
,
2
,
3
,
-
1
,
2
,
3
,
-
1
,
2
}},
{{
1
,
-
1
,
3
,
1
,
-
1
,
3
,
1
,
-
1
,
3
,
1
,
-
1
,
3
},
{
0
,
-
1
,
2
,
0
,
-
1
,
2
,
0
,
-
1
,
2
,
0
,
-
1
,
2
}}};
const
int
m_channel2bar
[
3
][
2
][
12
]
=
{{{
0
,
-
2
,
2
,
3
,
-
2
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
},
{
0
,
-
2
,
2
,
3
,
-
2
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
}},
{{
0
,
-
1
,
2
,
3
,
-
1
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
},
{
0
,
-
1
,
2
,
3
,
-
1
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
}},
{{
0
,
-
1
,
2
,
3
,
-
1
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
},
{
0
,
-
1
,
2
,
3
,
-
1
,
1
,
2
,
-
1
,
0
,
1
,
-
1
,
3
}}};
};
#endif
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