CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SUSY_HLT_VBF_Mu Class Reference

#include <SUSY_HLT_VBF_Mu.h>

Inheritance diagram for SUSY_HLT_VBF_Mu:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 SUSY_HLT_VBF_Mu (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_VBF_Mu () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void bookHistos (DQMStore::IBooker &)
 

Private Attributes

double deltaetaVBFJets
 
double dijet
 
double dijetOff
 
double etaThrJet_
 
double etaThrJetTrig_
 
HLTConfigProvider fHltConfig
 
MonitorElementh_den_ht
 
MonitorElementh_den_met
 
MonitorElementh_den_mjj
 
MonitorElementh_den_muoneta
 
MonitorElementh_den_muonpt
 
MonitorElementh_DiJetMass
 
MonitorElementh_ht
 
MonitorElementh_Met
 
MonitorElementh_num_ht
 
MonitorElementh_num_met
 
MonitorElementh_num_mjj
 
MonitorElementh_num_muoneta
 
MonitorElementh_num_muonpt
 
MonitorElementh_triggerCaloMet
 
MonitorElementh_triggerMet
 
MonitorElementh_triggerMetPhi
 
MonitorElementh_triggerMuEta
 
MonitorElementh_triggerMuPhi
 
MonitorElementh_triggerMuPt
 
std::string HLTProcess_
 
double htOnlinethreshold
 
double metCut_
 
double mjjOnlinethreshold
 
double muonOnlinethreshold
 
double pfmetOnlinethreshold
 
double ptThrJet_
 
double ptThrJetTrig_
 
edm::EDGetTokenT< reco::CaloJetCollectiontheCaloJetCollection_
 
edm::EDGetTokenT< reco::CaloMETCollectiontheCaloMETCollection_
 
edm::EDGetTokenT< reco::MuonCollectiontheMuonCollection_
 
edm::EDGetTokenT< reco::PFJetCollectionthePfJetCollection_
 
edm::EDGetTokenT< reco::PFMETCollectionthePfMETCollection_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerCaloMETFilter_
 
edm::InputTag triggerDiJetFilter_
 
edm::InputTag triggerHTFilter_
 
edm::InputTag triggerMetFilter_
 
edm::InputTag triggerMuFilter_
 
std::string triggerPath_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 33 of file SUSY_HLT_VBF_Mu.h.

Constructor & Destructor Documentation

SUSY_HLT_VBF_Mu::SUSY_HLT_VBF_Mu ( const edm::ParameterSet ps)

Definition at line 19 of file SUSY_HLT_VBF_Mu.cc.

References deltaetaVBFJets, etaThrJet_, etaThrJetTrig_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTProcess_, htOnlinethreshold, mjjOnlinethreshold, muonOnlinethreshold, pfmetOnlinethreshold, ptThrJet_, ptThrJetTrig_, AlCaHLTBitMon_QueryRunRegistry::string, theCaloJetCollection_, theCaloMETCollection_, theMuonCollection_, thePfJetCollection_, thePfMETCollection_, theTrigSummary_, triggerCaloMETFilter_, triggerDiJetFilter_, triggerHTFilter_, triggerMetFilter_, triggerMuFilter_, triggerPath_, and triggerResults_.

19  {
20  edm::LogInfo("SUSY_HLT_VBF_Mu") << "Constructor SUSY_HLT_VBF_Mu::SUSY_HLT_VBF_Mu " << std::endl;
21  // Get parameters from configuration file
22  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
23  theMuonCollection_ = consumes<reco::MuonCollection>(ps.getParameter<edm::InputTag>("MuonCollection"));
24  thePfJetCollection_ = consumes<reco::PFJetCollection>(ps.getParameter<edm::InputTag>("pfJetCollection"));
25  thePfMETCollection_ = consumes<reco::PFMETCollection>(ps.getParameter<edm::InputTag>("pfMETCollection"));
26  theCaloJetCollection_ = consumes<reco::CaloJetCollection>(ps.getParameter<edm::InputTag>("caloJetCollection"));
27  theCaloMETCollection_ = consumes<reco::CaloMETCollection>(ps.getParameter<edm::InputTag>("caloMETCollection"));
28  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
29  HLTProcess_ = ps.getParameter<std::string>("HLTProcess");
30  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
31  triggerMuFilter_ = ps.getParameter<edm::InputTag>("TriggerFilterMuon");
32  triggerHTFilter_ = ps.getParameter<edm::InputTag>("TriggerFilterHT");
33  triggerMetFilter_ = ps.getParameter<edm::InputTag>("TriggerFilterMET");
34  triggerDiJetFilter_ = ps.getParameter<edm::InputTag>("TriggerFilterMJJ");
35  triggerCaloMETFilter_ = ps.getParameter<edm::InputTag>("TriggerFilterCaloMET");
36  ptThrJetTrig_ = ps.getUntrackedParameter<double>("PtThrJetTrig");
37  etaThrJetTrig_ = ps.getUntrackedParameter<double>("EtaThrJetTrig");
38  ptThrJet_ = ps.getUntrackedParameter<double>("PtThrJet");
39  etaThrJet_ = ps.getUntrackedParameter<double>("EtaThrJet");
40  deltaetaVBFJets = ps.getUntrackedParameter<double>("DeltaEtaVBFJets");
41  pfmetOnlinethreshold = ps.getUntrackedParameter<double>("PFMetCutOnline");
42  muonOnlinethreshold = ps.getUntrackedParameter<double>("MuonCutOnline");
43  htOnlinethreshold = ps.getUntrackedParameter<double>("HTCutOnline");
44  mjjOnlinethreshold = ps.getUntrackedParameter<double>("MJJCutOnline");
45 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollection_
edm::InputTag triggerMetFilter_
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
double mjjOnlinethreshold
double muonOnlinethreshold
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
edm::InputTag triggerDiJetFilter_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::InputTag triggerHTFilter_
edm::InputTag triggerMuFilter_
double htOnlinethreshold
std::string HLTProcess_
std::string triggerPath_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
double pfmetOnlinethreshold
edm::InputTag triggerCaloMETFilter_
SUSY_HLT_VBF_Mu::~SUSY_HLT_VBF_Mu ( )
override

Definition at line 47 of file SUSY_HLT_VBF_Mu.cc.

47  {
48  edm::LogInfo("SUSY_HLT_VBF_Mu") << "Destructor SUSY_HLT_VBF_Mu::~SUSY_HLT_VBF_Mu " << std::endl;
49 }

Member Function Documentation

void SUSY_HLT_VBF_Mu::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 82 of file SUSY_HLT_VBF_Mu.cc.

References edm::HLTGlobalStatus::accept(), pdwgLeptonRecoSkim_cfi::caloJetCollection, ewkDQM_cfi::caloMETCollection, deltaetaVBFJets, reco::deltaR(), dijet, dijetOff, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), etaThrJet_, etaThrJetTrig_, dqm::impl::MonitorElement::Fill(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), h_den_ht, h_den_met, h_den_mjj, h_den_muoneta, h_den_muonpt, h_DiJetMass, h_ht, h_num_ht, h_num_met, h_num_mjj, h_num_muoneta, h_num_muonpt, h_triggerCaloMet, h_triggerMet, h_triggerMetPhi, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, HLTBitAnalyser_cfi::hltresults, htOnlinethreshold, mps_fire::i, trigger::TriggerObject::id(), edm::HandleBase::isValid(), dqmiolumiharvest::j, relativeConstraints::keys, mjjOnlinethreshold, HLT_2018_cff::muon, muonOnlinethreshold, ExoticaDQM_cfi::pfJetCollection, B2GDQM_cfi::pfMETCollection, pfmetOnlinethreshold, trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), ptThrJet_, ptThrJetTrig_, trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), edm::TriggerNames::size(), trigger::TriggerEvent::sizeFilters(), theCaloJetCollection_, theCaloMETCollection_, theMuonCollection_, thePfJetCollection_, thePfMETCollection_, theTrigSummary_, triggerCaloMETFilter_, triggerDiJetFilter_, triggerHTFilter_, triggerMetFilter_, triggerMuFilter_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerMatchMonitor_cfi::triggerObjects, triggerPath_, triggerResults_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, trigNames, edm::HLTGlobalStatus::wasrun(), and x.

