CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
egHLT::PhoHLTFilterMon Class Reference

#include <EgHLTPhoHLTFilterMon.h>

Classes

struct  ptrCompStr
 
struct  ptrLess
 

Public Member Functions

void fill (const OffEvt &evt, float weight)
 
const std::string & filterName () const
 
bool operator< (const PhoHLTFilterMon &rhs) const
 
 PhoHLTFilterMon (MonElemFuncs &monElemFuncs, const std::string &filterName, TrigCodes::TrigBitSet filterBit, const BinData &bins, const CutMasks &masks)
 
 ~PhoHLTFilterMon ()
 

Private Member Functions

PhoHLTFilterMonoperator= (const PhoHLTFilterMon &)
 
 PhoHLTFilterMon (const PhoHLTFilterMon &)
 

Private Attributes

MonElemManagerBase
< ParticlePair< OffPho > > * 
diPhoMassBothHighME_
 
MonElemManagerBase
< ParticlePair< OffPho > > * 
diPhoMassBothME_
 
MonElemManagerBase
< ParticlePair< OffPho > > * 
diPhoMassOnlyOneHighME_
 
MonElemManagerBase
< ParticlePair< OffPho > > * 
diPhoMassOnlyOneME_
 
const TrigCodes::TrigBitSet filterBit_
 
std::string filterName_
 
std::vector< MonElemContainer
< OffPho > * > 
phoEffHists_
 
std::vector< MonElemContainer
< OffPho > * > 
phoFailMonElems_
 
std::vector< MonElemContainer
< OffPho > * > 
phoMonElems_
 
std::vector
< MonElemManagerBase
< trigger::TriggerObject > * > 
trigMonElems_
 

Detailed Description

Definition at line 40 of file EgHLTPhoHLTFilterMon.h.

Constructor & Destructor Documentation

egHLT::PhoHLTFilterMon::PhoHLTFilterMon ( const PhoHLTFilterMon )
inlineprivate

Definition at line 73 of file EgHLTPhoHLTFilterMon.h.

73 {}
PhoHLTFilterMon::PhoHLTFilterMon ( MonElemFuncs monElemFuncs,
const std::string &  filterName,
TrigCodes::TrigBitSet  filterBit,
const BinData bins,
const CutMasks masks 
)

Definition at line 14 of file EgHLTPhoHLTFilterMon.cc.

References diPhoMassBothHighME_, diPhoMassBothME_, diPhoMassOnlyOneHighME_, diPhoMassOnlyOneME_, egHLT::BinData::et, egHLT::OffPho::et(), egHLT::BinData::eta, egHLT::OffPho::eta(), filterName_, egHLT::MonElemFuncs::getIB(), i, egHLT::MonElemFuncs::initStdEffHists(), egHLT::MonElemFuncs::initStdPhoHists(), egHLT::BinData::mass, egHLT::BinData::massHigh, egHLT::BinData::Data1D::max, egHLT::BinData::Data1D::min, mergeVDriftHistosByStation::name, egHLT::BinData::Data1D::nr, phoEffHists_, phoFailMonElems_, and phoMonElems_.

