CMS 3D CMS Logo

MonElemFuncs.cc

Go to the documentation of this file.
00001 #include "DQMOffline/Trigger/interface/MonElemFuncs.h"
00002 
00003 #include "DQMOffline/Trigger/interface/MonElemMgrEBEE.h"
00004 #include "DQMOffline/Trigger/interface/CutCodes.h"
00005 #include "DQMOffline/Trigger/interface/EgHLTDQMCut.h"
00006 #include "DQMOffline/Trigger/interface/MonElemWithCutEBEE.h"
00007 
00008 void MonElemFuncs::initStdEleHists(std::vector<MonElemManagerBase<EgHLTOffEle>*>& histVec,const std::string& baseName)
00009 {
00010   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_et",baseName+" E_{T};E_{T} (GeV)",11,-10.,100.,&EgHLTOffEle::et));
00011   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_eta",baseName+" #eta;#eta",54,-2.7,2.7,&EgHLTOffEle::detEta));             
00012   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_phi",baseName+" #phi;#phi (rad)",50,-3.14,3.14,&EgHLTOffEle::phi));
00013   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,int>(baseName+"_charge",baseName+" Charge; charge",2,-1.5,1.5,&EgHLTOffEle::charge));
00014   
00015   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_hOverE",baseName+" H/E; H/E",60,-0.05,0.25,&EgHLTOffEle::hOverE));
00016   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_dPhiIn",baseName+" #Delta #phi_{in}; #Delta #phi_{in}",50,-0.15,0.15,&EgHLTOffEle::dPhiIn));
00017   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_dEtaIn",baseName+" #Delta #eta_{in}; #Delta #eta_{in}",50,-0.02,0.02,&EgHLTOffEle::dEtaIn));
00018   histVec.push_back(new MonElemMgrEBEE<EgHLTOffEle,float>(baseName+"_sigmaEtaEta",baseName+" #sigma_{#eta#eta} ; #sigma_{#eta#eta}",60,-0.01,0.05,&EgHLTOffEle::sigmaEtaEta));
00019   histVec.push_back(new MonElemManager2D<EgHLTOffEle,float,float>(baseName+"_etaVsPhi",baseName+" #eta vs #phi;#eta;#phi (rad)",54,-2.7,2.7,50,-3.14,3.14,&EgHLTOffEle::detEta,&EgHLTOffEle::phi));
00020   //histVec.push_back(new MonElemManager2D<EgHLTOffEle,float,float>(baseName+"_sigEtaEtaVsEta",baseName+" #sigma_{#eta#eta} vs #eta;#eta;#sigma_{#eta#eta}",60,-0.01,0.05,54,-2.7,2.7,&EgHLTOffEle::sigmaEtaEta,&EgHLTOffEle::detEta));
00021 }
00022 
00023 
00024 void MonElemFuncs::initStdEffHists(std::vector<MonElemWithCutBase<EgHLTOffEle>*>& histVec,const std::string& baseName,int nrBins,double xMin,double xMax,float (EgHLTOffEle::*vsVarFunc)()const)
00025 {
00026   //some convience typedefs, I hate typedefs but atleast here where they are defined is obvious
00027   typedef EgHLTDQMVarCut<EgHLTOffEle> VarCut;
00028   typedef MonElemWithCutEBEE<EgHLTOffEle,float> MonElemFloat;
00029   int stdCutCode = CutCodes::getCode("detEta:crack:sigmaEtaEta:hadem:dPhiIn:dEtaIn"); //will have it non hardcoded at a latter date
00030   //first do the zero and all cuts histograms
00031   histVec.push_back(new MonElemFloat(baseName+"_noCuts",baseName+" NoCuts",nrBins,xMin,xMax,vsVarFunc));
00032   histVec.push_back(new MonElemFloat(baseName+"_allCuts",baseName+" All Cuts",nrBins,xMin,xMax,vsVarFunc,
00033                                      new VarCut(stdCutCode,&EgHLTOffEle::cutCode))); 
00034   //now the single histograms
00035   histVec.push_back(new MonElemFloat(baseName+"_single_hOverE",baseName+" Single H/E",nrBins,xMin,xMax,vsVarFunc,
00036                                      new VarCut(CutCodes::HADEM,&EgHLTOffEle::cutCode)));
00037   histVec.push_back(new MonElemFloat(baseName+"_single_dEtaIn",baseName+" Single #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
00038                                      new VarCut(CutCodes::DETAIN,&EgHLTOffEle::cutCode)));
00039   histVec.push_back(new MonElemFloat(baseName+"_single_dPhiIn",baseName+" Single #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
00040                                      new VarCut(CutCodes::DPHIIN,&EgHLTOffEle::cutCode)));
00041   histVec.push_back(new MonElemFloat(baseName+"_single_sigmaEtaEta",baseName+" Single #sigma_{#eta#eta}",nrBins,xMin,xMax,vsVarFunc,
00042                                      new VarCut(CutCodes::SIGMAETAETA,&EgHLTOffEle::cutCode)));
00043   //now for the n-1
00044   histVec.push_back(new MonElemFloat(baseName+"_n1_dEtaIn",baseName+" N1 #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
00045                                      new VarCut(~CutCodes::DETAIN&stdCutCode,&EgHLTOffEle::cutCode)));
00046   histVec.push_back(new MonElemFloat(baseName+"_n1_dPhiIn",baseName+" N1 #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
00047                                      new VarCut(~CutCodes::DPHIIN&stdCutCode,&EgHLTOffEle::cutCode)));
00048   histVec.push_back(new MonElemFloat(baseName+"_n1_sigmaEtaEta",baseName+" N1 #sigma_{#eta#eta}",nrBins,xMin,xMax,vsVarFunc,
00049                                      new VarCut(~CutCodes::SIGMAETAETA&stdCutCode,&EgHLTOffEle::cutCode)));
00050   histVec.push_back(new MonElemFloat(baseName+"_n1_hOverE",baseName+" N1 H/E",nrBins,xMin,xMax,vsVarFunc,
00051                                      new VarCut(~CutCodes::HADEM &stdCutCode,&EgHLTOffEle::cutCode)));
00052 }
00053 
00054 //we own the passed in cut, so we give it to the first mon element and then clone it after that
00055 void MonElemFuncs::initStdEleCutHists(std::vector<MonElemWithCutBase<EgHLTOffEle>*>& histVec,const std::string& baseName,EgHLTDQMCut<EgHLTOffEle>* cut)
00056 {
00057   histVec.push_back(new MonElemWithCutEBEE<EgHLTOffEle,float>(baseName+"_et",baseName+" E_{T};E_{T} (GeV)",11,-10.,100.,&EgHLTOffEle::et,cut));
00058   histVec.push_back(new MonElemWithCutEBEE<EgHLTOffEle,float>(baseName+"_eta",baseName+" #eta;#eta",12,-3,3,&EgHLTOffEle::detEta,cut ? cut->clone(): NULL));            
00059   histVec.push_back(new MonElemWithCutEBEE<EgHLTOffEle,float>(baseName+"_phi",baseName+" #phi;#phi (rad)",8,-3.14,3.14,&EgHLTOffEle::phi,cut ? cut->clone():NULL));
00060   histVec.push_back(new MonElemWithCutEBEE<EgHLTOffEle,int>(baseName+"_charge",baseName+" Charge; charge",2,-1.5,1.5,&EgHLTOffEle::charge,cut ? cut->clone():NULL));
00061   
00062  
00063 }

Generated on Tue Jun 9 17:34:10 2009 for CMSSW by  doxygen 1.5.4