82  {
83  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::analyze" << std::endl;
84 
85  //-------------------------------
86  //--- Jets
87  //-------------------------------
88 
90  e.getByToken(thePfJetCollection_, pfJetCollection);
91  if (!pfJetCollection.isValid()) {
92  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: PFJets"
93  << "\n";
94  return;
95  }
96 
98  e.getByToken(theCaloJetCollection_, caloJetCollection);
99  if (!caloJetCollection.isValid()) {
100  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: CaloJets"
101  << "\n";
102  return;
103  }
104 
105  //-------------------------------
106  //--- Muon
107  //-------------------------------
109  e.getByToken(theMuonCollection_, MuonCollection);
110  if (!MuonCollection.isValid()) {
111  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: Muons "
112  << "\n";
113  return;
114  }
115 
116  //-------------------------------
117  //--- MET
118  //-------------------------------
119 
121  e.getByToken(theCaloMETCollection_, caloMETCollection);
122  if (!caloMETCollection.isValid()) {
123  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: CaloMET"
124  << "\n";
125  return;
126  }
127 
129  e.getByToken(thePfMETCollection_, pfMETCollection);
130  if (!pfMETCollection.isValid()) {
131  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: PFMET"
132  << "\n";
133  return;
134  }
135  //
136 
137  //-------------------------------
138  //--- Trigger
139  //-------------------------------
141  e.getByToken(triggerResults_, hltresults);
142  if (!hltresults.isValid()) {
143  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: TriggerResults"
144  << "\n";
145  return;
146  }
148  e.getByToken(theTrigSummary_, triggerSummary);
149  if (!triggerSummary.isValid()) {
150  edm::LogError("SUSY_HLT_VBF_Mu") << "invalid collection: TriggerSummary"
151  << "\n";
152  return;
153  }
154 
155  // get online objects
156 
157  std::vector<float> ptMuon, etaMuon, phiMuon;
158  size_t filterIndexMu = triggerSummary->filterIndex(triggerMuFilter_);
160  if (!(filterIndexMu >= triggerSummary->sizeFilters())) {
161  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexMu);
162  for (size_t j = 0; j < keys.size(); ++j) {
163  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
164  if (fabs(foundObject.id()) == 13) { // It's a muon
165 
166  bool same = false;
167  for (unsigned int x = 0; x < ptMuon.size(); x++) {
168  if (fabs(ptMuon[x] - foundObject.pt()) < 0.01)
169  same = true;
170  }
171 
172  if (!same) {
173  h_triggerMuPt->Fill(foundObject.pt());
174  h_triggerMuEta->Fill(foundObject.eta());
175  h_triggerMuPhi->Fill(foundObject.phi());
176  ptMuon.push_back(foundObject.pt());
177  etaMuon.push_back(foundObject.eta());
178  phiMuon.push_back(foundObject.phi());
179  }
180  }
181  }
182  }
183 
184  // get online objects
185 
186  size_t filterIndexMet = triggerSummary->filterIndex(triggerMetFilter_);
187  size_t dijetFilterIndex = triggerSummary->filterIndex(triggerDiJetFilter_);
188 
189  if (!(filterIndexMet >= triggerSummary->sizeFilters())) {
190  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexMet);
191  for (size_t j = 0; j < keys.size(); ++j) {
192  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
193  h_triggerMet->Fill(foundObject.pt());
194  h_triggerMetPhi->Fill(foundObject.phi());
195  }
196  }
197 
198  dijet = -1;
199 
200  std::vector<float> ptJet, etaJet, phiJet;
201  if (!(dijetFilterIndex >= triggerSummary->sizeFilters())) {
202  const trigger::Keys &KEYS(triggerSummary->filterKeys(dijetFilterIndex));
203  const size_t nK(KEYS.size());
204  const trigger::TriggerObjectCollection &TOC(triggerSummary->getObjects());
205 
206  for (size_t i = 0; i < nK; i++) {
207  const trigger::TriggerObject &TO1(TOC[KEYS[i]]);
208  if (TO1.pt() > ptThrJetTrig_ && fabs(TO1.eta()) < etaThrJetTrig_) {
209  // for dijet part
210  for (size_t j = i; j < nK; j++) {
211  if (i < j) {
212  const trigger::TriggerObject &TO2(TOC[KEYS[j]]);
213  if (TO2.pt() > ptThrJetTrig_ && fabs(TO2.eta()) < etaThrJetTrig_) {
214  double tmpdeta = fabs(TO1.eta() - TO2.eta());
215  double tmpopposite = TO1.eta() * TO2.eta();
216  if (tmpdeta > deltaetaVBFJets && tmpopposite < 0) {
217  TLorentzVector j1(TO1.px(), TO1.py(), TO1.pz(), TO1.energy());
218  TLorentzVector j2(TO2.px(), TO2.py(), TO2.pz(), TO2.energy());
219  double tmpmass = (j1 + j2).M();
220  if (dijet < tmpmass) {
221  dijet = tmpmass;
222  }
223  }
224  }
225  }
226  }
227  }
228  }
230  }
231 
232  size_t filterIndexCaloMET = triggerSummary->filterIndex(triggerCaloMETFilter_);
233  if (filterIndexCaloMET < triggerSummary->sizeFilters()) {
234  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexCaloMET);
235  if (!keys.empty()) {
236  float met_h = triggerObjects[keys[0]].pt();
237  h_triggerCaloMet->Fill(met_h);
238  }
239  }
240 
241  size_t filterIndexHt = triggerSummary->filterIndex(triggerHTFilter_);
242  if (filterIndexHt < triggerSummary->sizeFilters()) {
243  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndexHt);
244  if (!keys.empty()) {
245  float ht = triggerObjects[keys[0]].pt();
246  h_ht->Fill(ht);
247  }
248  }
249 
250  bool hasFired = false;
251 
252  const edm::TriggerNames &trigNames = e.triggerNames(*hltresults);
253  unsigned int numTriggers = trigNames.size();
254 
255  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
256  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
257  hltresults->accept(hltIndex))
258  hasFired = true;
259  }
260 
261  // Matching the muon
262  int indexOfMatchedMuon = -1;
263  int offlineCounter = 0;
264  for (reco::MuonCollection::const_iterator muon = MuonCollection->begin(); muon != MuonCollection->end(); ++muon) {
265  for (size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
266  if (reco::deltaR(muon->eta(), muon->phi(), etaMuon[off_i], phiMuon[off_i]) < 0.5) {
267  indexOfMatchedMuon = offlineCounter;
268  break;
269  }
270  }
271  offlineCounter++;
272  }
273 
274  float pfHT = 0.0;
275 
276  for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
277  ++i_pfjet) {
278  if (i_pfjet->pt() < ptThrJet_)
279  continue;
280  if (fabs(i_pfjet->eta()) > etaThrJet_)
281  continue;
282  pfHT += i_pfjet->pt();
283  }
284 
285  //
286 
287  dijetOff = -1;
288 
289  size_t jetCol = pfJetCollection->size();
290 
291  for (size_t i = 0; i < jetCol; i++) {
292  if (pfJetCollection->at(i).pt() > ptThrJetTrig_ && fabs(pfJetCollection->at(i).eta()) < etaThrJetTrig_) {
293  for (size_t j = i; j < jetCol; j++) {
294  if (i < j) {
295  if (pfJetCollection->at(j).pt() > ptThrJetTrig_ && fabs(pfJetCollection->at(j).eta()) < etaThrJetTrig_) {
296  double tmpdetaOff = fabs(pfJetCollection->at(i).eta() - pfJetCollection->at(j).eta());
297  double tmpoppositeOff = pfJetCollection->at(i).eta() * pfJetCollection->at(j).eta();
298  if (tmpdetaOff > deltaetaVBFJets && tmpoppositeOff < 0) {
299  TLorentzVector j1Off(pfJetCollection->at(i).px(),
300  pfJetCollection->at(i).py(),
301  pfJetCollection->at(i).pz(),
302  pfJetCollection->at(i).energy());
303  TLorentzVector j2Off(pfJetCollection->at(j).px(),
304  pfJetCollection->at(j).py(),
305  pfJetCollection->at(j).pz(),
306  pfJetCollection->at(j).energy());
307  double tmpmassOff = (j1Off + j2Off).M();
308  if (dijetOff < tmpmassOff)
309  dijetOff = tmpmassOff;
310  }
311  }
312  }
313  }
314  }
315  }
316 
317  // For trigger turn on curves
318 
319  // for muon
320  if (indexOfMatchedMuon > -1 && (dijetOff > mjjOnlinethreshold) &&
321  (pfMETCollection->begin()->et() > pfmetOnlinethreshold) && (pfHT > htOnlinethreshold)) {
322  h_den_muonpt->Fill(MuonCollection->at(indexOfMatchedMuon).pt());
323  h_den_muoneta->Fill(MuonCollection->at(indexOfMatchedMuon).eta());
324  if (hasFired) {
325  h_num_muonpt->Fill(MuonCollection->at(indexOfMatchedMuon).pt());
326  h_num_muoneta->Fill(MuonCollection->at(indexOfMatchedMuon).eta());
327  }
328  }
329 
330  // For MJJ
331  if (indexOfMatchedMuon > -1 && (MuonCollection->at(indexOfMatchedMuon).pt() > muonOnlinethreshold) &&
332  (pfMETCollection->begin()->et() > pfmetOnlinethreshold) && (pfHT > htOnlinethreshold)) {
334  if (hasFired) {
336  }
337  }
338 
339  // For HT
340  //
341  if (indexOfMatchedMuon > -1 && (MuonCollection->at(indexOfMatchedMuon).pt() > muonOnlinethreshold) &&
342  (pfMETCollection->begin()->et() > pfmetOnlinethreshold) && (dijetOff > mjjOnlinethreshold)) {
343  h_den_ht->Fill(pfHT);
344  if (hasFired) {
345  h_num_ht->Fill(pfHT);
346  }
347  }
348 
349  if (indexOfMatchedMuon > -1 && (dijetOff > mjjOnlinethreshold) && (pfHT > htOnlinethreshold) &&
350  (MuonCollection->at(indexOfMatchedMuon).pt() > muonOnlinethreshold)) {
351  h_den_met->Fill(pfMETCollection->begin()->et());
352  if (hasFired) {
353  h_num_met->Fill(pfMETCollection->begin()->et());
354  }
355  }
356 }
MonitorElement * h_triggerMuPhi
bool wasrun() const
Was at least one path run?
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollection_
MonitorElement * h_num_met
int id() const
getters
Definition: TriggerObject.h:51
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
MonitorElement * h_ht
MonitorElement * h_den_muonpt
MonitorElement * h_triggerCaloMet
float phi() const
Definition: TriggerObject.h:54
edm::InputTag triggerMetFilter_
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
double mjjOnlinethreshold
double muonOnlinethreshold
Strings::size_type size() const
Definition: TriggerNames.cc:31
float eta() const
Definition: TriggerObject.h:53
MonitorElement * h_num_muoneta
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
MonitorElement * h_num_mjj
edm::InputTag triggerDiJetFilter_
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_DiJetMass
MonitorElement * h_den_met
edm::InputTag triggerHTFilter_
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag triggerMuFilter_
MonitorElement * h_triggerMuPt
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double htOnlinethreshold
MonitorElement * h_den_mjj
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
std::vector< size_type > Keys
std::string triggerPath_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_num_muonpt
MonitorElement * h_num_ht
double pfmetOnlinethreshold
MonitorElement * h_triggerMetPhi
MonitorElement * h_triggerMuEta
MonitorElement * h_den_ht
MonitorElement * h_triggerMet
edm::InputTag triggerCaloMETFilter_
MonitorElement * h_den_muoneta
void SUSY_HLT_VBF_Mu::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 76 of file SUSY_HLT_VBF_Mu.cc.