14  :
16  filterBit_(filterBit)
17 {
18  bool monHLTFailedPho=false;
19  bool doN1andSingleEffsPho=false;
20 
21  phoMonElems_.push_back(new MonElemContainer<OffPho>());
22  //phoMonElems_.push_back(new MonElemContainer<OffPho>("_cut"," cut, debug hists ",new EgHLTDQMVarCut<OffPho>(~0x0,&OffPho::cutCode)));
23  for(size_t i=0;i<phoMonElems_.size();i++){
24  monElemFuncs.initStdPhoHists(phoMonElems_[i]->monElems(),filterName_,filterName_+"_pho_passFilter"+phoMonElems_[i]->name(),bins);
25  }
26 
27  if(monHLTFailedPho) phoFailMonElems_.push_back(new MonElemContainer<OffPho>());
28  for(size_t i=0;i<phoFailMonElems_.size();i++){
29  monElemFuncs.initStdPhoHists(phoFailMonElems_[i]->monElems(),filterName_,filterName_+"_pho_failFilter"+phoMonElems_[i]->name(),bins);
30  }
31 
32  phoEffHists_.push_back(new MonElemContainer<OffPho>());
33  // phoEffHists_.push_back(new MonElemContainer<OffPho>("_jetTag"," Tag and Probe ",new EgJetB2BCut<OffPho>(-M_PI/12,M_PI/12,0.3)));
34  if(doN1andSingleEffsPho){
35  for(size_t i=0;i<phoEffHists_.size();i++){
36  monElemFuncs.initStdEffHists(phoEffHists_[i]->cutMonElems(),filterName_,
37  filterName_+"_pho_effVsEt"+phoEffHists_[i]->name(),bins.et,&OffPho::et,masks);
38  monElemFuncs.initStdEffHists(phoEffHists_[i]->cutMonElems(),filterName_,
39  filterName_+"_pho_effVsEta"+phoEffHists_[i]->name(),bins.eta,&OffPho::eta,masks);
40  /* monElemFuncs.initStdEffHists(phoEffHists_[i]->cutMonElems(),filterName_,
41  filterName_+"_pho_effVsPhi"+phoEffHists_[i]->name(),bins.phi,&OffPho::phi,masks);*/
42  }
43  }
44  typedef MonElemManager<ParticlePair<OffPho>,float > DiPhoMon;
45  diPhoMassBothME_ = new DiPhoMon(monElemFuncs.getIB(), filterName_+"_diPho_bothPassFilter_mass",
46  filterName_+"_diPho_bothPassFilter Mass;M_{#gamma#gamma} (GeV/c^{2})",
48  diPhoMassOnlyOneME_ = new DiPhoMon(monElemFuncs.getIB(), filterName_+"_diPho_onlyOnePassFilter_mass",
49  filterName_+"_diPho_onlyOnePassFilter Mass;M_{#gamma#gamma} (GeV/c^{2})",
51  diPhoMassBothHighME_ = new DiPhoMon(monElemFuncs.getIB(), filterName_+"_diPho_bothPassFilter_massHigh",
52  filterName_+"_diPho_bothPassFilter Mass;M_{#gamma#gamma} (GeV/c^{2})",
54  diPhoMassOnlyOneHighME_ = new DiPhoMon(monElemFuncs.getIB(), filterName_+"_diPho_onlyOnePassFilter_massHigh",
55  filterName_+"_diPho_onlyOnePassFilter Mass;M_{#gamma#gamma} (GeV/c^{2})",
57 
58 }
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneME_
int i
Definition: DBlmapReader.cc:9
void initStdPhoHists(std::vector< MonElemManagerBase< OffPho > * > &histVec, const std::string &filterName, const std::string &baseName, const BinData &bins)
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothHighME_
float et() const
Definition: EgHLTOffPho.h:101
std::vector< MonElemContainer< OffPho > * > phoEffHists_
std::vector< MonElemContainer< OffPho > * > phoMonElems_
float eta() const
Definition: EgHLTOffPho.h:104
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneHighME_
std::vector< MonElemContainer< OffPho > * > phoFailMonElems_
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothME_
const std::string & filterName() const
DQMStore::IBooker & getIB()
const TrigCodes::TrigBitSet filterBit_
void initStdEffHists(std::vector< MonElemWithCutBase< OffEle > * > &histVec, const std::string &filterName, const std::string &baseName, int nrBins, double xMin, double xMax, float(OffEle::*vsVarFunc)() const, const CutMasks &masks)
PhoHLTFilterMon::~PhoHLTFilterMon ( )

Definition at line 60 of file EgHLTPhoHLTFilterMon.cc.

References diPhoMassBothHighME_, diPhoMassBothME_, diPhoMassOnlyOneHighME_, diPhoMassOnlyOneME_, i, phoEffHists_, phoFailMonElems_, and phoMonElems_.

61 {
62  for(size_t i=0;i<phoMonElems_.size();i++) delete phoMonElems_[i];
63  for(size_t i=0;i<phoFailMonElems_.size();i++) delete phoFailMonElems_[i];
64  for(size_t i=0;i<phoEffHists_.size();i++) delete phoEffHists_[i];
65  delete diPhoMassBothME_;
66  delete diPhoMassOnlyOneME_;
67  delete diPhoMassBothHighME_;
69 }
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneME_
int i
Definition: DBlmapReader.cc:9
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothHighME_
std::vector< MonElemContainer< OffPho > * > phoEffHists_
std::vector< MonElemContainer< OffPho > * > phoMonElems_
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneHighME_
std::vector< MonElemContainer< OffPho > * > phoFailMonElems_
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothME_

Member Function Documentation

void PhoHLTFilterMon::fill ( const OffEvt evt,
float  weight 
)

Definition at line 72 of file EgHLTPhoHLTFilterMon.cc.

References diPhoMassBothME_, diPhoMassOnlyOneME_, egHLT::OffEvt::evtTrigBits(), fill(), filterBit_, phoEffHists_, phoFailMonElems_, phoMonElems_, egHLT::OffEvt::phos(), and egHLT::OffPho::trigBits().

Referenced by fill().

73 {
74  for(size_t phoNr=0;phoNr<evt.phos().size();phoNr++){
75  const OffPho& pho = evt.phos()[phoNr];
76  if((pho.trigBits()&filterBit_)!=0){ //pho passes
77  for(size_t monElemNr=0;monElemNr<phoMonElems_.size();monElemNr++) phoMonElems_[monElemNr]->fill(pho,evt,weight);
78  for(size_t monElemNr=0;monElemNr<phoEffHists_.size();monElemNr++) phoEffHists_[monElemNr]->fill(pho,evt,weight);
79  }else { //pho didnt pass trigger
80  for(size_t monElemNr=0;monElemNr<phoFailMonElems_.size();monElemNr++) phoFailMonElems_[monElemNr]->fill(pho,evt,weight);
81  }
82  }//end loop over photons
83 
84 
85 
86  if((evt.evtTrigBits()&filterBit_)!=0){
87  for(size_t pho1Nr=0;pho1Nr<evt.phos().size();pho1Nr++){
88  for(size_t pho2Nr=pho1Nr+1;pho2Nr<evt.phos().size();pho2Nr++){
89  const OffPho& pho1 = evt.phos()[pho1Nr];
90  const OffPho& pho2 = evt.phos()[pho2Nr];
91 
92  if((pho1.trigBits()&pho2.trigBits()&filterBit_)==filterBit_) diPhoMassBothME_->fill(ParticlePair<OffPho>(pho1,pho2),weight);
93  else if((pho1.trigBits()&filterBit_)==filterBit_ ||
94  (pho2.trigBits()&filterBit_)==filterBit_){
96  }
97 
98  }//end inner pho loop
99  }//end outer pho loop
100  }//end check if filter is present
101 }
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassOnlyOneME_
std::vector< MonElemContainer< OffPho > * > phoEffHists_
std::vector< MonElemContainer< OffPho > * > phoMonElems_
TrigCodes::TrigBitSet trigBits() const
Definition: EgHLTOffPho.h:155
std::vector< MonElemContainer< OffPho > * > phoFailMonElems_
TrigCodes::TrigBitSet evtTrigBits() const
Definition: EgHLTOffEvt.h:50
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:48
MonElemManagerBase< ParticlePair< OffPho > > * diPhoMassBothME_
const TrigCodes::TrigBitSet filterBit_
void fill(const OffEvt &evt, float weight)
const std::string& egHLT::PhoHLTFilterMon::filterName ( ) const
inline

Definition at line 85 of file EgHLTPhoHLTFilterMon.h.

References filterName_.

Referenced by egHLT::PhoHLTFilterMon::ptrCompStr::operator()().

85 {return filterName_;}
bool egHLT::PhoHLTFilterMon::operator< ( const PhoHLTFilterMon rhs) const
inline

Definition at line 83 of file EgHLTPhoHLTFilterMon.h.

References filterName_.

83 {return filterName_<rhs.filterName_;}
PhoHLTFilterMon& egHLT::PhoHLTFilterMon::operator= ( const PhoHLTFilterMon )
inlineprivate

Definition at line 74 of file EgHLTPhoHLTFilterMon.h.

74 {return *this;}

Member Data Documentation

MonElemManagerBase<ParticlePair<OffPho> >* egHLT::PhoHLTFilterMon::diPhoMassBothHighME_
private

Definition at line 69 of file EgHLTPhoHLTFilterMon.h.

Referenced by PhoHLTFilterMon(), and ~PhoHLTFilterMon().

MonElemManagerBase<ParticlePair<OffPho> >* egHLT::PhoHLTFilterMon::diPhoMassBothME_
private

Definition at line 67 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill(), PhoHLTFilterMon(), and ~PhoHLTFilterMon().

MonElemManagerBase<ParticlePair<OffPho> >* egHLT::PhoHLTFilterMon::diPhoMassOnlyOneHighME_
private

Definition at line 70 of file EgHLTPhoHLTFilterMon.h.

Referenced by PhoHLTFilterMon(), and ~PhoHLTFilterMon().

MonElemManagerBase<ParticlePair<OffPho> >* egHLT::PhoHLTFilterMon::diPhoMassOnlyOneME_
private

Definition at line 68 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill(), PhoHLTFilterMon(), and ~PhoHLTFilterMon().

const TrigCodes::TrigBitSet egHLT::PhoHLTFilterMon::filterBit_
private

Definition at line 58 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill().

std::string egHLT::PhoHLTFilterMon::filterName_
private

Definition at line 57 of file EgHLTPhoHLTFilterMon.h.

Referenced by filterName(), operator<(), and PhoHLTFilterMon().

std::vector<MonElemContainer<OffPho>*> egHLT::PhoHLTFilterMon::phoEffHists_
private

Definition at line 62 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill(), PhoHLTFilterMon(), and ~PhoHLTFilterMon().

std::vector<MonElemContainer<OffPho>*> egHLT::PhoHLTFilterMon::phoFailMonElems_
private

Definition at line 64 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill(), PhoHLTFilterMon(), and ~PhoHLTFilterMon().

std::vector<MonElemContainer<OffPho>*> egHLT::PhoHLTFilterMon::phoMonElems_
private

Definition at line 63 of file EgHLTPhoHLTFilterMon.h.

Referenced by fill(), PhoHLTFilterMon(), and ~PhoHLTFilterMon().

std::vector<MonElemManagerBase<trigger::TriggerObject>*> egHLT::PhoHLTFilterMon::trigMonElems_
private

Definition at line 61 of file EgHLTPhoHLTFilterMon.h.