CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: FourVectorHLT.h,v 1.6 2009/10/15 11:31:28 fwyzard Exp $
20 //
21 //
22 
23 
24 // system include files
25 #include <memory>
26 #include <unistd.h>
27 
28 
29 // user include files
32 
36 
42 #include <iostream>
43 #include <fstream>
44 #include <vector>
45 
46 //
47 // class decleration
48 //
49 
51  public:
52  explicit FourVectorHLT(const edm::ParameterSet&);
54 
55 
56  private:
57  virtual void beginJob() ;
58  virtual void analyze(const edm::Event&, const edm::EventSetup&);
59  virtual void endJob() ;
60 
61  // BeginRun
62  void beginRun(const edm::Run& run, const edm::EventSetup& c);
63 
64  // EndRun
65  void endRun(const edm::Run& run, const edm::EventSetup& c);
66 
67 
68  // ----------member data ---------------------------
69  int nev_;
71 
73 
74  bool plotAll_;
75  bool resetMe_;
77 
78  unsigned int nBins_;
79  double ptMin_ ;
80  double ptMax_ ;
81 
82  std::string dirname_;
87 
88  // helper class to store the data
89  class PathInfo {
91  pathIndex_(-1), pathName_("unset"), objectType_(-1)
92  {};
93  public:
94  void setHistos(MonitorElement* const et, MonitorElement* const eta,
95  MonitorElement* const phi,
96  MonitorElement* const etavsphi ) {
97  et_ = et;
98  eta_ = eta;
99  phi_ = phi;
100  etavsphi_ = etavsphi;
101  }
103  return et_;
104  }
106  return eta_;
107  }
109  return phi_;
110  }
112  return etavsphi_;
113  }
114  const std::string getName(void ) const {
115  return pathName_;
116  }
117  ~PathInfo() {};
118  PathInfo(std::string pathName, size_t type, float ptmin,
119  float ptmax):
120  pathName_(pathName), objectType_(type),
121  et_(0), eta_(0), phi_(0), etavsphi_(0),
122  ptmin_(ptmin), ptmax_(ptmax)
123  {
124  };
125  PathInfo(std::string pathName, size_t type,
126  MonitorElement *et,
129  MonitorElement *etavsphi,
130  float ptmin, float ptmax
131  ):
132  pathName_(pathName), objectType_(type),
133  et_(et), eta_(eta), phi_(phi), etavsphi_(etavsphi),
134  ptmin_(ptmin), ptmax_(ptmax)
135  {};
136  bool operator==(const std::string v)
137  {
138  return v==pathName_;
139  }
140  private:
142  std::string pathName_;
144 
145  // we don't own this data
147 
148  float ptmin_, ptmax_;
149 
150  const int index() {
151  return pathIndex_;
152  }
153  const int type() {
154  return objectType_;
155  }
156  public:
157  float getPtMin() const { return ptmin_; }
158  float getPtMax() const { return ptmax_; }
159  };
160 
161  // simple collection - just
162  class PathInfoCollection: public std::vector<PathInfo> {
163  public:
164  PathInfoCollection(): std::vector<PathInfo>()
165  {};
166  std::vector<PathInfo>::iterator find(std::string pathName) {
167  return std::find(begin(), end(), pathName);
168  }
169  };
171 
172 
173 };
174 #endif
type
Definition: HCALResponse.h:22
bool operator==(const std::string v)
std::string dirname_
Definition: FourVectorHLT.h:82
edm::InputTag triggerResultLabel_
Definition: FourVectorHLT.h:86
MonitorElement * getEtHisto()
virtual void endJob()
T eta() const
MonitorElement * getEtaHisto()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * getPhiHisto()
FourVectorHLT(const edm::ParameterSet &)
void setHistos(MonitorElement *const et, MonitorElement *const eta, MonitorElement *const phi, MonitorElement *const etavsphi)
Definition: FourVectorHLT.h:94
MonitorElement * etavsphi_
MonitorElement * et_
PathInfo(std::string pathName, size_t type, float ptmin, float ptmax)
MonitorElement * phi_
float getPtMax() const
#define end
Definition: vmac.h:38
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
MonitorElement * eta_
PathInfoCollection hltPaths_
double ptmin
Definition: HydjetWrapper.h:86
MonitorElement * total_
Definition: FourVectorHLT.h:72
#define begin
Definition: vmac.h:31
unsigned int nBins_
Definition: FourVectorHLT.h:78
std::vector< PathInfo >::iterator find(std::string pathName)
float getPtMin() const
DQMStore * dbe_
Definition: FourVectorHLT.h:70
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)
virtual void beginJob()
mathSSE::Vec4< T > v
void beginRun(const edm::Run &run, const edm::EventSetup &c)
Definition: Run.h:33
edm::InputTag triggerSummaryLabel_
Definition: FourVectorHLT.h:85
Definition: DDAxes.h:10