CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 <vector>
46 #include <string>
47 
49  public:
52 
53  virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
54  virtual void analyze(const edm::Event &, const edm::EventSetup &) override;
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_;
81  bool etaOpposite_;
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(
188  MonitorElement* const RECO_deltaEta_DiJet,
189  MonitorElement* const RECO_deltaPhi_DiJet,
190  MonitorElement* const RECO_invMass_DiJet,
191  MonitorElement* const HLT_deltaEta_DiJet,
192  MonitorElement* const HLT_deltaPhi_DiJet,
193  MonitorElement* const HLT_invMass_DiJet,
194  MonitorElement* const RECO_deltaEta_DiJet_Match,
195  MonitorElement* const RECO_deltaPhi_DiJet_Match,
196  MonitorElement* const RECO_invMass_DiJet_Match,
197  MonitorElement* const RECOHLT_deltaEta,
198  MonitorElement* const RECOHLT_deltaPhi,
199  MonitorElement* const RECOHLT_invMass,
200  MonitorElement* const NumberOfMatches,
201  MonitorElement* const NumberOfEvents
202  )
203  {
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() {};
220  PathInfo(int prescaleUsed,
221  std::string pathName,
224  size_t type,
226  prescaleUsed_(prescaleUsed),
227  pathName_(pathName),
228  filterName_(filterName),
229  processName_(processName),
230  objectType_(type),
231  triggerType_(triggerType){};
232 
247 
248  const std::string getLabel(void ) const {
249  return filterName_;
250  }
251  void setLabel(std::string labelName){
252  filterName_ = labelName;
253  return;
254  }
255  const std::string getPath(void ) const {
256  return pathName_;
257  }
258  const int getprescaleUsed(void) const {
259  return prescaleUsed_;
260  }
261  const std::string getProcess(void ) const {
262  return processName_;
263  }
264  const int getObjectType(void ) const {
265  return objectType_;
266  }
267  const std::string getTriggerType(void ) const {
268  return triggerType_;
269  }
270  const edm::InputTag getTag(void) const{
272  return tagName;
273  }
274  bool operator==(const std::string v){
275  return v==pathName_;
276  }
277 
278  private:
285 
300  };
301 
302  // simple collection
303  class PathInfoCollection: public std::vector<PathInfo> {
304  public:
305  PathInfoCollection(): std::vector<PathInfo>()
306  {};
307  std::vector<PathInfo>::iterator find(std::string pathName) {
308  return std::find(begin(), end(), pathName);
309  }
310  };
312 };
313 #endif
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet_Match()
type
Definition: HCALResponse.h:21
MonitorElement * getMEhisto_HLT_deltaEta_DiJet()
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
const int getprescaleUsed(void) 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:7
reco::PFJetCollection pfjet
PathInfo(int prescaleUsed, std::string pathName, std::string filterName, std::string processName, size_t type, std::string triggerType)
const edm::InputTag getTag(void) const
const std::string getProcess(void) const
virtual 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_
const std::string getTriggerType(void) const
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)
const std::string getLabel(void) const
std::vector< std::string > path_
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const std::string getPath(void) const
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()
MonitorElement * getMEhisto_HLT_invMass_DiJet()
void setLabel(std::string labelName)
std::vector< PathInfo >::iterator find(std::string pathName)
reco::CaloJetCollection calojet
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
MonitorElement * getMEhisto_RECO_deltaEta_DiJet()
MonitorElement * getMEhisto_RECO_deltaPhi_DiJet()
Definition: Run.h:43
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)