Commit fca194f8 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

Remove deprecated LikeliHood helper. The string anyhow is different as all...

Remove deprecated LikeliHood helper. The string anyhow is different as all these are redone Derivation or not there are at all. And the current implementation is not the most efficient as it redoes the lookup for the Accessor..
parent 7c8878e8
......@@ -450,25 +450,6 @@ void Egamma_v1::setSelectionisEM(unsigned int value, const std::string& isEM){
acc(*this)=value;
}
bool Egamma_v1::likelihoodValue(float& value, const std::string& LHValue/*=std::string("LHValue")*/) const{
const SG::AuxElement::Accessor<float> acc( LHValue );
if(!acc.isAvailable(*this) ) {
return false;
}
value= acc(*this);
return true;
}
float Egamma_v1::likelihoodValue(const std::string& LHValue/*=std::string("LHValue")*/) const{
const SG::AuxElement::Accessor< float > acc( LHValue );
return acc(*this);
}
void Egamma_v1::setLikelihoodValue(float value, const std::string& LHValue/*=std::string("LHValue")*/){
const SG::AuxElement::Accessor<float> acc( LHValue);
acc(*this)=value;
}
} // namespace xAOD
// LocalWords: const el hasStore makePrivateStore
......@@ -7,6 +7,10 @@
#include "PATCore/AcceptData.h"
#include "xAODEgamma/Egamma.h"
namespace {
const SG::AuxElement::Accessor<float> accLH("LHValue");
}
EMPIDBuilder::EMPIDBuilder(const std::string& type,
const std::string& name,
const IInterface* parent)
......@@ -140,10 +144,8 @@ EMPIDBuilder::execute(const EventContext& ctx, xAOD::Egamma* eg) const
// save the LHValue only once
if (i == 0) {
eg->setLikelihoodValue(
static_cast<float>(
m_electronLHselectors[i]->calculate(ctx, eg, avg_mu)),
m_LHValueName);
accLH(*eg) = static_cast<float>(
m_electronLHselectors[i]->calculate(ctx, eg, avg_mu));
}
}
......
......@@ -1780,6 +1780,9 @@ StatusCode TrigEDMChecker::dumpxAODElectronContainer() {
//DEBUG output for Egamma container
ATH_MSG_INFO(" REGTEST: xAOD Reconstruction variables: ");
// //Cluster and ShowerShape info
//
static const SG::AuxElement::Accessor< float > accLH("LHValue");
static const SG::AuxElement::Accessor< float > accLHCalo("LHCaloValue");
for (const auto eg : *elCont){
//REGTEST printout
if (eg) {
......@@ -1810,12 +1813,12 @@ StatusCode TrigEDMChecker::dumpxAODElectronContainer() {
if(eg->selectionisEM(isEMbit,"isEMLHTight"))
ATH_MSG_INFO(" REGTEST: isEMLHTight " << std::hex << isEMbit << std::dec);
else ATH_MSG_WARNING(" REGTEST: Missing Aux info");
if(eg->likelihoodValue(val_float,"LHValue"))
ATH_MSG_INFO(" REGTEST: LHValue " << val_float);
if(accLH.isAvailable(*eg))
ATH_MSG_INFO(" REGTEST: LHValue " << accLH(*eg));
else
ATH_MSG_WARNING(" REGTEST: Missing Aux info ");
if(eg->likelihoodValue(val_float,"LHCaloValue"))
ATH_MSG_INFO(" REGTEST: LHValue " << val_float);
if(accLHCalo.isAvailable(*eg))
ATH_MSG_INFO(" REGTEST: LHValue " << accLHCalo(*eg));
else
ATH_MSG_WARNING(" REGTEST: Missing Aux info ");
if(eg->passSelection(pid,"LHVLoose"))
......
Supports Markdown
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