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 //
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&);
53 
54 
55  private:
56  virtual void beginJob() ;
57  virtual void analyze(const edm::Event&, const edm::EventSetup&);
58  virtual void endJob() ;
59 
60  // BeginRun
61  void beginRun(const edm::Run& run, const edm::EventSetup& c);
62 
63  // EndRun
64  void endRun(const edm::Run& run, const edm::EventSetup& c);
65 
66 
67  // ----------member data ---------------------------
68  int nev_;
70 
72 
73  bool plotAll_;
74  bool resetMe_;
76 
77  unsigned int nBins_;
78  double ptMin_ ;
79  double ptMax_ ;
80 
86 
87  //define Token(-s)
89 
90  // helper class to store the data
91  class PathInfo {
93  pathIndex_(-1), pathName_("unset"), objectType_(-1)
94  {};
95  public:
96  void setHistos(MonitorElement* const et, MonitorElement* const eta,
97  MonitorElement* const phi,
98  MonitorElement* const etavsphi ) {
99  et_ = et;
100  eta_ = eta;
101  phi_ = phi;
102  etavsphi_ = etavsphi;
103  }
105  return et_;
106  }
108  return eta_;
109  }
111  return phi_;
112  }
114  return etavsphi_;
115  }
116  const std::string getName(void ) const {
117  return pathName_;
118  }
119  ~PathInfo() {};
121  float ptmax):
122  pathName_(pathName), objectType_(type),
123  et_(0), eta_(0), phi_(0), etavsphi_(0),
124  ptmin_(ptmin), ptmax_(ptmax)
125  {
126  };
128  MonitorElement *et,
131  MonitorElement *etavsphi,
132  float ptmin, float ptmax
133  ):
134  pathName_(pathName), objectType_(type),
135  et_(et), eta_(eta), phi_(phi), etavsphi_(etavsphi),
136  ptmin_(ptmin), ptmax_(ptmax)
137  {};
138  bool operator==(const std::string v)
139  {
140  return v==pathName_;
141  }
142  private:
146 
147  // we don't own this data
149 
150  float ptmin_, ptmax_;
151 
152  const int index() {
153  return pathIndex_;
154  }
155  const int type() {
156  return objectType_;
157  }
158  public:
159  float getPtMin() const { return ptmin_; }
160  float getPtMax() const { return ptmax_; }
161  };
162 
163  // simple collection - just
164  class PathInfoCollection: public std::vector<PathInfo> {
165  public:
166  PathInfoCollection(): std::vector<PathInfo>()
167  {};
168  std::vector<PathInfo>::iterator find(std::string pathName) {
169  return std::find(begin(), end(), pathName);
170  }
171  };
173 
174 
175 };
176 #endif
type
Definition: HCALResponse.h:21
bool operator==(const std::string v)
std::string dirname_
Definition: FourVectorHLT.h:81
edm::InputTag triggerResultLabel_
Definition: FourVectorHLT.h:85
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:96
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:37
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:85
MonitorElement * total_
Definition: FourVectorHLT.h:71
#define begin
Definition: vmac.h:30
unsigned int nBins_
Definition: FourVectorHLT.h:77
std::vector< PathInfo >::iterator find(std::string pathName)
float getPtMin() const
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
Definition: FourVectorHLT.h:88
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)
virtual void beginJob()
void beginRun(const edm::Run &run, const edm::EventSetup &c)
Definition: Run.h:41
edm::InputTag triggerSummaryLabel_
Definition: FourVectorHLT.h:84
Definition: DDAxes.h:10