Created
June 25, 2015 14:38
-
-
Save jpata/1485e93603be930facd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using namespace reco; | |
using namespace PhysicsTools; | |
CombinedMVAJetTagComputerETH::CombinedMVAJetTagComputerETH( | |
const edm::ParameterSet ¶ms) : | |
GenericMVAJetTagComputer(params) | |
{ | |
std::cout << "CombinedMVAJetTagComputerETH::constructor" << std::endl; | |
inputComputerNames = params.getParameter< std::vector<std::string>>( | |
"jetTagComputers" | |
); | |
uses(0, "ipTagInfos"); | |
uses(1, "svTagInfos"); | |
uses(2, "muonTagInfos"); | |
uses(3, "elecTagInfos"); | |
} | |
CombinedMVAJetTagComputerETH::~CombinedMVAJetTagComputerETH() | |
{ | |
} | |
void CombinedMVAJetTagComputerETH::initialize(const JetTagComputerRecord & record) { | |
std::cout << "CombinedMVAJetTagComputerETH::initialize" << std::endl; | |
for (auto & name : inputComputerNames) { | |
edm::ESHandle<JetTagComputer> computerHandle; | |
record.get(name, computerHandle); | |
const JetTagComputer* comp = computerHandle.product(); | |
computers.push_back(comp); | |
std::vector<std::string> inputLabels(comp->getInputLabels()); | |
for (auto lab : inputLabels) { | |
std::cout << name << " " << lab << std::endl; | |
} | |
} | |
GenericMVAJetTagComputer::initialize(record); | |
} | |
float CombinedMVAJetTagComputerETH::discriminator(const JetTagComputer::TagInfoHelper &info) const | |
{ | |
int i = 0; | |
for (const JetTagComputer* comp : computers) { | |
float d = (*comp)(info); | |
std::cout << inputComputerNames[i] << " " << d << std::endl; | |
i++; | |
} | |
return 0.0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment