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
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  private:
58  virtual bool isBarrel(double eta);
59  virtual bool isEndCap(double eta);
60  virtual bool isForward(double eta);
61  virtual bool validPathHLT(std::string path);
62  virtual bool isHLTPathAccepted(std::string pathName);
64  //virtual double TriggerPosition(std::string trigName);
65 
66  // ----------member data ---------------------------
67  int nCount_;
68 
69  std::vector<int> prescUsed_;
70 
73  //reco::helper::JetIDHelper *jetID; // JetID helper (Need to run with RECO, not AOD)
74  std::vector<std::string> path_;
75 
76  bool debug_;
77 
78  double minPtHigh_;
79  double minPtLow_;
80  double minDeltaEta_;
81  double minInvMass_;
82  double deltaRMatch_;
83  bool etaOpposite_;
84 
89  edm::TriggerNames triggerNames_; // TriggerNames class
90 
95 
100 
105 
109 
118 
121 
122  double reco_ejet1;
123  //double reco_etjet1;
124  double reco_pxjet1;
125  double reco_pyjet1;
126  double reco_pzjet1;
127  double reco_ptjet1;
128  double reco_etajet1;
129  double reco_phijet1;
130  //
131  double reco_ejet2;
132  //double reco_etjet2;
133  double reco_pxjet2;
134  double reco_pyjet2;
135  double reco_pzjet2;
136  double reco_ptjet2;
137  double reco_etajet2;
138  double reco_phijet2;
139  //
140  double hlt_ejet1;
141  //double hlt_etjet1;
142  double hlt_pxjet1;
143  double hlt_pyjet1;
144  double hlt_pzjet1;
145  double hlt_ptjet1;
146  double hlt_etajet1;
147  double hlt_phijet1;
148  //
149  double hlt_ejet2 ;
150  //double hlt_etjet2;
151  double hlt_pxjet2;
152  double hlt_pyjet2;
153  double hlt_pzjet2;
154  double hlt_ptjet2;
155  double hlt_etajet2;
156  double hlt_phijet2;
157  //
159  bool checkHLT;
161  //
168  //
175 
176  // helper class to store the data path
177 
178  class PathInfo {
180  prescaleUsed_(-1),
181  pathName_("unset"),
182  filterName_("unset"),
183  processName_("unset"),
184  objectType_(-1),
185  triggerType_("unset"){};
186  //
187  public:
188  //
189  void setHistos(
190  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  )
205  {
206  RECO_deltaEta_DiJet_ = RECO_deltaEta_DiJet;
207  RECO_deltaPhi_DiJet_ = RECO_deltaPhi_DiJet;
208  RECO_invMass_DiJet_ = RECO_invMass_DiJet;
209  HLT_deltaEta_DiJet_ = HLT_deltaEta_DiJet;
210  HLT_deltaPhi_DiJet_ = HLT_deltaPhi_DiJet ;
211  HLT_invMass_DiJet_ = HLT_invMass_DiJet;
212  RECO_deltaEta_DiJet_Match_ = RECO_deltaEta_DiJet_Match;
213  RECO_deltaPhi_DiJet_Match_ = RECO_deltaPhi_DiJet_Match;
214  RECO_invMass_DiJet_Match_ = RECO_invMass_DiJet_Match;
215  RECOHLT_deltaEta_ = RECOHLT_deltaEta;
216  RECOHLT_deltaPhi_ = RECOHLT_deltaPhi ;
217  RECOHLT_invMass_ = RECOHLT_invMass;
218  NumberOfMatches_ = NumberOfMatches;
219  NumberOfEvents_ = NumberOfEvents;
220  };
221  ~PathInfo() = default;;
222  PathInfo(int prescaleUsed,
223  std::string pathName,
226  size_t type,
227  std::string triggerType):
228  prescaleUsed_(prescaleUsed),
229  pathName_(std::move(pathName)),
230  filterName_(std::move(filterName)),
231  processName_(std::move(processName)),
232  objectType_(type),
233  triggerType_(std::move(triggerType))
234  {
235  }
236 
251 
252  const std::string getLabel( ) const {
253  return filterName_;
254  }
255  void setLabel(std::string labelName){
256  filterName_ = std::move(labelName);
257  return;
258  }
259  const std::string getPath( ) const {
260  return pathName_;
261  }
262  const int getprescaleUsed() const {
263  return prescaleUsed_;
264  }
265  const std::string getProcess( ) const {
266  return processName_;
267  }
268  const int getObjectType( ) const {
269  return objectType_;
270  }
271  const std::string getTriggerType( ) const {
272  return triggerType_;
273  }
274  const edm::InputTag getTag() const{
276  return tagName;
277  }
278  bool operator==(const std::string& v){
279  return v==pathName_;
280  }
281 
282  private:
289 
304  };
305 
306  // simple collection
307  class PathInfoCollection: public std::vector<PathInfo> {
308  public:
310  {};
311  std::vector<PathInfo>::iterator find(const std::string& pathName) {
312  return std::find(begin(), end(), pathName);
313  }
314  };
316 };
317 #endif
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet_Match()
type
Definition: HCALResponse.h:21
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:20
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
std::vector< int > prescUsed_
MonitorElement * getMEhisto_RECOHLT_deltaPhi()
#define end
Definition: vmac.h:37
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
#define begin
Definition: vmac.h:30
MonitorElement * getMEhisto_RECOHLT_deltaEta()
edm::InputTag triggerResultsLabel_
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()
def move(src, dest)
Definition: eostools.py:510
Definition: Run.h:42
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)