References bookHistos().

76  {
77  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::bookHistograms" << std::endl;
78  // book at beginRun
79  bookHistos(ibooker_);
80 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_VBF_Mu::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 362 of file SUSY_HLT_VBF_Mu.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), DEFINE_FWK_MODULE, h_den_ht, h_den_met, h_den_mjj, h_den_muoneta, h_den_muonpt, h_DiJetMass, h_ht, h_num_ht, h_num_met, h_num_mjj, h_num_muoneta, h_num_muonpt, h_triggerCaloMet, h_triggerMet, h_triggerMetPhi, h_triggerMuEta, h_triggerMuPhi, h_triggerMuPt, and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

Referenced by bookHistograms().

362  {
363  ibooker_.cd();
364  ibooker_.setCurrentFolder("HLT/SUSYBSM/SUSY_HLT_VBF_Mu");
365 
366  // offline quantities
367 
368  // online quantities
369  h_triggerMuPt = ibooker_.book1D("triggerMuPt", "Trigger Muon Pt; GeV", 50, 0.0, 500.0);
370  h_triggerMuEta = ibooker_.book1D("triggerMuEta", "Trigger Muon Eta", 20, -3.0, 3.0);
371  h_triggerMuPhi = ibooker_.book1D("triggerMuPhi", "Trigger Muon Phi", 20, -3.5, 3.5);
372 
373  h_triggerCaloMet = ibooker_.book1D("h_triggerCaloMet", "Trigger Calo MET; GeV", 20, 0.0, 500.0);
374 
375  h_ht = ibooker_.book1D("h_ht", "h_ht", 30, 0.0, 1500.0);
376 
377  h_triggerMet = ibooker_.book1D("triggerMet", "Trigger MET; GeV", 20, 0.0, 500.0);
378  h_triggerMetPhi = ibooker_.book1D("triggerMetPhi", "Trigger MET Phi", 20, -3.5, 3.5);
379 
380  h_DiJetMass = ibooker_.book1D("h_DiJetMass", "h_DiJetMass", 500, 0.0, 5000.0);
381 
382  // num and den hists to be divided in harvesting step to make turn on curves
383 
384  h_den_muonpt = ibooker_.book1D("h_den_muonpt", "h_den_muonpt", 50, 0.0, 500.0);
385  h_num_muonpt = ibooker_.book1D("h_num_muonpt", "h_num_muonpt", 50, 0.0, 500.0);
386 
387  h_den_muoneta = ibooker_.book1D("h_den_muoneta", "h_den_muoneta", 20, -3.0, 3.0);
388  h_num_muoneta = ibooker_.book1D("h_num_muoneta", "h_num_muoneta", 20, -3.0, 3.0);
389 
390  h_den_mjj = ibooker_.book1D("h_den_mjj", "h_den_mjj", 500, 0.0, 5000.0);
391  h_num_mjj = ibooker_.book1D("h_num_mjj", "h_num_mjj", 500, 0.0, 5000.0);
392 
393  h_den_met = ibooker_.book1D("h_den_met", "h_den_met", 20, 0.0, 500.0);
394  h_num_met = ibooker_.book1D("h_num_met", "h_num_met", 20, 0.0, 500.0);
395 
396  h_den_ht = ibooker_.book1D("h_den_ht", "h_den_ht", 30, 0.0, 1500.0);
397  h_num_ht = ibooker_.book1D("h_num_ht", "h_num_ht", 30, 0.0, 1500.0);
398 
399  ibooker_.cd();
400 }
MonitorElement * h_triggerMuPhi
MonitorElement * h_num_met
MonitorElement * h_ht
MonitorElement * h_den_muonpt
MonitorElement * h_triggerCaloMet
MonitorElement * h_num_muoneta
MonitorElement * h_num_mjj
MonitorElement * h_DiJetMass
MonitorElement * h_den_met
MonitorElement * h_triggerMuPt
MonitorElement * h_den_mjj
MonitorElement * h_num_muonpt
MonitorElement * h_num_ht
MonitorElement * h_triggerMetPhi
MonitorElement * h_triggerMuEta
MonitorElement * h_den_ht
MonitorElement * h_triggerMet
MonitorElement * h_den_muoneta
void SUSY_HLT_VBF_Mu::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  e 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 51 of file SUSY_HLT_VBF_Mu.cc.

