192 std::cout <<
"<BoostedTauSeedsProducer::produce (moduleLabel = " <<
moduleLabel_ <<
")>:" << std::endl;
200 assert((subjets->
size() % 2) == 0);
205 std::cout <<
"#pfCandidates = " << pfCandidates->size() << std::endl;
208 auto selectedSubjets = std::make_unique<reco::PFJetCollection>();
211 auto selectedSubjetPFCandidateAssociationForIsolation =
212 std::make_unique<JetToPFCandidateAssociation>(&evt.
productGetter());
216 JetToConstitMap constitmap(subjets->
size());
219 const auto& thesubjets = *subjets;
220 for (
unsigned i = 0;
i < thesubjets.size(); ++
i) {
221 for (
unsigned j = 0;
j < thesubjets[
i].numberOfDaughters(); ++
j) {
222 constitmap[
i].emplace(thesubjets[
i].daughterPtr(
j).
key());
229 assert(subjet1 && subjet2);
231 std::cout <<
"processing jet #" <<
idx <<
":" << std::endl;
232 std::cout <<
" subjet1: Pt = " << subjet1->
pt() <<
", eta = " << subjet1->
eta() <<
", phi = " << subjet1->
phi()
233 <<
", mass = " << subjet1->
mass() <<
" (#constituents = " << subjet1->
nConstituents()
234 <<
", area = " << subjet1->
jetArea() <<
")" << std::endl;
235 std::cout <<
" subjet2: Pt = " << subjet2->
pt() <<
", eta = " << subjet2->
eta() <<
", phi = " << subjet2->
phi()
236 <<
", mass = " << subjet2->
mass() <<
" (#constituents = " << subjet2->
nConstituents()
237 <<
", area = " << subjet2->
jetArea() <<
")" << std::endl;
245 getJetConstituents(*subjet1, subjetConstituents1);
247 getJetConstituents(*subjet2, subjetConstituents2);
249 printJetConstituents(
"subjetConstituents1", subjetConstituents1);
250 printJetConstituents(
"subjetConstituents2", subjetConstituents2);
253 selectedSubjets->push_back(convertToPFJet(*subjet1, subjetConstituents1));
255 selectedSubjets->push_back(convertToPFJet(*subjet2, subjetConstituents2));
259 std::vector<reco::PFCandidateRef> pfCandidatesNotInSubjet1 = getPFCandidates_exclJetConstituents(
260 *subjet1, pfCandidates, constitmap[2 *
idx], subjetConstituents2, 1.
e-4,
false);
261 std::vector<reco::PFCandidateRef> pfCandidatesNotInSubjet2 = getPFCandidates_exclJetConstituents(
262 *subjet2, pfCandidates, constitmap[2 *
idx + 1], subjetConstituents1, 1.
e-4,
false);
264 std::cout <<
"#pfCandidatesNotInSubjet1 = " << pfCandidatesNotInSubjet1.size() << std::endl;
265 std::cout <<
"#pfCandidatesNotInSubjet2 = " << pfCandidatesNotInSubjet2.size() << std::endl;
270 for (
auto const& pfCandidate : pfCandidatesNotInSubjet1) {
271 selectedSubjetPFCandidateAssociationForIsolation->insert(subjetRef1, pfCandidate);
273 for (
auto const& pfCandidate : pfCandidatesNotInSubjet2) {
274 selectedSubjetPFCandidateAssociationForIsolation->insert(subjetRef2, pfCandidate);
279 evt.
put(
std::move(selectedSubjetPFCandidateAssociationForIsolation),
"pfCandAssocMapForIsolation");
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Base class for all types of Jets.
EDProductGetter const & productGetter() const
std::vector< Constituent > Constituents
double pt() const final
transverse momentum
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidates_
RefProd< PROD > getRefBeforePut()
std::vector< PFJet > PFJetCollection
collection of PFJet objects
virtual float jetArea() const
get jet area
virtual int nConstituents() const
of constituents
const_reference at(size_type pos) const
edm::EDGetTokenT< JetView > srcSubjets_
double phi() const final
momentum azimuthal angle
double mass() const final
mass