CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSY_HLT_VBF_Mu (const edm::ParameterSet &ps)
 
virtual ~SUSY_HLT_VBF_Mu ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
- 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::CaloJetCollection
theCaloJetCollection_
 
edm::EDGetTokenT
< reco::CaloMETCollection
theCaloMETCollection_
 
edm::EDGetTokenT
< reco::MuonCollection
theMuonCollection_
 
edm::EDGetTokenT
< reco::PFJetCollection
thePfJetCollection_
 
edm::EDGetTokenT
< reco::PFMETCollection
thePfMETCollection_
 
edm::EDGetTokenT
< trigger::TriggerEvent
theTrigSummary_
 
edm::InputTag triggerCaloMETFilter_
 
edm::InputTag triggerDiJetFilter_
 
edm::InputTag triggerHTFilter_
 
edm::InputTag triggerMetFilter_
 
edm::InputTag triggerMuFilter_
 
std::string triggerPath_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResults_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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 ( )
virtual

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 
)
protectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 95 of file SUSY_HLT_VBF_Mu.cc.

References deltaetaVBFJets, reco::deltaR(), dijet, dijetOff, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), HLT_25ns14e33_v1_cff::etaJet, etaThrJet_, etaThrJetTrig_, MonitorElement::Fill(), edm::Event::getByToken(), 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, i, trigger::TriggerObject::id(), edm::HandleBase::isValid(), j, 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(), theCaloJetCollection_, theCaloMETCollection_, theMuonCollection_, thePfJetCollection_, thePfMETCollection_, theTrigSummary_, triggerCaloMETFilter_, triggerDiJetFilter_, triggerHTFilter_, triggerMetFilter_, triggerMuFilter_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerResults_, trigNames, and x.

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 87 of file SUSY_HLT_VBF_Mu.cc.

89 {
90  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::beginLuminosityBlock" << std::endl;
91 }
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 390 of file SUSY_HLT_VBF_Mu.cc.

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

391 {
392  ibooker_.cd();
393  ibooker_.setCurrentFolder("HLT/SUSYBSM/SUSY_HLT_VBF_Mu");
394 
395  //offline quantities
396 
397  //online quantities
398  h_triggerMuPt = ibooker_.book1D("triggerMuPt", "Trigger Muon Pt; GeV", 50, 0.0, 500.0);
399  h_triggerMuEta = ibooker_.book1D("triggerMuEta", "Trigger Muon Eta", 20, -3.0, 3.0);
400  h_triggerMuPhi = ibooker_.book1D("triggerMuPhi", "Trigger Muon Phi", 20, -3.5, 3.5);
401 
402  h_triggerCaloMet = ibooker_.book1D("h_triggerCaloMet", "Trigger Calo MET; GeV", 20, 0.0, 500.0);
403 
404  h_ht = ibooker_.book1D("h_ht", "h_ht",30, 0.0, 1500.0 );
405 
406  h_triggerMet = ibooker_.book1D("triggerMet", "Trigger MET; GeV", 20, 0.0, 500.0);
407  h_triggerMetPhi = ibooker_.book1D("triggerMetPhi", "Trigger MET Phi", 20, -3.5, 3.5);
408 
409  h_DiJetMass = ibooker_.book1D("h_DiJetMass" , "h_DiJetMass", 500,0.0,5000.0);
410 
411 //num and den hists to be divided in harvesting step to make turn on curves
412 
413  h_den_muonpt = ibooker_.book1D("h_den_muonpt","h_den_muonpt", 50, 0.0, 500.0);
414  h_num_muonpt = ibooker_.book1D("h_num_muonpt","h_num_muonpt", 50, 0.0, 500.0);
415 
416 
417  h_den_muoneta = ibooker_.book1D("h_den_muoneta","h_den_muoneta", 20, -3.0, 3.0);
418  h_num_muoneta = ibooker_.book1D("h_num_muoneta","h_num_muoneta", 20, -3.0, 3.0);
419 
420  h_den_mjj = ibooker_.book1D("h_den_mjj","h_den_mjj",500,0.0,5000.0);
421  h_num_mjj = ibooker_.book1D("h_num_mjj","h_num_mjj",500,0.0,5000.0);
422 
423  h_den_met = ibooker_.book1D("h_den_met","h_den_met",20,0.0,500.0);
424  h_num_met = ibooker_.book1D("h_num_met","h_num_met",20,0.0,500.0);
425 
426  h_den_ht = ibooker_.book1D("h_den_ht","h_den_ht",30,0.0,1500.0);
427  h_num_ht = ibooker_.book1D("h_num_ht","h_num_ht",30,0.0,1500.0);
428 
429 
430  ibooker_.cd();
431 }
MonitorElement * h_triggerMuPhi
MonitorElement * h_num_met
MonitorElement * h_ht
MonitorElement * h_den_muonpt
MonitorElement * h_triggerCaloMet
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * h_num_muoneta
MonitorElement * h_num_mjj
MonitorElement * h_DiJetMass
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
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(), j, 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:7
HLTConfigProvider fHltConfig
int j
Definition: DBlmapReader.cc:9
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::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 379 of file SUSY_HLT_VBF_Mu.cc.

380 {
381  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::endLuminosityBlock" << std::endl;
382 }
void SUSY_HLT_VBF_Mu::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 385 of file SUSY_HLT_VBF_Mu.cc.

386 {
387  edm::LogInfo("SUSY_HLT_VBF_Mu") << "SUSY_HLT_VBF_Mu::endRun" << std::endl;
388 }

Member Data Documentation

double SUSY_HLT_VBF_Mu::deltaetaVBFJets
private

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

Referenced by analyze().

double SUSY_HLT_VBF_Mu::dijetOff
private

Definition at line 81 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze().

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

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

Referenced by dqmBeginRun().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_ht
private

Definition at line 102 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_met
private

Definition at line 104 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_mjj
private

Definition at line 100 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muoneta
private

Definition at line 98 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_den_muonpt
private

Definition at line 96 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_DiJetMass
private

Definition at line 95 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_ht
private

Definition at line 94 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_Met
private

Definition at line 93 of file SUSY_HLT_VBF_Mu.h.

MonitorElement* SUSY_HLT_VBF_Mu::h_num_ht
private

Definition at line 103 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_met
private

Definition at line 105 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_mjj
private

Definition at line 101 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muoneta
private

Definition at line 99 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_num_muonpt
private

Definition at line 97 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerCaloMet
private

Definition at line 90 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMet
private

Definition at line 91 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMetPhi
private

Definition at line 92 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuEta
private

Definition at line 88 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPhi
private

Definition at line 89 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_VBF_Mu::h_triggerMuPt
private

Definition at line 87 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and bookHistos().

std::string SUSY_HLT_VBF_Mu::HLTProcess_
private

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

double SUSY_HLT_VBF_Mu::mjjOnlinethreshold
private

Definition at line 85 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 83 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 82 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 74 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 76 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 60 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 64 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 58 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 59 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 63 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 62 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 73 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 70 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 71 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 69 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 72 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 68 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 61 of file SUSY_HLT_VBF_Mu.h.

Referenced by analyze(), and SUSY_HLT_VBF_Mu().