20 template <
typename jetType>
22 hltLeptonTag(iConfig.getParameter< edm::InputTag > (
"HltLeptonTag")),
23 sourceJetTag(iConfig.getParameter< edm::InputTag > (
"SourceJetTag")),
24 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
31 produces<JetCollectionVector> ();
34 template <
typename jetType>
42 template <
typename jetType>
48 desc.
add<
double> (
"minDeltaR", 0.5);
59 template <
typename jetType>
75 vector<Ref<reco::RecoEcalCandidateCollection> > clusCands;
78 vector<Ref<reco::ElectronCollection> > eleCands;
81 vector<reco::RecoChargedCandidateRef> muonCands;
87 const JetCollection & theJetCollection = *theJetCollectionHandle;
89 auto_ptr < JetCollectionVector > allSelections(
new JetCollectionVector());
91 if(!clusCands.empty()){
92 for(
size_t candNr=0;candNr<clusCands.size();candNr++){
94 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
97 allSelections->push_back(refVector);
101 if(!eleCands.empty()){
102 for(
size_t candNr=0;candNr<eleCands.size();candNr++){
104 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
107 allSelections->push_back(refVector);
111 if(!muonCands.empty()){
112 for(
size_t candNr=0;candNr<muonCands.size();candNr++){
114 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
115 if (
deltaR(muonCands[candNr]->
p4(),theJetCollection[
j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
117 allSelections->push_back(refVector);
124 iEvent.
put(allSelections);
std::vector< Jet > JetCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_theLeptonToken
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)
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)
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
virtual void produce(edm::Event &, const edm::EventSetup &)