57 return j1.
id() == j2.
id() && j1.
key() == j2.
key();
98 jpComputer_(iConfig.getParameter<
std::
string>(
"jpComputerSrc")),
99 jpbComputer_(iConfig.getParameter<
std::
string>(
"jpbComputerSrc")),
100 softmuComputer_(iConfig.getParameter<
std::
string>(
"softmuComputerSrc")),
101 softelComputer_(iConfig.getParameter<
std::
string>(
"softelComputerSrc")),
102 cMVAPtThreshold_(iConfig.getParameter<double>(
"cMVAPtThreshold"))
105 produces<std::vector<reco::ShallowTagInfo> >();
154 auto tagInfos = std::make_unique<std::vector<reco::ShallowTagInfo> >();
157 for(
size_t idx = 0;
idx<nnInfos->size(); ++
idx) {
158 auto& nnInfo = nnInfos->at(
idx);
159 auto& ipInfo = ipInfos->at(
idx);
160 auto& muInfo = muInfos->at(
idx);
161 auto& elInfo = elInfos->at(
idx);
164 !
equals(nnInfo.jet(), ipInfo.jet()) ||
165 !
equals(nnInfo.jet(), muInfo.jet()) ||
166 !
equals(nnInfo.jet(), elInfo.jet())
168 throw cms::Exception(
"ValueError") <<
"DeepNNTagInfoProducer::produce: The tagInfos taken belong to different jets!" << std::endl
169 <<
"This could be due to: " << std::endl
170 <<
" - You passed tagInfos computed on different jet collection" << std::endl
171 <<
" - The assumption that the tagInfos are filled in the same order is actually wrong" << std::endl;
175 std::vector<const BaseTagInfo*> ipBaseInfo;
176 ipBaseInfo.push_back(&ipInfo);
177 std::vector<const BaseTagInfo*> muBaseInfo;
178 muBaseInfo.push_back(&muInfo);
179 std::vector<const BaseTagInfo*> elBaseInfo;
180 elBaseInfo.push_back(&elInfo);
198 tagInfos->emplace_back(vars, nnInfo.jet());
const edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > elInfoSrc_
DeepCMVATagInfoProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< std::vector< reco::ShallowTagInfo > > deepNNSrc_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~DeepCMVATagInfoProducer() override
void produce(edm::Event &, const edm::EventSetup &) override
void endStream() override
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
const edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > ipInfoSrc_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string softmuComputer_
const edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > muInfoSrc_
std::string softelComputer_
void beginStream(edm::StreamID) override
T const * product() const
void insert(const TaggingVariable &variable, bool delayed=false)