00001 #include "DQMOffline/Trigger/interface/EgHLTMonElemFuncs.h"
00002
00003 #include "DQMOffline/Trigger/interface/EgHLTMonElemMgrEBEE.h"
00004 #include "DQMOffline/Trigger/interface/EgHLTEgCutCodes.h"
00005 #include "DQMOffline/Trigger/interface/EgHLTDQMCut.h"
00006 #include "DQMOffline/Trigger/interface/EgHLTCutMasks.h"
00007
00008
00009 using namespace egHLT;
00010
00011 void MonElemFuncs::initStdEleHists(std::vector<MonElemManagerBase<OffEle>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins)
00012 {
00013 addStdHist<OffEle,float>(histVec,baseName+"_energy",baseName+" reco CaloEnergy;reco CaloEnergy (GeV)",bins.energy, &OffEle::energy);
00014 addStdHist<OffEle,float>(histVec,baseName+"_et",baseName+" E_{T};E_{T} (GeV)",bins.et,&OffEle::et);
00015 addStdHist<OffEle,float>(histVec,baseName+"_etHigh",baseName+" E_{T};E_{T} (GeV)",bins.etHigh,&OffEle::et);
00016 addStdHist<OffEle,float>(histVec,baseName+"_etSC",baseName+" E^{SC}_{T};E^{SC}_{T} (GeV)",bins.et,&OffEle::etSC);
00017 addStdHist<OffEle,float>(histVec,baseName+"_eta",baseName+" #eta;#eta",bins.eta,&OffEle::detEta);
00018 addStdHist<OffEle,float>(histVec,baseName+"_phi",baseName+" #phi;#phi (rad)",bins.phi,&OffEle::phi);
00019
00020
00021 addStdHist<OffEle,float>(histVec,baseName+"_hOverE",baseName+" H/E; H/E",bins.hOverE,&OffEle::hOverE);
00022
00023 addStdHist<OffEle,float>(histVec,baseName+"_maxr9",baseName+" MAXR9 ; MAXR9",bins.maxr9,&OffEle::r9);
00024 addStdHist<OffEle,float>(histVec,baseName+"_HLTenergy",baseName+" HLT Energy;HLT Energy (GeV)",bins.HLTenergy,&OffEle::hltEnergy);
00025 addStdHist<OffEle,float>(histVec,baseName+"_HLTeta",baseName+" HLT #eta;HLT #eta",bins.HLTeta,&OffEle::hltEta);
00026 addStdHist<OffEle,float>(histVec,baseName+"_HLTphi",baseName+" HLT #phi;HLT #phi (rad)",bins.HLTphi,&OffEle::hltPhi);
00027
00028 addStdHist<OffEle,float>(histVec,baseName+"_dPhiIn",baseName+" #Delta #phi_{in}; #Delta #phi_{in}",bins.dPhiIn,&OffEle::dPhiIn);
00029 addStdHist<OffEle,float>(histVec,baseName+"_dEtaIn",baseName+" #Delta #eta_{in}; #Delta #eta_{in}",bins.dEtaIn,&OffEle::dEtaIn);
00030 addStdHist<OffEle,float>(histVec,baseName+"_sigmaIEtaIEta",baseName+"#sigma_{i#etai#eta}; #sigma_{i#etai#eta}",bins.sigEtaEta,&OffEle::sigmaIEtaIEta);
00031 addStdHist<OffEle,float>(histVec,baseName+"_epIn",baseName+"E/p_{in}; E/p_{in}",bins.eOverP,&OffEle::epIn);
00032 addStdHist<OffEle,float>(histVec,baseName+"_epOut",baseName+"E/p_{out}; E/p_{out}",bins.eOverP,&OffEle::epOut);
00033 addStdHist<OffEle,float>(histVec,baseName+"_invEInvP",baseName+"1/E -1/p; 1/E - 1/p",bins.invEInvP,&OffEle::invEInvP);
00034
00035 addStdHist<OffEle,float>(histVec,baseName+"_e2x5Over5x5",baseName+"E^{2x5}/E^{5x5}; E^{2x5}/E^{5x5}",bins.e2x5,&OffEle::e2x5MaxOver5x5);
00036 addStdHist<OffEle,float>(histVec,baseName+"_e1x5Over5x5",baseName+"E^{1x5}/E^{5x5}; E^{1x5}/E^{5x5}",bins.e1x5,&OffEle::e1x5Over5x5);
00037
00038
00039
00040 addStdHist<OffEle,float>(histVec,baseName+"_hltIsolTrksEle",baseName+"HLT Ele Isol Trks; HLT Ele Iso Tracks (GeV/c)",bins.isolPtTrks,&OffEle::hltIsolTrksEle);
00041
00042 addStdHist<OffEle,float>(histVec,baseName+"_hltIsolHad",baseName+"HLT Isol Had; HLT Isol Had (GeV)",bins.isolHad,&OffEle::hltIsolHad);
00043 addStdHist<OffEle,float>(histVec,baseName+"_hltIsolEm",baseName+"HLT Isol Em; HLT Isol Em (GeV)",bins.isolEm,&OffEle::hltIsolEm);
00044 addStdHist<OffEle,float>(histVec,baseName+"_DeltaE",baseName+"HLT Energy - reco SC Energy;HLT Energy - reco SC Energy (GeV)",bins.deltaE,&OffEle::DeltaE);
00045
00046 histVec.push_back(new MonElemManager2D<OffEle,float,float>(baseName+"_etaVsPhi",
00047 baseName+" #eta vs #phi;#eta;#phi (rad)",
00048 bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
00049 bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
00050 &OffEle::detEta,&OffEle::phi));
00051 histVec.push_back(new MonElemManager2D<OffEle,float,float>(baseName+"_HLTetaVsHLTphi",
00052 baseName+" HLT #eta vs HLT #phi;HLT #eta;HLT #phi (rad)",
00053 bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
00054 bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
00055 &OffEle::hltEta,&OffEle::hltPhi));
00056 }
00057
00058 void MonElemFuncs::initStdPhoHists(std::vector<MonElemManagerBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins)
00059 {
00060 addStdHist<OffPho,float>(histVec,baseName+"_energy",baseName+" reco Energy;reco Energy (GeV)",bins.energy, &OffPho::energy);
00061 addStdHist<OffPho,float>(histVec,baseName+"_et",baseName+" E_{T};E_{T} (GeV)",bins.et,&OffPho::et);
00062 addStdHist<OffPho,float>(histVec,baseName+"_etHigh",baseName+" E_{T};E_{T} (GeV)",bins.etHigh,&OffPho::et);
00063 addStdHist<OffPho,float>(histVec,baseName+"_etSC",baseName+" E^{SC}_{T};E^{SC}_{T} (GeV)",bins.et,&OffPho::etSC);
00064 addStdHist<OffPho,float>(histVec,baseName+"_eta",baseName+" #eta;#eta",bins.eta,&OffPho::detEta);
00065 addStdHist<OffPho,float>(histVec,baseName+"_phi",baseName+" #phi;#phi (rad)",bins.phi,&OffPho::phi);
00066
00067 addStdHist<OffPho,float>(histVec,baseName+"_hOverE",baseName+" H/E; H/E",bins.hOverE,&OffPho::hOverE);
00068
00069
00070
00071 addStdHist<OffPho,float>(histVec,baseName+"_maxr9",baseName+" MAXR9 ; MAXR9",bins.maxr9,&OffPho::r9);
00072 addStdHist<OffPho,float>(histVec,baseName+"_HLTenergy",baseName+" HLT Energy;HLT Energy (GeV)",bins.HLTenergy,&OffPho::hltEnergy);
00073 addStdHist<OffPho,float>(histVec,baseName+"_HLTeta",baseName+" HLT #eta;HLT #eta",bins.HLTeta,&OffPho::hltEta);
00074 addStdHist<OffPho,float>(histVec,baseName+"_HLTphi",baseName+" HLT #phi;HLT #phi (rad)",bins.HLTphi,&OffPho::hltPhi);
00075
00076 addStdHist<OffPho,float>(histVec,baseName+"_sigmaIEtaIEta",baseName+"#sigma_{i#etai#eta}; #sigma_{i#etai#eta}",bins.sigEtaEta,&OffPho::sigmaIEtaIEta);
00077 addStdHist<OffPho,float>(histVec,baseName+"_e2x5Over5x5",baseName+"E^{2x5}/E^{5x5}; E^{2x5}/E^{5x5}",bins.e2x5,&OffPho::e2x5MaxOver5x5);
00078 addStdHist<OffPho,float>(histVec,baseName+"_e1x5Over5x5",baseName+"E^{1x5}/E^{5x5}; E^{1x5}/E^{5x5}",bins.e1x5,&OffPho::e1x5Over5x5);
00079 addStdHist<OffPho,float>(histVec,baseName+"_isolEM",baseName+"Isol EM; Isol EM (GeV)",bins.isolEm,&OffPho::isolEm);
00080 addStdHist<OffPho,float>(histVec,baseName+"_isolHad",baseName+"Isol Had; Isol Had (GeV)",bins.isolHad,&OffPho::isolHad);
00081 addStdHist<OffPho,float>(histVec,baseName+"_isolPtTrks",baseName+"Isol Pt Trks; Isol Pt Tracks (GeV/c)",bins.isolPtTrks,&OffPho::isolPtTrks);
00082 addStdHist<OffPho,int>(histVec,baseName+"_isolNrTrks",baseName+"Isol Nr Trks; Isol Nr Tracks",bins.isolNrTrks,&OffPho::isolNrTrks);
00083
00084
00085 addStdHist<OffPho,float>(histVec,baseName+"_DeltaE",baseName+"HLT Energy - reco SC Energy;HLT Energy - reco SC Energy (GeV)",bins.deltaE,&OffPho::DeltaE);
00086
00087 histVec.push_back(new MonElemManager2D<OffPho,float,float>(baseName+"_etaVsPhi",
00088 baseName+" #eta vs #phi;#eta;#phi (rad)",
00089 bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
00090 bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
00091 &OffPho::detEta,&OffPho::phi));
00092 histVec.push_back(new MonElemManager2D<OffPho,float,float>(baseName+"_HLTetaVsHLTphi",
00093 baseName+" HLT #eta vs HLT #phi;HLT #eta;HLT #phi (rad)",
00094 bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
00095 bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
00096 &OffPho::hltEta,&OffPho::hltPhi));
00097 }
00098
00099 void MonElemFuncs::initStdEffHists(std::vector<MonElemWithCutBase<OffEle>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData::Data1D& bins,float (OffEle::*vsVarFunc)()const,const CutMasks& masks)
00100 {
00101 initStdEffHists(histVec,filterName,baseName,bins.nr,bins.min,bins.max,vsVarFunc,masks);
00102 }
00103
00104 void MonElemFuncs::initStdEffHists(std::vector<MonElemWithCutBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData::Data1D& bins,float (OffPho::*vsVarFunc)()const,const CutMasks& masks)
00105 {
00106 initStdEffHists(histVec,filterName,baseName,bins.nr,bins.min,bins.max,vsVarFunc,masks);
00107 }
00108
00109 void MonElemFuncs::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)
00110 {
00111
00112 typedef EgHLTDQMVarCut<OffEle> VarCut;
00113 typedef MonElemWithCutEBEE<OffEle,float> MonElemFloat;
00114 int stdCutCode = masks.stdEle;
00115
00116
00117 histVec.push_back(new MonElemFloat(baseName+"_noCuts",baseName+" NoCuts",nrBins,xMin,xMax,vsVarFunc));
00118 histVec.push_back(new MonElemFloat(baseName+"_allCuts",baseName+" All Cuts",nrBins,xMin,xMax,vsVarFunc,
00119 new VarCut(stdCutCode,&OffEle::cutCode)));
00120
00121
00122 histVec.push_back(new MonElemFloat(baseName+"_n1_dEtaIn",baseName+" N1 #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
00123 new VarCut(~EgCutCodes::DETAIN&stdCutCode,&OffEle::cutCode)));
00124 histVec.push_back(new MonElemFloat(baseName+"_n1_dPhiIn",baseName+" N1 #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
00125 new VarCut(~EgCutCodes::DPHIIN&stdCutCode,&OffEle::cutCode)));
00126 histVec.push_back(new MonElemFloat(baseName+"_n1_sigmaIEtaIEta",baseName+" N1 #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
00127 new VarCut(~EgCutCodes::SIGMAIETAIETA&stdCutCode,&OffEle::cutCode)));
00128 histVec.push_back(new MonElemFloat(baseName+"_n1_hOverE",baseName+" N1 H/E",nrBins,xMin,xMax,vsVarFunc,
00129 new VarCut(~EgCutCodes::HADEM&stdCutCode,&OffEle::cutCode)));
00130
00131
00132
00133
00134
00135
00136 histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolEm",baseName+" N1 HLT Isol Em",nrBins,xMin,xMax,vsVarFunc,
00137 new VarCut(~EgCutCodes::HLTISOLEM&stdCutCode,&OffEle::cutCode)));
00138 histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolHad",baseName+" N1 HLT Isol Had",nrBins,xMin,xMax,vsVarFunc,
00139 new VarCut(~EgCutCodes::HLTISOLHAD&stdCutCode,&OffEle::cutCode)));
00140 histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolTrksEle",baseName+" N1 HLT Isol Tracks Ele ",nrBins,xMin,xMax,vsVarFunc,
00141 new VarCut(~EgCutCodes::HLTISOLTRKSELE&stdCutCode,&OffEle::cutCode)));
00142 histVec.push_back(new MonElemFloat(baseName+"_single_dEtaIn",baseName+" Single #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
00143 new VarCut(EgCutCodes::DETAIN,&OffEle::cutCode)));
00144 histVec.push_back(new MonElemFloat(baseName+"_single_dPhiIn",baseName+" Single #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
00145 new VarCut(EgCutCodes::DPHIIN,&OffEle::cutCode)));
00146 histVec.push_back(new MonElemFloat(baseName+"_single_sigmaIEtaIEta",baseName+" Single #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
00147 new VarCut(EgCutCodes::SIGMAIETAIETA,&OffEle::cutCode)));
00148 histVec.push_back(new MonElemFloat(baseName+"_single_hOverE",baseName+" Single H/E",nrBins,xMin,xMax,vsVarFunc,
00149 new VarCut(EgCutCodes::HADEM,&OffEle::cutCode)));
00150
00151
00152
00153
00154
00155
00156 histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolEm",baseName+" Single HLT Isol Em",nrBins,xMin,xMax,vsVarFunc,
00157 new VarCut(EgCutCodes::HLTISOLEM,&OffEle::cutCode)));
00158 histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolHad",baseName+" Single HLT Isol Had",nrBins,xMin,xMax,vsVarFunc,
00159 new VarCut(EgCutCodes::HLTISOLHAD,&OffEle::cutCode)));
00160 histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolTrksEle",baseName+" Single HLT Isol Tracks Ele ",nrBins,xMin,xMax,vsVarFunc,
00161 new VarCut(EgCutCodes::HLTISOLTRKSELE,&OffEle::cutCode)));
00162
00163
00164
00165 }
00166
00167 void MonElemFuncs::initStdEffHists(std::vector<MonElemWithCutBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,int nrBins,double xMin,double xMax,float (OffPho::*vsVarFunc)()const,const CutMasks& masks)
00168 {
00169
00170 typedef EgHLTDQMVarCut<OffPho> VarCut;
00171 typedef MonElemWithCutEBEE<OffPho,float> MonElemFloat;
00172 int stdCutCode = masks.stdPho;
00173
00174 histVec.push_back(new MonElemFloat(baseName+"_noCuts",baseName+" NoCuts",nrBins,xMin,xMax,vsVarFunc));
00175 histVec.push_back(new MonElemFloat(baseName+"_allCuts",baseName+" All Cuts",nrBins,xMin,xMax,vsVarFunc,
00176 new VarCut(stdCutCode,&OffPho::cutCode)));
00177
00178
00179 histVec.push_back(new MonElemFloat(baseName+"_n1_sigmaIEtaIEta",baseName+" N1 #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
00180 new VarCut(~EgCutCodes::SIGMAIETAIETA&stdCutCode,&OffPho::cutCode)));
00181
00182 histVec.push_back(new MonElemFloat(baseName+"_n1_hOverE",baseName+" N1 H/E",nrBins,xMin,xMax,vsVarFunc,
00183 new VarCut(~EgCutCodes::HADEM&stdCutCode,&OffPho::cutCode)));
00184
00185
00186
00187
00188
00189 histVec.push_back(new MonElemFloat(baseName+"_n1_isolEm",baseName+" N1 Isol Em",nrBins,xMin,xMax,vsVarFunc,
00190 new VarCut(~EgCutCodes::ISOLEM&stdCutCode,&OffPho::cutCode)));
00191 histVec.push_back(new MonElemFloat(baseName+"_n1_isolHad",baseName+" N1 Isol Had",nrBins,xMin,xMax,vsVarFunc,
00192 new VarCut(~EgCutCodes::ISOLHAD&stdCutCode,&OffPho::cutCode)));
00193 histVec.push_back(new MonElemFloat(baseName+"_n1_isolPtTrks",baseName+" N1 Pt Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
00194 new VarCut(~EgCutCodes::ISOLPTTRKS&stdCutCode,&OffPho::cutCode)));
00195 histVec.push_back(new MonElemFloat(baseName+"_n1_isolNrTrks",baseName+" N1 Nr Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
00196 new VarCut(~EgCutCodes::ISOLNRTRKS&stdCutCode,&OffPho::cutCode)));
00197
00198 histVec.push_back(new MonElemFloat(baseName+"_single_hOverE",baseName+" Single H/E",nrBins,xMin,xMax,vsVarFunc,
00199 new VarCut(EgCutCodes::HADEM,&OffPho::cutCode)));
00200 histVec.push_back(new MonElemFloat(baseName+"_single_sigmaIEtaIEta",baseName+" Single #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
00201 new VarCut(EgCutCodes::SIGMAIETAIETA,&OffPho::cutCode)));
00202 histVec.push_back(new MonElemFloat(baseName+"_single_isolEm",baseName+" Single Isol Em",nrBins,xMin,xMax,vsVarFunc,
00203 new VarCut(~EgCutCodes::ISOLEM,&OffPho::cutCode)));
00204 histVec.push_back(new MonElemFloat(baseName+"_single_isolHad",baseName+" Single Isol Had",nrBins,xMin,xMax,vsVarFunc,
00205 new VarCut(~EgCutCodes::ISOLHAD,&OffPho::cutCode)));
00206 histVec.push_back(new MonElemFloat(baseName+"_single_isolPtTrks",baseName+" Single Pt Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
00207 new VarCut(~EgCutCodes::ISOLPTTRKS,&OffPho::cutCode)));
00208
00209
00210
00211
00212
00213
00214 }
00215
00216
00217
00218
00219 void MonElemFuncs::initStdEleCutHists(std::vector<MonElemWithCutBase<OffEle>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins,EgHLTDQMCut<OffEle>* cut)
00220 {
00221 histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_et",
00222 baseName+" E_{T};E_{T} (GeV)",
00223 bins.et.nr,bins.et.min,bins.et.max,&OffEle::et,cut));
00224 histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_eta",
00225 baseName+" #eta;#eta",
00226 bins.eta.nr,bins.eta.min,bins.eta.max,
00227 &OffEle::detEta,cut ? cut->clone(): NULL));
00228 histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_phi",
00229 baseName+" #phi;#phi (rad)",
00230 bins.phi.nr,bins.phi.min,bins.phi.max,
00231 &OffEle::phi,cut ? cut->clone():NULL));
00232 histVec.push_back(new MonElemWithCutEBEE<OffEle,int>(baseName+"_nVertex",
00233 baseName+" nVertex;nVertex",
00234 bins.nVertex.nr,bins.nVertex.min,bins.nVertex.max,
00235 &OffEle::NVertex,cut ? cut->clone():NULL));
00236
00237
00238
00239
00240 }
00241
00242
00243 void MonElemFuncs::initStdPhoCutHists(std::vector<MonElemWithCutBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins,EgHLTDQMCut<OffPho>* cut)
00244 {
00245 histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_et",
00246 baseName+" E_{T};E_{T} (GeV)",
00247 bins.et.nr,bins.et.min,bins.et.max,&OffPho::et,cut));
00248 histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_eta",
00249 baseName+" #eta;#eta",
00250 bins.eta.nr,bins.eta.min,bins.eta.max,
00251 &OffPho::detEta,cut ? cut->clone(): NULL));
00252 histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_phi",
00253 baseName+" #phi;#phi (rad)",
00254 bins.phi.nr,bins.phi.min,bins.phi.max,
00255 &OffPho::phi,cut ? cut->clone():NULL));
00256
00257
00258
00259
00260 }
00261
00262
00263 void MonElemFuncs::initTightLooseTrigHists(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins,EgHLTDQMCut<OffEle>* eleCut)
00264 {
00265 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00266 std::vector<std::string> splitString;
00267 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00268 if(splitString.size()!=2) continue;
00269 const std::string& tightTrig = splitString[0];
00270 const std::string& looseTrig = splitString[1];
00271
00272
00273
00274 if(trigNr!=tightLooseTrigs.size()-2) addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut->clone(),"gsfEle",bins);
00275 else addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle",bins);
00276 }
00277 }
00278
00279
00280 void MonElemFuncs::initTightLooseTrigHists(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins,EgHLTDQMCut<OffPho>* phoCut)
00281 {
00282 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00283 std::vector<std::string> splitString;
00284 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00285 if(splitString.size()!=2) continue;
00286 const std::string& tightTrig = splitString[0];
00287 const std::string& looseTrig = splitString[1];
00288
00289
00290
00291
00292 if(trigNr!=tightLooseTrigs.size()-2) addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut->clone(),"pho",bins);
00293 else addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho",bins);
00294 }
00295 }
00296
00297
00298
00299
00300
00301 void MonElemFuncs::addTightLooseTrigHist(std::vector<MonElemContainer<OffEle>*>& eleMonElems,
00302 const std::string& tightTrig,const std::string& looseTrig,
00303 EgHLTDQMCut<OffEle>* eleCut,
00304 const std::string& histId,const BinData& bins)
00305 {
00306 MonElemContainer<OffEle>* passMonElem = NULL;
00307 passMonElem = new MonElemContainer<OffEle>(tightTrig+"_"+looseTrig+"_"+histId+"_passTrig","",
00308 &(*(new EgMultiCut<OffEle>) <<
00309 new EgObjTrigCut<OffEle>(TrigCodes::getCode(tightTrig+":"+looseTrig),EgObjTrigCut<OffEle>::AND) <<
00310 eleCut->clone()));
00311
00312
00313 MonElemContainer<OffEle>* failMonElem = NULL;
00314 failMonElem = new MonElemContainer<OffEle>(tightTrig+"_"+looseTrig+"_"+histId+"_failTrig","",
00315 &(*(new EgMultiCut<OffEle>) <<
00316 new EgObjTrigCut<OffEle>(TrigCodes::getCode(looseTrig),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode(tightTrig)) <<
00317 eleCut));
00318
00319 MonElemFuncs::initStdEleHists(passMonElem->monElems(),tightTrig+"_"+looseTrig,passMonElem->name(),bins);
00320 MonElemFuncs::initStdEleHists(failMonElem->monElems(),tightTrig+"_"+looseTrig,failMonElem->name(),bins);
00321 eleMonElems.push_back(passMonElem);
00322 eleMonElems.push_back(failMonElem);
00323 }
00324
00325
00326
00327 void MonElemFuncs::addTightLooseTrigHist(std::vector<MonElemContainer<OffPho>*>& phoMonElems,
00328 const std::string& tightTrig,const std::string& looseTrig,
00329 EgHLTDQMCut<OffPho>* phoCut,
00330 const std::string& histId,const BinData& bins)
00331 {
00332 MonElemContainer<OffPho>* passMonElem = NULL;
00333 passMonElem = new MonElemContainer<OffPho>(tightTrig+"_"+looseTrig+"_"+histId+"_passTrig","",
00334 &(*(new EgMultiCut<OffPho>) <<
00335 new EgObjTrigCut<OffPho>(TrigCodes::getCode(tightTrig+":"+looseTrig),EgObjTrigCut<OffPho>::AND) <<
00336 phoCut->clone()));
00337
00338
00339 MonElemContainer<OffPho>* failMonElem = NULL;
00340 failMonElem = new MonElemContainer<OffPho>(tightTrig+"_"+looseTrig+"_"+histId+"_failTrig","",
00341 &(*(new EgMultiCut<OffPho>) <<
00342 new EgObjTrigCut<OffPho>(TrigCodes::getCode(looseTrig),EgObjTrigCut<OffPho>::AND,TrigCodes::getCode(tightTrig)) <<
00343 phoCut));
00344
00345 MonElemFuncs::initStdPhoHists(passMonElem->monElems(),tightTrig+"_"+looseTrig,passMonElem->name(),bins);
00346 MonElemFuncs::initStdPhoHists(failMonElem->monElems(),tightTrig+"_"+looseTrig,failMonElem->name(),bins);
00347 phoMonElems.push_back(passMonElem);
00348 phoMonElems.push_back(failMonElem);
00349 }
00350
00351
00352
00353
00354 void MonElemFuncs::initTightLooseTrigHistsTrigCuts(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
00355 {
00356 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00357 std::vector<std::string> splitString;
00358 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00359 if(splitString.size()!=2) continue;
00360 const std::string& tightTrig = splitString[0];
00361 const std::string& looseTrig = splitString[1];
00362 EgHLTDQMCut<OffEle>* eleCut = new EgHLTDQMUserVarCut<OffEle,TrigCodes::TrigBitSet>(&OffEle::trigCutsCutCode,TrigCodes::getCode(tightTrig));
00363 addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle_trigCuts",bins);
00364 }
00365 }
00366
00367
00368 void MonElemFuncs::initTightLooseTrigHistsTrigCuts(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
00369 {
00370 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00371 std::vector<std::string> splitString;
00372 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00373 if(splitString.size()!=2) continue;
00374 const std::string& tightTrig = splitString[0];
00375 const std::string& looseTrig = splitString[1];
00376 EgHLTDQMCut<OffPho>* phoCut = new EgHLTDQMUserVarCut<OffPho,TrigCodes::TrigBitSet>(&OffPho::trigCutsCutCode,TrigCodes::getCode(tightTrig));
00377 addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho_trigCuts",bins);
00378 }
00379 }
00380
00381
00382
00383 void MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
00384 {
00385 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00386 std::vector<std::string> splitString;
00387 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00388 if(splitString.size()!=2) continue;
00389 const std::string& tightTrig = splitString[0];
00390 const std::string& looseTrig = splitString[1];
00391 EgHLTDQMCut<OffEle>* eleCut = new EgDiEleUserCut<TrigCodes::TrigBitSet>(&OffEle::trigCutsCutCode,TrigCodes::getCode(tightTrig));
00392 addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle_trigCuts",bins);
00393 }
00394 }
00395
00396
00397
00398 void MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
00399 {
00400 for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
00401 std::vector<std::string> splitString;
00402 boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
00403 if(splitString.size()!=2) continue;
00404 const std::string& tightTrig = splitString[0];
00405 const std::string& looseTrig = splitString[1];
00406 EgHLTDQMCut<OffPho>* phoCut = new EgDiPhoUserCut<TrigCodes::TrigBitSet>(&OffPho::trigCutsCutCode,TrigCodes::getCode(tightTrig));
00407 addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho_trigCuts",bins);
00408 }
00409 }
00410
00411
00412
00413
00414
00415
00416 void MonElemFuncs::initTrigTagProbeHists(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string> filterNames,int cutMask,const BinData& bins)
00417 {
00418 for(size_t filterNr=0;filterNr<filterNames.size();filterNr++){
00419
00420 std::string trigName(filterNames[filterNr]);
00421
00422 float etCutValue = 0.;
00423
00424 MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFiltesr"),cutMask,&OffEle::cutCode));
00425
00426 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_all",bins,new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC));
00427
00428 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_pass",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));
00429
00430 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_passNotTag",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffEle>::AND)));
00431
00432 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_passTagTag",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND) << new EgObjTrigCut<OffEle>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffEle>::AND) ));
00433
00434 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_fail",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));
00435
00436
00437
00438
00439
00440 eleMonElems.push_back(monElemCont);
00441 }
00442
00443 }
00444
00445
00446 void MonElemFuncs::initTrigTagProbeHist(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::string filterName,int cutMask,const BinData& bins)
00447 {
00448 std::string trigName(filterName);
00449
00450 float etCutValue = 0.;
00451
00452 MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffEle::cutCode));
00453
00454 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_all",bins,new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC));
00455
00456 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_pass",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));
00457
00458 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_passNotTag",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffEle>::AND)));
00459
00460 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_passTagTag",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND) << new EgObjTrigCut<OffEle>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffEle>::AND) ));
00461
00462 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_fail",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));
00463
00464
00465
00466
00467
00468 eleMonElems.push_back(monElemCont);
00469 }
00470
00471
00472 void MonElemFuncs::initTrigTagProbeHist_2Leg(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::string filterName,int cutMask,const BinData& bins)
00473 {
00474
00475 std::string trigNameLeg1 = filterName.substr(0,filterName.find("::"));
00476 std::string trigNameLeg2 = filterName.substr(filterName.find("::")+2);
00477
00478 float etCutValue = 0.;
00479 MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffEle::cutCode));
00480
00481
00482
00483
00484
00485 MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigNameLeg2,trigNameLeg2+"_"+monElemCont->name()+"_gsfEle_passLeg2failLeg1",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigNameLeg2),EgObjTrigCut<OffEle>::AND,TrigCodes::getCode(trigNameLeg1),EgObjTrigCut<OffEle>::AND)));
00486
00487 }
00488
00489
00490
00491 void MonElemFuncs::initTrigTagProbeHists(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string> filterNames,int cutMask,const BinData& bins)
00492 {
00493 for(size_t filterNr=0;filterNr<filterNames.size();filterNr++){
00494
00495 std::string trigName(filterNames[filterNr]);
00496
00497 float etCutValue = 0.;
00498
00499 MonElemContainer<OffPho>* monElemCont = new MonElemContainer<OffPho>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_NewPho(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffPho::cutCode));
00500
00501 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_all",bins,new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC));
00502
00503 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_pass",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));
00504
00505 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_passNotTag",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND,TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffPho>::AND)));
00506
00507 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_passTagTag",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND) << new EgObjTrigCut<OffPho>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffPho>::AND) ));
00508
00509 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_fail",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),EgObjTrigCut<OffPho>::AND,TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));
00510
00511
00512
00513
00514
00515 phoMonElems.push_back(monElemCont);
00516 }
00517
00518 }
00519
00520 void MonElemFuncs::initTrigTagProbeHist(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::string filterName,int cutMask,const BinData& bins)
00521 {
00522 std::string trigName(filterName);
00523
00524 float etCutValue = 0.;
00525
00526 MonElemContainer<OffPho>* monElemCont = new MonElemContainer<OffPho>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_NewPho(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffPho::cutCode));
00527
00528 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_all",bins,new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC));
00529
00530 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_pass",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));
00531
00532 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_passNotTag",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND,TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffPho>::AND)));
00533
00534 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_passTagTag",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND) << new EgObjTrigCut<OffPho>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),EgObjTrigCut<OffPho>::AND) ));
00535
00536 MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_fail",bins,&(*(new EgMultiCut<OffPho>) << new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC) << new EgObjTrigCut<OffPho>(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),EgObjTrigCut<OffPho>::AND,TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));
00537
00538
00539
00540
00541
00542 phoMonElems.push_back(monElemCont);
00543 }
00544
00545
00546
00547