52 auto patJets = std::make_unique<std::vector<Jet>>();
54 auto genJetsOut = std::make_unique<reco::GenJetCollection>();
55 auto caloTowersOut = std::make_unique<std::vector<CaloTower> >();
56 auto pfCandidatesOut = std::make_unique<reco::PFCandidateCollection>();
57 auto tagInfosOut = std::make_unique<edm::OwnVector<reco::BaseTagInfo>>();
71 iend = h_jets->
end(), ijet = ibegin;
72 ijet != iend; ++ijet ) {
74 bool selectedLoose =
false;
81 if (
selector_(*ijet) || selectedLoose ) {
83 for ( CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
84 itowerEnd = ijet->caloTowersFwdPtr().end(), itower = itowerBegin;
85 itower != itowerEnd; ++itower ) {
87 caloTowersOut->push_back( **itower );
92 for ( reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
93 icandEnd = ijet->pfCandidatesFwdPtr().end(), icand = icandBegin;
94 icand != icandEnd; ++icand ) {
96 pfCandidatesOut->push_back( **icand );
100 for ( TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
101 iinfoEnd = ijet->tagInfosFwdPtr().end(), iinfo = iinfoBegin;
102 iinfo != iinfoEnd; ++iinfo ) {
104 tagInfosOut->push_back( **iinfo );
108 if ( ijet->genJet() !=
nullptr ) {
109 genJetsOut->push_back( *(ijet->genJet()) );
126 unsigned int caloTowerIndex = 0;
127 unsigned int pfCandidateIndex = 0;
128 unsigned int tagInfoIndex = 0;
129 unsigned int genJetIndex = 0;
133 iend = h_jets->
end(), ijet = ibegin;
134 ijet != iend; ++ijet ) {
136 bool selectedLoose =
false;
138 selectedLoose =
true;
142 if (
selector_(*ijet) || selectedLoose ) {
147 for ( CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
148 itowerEnd = ijet->caloTowersFwdPtr().end(), itower = itowerBegin;
149 itower != itowerEnd; ++itower ) {
154 patJets->back().updateFwdCaloTowerFwdPtr( itower - itowerBegin,
162 for ( reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
163 icandEnd = ijet->pfCandidatesFwdPtr().end(), icand = icandBegin;
164 icand != icandEnd; ++icand ) {
169 patJets->back().updateFwdPFCandidateFwdPtr( icand - icandBegin,
176 for ( TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
177 iinfoEnd = ijet->tagInfosFwdPtr().end(), iinfo = iinfoBegin;
178 iinfo != iinfoEnd; ++iinfo ) {
183 patJets->back().updateFwdTagInfoFwdPtr( iinfo - iinfoBegin,
190 if ( ijet->genJet() !=
nullptr ) {
const StringCutObjectSelector< Jet > selector_
const StringCutObjectSelector< Jet > selectorLoose_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< GenJet > GenJetCollection
collection of GenJet objects
RefProd< PROD > getRefBeforePut()
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const edm::EDGetTokenT< edm::View< pat::Jet > > srcToken_