References fHltConfig, spr::find(), HLTProcess_, HLTConfigProvider::init(), dqmiolumiharvest::j, LogDebug, HLTConfigProvider::triggerNames(), and triggerPath_.

51  {
52  bool changed;
53 
54  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
55  edm::LogError("SUSY_HLT_VBF_Mu") << "Initialization of HLTConfigProvider failed!!";
56  return;
57  }
58 
59  bool pathFound = false;
60  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
61  for (size_t j = 0; j < allTrigNames.size(); ++j) {
62  if (allTrigNames[j].find(triggerPath_) != std::string::npos) {
63  pathFound = true;
64  }
65  }
66 
67  if (!pathFound) {
68  LogDebug("SUSY_HLT_VBF_Mu") << "Path not found"
69  << "\n";
70  return;
71  }
72 
73  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::beginRun" << std::endl;
74 }
#define LogDebug(id)
const std::vector< std::string > & triggerNames() const
names of trigger paths
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HLTConfigProvider fHltConfig
std::string HLTProcess_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::string triggerPath_
void SUSY_HLT_VBF_Mu::dqmEndRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 358 of file SUSY_HLT_VBF_Mu.cc.

358  {
359  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::endRun" << std::endl;
360 }

Member Data Documentation

double SUSY_HLT_VBF_Mu::deltaetaVBFJets
private

