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 
29 
30 #include <string>
31 
32 namespace trigger{
33  class TriggerObject;
34 }
35 
36 namespace egHLT {
37  struct BinData;
38  struct CutMasks;
39 
41 
42  public:
43 
44 
45  //comparision functor for PhoHLTFilterMon
46  //short for: pointer compared with string
47  struct ptrCompStr : public std::binary_function<const PhoHLTFilterMon*,const std::string&,bool> {
48  bool operator()(const PhoHLTFilterMon* lhs,const std::string& rhs){return lhs->filterName()<rhs;}
49  bool operator()(const std::string& lhs,const PhoHLTFilterMon* rhs){return lhs<rhs->filterName();}
50  };
51  //yes I am aware that such a function undoubtably exists but it was quicker to write it than look it up
52  template<class T> struct ptrLess : public std::binary_function<const T*,const T*,bool> {
53  bool operator()(const T* lhs,const T* rhs){return *lhs<*rhs;}
54  };
55 
56  private:
59 
60  //we own the pointers in the vectors
61  std::vector<MonElemManagerBase<trigger::TriggerObject>*> trigMonElems_;
62  std::vector<MonElemContainer<OffPho>*> phoEffHists_;
63  std::vector<MonElemContainer<OffPho>*> phoMonElems_;
64  std::vector<MonElemContainer<OffPho>*> phoFailMonElems_;
65 
66  //we also own these pointers
71 
72  //disabling copying
74  PhoHLTFilterMon& operator=(const PhoHLTFilterMon&){return *this;}
75  public:
76  PhoHLTFilterMon(MonElemFuncs& monElemFuncs, const std::string& filterName,TrigCodes::TrigBitSet filterBit,const BinData& bins,const CutMasks& masks);
78 
79 
80  void fill(const OffEvt& evt,float weight);
81 
82  //sort by filter name
83  bool operator<(const PhoHLTFilterMon& rhs)const{return filterName_<rhs.filterName_;}
84  //bool operator<(const std::string& rhs)const{return filterName_<rhs;}
85  const std::string& filterName()const{return filterName_;}
86 
87  };
88 }
89 
90 
91 
92 #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