CMS 3D CMS Logo

HLTInclusiveVBFSource.h
Go to the documentation of this file.
1 #ifndef HLTInclusiveVBFSource_H
2 #define HLTInclusiveVBFSource_H
3 
4 // system include files
5 #include <memory>
6 #include <unistd.h>
7 
8 // user include files
15 
17 
20 
38 
39 //#include "RecoJets/JetProducers/interface/JetIDHelper.h"
40 
41 #include <iostream>
42 #include <fstream>
43 #include <utility>
44 #include <vector>
45 #include <string>
46 
48 public:
50  ~HLTInclusiveVBFSource() override;
51 
52  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
53  void analyze(const edm::Event&, const edm::EventSetup&) override;
54 
55 private:
56  virtual bool isBarrel(double eta);
57  virtual bool isEndCap(double eta);
58  virtual bool isForward(double eta);
59  virtual bool validPathHLT(std::string path);
62  //virtual double TriggerPosition(std::string trigName);
63 
64  // ----------member data ---------------------------
65  int nCount_;
66 
67  std::vector<int> prescUsed_;
68 
71  //reco::helper::JetIDHelper *jetID; // JetID helper (Need to run with RECO, not AOD)
72  std::vector<std::string> path_;
73 
74  bool debug_;
75 
76  double minPtHigh_;
77  double minPtLow_;
78  double minDeltaEta_;
79  double minInvMass_;
80  double deltaRMatch_;
82 
87  edm::TriggerNames triggerNames_; // TriggerNames class
88 
93 
98 
103 
107 
116 
119 
120  double reco_ejet1;
121  //double reco_etjet1;
122  double reco_pxjet1;
123  double reco_pyjet1;
124  double reco_pzjet1;
125  double reco_ptjet1;
126  double reco_etajet1;
127  double reco_phijet1;
128  //
129  double reco_ejet2;
130  //double reco_etjet2;
131  double reco_pxjet2;
132  double reco_pyjet2;
133  double reco_pzjet2;
134  double reco_ptjet2;
135  double reco_etajet2;
136  double reco_phijet2;
137  //
138  double hlt_ejet1;
139  //double hlt_etjet1;
140  double hlt_pxjet1;
141  double hlt_pyjet1;
142  double hlt_pzjet1;
143  double hlt_ptjet1;
144  double hlt_etajet1;
145  double hlt_phijet1;
146  //
147  double hlt_ejet2;
148  //double hlt_etjet2;
149  double hlt_pxjet2;
150  double hlt_pyjet2;
151  double hlt_pzjet2;
152  double hlt_ptjet2;
153  double hlt_etajet2;
154  double hlt_phijet2;
155  //
157  bool checkHLT;
159  //
166  //
173 
174  // helper class to store the data path
175 
176  class PathInfo {
178  : prescaleUsed_(-1),
179  pathName_("unset"),
180  filterName_("unset"),
181  processName_("unset"),
182  objectType_(-1),
183  triggerType_("unset") {}
184  //
185  public:
186  //
187  void setHistos(MonitorElement* const RECO_deltaEta_DiJet,
188  MonitorElement* const RECO_deltaPhi_DiJet,
189  MonitorElement* const RECO_invMass_DiJet,
190  MonitorElement* const HLT_deltaEta_DiJet,
191  MonitorElement* const HLT_deltaPhi_DiJet,
192  MonitorElement* const HLT_invMass_DiJet,
193  MonitorElement* const RECO_deltaEta_DiJet_Match,
194  MonitorElement* const RECO_deltaPhi_DiJet_Match,
195  MonitorElement* const RECO_invMass_DiJet_Match,
196  MonitorElement* const RECOHLT_deltaEta,
197  MonitorElement* const RECOHLT_deltaPhi,
198  MonitorElement* const RECOHLT_invMass,
199  MonitorElement* const NumberOfMatches,
200  MonitorElement* const NumberOfEvents) {
201  RECO_deltaEta_DiJet_ = RECO_deltaEta_DiJet;
202  RECO_deltaPhi_DiJet_ = RECO_deltaPhi_DiJet;
203  RECO_invMass_DiJet_ = RECO_invMass_DiJet;
204  HLT_deltaEta_DiJet_ = HLT_deltaEta_DiJet;
205  HLT_deltaPhi_DiJet_ = HLT_deltaPhi_DiJet;
206  HLT_invMass_DiJet_ = HLT_invMass_DiJet;
207  RECO_deltaEta_DiJet_Match_ = RECO_deltaEta_DiJet_Match;
208  RECO_deltaPhi_DiJet_Match_ = RECO_deltaPhi_DiJet_Match;
209  RECO_invMass_DiJet_Match_ = RECO_invMass_DiJet_Match;
210  RECOHLT_deltaEta_ = RECOHLT_deltaEta;
211  RECOHLT_deltaPhi_ = RECOHLT_deltaPhi;
212  RECOHLT_invMass_ = RECOHLT_invMass;
213  NumberOfMatches_ = NumberOfMatches;
214  NumberOfEvents_ = NumberOfEvents;
215  };
216  ~PathInfo() = default;
217  ;
218  PathInfo(int prescaleUsed,
222  size_t type,
224  : prescaleUsed_(prescaleUsed),
228  objectType_(type),
230 
245 
246  const std::string getLabel() const { return filterName_; }
249  return;
250  }
251  const std::string getPath() const { return pathName_; }
252  const int getprescaleUsed() const { return prescaleUsed_; }
253  const std::string getProcess() const { return processName_; }
254  const int getObjectType() const { return objectType_; }
255  const std::string getTriggerType() const { return triggerType_; }
256  const edm::InputTag getTag() const {
258  return tagName;
259  }
260  bool operator==(const std::string& v) { return v == pathName_; }
261 
262  private:
269 
284  };
285 
286  // simple collection
287  class PathInfoCollection : public std::vector<PathInfo> {
288  public:
290  std::vector<PathInfo>::iterator find(const std::string& pathName) { return std::find(begin(), end(), pathName); }
291  };
293 };
294 #endif
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet_Match()
MonitorElement * getMEhisto_HLT_deltaEta_DiJet()
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
MonitorElement * getMEhisto_RECO_invMass_DiJet()
virtual bool isForward(double eta)
PathInfoCollection hltPathsAll_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
virtual bool isBarrel(double eta)
MonitorElement * getMEhisto_RECO_invMass_DiJet_Match()
edm::InputTag triggerSummaryLabel_
virtual bool validPathHLT(std::string path)
edm::Handle< trigger::TriggerEvent > triggerObj_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
MonitorElement * getMEhisto_HLT_deltaPhi_DiJet()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< PathInfo >::iterator find(const std::string &pathName)
reco::PFJetCollection pfjet
PathInfo(int prescaleUsed, std::string pathName, std::string filterName, std::string processName, size_t type, std::string triggerType)
void analyze(const edm::Event &, const edm::EventSetup &) override
void setHistos(MonitorElement *const RECO_deltaEta_DiJet, MonitorElement *const RECO_deltaPhi_DiJet, MonitorElement *const RECO_invMass_DiJet, MonitorElement *const HLT_deltaEta_DiJet, MonitorElement *const HLT_deltaPhi_DiJet, MonitorElement *const HLT_invMass_DiJet, MonitorElement *const RECO_deltaEta_DiJet_Match, MonitorElement *const RECO_deltaPhi_DiJet_Match, MonitorElement *const RECO_invMass_DiJet_Match, MonitorElement *const RECOHLT_deltaEta, MonitorElement *const RECOHLT_deltaPhi, MonitorElement *const RECOHLT_invMass, MonitorElement *const NumberOfMatches, MonitorElement *const NumberOfEvents)
HLTInclusiveVBFSource(const edm::ParameterSet &)
edm::Handle< reco::CaloJetCollection > calojetColl_
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken
edm::EDGetTokenT< edm::View< reco::PFJet > > pfJetsToken
edm::Handle< reco::PFJetCollection > pfjetColl_
edm::Handle< reco::PFMETCollection > pfmetColl_
edm::EDGetTokenT< edm::View< reco::PFMET > > pfMetToken
std::vector< int > prescUsed_
MonitorElement * getMEhisto_RECOHLT_deltaPhi()
const std::string getTriggerType() const
const std::string getPath() const
edm::TriggerNames triggerNames_
bool operator==(const std::string &v)
labelName
Custom Jet reco ####.
const std::string getLabel() const
const edm::InputTag getTag() const
std::vector< std::string > path_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
HLTConfigProvider hltConfig_
edm::Handle< reco::CaloMETCollection > calometColl_
virtual bool isTriggerObjectFound(std::string objectName)
virtual bool isHLTPathAccepted(std::string pathName)
const std::string getProcess() const
std::vector< PFJet > PFJetCollection
collection of PFJet objects
MonitorElement * getMEhisto_RECOHLT_deltaEta()
edm::InputTag triggerResultsLabel_
MonitorElement * getMEhisto_RECO_deltaEta_DiJet_Match()
MonitorElement * getMEhisto_HLT_invMass_DiJet()
void setLabel(std::string labelName)
reco::CaloJetCollection calojet
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
MonitorElement * getMEhisto_RECO_deltaEta_DiJet()
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet()
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)