21 template <
typename jetType>
23 hltLeptonTag(iConfig.getParameter<
edm::InputTag > (
"HltLeptonTag")),
24 sourceJetTag(iConfig.getParameter<
edm::InputTag > (
"SourceJetTag")),
25 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
32 produces<JetCollectionVector> ();
35 template <
typename jetType>
43 template <
typename jetType>
49 desc.
add<
double> (
"minDeltaR", 0.5);
60 template <
typename jetType>
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);
std::string defaultModuleLabel()
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::InputTag hltLeptonTag
void produce(edm::Event &, const edm::EventSetup &) override
edm::Ref< JetBxCollection > JetRef
edm::InputTag sourceJetTag
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double deltaR(double eta1, double eta2, double phi1, double phi2)
HLTJetCollectionsForLeptonPlusJets(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
std::vector< reco::RecoEcalCandidateRef > VRphoton
~HLTJetCollectionsForLeptonPlusJets() override