51 auto patJets = std::make_unique<std::vector<Jet>>();
53 auto genJetsOut = std::make_unique<reco::GenJetCollection>();
54 auto caloTowersOut = std::make_unique<std::vector<CaloTower> >();
55 auto pfCandidatesOut = std::make_unique<reco::PFCandidateCollection>();
56 auto tagInfosOut = std::make_unique<edm::OwnVector<reco::BaseTagInfo>>();
70 iend = h_jets->
end(), ijet = ibegin;
71 ijet != iend; ++ijet ) {
73 bool selectedLoose =
false;
80 if (
selector_(*ijet) || selectedLoose ) {
82 for ( CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
83 itowerEnd = ijet->caloTowersFwdPtr().end(), itower = itowerBegin;
84 itower != itowerEnd; ++itower ) {
86 caloTowersOut->push_back( **itower );
91 for ( reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
92 icandEnd = ijet->pfCandidatesFwdPtr().end(), icand = icandBegin;
93 icand != icandEnd; ++icand ) {
95 pfCandidatesOut->push_back( **icand );
99 for ( TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
100 iinfoEnd = ijet->tagInfosFwdPtr().end(), iinfo = iinfoBegin;
101 iinfo != iinfoEnd; ++iinfo ) {
103 tagInfosOut->push_back( **iinfo );
107 if ( ijet->genJet() !=
nullptr ) {
108 genJetsOut->push_back( *(ijet->genJet()) );
125 unsigned int caloTowerIndex = 0;
126 unsigned int pfCandidateIndex = 0;
127 unsigned int tagInfoIndex = 0;
128 unsigned int genJetIndex = 0;
132 iend = h_jets->
end(), ijet = ibegin;
133 ijet != iend; ++ijet ) {
135 bool selectedLoose =
false;
137 selectedLoose =
true;
141 if (
selector_(*ijet) || selectedLoose ) {
146 for ( CaloTowerFwdPtrVector::const_iterator itowerBegin = ijet->caloTowersFwdPtr().begin(),
147 itowerEnd = ijet->caloTowersFwdPtr().end(), itower = itowerBegin;
148 itower != itowerEnd; ++itower ) {
153 patJets->back().updateFwdCaloTowerFwdPtr( itower - itowerBegin,
161 for ( reco::PFCandidateFwdPtrVector::const_iterator icandBegin = ijet->pfCandidatesFwdPtr().begin(),
162 icandEnd = ijet->pfCandidatesFwdPtr().end(), icand = icandBegin;
163 icand != icandEnd; ++icand ) {
168 patJets->back().updateFwdPFCandidateFwdPtr( icand - icandBegin,
175 for ( TagInfoFwdPtrCollection::const_iterator iinfoBegin = ijet->tagInfosFwdPtr().begin(),
176 iinfoEnd = ijet->tagInfosFwdPtr().end(), iinfo = iinfoBegin;
177 iinfo != iinfoEnd; ++iinfo ) {
182 patJets->back().updateFwdTagInfoFwdPtr( iinfo - iinfoBegin,
189 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_