CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTPhoHLTFilterMon.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_EGHLTPHOHLTFILTERMON
2 #define DQMOFFLINE_TRIGGER_EGHLTPHOHLTFILTERMON
3 
4 //class: EleHLTFilterMon
5 //
6 //author: Sam Harper (June 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: this object will manage all histograms associated with a particular HLT filter
12 // ie histograms for computing efficiency of each filter step, id efficiency of gsf electrons passing trigger etc
13 //
14 //implimentation:
15 //
16 //
17 
19 
20 
28 
29 #include <string>
30 
31 namespace trigger{
32  class TriggerObject;
33 }
34 
35 namespace egHLT {
36  class BinData;
37  class CutMasks;
38 
40 
41  public:
42 
43 
44  //comparision functor for PhoHLTFilterMon
45  //short for: pointer compared with string
46  struct ptrCompStr : public std::binary_function<const PhoHLTFilterMon*,const std::string&,bool> {
47  bool operator()(const PhoHLTFilterMon* lhs,const std::string& rhs){return lhs->filterName()<rhs;}
48  bool operator()(const std::string& lhs,const PhoHLTFilterMon* rhs){return lhs<rhs->filterName();}
49  };
50  //yes I am aware that such a function undoubtably exists but it was quicker to write it than look it up
51  template<class T> struct ptrLess : public std::binary_function<const T*,const T*,bool> {
52  bool operator()(const T* lhs,const T* rhs){return *lhs<*rhs;}
53  };
54 
55  private:
56  std::string filterName_;
58 
59  //we own the pointers in the vectors
60  std::vector<MonElemManagerBase<trigger::TriggerObject>*> trigMonElems_;
61  std::vector<MonElemContainer<OffPho>*> phoEffHists_;
62  std::vector<MonElemContainer<OffPho>*> phoMonElems_;
63  std::vector<MonElemContainer<OffPho>*> phoFailMonElems_;
64 
65  //we also own these pointers
70 
71  //disabling copying
73  PhoHLTFilterMon& operator=(const PhoHLTFilterMon&){return *this;}
74  public:
75  PhoHLTFilterMon(const std::string& filterName,TrigCodes::TrigBitSet filterBit,const BinData& bins,const CutMasks& masks);
77 
78 
79  void fill(const OffEvt& evt,float weight);
80 
81  //sort by filter name
82  bool operator<(const PhoHLTFilterMon& rhs)const{return filterName_<rhs.filterName_;}
83  //bool operator<(const std::string& rhs)const{return filterName_<rhs;}
84  const std::string& filterName()const{return filterName_;}
85 
86  };
87 }
88 
89 
90 
91 #endif
bool operator<(const PhoHLTFilterMon &rhs) const
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneME_
PhoHLTFilterMon(const PhoHLTFilterMon &)
bool operator()(const PhoHLTFilterMon *lhs, const std::string &rhs)
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothHighME_
std::vector< MonElemContainer< OffPho > * > phoEffHists_
std::vector< MonElemContainer< OffPho > * > phoMonElems_
bool operator()(const std::string &lhs, const PhoHLTFilterMon *rhs)
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneHighME_
std::vector< MonElemContainer< OffPho > * > phoFailMonElems_
std::vector< MonElemManagerBase< trigger::TriggerObject > * > trigMonElems_
bool operator()(const T *lhs, const T *rhs)
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothME_
const std::string & filterName() const
PhoHLTFilterMon & operator=(const PhoHLTFilterMon &)
long double T
const TrigCodes::TrigBitSet filterBit_
void fill(const OffEvt &evt, float weight)
std::bitset< maxNrBits_ > TrigBitSet
static const uint32_t masks[]
Definition: CaloRecHit.cc:12