24 template <
typename jetType>
26 hltLeptonTag(iConfig.getParameter< edm::InputTag > (
"HltLeptonTag")),
27 sourceJetTag(iConfig.getParameter< edm::InputTag > (
"SourceJetTag")),
28 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
33 produces<JetCollectionVector> ();
36 template <
typename jetType>
44 template <
typename jetType>
50 desc.
add<
double> (
"minDeltaR", 0.5);
61 template <
typename jetType>
77 vector<Ref<reco::RecoEcalCandidateCollection> > clusCands;
80 vector<Ref<reco::ElectronCollection> > eleCands;
83 vector<reco::RecoChargedCandidateRef> muonCands;
89 const JetCollection & theJetCollection = *theJetCollectionHandle;
91 auto_ptr < JetCollectionVector > allSelections(
new JetCollectionVector());
93 if(!clusCands.empty()){
94 for(
size_t candNr=0;candNr<clusCands.size();candNr++){
96 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
99 allSelections->push_back(refVector);
103 if(!eleCands.empty()){
104 for(
size_t candNr=0;candNr<eleCands.size();candNr++){
106 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
109 allSelections->push_back(refVector);
113 if(!muonCands.empty()){
114 for(
size_t candNr=0;candNr<muonCands.size();candNr++){
116 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
117 if (
deltaR(muonCands[candNr]->
p4(),theJetCollection[
j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
119 allSelections->push_back(refVector);
126 iEvent.
put(allSelections);
std::vector< Jet > JetCollection
edm::Ref< JetCollection > JetRef
edm::InputTag hltLeptonTag
static int position[TOTALCHAMBERS][3]
edm::RefVector< JetCollection > JetRefVector
edm::InputTag sourceJetTag
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
~HLTJetCollectionsForLeptonPlusJets()
HLTJetCollectionsForLeptonPlusJets(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void produce(edm::Event &, const edm::EventSetup &)