Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Davide Di Croce
athena
Commits
1360bab7
Commit
1360bab7
authored
10 months ago
by
Ruggero Turra
Committed by
Walter Lampl
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
special case to avoid TRT photon Conversion in MVA calibration
special case to avoid TRT photon Conversion in MVA calibration
parent
e4cae4a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx
+24
-12
24 additions, 12 deletions
Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx
Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h
+4
-0
4 additions, 0 deletions
...ction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h
with
28 additions
and
12 deletions
Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx
+
24
−
12
View file @
1360bab7
...
...
@@ -64,20 +64,32 @@ StatusCode egammaMVASvc::getEnergy(const xAOD::CaloCluster& cluster,
ATH_MSG_FATAL
(
"Trying to calibrate an electron, but disabled"
);
return
StatusCode
::
FAILURE
;
}
}
else
if
(
xAOD
::
EgammaHelpers
::
isConvertedPhoton
(
&
eg
)
&&
xAOD
::
EgammaHelpers
::
conversionRadius
(
static_cast
<
const
xAOD
::
Photon
*>
(
&
eg
))
<
m_maxConvR
)
{
if
(
!
m_mvaConvertedPhoton
.
empty
())
{
mvaE
=
m_mvaConvertedPhoton
->
getEnergy
(
cluster
,
&
eg
);
}
else
{
ATH_MSG_FATAL
(
"Trying to calibrate a converted photon, but disabled"
);
return
StatusCode
::
FAILURE
;
}
}
else
if
(
xAOD
::
EgammaHelpers
::
isPhoton
(
&
eg
))
{
if
(
!
m_mvaUnconvertedPhoton
.
empty
())
{
mvaE
=
m_mvaUnconvertedPhoton
->
getEnergy
(
cluster
,
&
eg
);
const
xAOD
::
Photon
*
ph
=
static_cast
<
const
xAOD
::
Photon
*>
(
&
eg
);
bool
isConvCalib
=
xAOD
::
EgammaHelpers
::
isConvertedPhoton
(
ph
)
&&
xAOD
::
EgammaHelpers
::
conversionRadius
(
ph
)
<
m_maxConvR
;
if
(
m_removeTRTConvBarrel
)
{
// special case in Run3 to avoid TRT converted photons in the barrel
using
enum
xAOD
::
EgammaParameters
::
ConversionType
;
const
xAOD
::
EgammaParameters
::
ConversionType
conversionType
=
xAOD
::
EgammaHelpers
::
conversionType
(
ph
);
const
bool
isTRTConv
=
(
conversionType
==
singleTRT
)
||
(
conversionType
==
doubleTRT
);
// 2 or 4
const
bool
isTRTEndcap
=
std
::
abs
(
ph
->
eta
())
>
0.8
;
isConvCalib
=
isConvCalib
&&
(
isTRTEndcap
||
!
isTRTConv
);
}
if
(
isConvCalib
)
{
if
(
!
m_mvaConvertedPhoton
.
empty
())
{
mvaE
=
m_mvaConvertedPhoton
->
getEnergy
(
cluster
,
&
eg
);
}
else
{
ATH_MSG_FATAL
(
"Trying to calibrate a converted photon, but disabled"
);
return
StatusCode
::
FAILURE
;
}
}
else
{
ATH_MSG_FATAL
(
"Trying to calibrate an unconverted photon, but disabled"
);
return
StatusCode
::
FAILURE
;
if
(
!
m_mvaUnconvertedPhoton
.
empty
())
{
mvaE
=
m_mvaUnconvertedPhoton
->
getEnergy
(
cluster
,
&
eg
);
}
else
{
ATH_MSG_FATAL
(
"Trying to calibrate an unconverted photon, but disabled"
);
return
StatusCode
::
FAILURE
;
}
}
}
else
{
ATH_MSG_FATAL
(
"Egamma object is of unsupported type"
);
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h
+
4
−
0
View file @
1360bab7
...
...
@@ -68,6 +68,10 @@ private:
"MaxConvRadius"
,
800.0
,
"The maximum conversion radius for a photon to be considered converted"
};
Gaudi
::
Property
<
bool
>
m_removeTRTConvBarrel
{
this
,
"RemoveTRTConvBarrel"
,
false
,
"Remove TRT converted photons in the barrel"
};
};
#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