Definition at line 70 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::dijet
private

Definition at line 71 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze().

double SUSY_HLT_VBF_Mu::dijetOff
private

Definition at line 72 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze().

double SUSY_HLT_VBF_Mu::etaThrJet_
private

Definition at line 66 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::etaThrJetTrig_
private

Definition at line 68 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

HLTConfigProvider SUSY_HLT_VBF_Mu::fHltConfig
private

Definition at line 56 of file SUSY_HLT_VBF_Mu.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_ht
private

Definition at line 93 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_met
private

Definition at line 95 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_mjj
private

Definition at line 91 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muoneta
private

Definition at line 89 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muonpt
private

Definition at line 87 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_DiJetMass
private

Definition at line 86 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_ht
private

Definition at line 85 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_Met
private

Definition at line 84 of file SUSY_HLT_VBF_Mu.h.

MonitorElement* SUSY_HLT_VBF_Mu::h_num_ht
private

Definition at line 94 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_met
private

Definition at line 96 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_mjj
private

Definition at line 92 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muoneta
private

Definition at line 90 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muonpt
private

Definition at line 88 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerCaloMet
private

Definition at line 81 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMet
private

Definition at line 82 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMetPhi
private

Definition at line 83 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuEta
private

Definition at line 79 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPhi
private

