CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
17 
19 
22 
40 
41 //#include "RecoJets/JetProducers/interface/JetIDHelper.h"
42 
43 #include <iostream>
44 #include <fstream>
45 #include <utility>
46 #include <utility>
47 #include <vector>
48 #include <string>
49 
51 public:
53  ~HLTInclusiveVBFSource() override;
54 
55  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
56  void analyze(const edm::Event&, const edm::EventSetup&) override;
57 
58 private:
59  virtual bool isBarrel(double eta);
60  virtual bool isEndCap(double eta);
61  virtual bool isForward(double eta);
62  virtual bool validPathHLT(std::string path);
65  //virtual double TriggerPosition(std::string trigName);
66 
67  // ----------member data ---------------------------
68  int nCount_;
69 
70  std::vector<int> prescUsed_;
71 
74  //reco::helper::JetIDHelper *jetID; // JetID helper (Need to run with RECO, not AOD)
75  std::vector<std::string> path_;
76 
77  bool debug_;
78 
79  double minPtHigh_;
80  double minPtLow_;
81  double minDeltaEta_;
82  double minInvMass_;
83  double deltaRMatch_;
85 
90  edm::TriggerNames triggerNames_; // TriggerNames class
91 
96 
101 
106 
110 
119 
122 
123  double reco_ejet1;
124  //double reco_etjet1;
125  double reco_pxjet1;
126  double reco_pyjet1;
127  double reco_pzjet1;
128  double reco_ptjet1;
129  double reco_etajet1;
130  double reco_phijet1;
131  //
132  double reco_ejet2;
133  //double reco_etjet2;
134  double reco_pxjet2;
135  double reco_pyjet2;
136  double reco_pzjet2;
137  double reco_ptjet2;
138  double reco_etajet2;
139  double reco_phijet2;
140  //
141  double hlt_ejet1;
142  //double hlt_etjet1;
143  double hlt_pxjet1;
144  double hlt_pyjet1;
145  double hlt_pzjet1;
146  double hlt_ptjet1;
147  double hlt_etajet1;
148  double hlt_phijet1;
149  //
150  double hlt_ejet2;
151  //double hlt_etjet2;
152  double hlt_pxjet2;
153  double hlt_pyjet2;
154  double hlt_pzjet2;
155  double hlt_ptjet2;
156  double hlt_etajet2;
157  double hlt_phijet2;
158  //
160  bool checkHLT;
162  //
169  //
176 
177  // helper class to store the data path
178 
179  class PathInfo {
181  : prescaleUsed_(-1),
182  pathName_("unset"),
183  filterName_("unset"),
184  processName_("unset"),
185  objectType_(-1),
186  triggerType_("unset"){};
187  //
188  public:
189  //
190  void setHistos(MonitorElement* const RECO_deltaEta_DiJet,
191  MonitorElement* const RECO_deltaPhi_DiJet,
192  MonitorElement* const RECO_invMass_DiJet,
193  MonitorElement* const HLT_deltaEta_DiJet,
194  MonitorElement* const HLT_deltaPhi_DiJet,
195  MonitorElement* const HLT_invMass_DiJet,
196  MonitorElement* const RECO_deltaEta_DiJet_Match,
197  MonitorElement* const RECO_deltaPhi_DiJet_Match,
198  MonitorElement* const RECO_invMass_DiJet_Match,
199  MonitorElement* const RECOHLT_deltaEta,
200  MonitorElement* const RECOHLT_deltaPhi,
201  MonitorElement* const RECOHLT_invMass,
202  MonitorElement* const NumberOfMatches,
203  MonitorElement* const NumberOfEvents) {
204  RECO_deltaEta_DiJet_ = RECO_deltaEta_DiJet;
205  RECO_deltaPhi_DiJet_ = RECO_deltaPhi_DiJet;
206  RECO_invMass_DiJet_ = RECO_invMass_DiJet;
207  HLT_deltaEta_DiJet_ = HLT_deltaEta_DiJet;
208  HLT_deltaPhi_DiJet_ = HLT_deltaPhi_DiJet;
209  HLT_invMass_DiJet_ = HLT_invMass_DiJet;
210  RECO_deltaEta_DiJet_Match_ = RECO_deltaEta_DiJet_Match;
211  RECO_deltaPhi_DiJet_Match_ = RECO_deltaPhi_DiJet_Match;
212  RECO_invMass_DiJet_Match_ = RECO_invMass_DiJet_Match;
213  RECOHLT_deltaEta_ = RECOHLT_deltaEta;
214  RECOHLT_deltaPhi_ = RECOHLT_deltaPhi;
215  RECOHLT_invMass_ = RECOHLT_invMass;
216  NumberOfMatches_ = NumberOfMatches;
217  NumberOfEvents_ = NumberOfEvents;
218  };
219  ~PathInfo() = default;
220  ;
221  PathInfo(int prescaleUsed,
222  std::string pathName,
225  size_t type,
227  : prescaleUsed_(prescaleUsed),
228  pathName_(std::move(pathName)),
229  filterName_(std::move(filterName)),
230  processName_(std::move(processName)),
231  objectType_(type),
232  triggerType_(std::move(triggerType)) {}
233 
248 
249  const std::string getLabel() const { return filterName_; }
250  void setLabel(std::string labelName) {
251  filterName_ = std::move(labelName);
252  return;
253  }
254  const std::string getPath() const { return pathName_; }
255  const int getprescaleUsed() const { return prescaleUsed_; }
256  const std::string getProcess() const { return processName_; }
257  const int getObjectType() const { return objectType_; }
258  const std::string getTriggerType() const { return triggerType_; }
259  const edm::InputTag getTag() const {
260  edm::InputTag tagName(filterName_, "", processName_);
261  return tagName;
262  }
263  bool operator==(const std::string& v) { return v == pathName_; }
264 
265  private:
272 
287  };
288 
289  // simple collection
290  class PathInfoCollection : public std::vector<PathInfo> {
291  public:
293  std::vector<PathInfo>::iterator find(const std::string& pathName) { return std::find(begin(), end(), pathName); }
294  };
296 };
297 #endif
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet_Match()
MonitorElement * getMEhisto_HLT_deltaEta_DiJet()
const std::string getTriggerType() const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
const std::string getPath() const
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
const std::string getLabel() const
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
const edm::InputTag getTag() const
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
def move
Definition: eostools.py:511
std::vector< int > prescUsed_
MonitorElement * getMEhisto_RECOHLT_deltaPhi()
edm::TriggerNames triggerNames_
bool operator==(const std::string &v)
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)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
MonitorElement * getMEhisto_RECOHLT_deltaEta()
edm::InputTag triggerResultsLabel_
string end
Definition: dataset.py:937
MonitorElement * getMEhisto_RECO_deltaEta_DiJet_Match()
const std::string getProcess() const
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()
Definition: Run.h:45
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)