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  private:
54  virtual void beginJob() ;
55  virtual void analyze(const edm::Event&, const edm::EventSetup&);
56  virtual void endJob() ;
57 
58  void beginRun(const edm::Run& run, const edm::EventSetup& c);
59  void endRun(const edm::Run& run, const edm::EventSetup& c);
60 
61  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
62  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
63  //void histobooking( const edm::EventSetup& c);
64 
65  virtual bool isBarrel(double eta);
66  virtual bool isEndCap(double eta);
67  virtual bool isForward(double eta);
68  virtual bool validPathHLT(std::string path);
71  //virtual double TriggerPosition(std::string trigName);
72 
73  // ----------member data ---------------------------
74  int nev_;
75  int nCount_;
77 
79 
80  std::vector<int> prescUsed_;
81 
84  //reco::helper::JetIDHelper *jetID; // JetID helper (Need to run with RECO, not AOD)
85  std::vector<std::string> path_;
86 
87  bool debug_;
88  bool isSetup_;
89 
90  double minPtHigh_;
91  double minPtLow_;
92  double minDeltaEta_;
93  double minInvMass_;
94  double deltaRMatch_;
95  bool etaOpposite_;
96 
101  edm::TriggerNames triggerNames_; // TriggerNames class
102 
107 
112 
117 
121 
130 
133 
134  double reco_ejet1;
135  //double reco_etjet1;
136  double reco_pxjet1;
137  double reco_pyjet1;
138  double reco_pzjet1;
139  double reco_ptjet1;
140  double reco_etajet1;
141  double reco_phijet1;
142  //
143  double reco_ejet2;
144  //double reco_etjet2;
145  double reco_pxjet2;
146  double reco_pyjet2;
147  double reco_pzjet2;
148  double reco_ptjet2;
149  double reco_etajet2;
150  double reco_phijet2;
151  //
152  double hlt_ejet1;
153  //double hlt_etjet1;
154  double hlt_pxjet1;
155  double hlt_pyjet1;
156  double hlt_pzjet1;
157  double hlt_ptjet1;
158  double hlt_etajet1;
159  double hlt_phijet1;
160  //
161  double hlt_ejet2 ;
162  //double hlt_etjet2;
163  double hlt_pxjet2;
164  double hlt_pyjet2;
165  double hlt_pzjet2;
166  double hlt_ptjet2;
167  double hlt_etajet2;
168  double hlt_phijet2;
169  //
171  bool checkHLT;
173  //
180  //
187 
188  // data across paths
190  // helper class to store the data path
191 
192  class PathInfo {
194  pathIndex_(-1),
195  prescaleUsed_(-1),
196  pathName_("unset"),
197  filterName_("unset"),
198  processName_("unset"),
199  objectType_(-1),
200  triggerType_("unset"){};
201  //
202  public:
203  //
204  void setHistos(
205  MonitorElement* const RECO_deltaEta_DiJet,
206  MonitorElement* const RECO_deltaPhi_DiJet,
207  MonitorElement* const RECO_invMass_DiJet,
208  MonitorElement* const HLT_deltaEta_DiJet,
209  MonitorElement* const HLT_deltaPhi_DiJet,
210  MonitorElement* const HLT_invMass_DiJet,
211  MonitorElement* const RECO_deltaEta_DiJet_Match,
212  MonitorElement* const RECO_deltaPhi_DiJet_Match,
213  MonitorElement* const RECO_invMass_DiJet_Match,
214  MonitorElement* const RECOHLT_deltaEta,
215  MonitorElement* const RECOHLT_deltaPhi,
216  MonitorElement* const RECOHLT_invMass,
217  MonitorElement* const NumberOfMatches,
218  MonitorElement* const NumberOfEvents
219  )
220  {
221  RECO_deltaEta_DiJet_ = RECO_deltaEta_DiJet;
222  RECO_deltaPhi_DiJet_ = RECO_deltaPhi_DiJet;
223  RECO_invMass_DiJet_ = RECO_invMass_DiJet;
224  HLT_deltaEta_DiJet_ = HLT_deltaEta_DiJet;
225  HLT_deltaPhi_DiJet_ = HLT_deltaPhi_DiJet ;
226  HLT_invMass_DiJet_ = HLT_invMass_DiJet;
227  RECO_deltaEta_DiJet_Match_ = RECO_deltaEta_DiJet_Match;
228  RECO_deltaPhi_DiJet_Match_ = RECO_deltaPhi_DiJet_Match;
229  RECO_invMass_DiJet_Match_ = RECO_invMass_DiJet_Match;
230  RECOHLT_deltaEta_ = RECOHLT_deltaEta;
231  RECOHLT_deltaPhi_ = RECOHLT_deltaPhi ;
232  RECOHLT_invMass_ = RECOHLT_invMass;
233  NumberOfMatches_ = NumberOfMatches;
234  NumberOfEvents_ = NumberOfEvents;
235  };
236  ~PathInfo() {};
237  PathInfo(int prescaleUsed,
238  std::string pathName,
240  std::string processName,
241  size_t type,
242  std::string triggerType):
243  prescaleUsed_(prescaleUsed),
244  pathName_(pathName),
245  filterName_(filterName),
246  processName_(processName),
247  objectType_(type),
248  triggerType_(triggerType){};
249 
264 
265  const std::string getLabel(void ) const {
266  return filterName_;
267  }
268  void setLabel(std::string labelName){
269  filterName_ = labelName;
270  return;
271  }
272  const std::string getPath(void ) const {
273  return pathName_;
274  }
275  const int getprescaleUsed(void) const {
276  return prescaleUsed_;
277  }
278  const std::string getProcess(void ) const {
279  return processName_;
280  }
281  const int getObjectType(void ) const {
282  return objectType_;
283  }
284  const std::string getTriggerType(void ) const {
285  return triggerType_;
286  }
287  const edm::InputTag getTag(void) const{
289  return tagName;
290  }
291  bool operator==(const std::string v){
292  return v==pathName_;
293  }
294 
295  private:
303 
318  };
319 
320  // simple collection
321  class PathInfoCollection: public std::vector<PathInfo> {
322  public:
323  PathInfoCollection(): std::vector<PathInfo>()
324  {};
325  std::vector<PathInfo>::iterator find(std::string pathName) {
326  return std::find(begin(), end(), pathName);
327  }
328  };
330 };
331 #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
void beginRun(const edm::Run &run, const edm::EventSetup &c)
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)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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 endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
T eta() const
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
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 &)
tuple path
else: Piece not in the list, fine.
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
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
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_
const std::string getPath(void) const
HLTConfigProvider hltConfig_
edm::Handle< reco::CaloMETCollection > calometColl_
virtual bool isTriggerObjectFound(std::string objectName)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
virtual bool isHLTPathAccepted(std::string pathName)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
#define begin
Definition: vmac.h:30
MonitorElement * getMEhisto_RECOHLT_deltaEta()
MonitorElement * scalersSelect
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:41
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::Handle< edm::TriggerResults > triggerResults_
virtual bool isEndCap(double eta)