Definition at line 80 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPt
private

Definition at line 78 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_VBF_Mu::HLTProcess_
private

Definition at line 58 of file SUSY_HLT_VBF_Mu.h.

Referenced by dqmBeginRun(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::htOnlinethreshold
private

Definition at line 75 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::metCut_
private

Definition at line 69 of file SUSY_HLT_VBF_Mu.h.

double SUSY_HLT_VBF_Mu::mjjOnlinethreshold
private

Definition at line 76 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::muonOnlinethreshold
private

Definition at line 74 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::pfmetOnlinethreshold
private

Definition at line 73 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::ptThrJet_
private

Definition at line 65 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

double SUSY_HLT_VBF_Mu::ptThrJetTrig_
private

Definition at line 67 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<reco::CaloJetCollection> SUSY_HLT_VBF_Mu::theCaloJetCollection_
private

Definition at line 51 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<reco::CaloMETCollection> SUSY_HLT_VBF_Mu::theCaloMETCollection_
private

Definition at line 55 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<reco::MuonCollection> SUSY_HLT_VBF_Mu::theMuonCollection_
private

Definition at line 49 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<reco::PFJetCollection> SUSY_HLT_VBF_Mu::thePfJetCollection_
private

Definition at line 50 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<reco::PFMETCollection> SUSY_HLT_VBF_Mu::thePfMETCollection_
private

Definition at line 54 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<trigger::TriggerEvent> SUSY_HLT_VBF_Mu::theTrigSummary_
private

Definition at line 53 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::InputTag SUSY_HLT_VBF_Mu::triggerCaloMETFilter_
private

Definition at line 64 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::InputTag SUSY_HLT_VBF_Mu::triggerDiJetFilter_
private

Definition at line 61 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::InputTag SUSY_HLT_VBF_Mu::triggerHTFilter_
private

Definition at line 62 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::InputTag SUSY_HLT_VBF_Mu::triggerMetFilter_
private

Definition at line 60 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

edm::InputTag SUSY_HLT_VBF_Mu::triggerMuFilter_
private

Definition at line 63 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().

std::string SUSY_HLT_VBF_Mu::triggerPath_
private

Definition at line 59 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), dqmBeginRun(), and SUSY_HLT_VBF_Mu().

edm::EDGetTokenT<edm::TriggerResults> SUSY_HLT_VBF_Mu::triggerResults_
private

Definition at line 52 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().