CMS 3D CMS Logo

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  bool ptrCompStr(const PhoHLTFilterMon* lhs,const std::string& rhs){return lhs->filterName()<rhs;}
48  bool ptrCompStr(const std::string& lhs,const PhoHLTFilterMon* rhs){return lhs<rhs->filterName();}
49  //yes I am aware that such a function undoubtably exists but it was quicker to write it than look it up
50  template<class T>
51  inline bool ptrLess(const T* lhs,const T* rhs){return *lhs<*rhs;}
52 
53  private:
56  bool doHEP_;
57  //we own the pointers in the vectors
58  std::vector<MonElemManagerBase<trigger::TriggerObject>*> trigMonElems_;
59  std::vector<MonElemContainer<OffPho>*> phoEffHists_;
60  std::vector<MonElemContainer<OffPho>*> phoMonElems_;
61  std::vector<MonElemContainer<OffPho>*> phoFailMonElems_;
62 
63  //we also own these pointers
68 
69  //disabling copying
71  PhoHLTFilterMon& operator=(const PhoHLTFilterMon&){return *this;}
72  public:
73  PhoHLTFilterMon(MonElemFuncs& monElemFuncs, std::string filterName,TrigCodes::TrigBitSet filterBit,const BinData& bins,const CutMasks& masks, bool doHEP);
74  ~PhoHLTFilterMon();
75 
76 
77  void fill(const OffEvt& evt,float weight);
78 
79  //sort by filter name
80  bool operator<(const PhoHLTFilterMon& rhs)const{return filterName_<rhs.filterName_;}
81  //bool operator<(const std::string& rhs)const{return filterName_<rhs;}
82  const std::string& filterName()const{return filterName_;}
83 
84  };
85 }
86 
87 
88 
89 #endif
bool operator<(const PhoHLTFilterMon &rhs) const
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneME_
PhoHLTFilterMon(const PhoHLTFilterMon &)
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothHighME_
std::vector< MonElemContainer< OffPho > * > phoEffHists_
Definition: weight.py:1
std::vector< MonElemContainer< OffPho > * > phoMonElems_
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneHighME_
std::vector< MonElemContainer< OffPho > * > phoFailMonElems_
bool ptrCompStr(const PhoHLTFilterMon *lhs, const std::string &rhs)
std::vector< MonElemManagerBase< trigger::TriggerObject > * > trigMonElems_
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothME_
bool ptrCompStr(const std::string &lhs, const PhoHLTFilterMon *rhs)
const std::string & filterName() const
PhoHLTFilterMon & operator=(const PhoHLTFilterMon &)
long double T
bool ptrLess(const T *lhs, const T *rhs)
std::bitset< maxNrBits_ > TrigBitSet
const TrigCodes::TrigBitSet filterBit_