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 auto_ptr < JetCollectionVector > allSelections(
new JetCollectionVector());
96 if(!clusCands.empty()){
97 for(
size_t candNr=0;candNr<clusCands.size();candNr++){
99 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
102 allSelections->push_back(refVector);
106 if(!eleCands.empty()){
107 for(
size_t candNr=0;candNr<eleCands.size();candNr++){
109 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
112 allSelections->push_back(refVector);
116 if(!photonCands.empty()){
117 for(
size_t candNr=0;candNr<photonCands.size();candNr++){
119 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
122 allSelections->push_back(refVector);
126 if(!muonCands.empty()){
127 for(
size_t candNr=0;candNr<muonCands.size();candNr++){
129 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
130 if (
deltaR(muonCands[candNr]->
p4(),theJetCollection[
j]) >
minDeltaR_) refVector.push_back(
JetRef(theJetCollectionHandle, j));
132 allSelections->push_back(refVector);
139 iEvent.
put(allSelections);
std::string defaultModuleLabel()
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
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)
static int position[264][3]
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< reco::RecoEcalCandidateRef > VRphoton