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 // system include files
23 #include <memory>
24 #include <unistd.h>
25 
26 // user include files
29 
33 
38 #include <iostream>
39 #include <fstream>
40 #include <vector>
41 
42 //
43 // class decleration
44 //
45 
47 public:
50 
51  explicit FourVectorHLT(const edm::ParameterSet&);
52  ~FourVectorHLT() override;
53 
54 private:
55  void beginJob() override;
56  void analyze(const edm::Event&, const edm::EventSetup&) override;
57  void endJob() override;
58 
59  // BeginRun
60  void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
61 
62  // EndRun
63  void endRun(const edm::Run& run, const edm::EventSetup& c) override;
64 
65  // ----------member data ---------------------------
66  int nev_;
68 
69  bool plotAll_;
70 
71  unsigned int nBins_;
72  double ptMin_;
73  double ptMax_;
74 
78 
79  //define Token(-s)
81 
82  // helper class to store the data
83  class PathInfo {
84  PathInfo() : pathIndex_(-1), pathName_("unset"), objectType_(-1){};
85 
86  public:
88  MonitorElement* const eta,
89  MonitorElement* const phi,
90  MonitorElement* const etavsphi) {
91  et_ = et;
92  eta_ = eta;
93  phi_ = phi;
94  etavsphi_ = etavsphi;
95  }
96  MonitorElement* getEtHisto() { return et_; }
100  const std::string getName(void) const { return pathName_; }
102  PathInfo(std::string pathName, size_t type, float ptmin, float ptmax)
103  : pathName_(pathName),
104  objectType_(type),
105  et_(nullptr),
106  eta_(nullptr),
107  phi_(nullptr),
108  etavsphi_(nullptr),
109  ptmin_(ptmin),
110  ptmax_(ptmax){};
112  size_t type,
116  MonitorElement* etavsphi,
117  float ptmin,
118  float ptmax)
119  : pathName_(pathName),
120  objectType_(type),
121  et_(et),
122  eta_(eta),
123  phi_(phi),
124  etavsphi_(etavsphi),
125  ptmin_(ptmin),
126  ptmax_(ptmax){};
127  bool operator==(const std::string v) { return v == pathName_; }
128 
129  private:
133 
134  // we don't own this data
136 
137  float ptmin_, ptmax_;
138 
139  const int index() { return pathIndex_; }
140  const int type() { return objectType_; }
141 
142  public:
143  float getPtMin() const { return ptmin_; }
144  float getPtMax() const { return ptmax_; }
145  };
146 
147  // simple collection - just
148  class PathInfoCollection : public std::vector<PathInfo> {
149  public:
151  std::vector<PathInfo>::iterator find(std::string pathName) { return std::find(begin(), end(), pathName); }
152  };
154 };
155 #endif
FourVectorHLT::triggerSummaryToken_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken_
Definition: FourVectorHLT.h:80
FourVectorHLT::triggerSummaryLabel_
edm::InputTag triggerSummaryLabel_
Definition: FourVectorHLT.h:76
FourVectorHLT::PathInfo::pathName_
std::string pathName_
Definition: FourVectorHLT.h:131
MessageLogger.h
FourVectorHLT::PathInfo::getPtMin
float getPtMin() const
Definition: FourVectorHLT.h:143
FourVectorHLT::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: FourVectorHLT.cc:199
FourVectorHLT::triggerResultLabel_
edm::InputTag triggerResultLabel_
Definition: FourVectorHLT.h:77
edm::Run
Definition: Run.h:45
TriggerEvent.h
edm::EDGetTokenT< trigger::TriggerEvent >
FourVectorHLT::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: FourVectorHLT.h:48
FourVectorHLT::PathInfo::getEtaVsPhiHisto
MonitorElement * getEtaVsPhiHisto()
Definition: FourVectorHLT.h:99
FourVectorHLT::PathInfo::index
const int index()
Definition: FourVectorHLT.h:139
DQMStore.h
FourVectorHLT::endRun
void endRun(const edm::Run &run, const edm::EventSetup &c) override
EndRun.
Definition: FourVectorHLT.cc:204
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
FourVectorHLT::PathInfo::et_
MonitorElement * et_
Definition: FourVectorHLT.h:135
EDAnalyzer.h
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FourVectorHLT::PathInfo::setHistos
void setHistos(MonitorElement *const et, MonitorElement *const eta, MonitorElement *const phi, MonitorElement *const etavsphi)
Definition: FourVectorHLT.h:87
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
FourVectorHLT::endJob
void endJob() override
Definition: FourVectorHLT.cc:193
FourVectorHLT::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: FourVectorHLT.h:49
FourVectorHLT::FourVectorHLT
FourVectorHLT(const edm::ParameterSet &)
Definition: FourVectorHLT.cc:15
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
FourVectorHLT::PathInfoCollection::PathInfoCollection
PathInfoCollection()
Definition: FourVectorHLT.h:150
FourVectorHLT::beginJob
void beginJob() override
Definition: FourVectorHLT.cc:159
FourVectorHLT::PathInfo::etavsphi_
MonitorElement * etavsphi_
Definition: FourVectorHLT.h:135
FourVectorHLT::nev_
int nev_
Definition: FourVectorHLT.h:66
dqm::legacy::DQMStore
Definition: DQMStore.h:727
hltMonBTagIPClient_cfi.pathName
pathName
Definition: hltMonBTagIPClient_cfi.py:5
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mps_fire.end
end
Definition: mps_fire.py:242
FourVectorHLT::PathInfo::phi_
MonitorElement * phi_
Definition: FourVectorHLT.h:135
FourVectorHLT::PathInfo::getEtaHisto
MonitorElement * getEtaHisto()
Definition: FourVectorHLT.h:97
FourVectorHLT::plotAll_
bool plotAll_
Definition: FourVectorHLT.h:69
FourVectorHLT::PathInfo::PathInfo
PathInfo(std::string pathName, size_t type, MonitorElement *et, MonitorElement *eta, MonitorElement *phi, MonitorElement *etavsphi, float ptmin, float ptmax)
Definition: FourVectorHLT.h:111
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FourVectorHLT::PathInfo::operator==
bool operator==(const std::string v)
Definition: FourVectorHLT.h:127
FourVectorHLT::PathInfo::objectType_
int objectType_
Definition: FourVectorHLT.h:132
FourVectorHLT::PathInfo::PathInfo
PathInfo()
Definition: FourVectorHLT.h:84
edm::ParameterSet
Definition: ParameterSet.h:47
FourVectorHLT::PathInfo::~PathInfo
~PathInfo()
Definition: FourVectorHLT.h:101
Event.h
FourVectorHLT::ptMax_
double ptMax_
Definition: FourVectorHLT.h:73
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
FourVectorHLT::PathInfo::eta_
MonitorElement * eta_
Definition: FourVectorHLT.h:135
FourVectorHLT::nBins_
unsigned int nBins_
Definition: FourVectorHLT.h:71
FourVectorHLT::~FourVectorHLT
~FourVectorHLT() override
Definition: FourVectorHLT.cc:59
FourVectorHLT::ptMin_
double ptMin_
Definition: FourVectorHLT.h:72
FourVectorHLT::PathInfoCollection
Definition: FourVectorHLT.h:148
FourVectorHLT::PathInfo::ptmax_
float ptmax_
Definition: FourVectorHLT.h:137
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
FourVectorHLT::PathInfo::pathIndex_
int pathIndex_
Definition: FourVectorHLT.h:130
FourVectorHLT::PathInfo::getPtMax
float getPtMax() const
Definition: FourVectorHLT.h:144
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
FourVectorHLT
Definition: FourVectorHLT.h:46
edm::EventSetup
Definition: EventSetup.h:58
FourVectorHLT::dbe_
DQMStore * dbe_
Definition: FourVectorHLT.h:67
DDAxes::phi
muonTiming_cfi.ptmax
ptmax
Definition: muonTiming_cfi.py:22
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
FourVectorHLT::PathInfo::PathInfo
PathInfo(std::string pathName, size_t type, float ptmin, float ptmax)
Definition: FourVectorHLT.h:102
FourVectorHLT::hltPaths_
PathInfoCollection hltPaths_
Definition: FourVectorHLT.h:153
Frameworkfwd.h
FourVectorHLT::PathInfoCollection::find
std::vector< PathInfo >::iterator find(std::string pathName)
Definition: FourVectorHLT.h:151
FourVectorHLT::dirname_
std::string dirname_
Definition: FourVectorHLT.h:75
FourVectorHLT::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: FourVectorHLT.cc:69
ptmin
double ptmin
Definition: HydjetWrapper.h:84
FourVectorHLT::PathInfo
Definition: FourVectorHLT.h:83
FourVectorHLT::PathInfo::getName
const std::string getName(void) const
Definition: FourVectorHLT.h:100
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
FourVectorHLT::PathInfo::type
const int type()
Definition: FourVectorHLT.h:140
edm::Event
Definition: Event.h:73
FourVectorHLT::PathInfo::ptmin_
float ptmin_
Definition: FourVectorHLT.h:137
FourVectorHLT::PathInfo::getEtHisto
MonitorElement * getEtHisto()
Definition: FourVectorHLT.h:96
edm::InputTag
Definition: InputTag.h:15
FourVectorHLT::PathInfo::getPhiHisto
MonitorElement * getPhiHisto()
Definition: FourVectorHLT.h:98