77 vector<Ref<reco::RecoEcalCandidateCollection> > clusCands;
80 vector<Ref<reco::ElectronCollection> > eleCands;
86 vector<reco::RecoChargedCandidateRef> muonCands;
92 const JetCollection & theJetCollection = *theJetCollectionHandle;
94 unique_ptr < JetCollectionVector > allSelections(
new JetCollectionVector());
96 if(!clusCands.empty()){
97 for(
auto & clusCand : clusCands){
98 JetRefVector refVector;
99 for (
unsigned int j = 0; j < theJetCollection.size(); j++) {
100 if (
deltaR(clusCand->superCluster()->position(),theJetCollection[j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
102 allSelections->push_back(refVector);
106 if(!eleCands.empty()){
107 for(
auto & eleCand : eleCands){
108 JetRefVector refVector;
109 for (
unsigned int j = 0; j < theJetCollection.size(); j++) {
110 if (
deltaR(eleCand->superCluster()->position(),theJetCollection[j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
112 allSelections->push_back(refVector);
116 if(!photonCands.empty()){
117 for(
auto & photonCand : photonCands){
118 JetRefVector refVector;
119 for (
unsigned int j = 0; j < theJetCollection.size(); j++) {
120 if (
deltaR(photonCand->superCluster()->position(),theJetCollection[j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
122 allSelections->push_back(refVector);
126 if(!muonCands.empty()){
127 for(
auto & muonCand : muonCands){
128 JetRefVector refVector;
129 for (
unsigned int j = 0; j < theJetCollection.size(); j++) {
130 if (
deltaR(muonCand->p4(),theJetCollection[j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
132 allSelections->push_back(refVector);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< Jet > JetCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_theLeptonToken
edm::RefVector< JetBxCollection > JetRefVector
edm::Ref< JetBxCollection > JetRef
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
std::vector< reco::RecoEcalCandidateRef > VRphoton