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