CMS 3D CMS Logo

FourVectorHLT.h
Go to the documentation of this file.
1 #ifndef FOURVECTORHLT_H
2 #define FOURVECTORHLT_H
3 // -*- C++ -*-
4 //
5 // Package: FourVectorHLT
6 // Class: FourVectorHLT
7 //
16 //
17 // Original Author: Peter Wittich
18 // Created: May 2008
19 //
20 //
21 
22 
23 // system include files
24 #include <memory>
25 #include <unistd.h>
26 
27 
28 // user include files
31 
35 
41 #include <iostream>
42 #include <fstream>
43 #include <vector>
44 
45 //
46 // class decleration
47 //
48 
50  public:
51  explicit FourVectorHLT(const edm::ParameterSet&);
52  ~FourVectorHLT() override;
53 
54 
55  private:
56  void beginJob() override ;
57  void analyze(const edm::Event&, const edm::EventSetup&) override;
58  void endJob() override ;
59 
60  // BeginRun
61  void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
62 
63  // EndRun
64  void endRun(const edm::Run& run, const edm::EventSetup& c) override;
65 
66 
67  // ----------member data ---------------------------
68  int nev_;
70 
71  bool plotAll_;
72 
73  unsigned int nBins_;
74  double ptMin_ ;
75  double ptMax_ ;
76 
80 
81  //define Token(-s)
83 
84  // helper class to store the data
85  class PathInfo {
87  pathIndex_(-1), pathName_("unset"), objectType_(-1)
88  {};
89  public:
91  MonitorElement* const phi,
92  MonitorElement* const etavsphi ) {
93  et_ = et;
94  eta_ = eta;
95  phi_ = phi;
96  etavsphi_ = etavsphi;
97  }
99  return et_;
100  }
102  return eta_;
103  }
105  return phi_;
106  }
108  return etavsphi_;
109  }
110  const std::string getName(void ) const {
111  return pathName_;
112  }
113  ~PathInfo() {};
114  PathInfo(std::string pathName, size_t type, float ptmin,
115  float ptmax):
116  pathName_(pathName), objectType_(type),
118  ptmin_(ptmin), ptmax_(ptmax)
119  {
120  };
121  PathInfo(std::string pathName, size_t type,
125  MonitorElement *etavsphi,
126  float ptmin, float ptmax
127  ):
128  pathName_(pathName), objectType_(type),
129  et_(et), eta_(eta), phi_(phi), etavsphi_(etavsphi),
130  ptmin_(ptmin), ptmax_(ptmax)
131  {};
132  bool operator==(const std::string v)
133  {
134  return v==pathName_;
135  }
136  private:
140 
141  // we don't own this data
143 
144  float ptmin_, ptmax_;
145 
146  const int index() {
147  return pathIndex_;
148  }
149  const int type() {
150  return objectType_;
151  }
152  public:
153  float getPtMin() const { return ptmin_; }
154  float getPtMax() const { return ptmax_; }
155  };
156 
157  // simple collection - just
158  class PathInfoCollection: public std::vector<PathInfo> {
159  public:
161  {};
162  std::vector<PathInfo>::iterator find(std::string pathName) {
163  return std::find(begin(), end(), pathName);
164  }
165  };
167 
168 
169 };
170 #endif
type
Definition: HCALResponse.h:21
bool operator==(const std::string v)
~FourVectorHLT() override
std::string dirname_
Definition: FourVectorHLT.h:77
edm::InputTag triggerResultLabel_
Definition: FourVectorHLT.h:79
MonitorElement * getEtHisto()
Definition: FourVectorHLT.h:98
#define nullptr
void endRun(const edm::Run &run, const edm::EventSetup &c) override
EndRun.
MonitorElement * getEtaHisto()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
MonitorElement * getPhiHisto()
FourVectorHLT(const edm::ParameterSet &)
void setHistos(MonitorElement *const et, MonitorElement *const eta, MonitorElement *const phi, MonitorElement *const etavsphi)
Definition: FourVectorHLT.h:90
MonitorElement * etavsphi_
MonitorElement * et_
PathInfo(std::string pathName, size_t type, float ptmin, float ptmax)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * phi_
float getPtMax() const
#define end
Definition: vmac.h:39
void beginJob() override
MonitorElement * eta_
PathInfoCollection hltPaths_
et
define resolution functions of each parameter
void endJob() override
double ptmin
Definition: HydjetWrapper.h:90
#define begin
Definition: vmac.h:32
unsigned int nBins_
Definition: FourVectorHLT.h:73
std::vector< PathInfo >::iterator find(std::string pathName)
float getPtMin() const
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
Definition: FourVectorHLT.h:82
DQMStore * dbe_
Definition: FourVectorHLT.h:69
MonitorElement * getEtaVsPhiHisto()
const std::string getName(void) const
PathInfo(std::string pathName, size_t type, MonitorElement *et, MonitorElement *eta, MonitorElement *phi, MonitorElement *etavsphi, float ptmin, float ptmax)
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: Run.h:45
edm::InputTag triggerSummaryLabel_
Definition: FourVectorHLT.h:78