Commit a51de259 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'tidy_photonISEMselector' into 'master'

continue with the clean up of egamma ISEM selectors, rm uneeded code, format

See merge request atlas/athena!48833
parents 85f2cfc5 0497e71a
......@@ -85,7 +85,7 @@ AsgElectronIsEMSelector::initialize()
sc = StatusCode::FAILURE;
return sc;
}
ATH_MSG_DEBUG("Configfile to use " << m_configFile);
ATH_MSG_INFO("Configfile to use " << m_configFile);
TEnv env;
env.ReadFile(filename.c_str(), kEnvLocal);
......@@ -98,7 +98,6 @@ AsgElectronIsEMSelector::initialize()
m_rootTool->m_isEMMask = static_cast<unsigned int>(mask);
}
//
ATH_MSG_DEBUG("Read in the TEnv config ");
// From here on the conf ovverides all other properties
bool useTRTOutliers(env.GetValue("useTRTOutliers", true));
m_rootTool->m_useTRTOutliers = useTRTOutliers;
......@@ -190,7 +189,6 @@ AsgElectronIsEMSelector::accept(const EventContext& ctx,
const xAOD::IParticle* part) const
{
ATH_MSG_DEBUG("Entering accept( const IParticle* part )");
if (part->type() == xAOD::Type::Electron ||
part->type() == xAOD::Type::Photon) {
return accept(ctx, static_cast<const xAOD::Egamma*>(part));
......@@ -206,7 +204,6 @@ AsgElectronIsEMSelector::accept(const EventContext& ctx,
const xAOD::Egamma* eg) const
{
ATH_MSG_DEBUG("Entering accept( const Egamma* part )");
if (eg) {
unsigned int isEM = ~0;
StatusCode sc = execute(ctx, eg, isEM);
......@@ -225,7 +222,6 @@ asg::AcceptData
AsgElectronIsEMSelector::accept(const EventContext& ctx,
const xAOD::Electron* el) const
{
ATH_MSG_DEBUG("Entering accept( const Electron* part )");
return accept(ctx, static_cast<const xAOD::Egamma*>(el));
}
......@@ -233,7 +229,6 @@ asg::AcceptData
AsgElectronIsEMSelector::accept(const EventContext& ctx,
const xAOD::Photon* ph) const
{
ATH_MSG_DEBUG("Entering accept( const Photon* part )");
return accept(ctx, static_cast<const xAOD::Egamma*>(ph));
}
......@@ -293,7 +288,6 @@ AsgElectronIsEMSelector::execute(const EventContext& ctx,
// Particle identification for electrons based on cuts
//
(void)ctx;
ATH_MSG_DEBUG("entering execute(const Egamma* eg...)");
// initialisation
isEM = 0;
// protection against null pointer
......@@ -466,7 +460,6 @@ AsgElectronIsEMSelector::TrackCut(const xAOD::Electron* eg,
// retrieve associated track
const xAOD::TrackParticle* t = eg->trackParticle();
// ATH_MSG_DEBUG("CaloCutsOnly is false");
// protection against bad pointers
if (t == nullptr) {
ATH_MSG_ERROR("Something is bad with the variables as passed");
......@@ -544,4 +537,3 @@ AsgElectronIsEMSelector::TrackCut(const xAOD::Electron* eg,
iflag);
}
// LocalWords: const el
......@@ -45,14 +45,13 @@ AsgElectronLikelihoodTool::AsgElectronLikelihoodTool(const std::string& myname)
// a failure
declareProperty("WorkingPoint", m_WorkingPoint = "", "The Working Point");
declareProperty("ConfigFile", m_configFile = "", "The config file to use");
// pdf file name. If specified it overrides the one in the config file
declareProperty("inputPDFFileName",
m_pdfFileName = "",
"The input ROOT file name that holds the PDFs");
//Addtional properties that are not part of the config files
// Addtional properties that are not part of the config files
declareProperty(
"usePVContainer", m_usePVCont = true, "Whether to use the PV container");
declareProperty(
......@@ -75,11 +74,7 @@ AsgElectronLikelihoodTool::~AsgElectronLikelihoodTool()
StatusCode
AsgElectronLikelihoodTool::initialize()
{
ATH_MSG_INFO("initialize : WP " << m_WorkingPoint.size() << " "
<< m_configFile.size());
std::string configFile,PDFfilename, resolvedPDF; // Default
std::string configFile, PDFfilename, resolvedPDF; // Default
if (!m_WorkingPoint.empty()) {
m_configFile = AsgConfigHelper::findConfigFile(
......@@ -94,7 +89,7 @@ AsgElectronLikelihoodTool::initialize()
return StatusCode::FAILURE;
}
ATH_MSG_DEBUG("Configfile to use " << m_configFile);
ATH_MSG_INFO("Configfile to use " << m_configFile);
TEnv env;
if (env.ReadFile(configFile.c_str(), kEnvLocal)) {
......@@ -106,10 +101,8 @@ AsgElectronLikelihoodTool::initialize()
// We need to see if the user had provided
// an override, if not needs to be in the input
// config file
ATH_MSG_DEBUG("Get the input PDFs in the tool ");
if (!m_pdfFileName
.empty()) { // If the property was set by the user, take that.
if (!m_pdfFileName.empty()) {
// If the property was set by the user, take that.
ATH_MSG_INFO("Setting user specified PDF file " << m_pdfFileName);
PDFfilename = m_pdfFileName;
} else {
......@@ -128,7 +121,6 @@ AsgElectronLikelihoodTool::initialize()
if (m_configFile.find("dev/") != std::string::npos) {
PDFfilename.insert(0, "dev/");
}
ATH_MSG_DEBUG("Getting the input PDFs from: " << PDFfilename);
}
resolvedPDF = PathResolverFindCalibFile(PDFfilename);
......@@ -140,7 +132,7 @@ AsgElectronLikelihoodTool::initialize()
return StatusCode::FAILURE;
}
///-----------Begin of text config----------------------------
///-----------Begin of text config----------------------------
// The following are all taken from the config
// file
m_rootTool->m_variableNames = env.GetValue("VariableNames", "");
......@@ -231,10 +223,6 @@ AsgElectronLikelihoodTool::initialize()
ATH_CHECK(
m_HIESContKey.initialize(doCentralityTransform && m_useCaloSumsCont));
// Get the name of the current operating point, and massage the other strings
// accordingly
ATH_MSG_VERBOSE(
"Going to massage the labels based on the provided operating point...");
// Get the message level and set the underlying ROOT tool message level
// accordingly
m_rootTool->msg().setLevel(this->msg().level());
......@@ -389,25 +377,6 @@ AsgElectronLikelihoodTool::accept(const EventContext& ctx,
// for now don't cache.
double likelihood = calculate(ctx, el, ip);
ATH_MSG_VERBOSE(Form(
"PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, nSiHitsPlusDeadSensors=%i, "
"nHitsPlusPixDeadSensors=%i, passBLayerRequirement=%i, ambiguityBit=%i, "
"d0=%8.5f, deltaEta=%8.5f, deltaphires=%5.8f, wstot=%8.5f, EoverP=%8.5f, "
"ip=%8.5f",
likelihood,
eta,
et,
nSiHitsPlusDeadSensors,
nPixHitsPlusDeadSensors,
passBLayerRequirement,
ambiguityBit,
d0,
deltaEta,
deltaPhiRescaled2,
wstot,
EoverP,
ip));
if (!allFound) {
ATH_MSG_ERROR(
"Skipping LH rectangular cuts! The following variables are missing: "
......@@ -513,20 +482,6 @@ AsgElectronLikelihoodTool::accept(const EventContext& ctx,
notFoundList += "wtots1 ";
}
ATH_MSG_VERBOSE(
Form("PassVars: LH=%8.5f, eta=%8.5f, et=%8.5f, "
"nSiHitsPlusDeadSensors=%i, nPixHitsPlusDeadSensors=%i, "
"passBLayerRequirement=%i, ambiguityBit=%i, ip=%8.5f, wstot=%8.5f",
likelihood,
eta,
et,
nSiHitsPlusDeadSensors,
nPixHitsPlusDeadSensors,
passBLayerRequirement,
ambiguityBit,
ip,
wstot));
if (!allFound) {
ATH_MSG_ERROR(
"Skipping LH rectangular cuts! The following variables are missing: "
......@@ -740,30 +695,6 @@ AsgElectronLikelihoodTool::calculate(const EventContext& ctx,
ip = mu;
}
ATH_MSG_VERBOSE(Form(
"Vars: eta=5%8.5f, et=%8.5f, f3=%8.5f, rHad==%8.5f, rHad1=%8.5f, "
"Reta=%8.5f, w2=%8.5f, f1=%8.5f, Emaxs1=%8.5f, deltaEta=%8.5f, d0=%8.5f, "
"d0sigma=%8.5f, Rphi=%8.5f, dpOverp=%8.5f, deltaPhiRescaled2=%8.5f, "
"TRT_PID=%8.5f, trans_TRT_PID=%8.5f, ip=%8.5f",
eta,
et,
f3,
Rhad,
Rhad1,
Reta,
w2,
f1,
Eratio,
deltaEta,
d0,
d0sigma,
Rphi,
dpOverp,
deltaPhiRescaled2,
TRT_PID,
trans_TRT_PID,
ip));
if (!allFound) {
ATH_MSG_ERROR(
"Skipping LH calculation! The following variables are missing: "
......@@ -914,29 +845,6 @@ AsgElectronLikelihoodTool::calculate(const EventContext& ctx,
ip = mu;
}
ATH_MSG_VERBOSE(
Form("Vars: eta=%8.5f, et=%8.5f, f3=%8.5f, rHad==%8.5f, rHad1=%8.5f, "
"Reta=%8.5f, w2=%8.5f, f1=%8.5f, Emaxs1=%8.5f, deltaEta=%8.5f, "
"d0=%8.5f, d0sigma=%8.5f, Rphi=%8.5f, dpOverp=%8.5f, "
"deltaPhiRescaled2=%8.5f, TRT_PID=%8.5f, ip=%8.5f",
eta,
et,
f3,
Rhad,
Rhad1,
Reta,
w2,
f1,
Eratio,
deltaEta,
d0,
d0sigma,
Rphi,
dpOverp,
deltaPhiRescaled2,
TRT_PID,
ip));
if (!allFound) {
ATH_MSG_ERROR(
"Skipping LH calculation! The following variables are missing: "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment