template<typename jetType>
class HLTJetCollectionsForLeptonPlusJets< jetType >
This class is an EDProducer implementing an HLT trigger for lepton and jet objects, cutting on variables relating to the jet 4-momentum representation. The producer checks for overlaps between leptons and jets and if a combination of one lepton + jets cleaned against this leptons satisfy the cuts. These jets are then added to a cleaned jet collection which is put into the event.
- Date:
- 2012/02/06 15:09:21
- Revision:
- 1.4
- Author
- Lukasz Kreczko
Definition at line 39 of file HLTJetCollectionsForLeptonPlusJets.h.
template<typename jetType >
Implements edm::EDProducer.
Definition at line 63 of file HLTJetCollectionsForLeptonPlusJets.cc.
References deltaR(), edm::Event::getByLabel(), HLTJetCollectionsForLeptonPlusJets< jetType >::hltLeptonTag, j, HLTJetCollectionsForLeptonPlusJets< jetType >::minDeltaR_, p4, position, edm::Event::put(), HLTJetCollectionsForLeptonPlusJets< jetType >::sourceJetTag, trigger::TriggerCluster, trigger::TriggerElectron, and trigger::TriggerMuon.
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.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)