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.
- Author
- Lukasz Kreczko
Definition at line 40 of file HLTJetCollectionsForLeptonPlusJets.h.
template<typename jetType >
Definition at line 54 of file HLTJetCollectionsForLeptonPlusJets.cc.
References PbPb_ZMuSkimMuonDPG_cff::deltaR, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), dqmiolumiharvest::j, HLT_2018_cff::jetType, HLTJetCollectionsForLeptonPlusJets< jetType >::m_theJetToken, HLTJetCollectionsForLeptonPlusJets< jetType >::m_theLeptonToken, HLTJetCollectionsForLeptonPlusJets< jetType >::minDeltaR_, eostools::move(), edm::Event::put(), trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerMuon, and trigger::TriggerPhoton.
69 vector<Ref<reco::RecoEcalCandidateCollection>> clusCands;
72 vector<Ref<reco::ElectronCollection>> eleCands;
78 vector<reco::RecoChargedCandidateRef> muonCands;
84 const JetCollection& theJetCollection = *theJetCollectionHandle;
86 unique_ptr<JetCollectionVector> allSelections(
new JetCollectionVector());
88 if (!clusCands.empty()) {
89 for (
auto& clusCand : clusCands) {
90 JetRefVector refVector;
91 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
92 if (
deltaR(clusCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
93 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
95 allSelections->push_back(refVector);
99 if (!eleCands.empty()) {
100 for (
auto& eleCand : eleCands) {
101 JetRefVector refVector;
102 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
103 if (
deltaR(eleCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
104 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
106 allSelections->push_back(refVector);
110 if (!photonCands.empty()) {
111 for (
auto& photonCand : photonCands) {
112 JetRefVector refVector;
113 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
114 if (
deltaR(photonCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
115 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
117 allSelections->push_back(refVector);
121 if (!muonCands.empty()) {
122 for (
auto& muonCand : muonCands) {
123 JetRefVector refVector;
124 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
126 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
128 allSelections->push_back(refVector);
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::Ref< JetBxCollection > JetRef
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_theLeptonToken
edm::RefVector< JetBxCollection > JetRefVector
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
std::vector< reco::RecoEcalCandidateRef > VRphoton