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::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > 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 &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
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 endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
- 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 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 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 39 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_.

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

50 {
51  edm::LogInfo("SUSY_HLT_VBF_Mu") << "Destructor SUSY_HLT_VBF_Mu::~SUSY_HLT_VBF_Mu " << std::endl;
52 }

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 90 of file SUSY_HLT_VBF_Mu.cc.

References edm::HLTGlobalStatus::accept(), deltaetaVBFJets, reco::deltaR(), dijet, dijetOff, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), etaThrJet_, etaThrJetTrig_, 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, htOnlinethreshold, mps_fire::i, trigger::TriggerObject::id(), edm::HandleBase::isValid(), relativeConstraints::keys, mjjOnlinethreshold, metsig::muon, muonOnlinethreshold, 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(), TriggerAnalyzer::triggerObjects, triggerPath_, triggerResults_, trigNames, edm::HLTGlobalStatus::wasrun(), and x.

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

References bookHistos().

81 {
82  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::bookHistograms" << std::endl;
83  //book at beginRun
84  bookHistos(ibooker_);
85 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_VBF_Mu::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 381 of file SUSY_HLT_VBF_Mu.cc.

References DQMStore::IBooker::book1D(), 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 DQMStore::IBooker::setCurrentFolder().

Referenced by bookHistograms().

382 {
383  ibooker_.cd();
384  ibooker_.setCurrentFolder("HLT/SUSYBSM/SUSY_HLT_VBF_Mu");
385 
386  //offline quantities
387 
388  //online quantities
389  h_triggerMuPt = ibooker_.book1D("triggerMuPt", "Trigger Muon Pt; GeV", 50, 0.0, 500.0);
390  h_triggerMuEta = ibooker_.book1D("triggerMuEta", "Trigger Muon Eta", 20, -3.0, 3.0);
391  h_triggerMuPhi = ibooker_.book1D("triggerMuPhi", "Trigger Muon Phi", 20, -3.5, 3.5);
392 
393  h_triggerCaloMet = ibooker_.book1D("h_triggerCaloMet", "Trigger Calo MET; GeV", 20, 0.0, 500.0);
394 
395  h_ht = ibooker_.book1D("h_ht", "h_ht",30, 0.0, 1500.0 );
396 
397  h_triggerMet = ibooker_.book1D("triggerMet", "Trigger MET; GeV", 20, 0.0, 500.0);
398  h_triggerMetPhi = ibooker_.book1D("triggerMetPhi", "Trigger MET Phi", 20, -3.5, 3.5);
399 
400  h_DiJetMass = ibooker_.book1D("h_DiJetMass" , "h_DiJetMass", 500,0.0,5000.0);
401 
402 //num and den hists to be divided in harvesting step to make turn on curves
403 
404  h_den_muonpt = ibooker_.book1D("h_den_muonpt","h_den_muonpt", 50, 0.0, 500.0);
405  h_num_muonpt = ibooker_.book1D("h_num_muonpt","h_num_muonpt", 50, 0.0, 500.0);
406 
407 
408  h_den_muoneta = ibooker_.book1D("h_den_muoneta","h_den_muoneta", 20, -3.0, 3.0);
409  h_num_muoneta = ibooker_.book1D("h_num_muoneta","h_num_muoneta", 20, -3.0, 3.0);
410 
411  h_den_mjj = ibooker_.book1D("h_den_mjj","h_den_mjj",500,0.0,5000.0);
412  h_num_mjj = ibooker_.book1D("h_num_mjj","h_num_mjj",500,0.0,5000.0);
413 
414  h_den_met = ibooker_.book1D("h_den_met","h_den_met",20,0.0,500.0);
415  h_num_met = ibooker_.book1D("h_num_met","h_num_met",20,0.0,500.0);
416 
417  h_den_ht = ibooker_.book1D("h_den_ht","h_den_ht",30,0.0,1500.0);
418  h_num_ht = ibooker_.book1D("h_num_ht","h_num_ht",30,0.0,1500.0);
419 
420 
421  ibooker_.cd();
422 }
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 * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * h_den_met
MonitorElement * h_triggerMuPt
MonitorElement * h_den_mjj
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
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 54 of file SUSY_HLT_VBF_Mu.cc.

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

55 {
56 
57  bool changed;
58 
59  if (!fHltConfig.init(run, e, HLTProcess_, changed)) {
60  edm::LogError("SUSY_HLT_VBF_Mu") << "Initialization of HLTConfigProvider failed!!";
61  return;
62  }
63 
64  bool pathFound = false;
65  const std::vector<std::string> allTrigNames = fHltConfig.triggerNames();
66  for(size_t j = 0; j <allTrigNames.size(); ++j) {
67  if(allTrigNames[j].find(triggerPath_) != std::string::npos) {
68  pathFound = true;
69  }
70  }
71 
72  if(!pathFound) {
73  LogDebug("SUSY_HLT_VBF_Mu") << "Path not found" << "\n";
74  return;
75  }
76 
77  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::beginRun" << std::endl;
78 }
#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:20
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::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 376 of file SUSY_HLT_VBF_Mu.cc.

377 {
378  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::endRun" << std::endl;
379 }

Member Data Documentation

double SUSY_HLT_VBF_Mu::deltaetaVBFJets
private

Definition at line 77 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 78 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze().

double SUSY_HLT_VBF_Mu::dijetOff
private

Definition at line 79 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze().

double SUSY_HLT_VBF_Mu::etaThrJet_
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::etaThrJetTrig_
private

Definition at line 75 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 63 of file SUSY_HLT_VBF_Mu.h.

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_ht
private

Definition at line 100 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_met
private

Definition at line 102 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_mjj
private

Definition at line 98 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muoneta
private

Definition at line 96 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muonpt
private

Definition at line 94 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_DiJetMass
private

Definition at line 93 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_ht
private

Definition at line 92 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_Met
private

Definition at line 91 of file SUSY_HLT_VBF_Mu.h.

MonitorElement* SUSY_HLT_VBF_Mu::h_num_ht
private

Definition at line 101 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_met
private

Definition at line 103 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_mjj
private

Definition at line 99 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muoneta
private

Definition at line 97 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muonpt
private

Definition at line 95 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerCaloMet
private

Definition at line 88 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMet
private

Definition at line 89 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMetPhi
private

Definition at line 90 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuEta
private

Definition at line 86 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPhi
private

Definition at line 87 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPt
private

Definition at line 85 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_VBF_Mu::HLTProcess_
private

Definition at line 65 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 82 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 76 of file SUSY_HLT_VBF_Mu.h.

double SUSY_HLT_VBF_Mu::mjjOnlinethreshold
private

Definition at line 83 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 81 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 80 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 72 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 74 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 58 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 62 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 56 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 57 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 61 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 60 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 71 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 68 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 69 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 67 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 70 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 66 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 59 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().