CMS 3D CMS Logo

EgHLTMonElemWithCutEBEE.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTMONELEMWITHCUTEBEE
2 #define DQMOFFLINE_TRIGGER_EGHLTMONELEMWITHCUTEBEE
3 
4 //struct: MonElemWithEBEE (Monitor Element Manger With Cut Barrel and Endcap)
5 //
6 //author: Sam Harper (July 2008)
7 //
8 //WARNING: interface is NOT final, please dont use this class for now without clearing it with me
9 // as I will change it and possibly break all your code
10 //
11 //aim: a monitor element which seperates transparently the objects into barrel and endcap
12 //
13 //implimentation: class simply has two MonElemWithCuts, one for endcap electrons, one for barrel electrons
14 // and fills them approprately. It assumes that the class passed in has a detEta function
15 // and uses 1.5 as the barrel,endcap descriminate
16 //
17 //
18 
19 #include <cmath>
20 
22 
23 namespace egHLT {
24  template <class T, typename varType>
26  private:
29 
30  public:
32  const std::string& name,
33  const std::string& title,
34  int nrBins,
35  float min,
36  float max,
37  varType (T::*varFunc)() const)
38  : barrel_(iBooker, name + "_eb", "Barrel " + title, nrBins, min, max, varFunc, nullptr),
39  endcap_(iBooker, name + "_ee", "Endcap " + title, nrBins, min, max, varFunc, nullptr) {}
40 
42  const std::string& name,
43  const std::string& title,
44  int nrBins,
45  float min,
46  float max,
47  varType (T::*varFunc)() const,
48  const EgHLTDQMCut<T>* cut)
49  : barrel_(iBooker, name + "_eb", "Barrel " + title, nrBins, min, max, varFunc, cut),
50  endcap_(iBooker, name + "_ee", "Endcap " + title, nrBins, min, max, varFunc, cut ? cut->clone() : nullptr) {}
51  ~MonElemWithCutEBEE() override = default;
52 
53  void fill(const T& obj, const OffEvt& evt, float weight) override;
54  };
55 } // namespace egHLT
56 
57 template <class T, typename varType>
59  if (std::fabs(obj.detEta()) < 1.5)
60  barrel_.fill(obj, evt, weight);
61  else
62  endcap_.fill(obj, evt, weight);
63 }
64 
65 #endif
EgHLTMonElemWithCut.h
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
egHLT::MonElemWithCut::fill
void fill(const T &obj, const OffEvt &evt, float weight) override
Definition: EgHLTMonElemWithCut.h:86
min
T min(T a, T b)
Definition: MathUtil.h:58
egHLT::MonElemWithCutEBEE::fill
void fill(const T &obj, const OffEvt &evt, float weight) override
Definition: EgHLTMonElemWithCutEBEE.h:58
egHLT::MonElemWithCutEBEE::MonElemWithCutEBEE
MonElemWithCutEBEE(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, int nrBins, float min, float max, varType(T::*varFunc)() const)
Definition: EgHLTMonElemWithCutEBEE.h:31
egHLT::MonElemWithCutEBEE::barrel_
MonElemWithCut< T, varType > barrel_
Definition: EgHLTMonElemWithCutEBEE.h:27
egHLT::OffEvt
Definition: EgHLTOffEvt.h:29
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
egHLT::EgHLTDQMCut
Definition: EgHLTDQMCut.h:27
egHLT::MonElemWithCut< T, varType >
dumpRecoGeometry_cfg.varType
varType
Definition: dumpRecoGeometry_cfg.py:8
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
egHLT::MonElemWithCutEBEE::MonElemWithCutEBEE
MonElemWithCutEBEE(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, int nrBins, float min, float max, varType(T::*varFunc)() const, const EgHLTDQMCut< T > *cut)
Definition: EgHLTMonElemWithCutEBEE.h:41
egHLT::MonElemWithCutEBEE
Definition: EgHLTMonElemWithCutEBEE.h:25
egHLT::MonElemWithCutBase
Definition: EgHLTMonElemWithCut.h:24
egHLT::MonElemWithCutEBEE::~MonElemWithCutEBEE
~MonElemWithCutEBEE() override=default
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
egHLT::MonElemWithCutEBEE::endcap_
MonElemWithCut< T, varType > endcap_
Definition: EgHLTMonElemWithCutEBEE.h:28
T
long double T
Definition: Basic3DVectorLD.h:48
PA_MinBiasSkim_cff.cut
cut
Definition: PA_MinBiasSkim_cff.py:13
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
egHLT
Definition: EgHLTBinData.h:10
weight
Definition: weight.py:1