CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgHLTMonElemFuncs.cc
Go to the documentation of this file.
2 
7 
8 
9 using namespace egHLT;
10 
11 void MonElemFuncs::initStdEleHists(std::vector<MonElemManagerBase<OffEle>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins)
12 {
13  addStdHist<OffEle,float>(histVec,baseName+"_energy",baseName+" reco CaloEnergy;reco CaloEnergy (GeV)",bins.energy, &OffEle::energy);
14  addStdHist<OffEle,float>(histVec,baseName+"_et",baseName+" E_{T};E_{T} (GeV)",bins.et,&OffEle::et);
15  addStdHist<OffEle,float>(histVec,baseName+"_etHigh",baseName+" E_{T};E_{T} (GeV)",bins.etHigh,&OffEle::et);
16  addStdHist<OffEle,float>(histVec,baseName+"_etSC",baseName+" E^{SC}_{T};E^{SC}_{T} (GeV)",bins.et,&OffEle::etSC);
17  addStdHist<OffEle,float>(histVec,baseName+"_eta",baseName+" #eta;#eta",bins.eta,&OffEle::detEta);
18  addStdHist<OffEle,float>(histVec,baseName+"_phi",baseName+" #phi;#phi (rad)",bins.phi,&OffEle::phi);
19  // addStdHist<OffEle,int>(histVec,baseName+"_charge",baseName+" Charge; charge",bins.charge,&OffEle::charge);
20 
21  addStdHist<OffEle,float>(histVec,baseName+"_hOverE",baseName+" H/E; H/E",bins.hOverE,&OffEle::hOverE);
22  //----Morse
23  addStdHist<OffEle,float>(histVec,baseName+"_maxr9",baseName+" MAXR9 ; MAXR9",bins.maxr9,&OffEle::r9);
24  addStdHist<OffEle,float>(histVec,baseName+"_HLTenergy",baseName+" HLT Energy;HLT Energy (GeV)",bins.HLTenergy,&OffEle::hltEnergy);
25  addStdHist<OffEle,float>(histVec,baseName+"_HLTeta",baseName+" HLT #eta;HLT #eta",bins.HLTeta,&OffEle::hltEta);
26  addStdHist<OffEle,float>(histVec,baseName+"_HLTphi",baseName+" HLT #phi;HLT #phi (rad)",bins.HLTphi,&OffEle::hltPhi);
27  //-------
28  addStdHist<OffEle,float>(histVec,baseName+"_dPhiIn",baseName+" #Delta #phi_{in}; #Delta #phi_{in}",bins.dPhiIn,&OffEle::dPhiIn);
29  addStdHist<OffEle,float>(histVec,baseName+"_dEtaIn",baseName+" #Delta #eta_{in}; #Delta #eta_{in}",bins.dEtaIn,&OffEle::dEtaIn);
30  addStdHist<OffEle,float>(histVec,baseName+"_sigmaIEtaIEta",baseName+"#sigma_{i#etai#eta}; #sigma_{i#etai#eta}",bins.sigEtaEta,&OffEle::sigmaIEtaIEta);
31  addStdHist<OffEle,float>(histVec,baseName+"_epIn",baseName+"E/p_{in}; E/p_{in}",bins.eOverP,&OffEle::epIn);
32  addStdHist<OffEle,float>(histVec,baseName+"_epOut",baseName+"E/p_{out}; E/p_{out}",bins.eOverP,&OffEle::epOut);
33  addStdHist<OffEle,float>(histVec,baseName+"_invEInvP",baseName+"1/E -1/p; 1/E - 1/p",bins.invEInvP,&OffEle::invEInvP);
34 
35  addStdHist<OffEle,float>(histVec,baseName+"_e2x5Over5x5",baseName+"E^{2x5}/E^{5x5}; E^{2x5}/E^{5x5}",bins.e2x5,&OffEle::e2x5MaxOver5x5);
36  addStdHist<OffEle,float>(histVec,baseName+"_e1x5Over5x5",baseName+"E^{1x5}/E^{5x5}; E^{1x5}/E^{5x5}",bins.e1x5,&OffEle::e1x5Over5x5);
37  // addStdHist<OffEle,float>(histVec,baseName+"_isolEM",baseName+"Isol EM; Isol EM (GeV)",bins.isolEm,&OffEle::isolEm);
38  //addStdHist<OffEle,float>(histVec,baseName+"_isolHad",baseName+"Isol Had; Isol Had (GeV)",bins.isolHad,&OffEle::isolHad);
39  //addStdHist<OffEle,float>(histVec,baseName+"_isolPtTrks",baseName+"Isol Pt Trks; Isol Pt Tracks (GeV/c)",bins.isolPtTrks,&OffEle::isolPtTrks);
40  addStdHist<OffEle,float>(histVec,baseName+"_hltIsolTrksEle",baseName+"HLT Ele Isol Trks; HLT Ele Iso Tracks (GeV/c)",bins.isolPtTrks,&OffEle::hltIsolTrksEle);
41  //addStdHist<OffEle,float>(histVec,baseName+"_hltIsolTrksPho",baseName+"HLT Pho Isol Trks; HLT Pho Iso Tracks (GeV/c)",bins.isolPtTrks,&OffEle::hltIsolTrksPho);
42  addStdHist<OffEle,float>(histVec,baseName+"_hltIsolHad",baseName+"HLT Isol Had; HLT Isol Had (GeV)",bins.isolHad,&OffEle::hltIsolHad);
43  addStdHist<OffEle,float>(histVec,baseName+"_hltIsolEm",baseName+"HLT Isol Em; HLT Isol Em (GeV)",bins.isolEm,&OffEle::hltIsolEm);
44  addStdHist<OffEle,float>(histVec,baseName+"_DeltaE",baseName+"HLT Energy - reco SC Energy;HLT Energy - reco SC Energy (GeV)",bins.deltaE,&OffEle::DeltaE);
45 
46  histVec.push_back(new MonElemManager2D<OffEle,float,float>(baseName+"_etaVsPhi",
47  baseName+" #eta vs #phi;#eta;#phi (rad)",
48  bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
49  bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
51  histVec.push_back(new MonElemManager2D<OffEle,float,float>(baseName+"_HLTetaVsHLTphi",
52  baseName+" HLT #eta vs HLT #phi;HLT #eta;HLT #phi (rad)",
53  bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
54  bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
56 }
57 
58 void MonElemFuncs::initStdPhoHists(std::vector<MonElemManagerBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins)
59 {
60  addStdHist<OffPho,float>(histVec,baseName+"_energy",baseName+" reco Energy;reco Energy (GeV)",bins.energy, &OffPho::energy);
61  addStdHist<OffPho,float>(histVec,baseName+"_et",baseName+" E_{T};E_{T} (GeV)",bins.et,&OffPho::et);
62  addStdHist<OffPho,float>(histVec,baseName+"_etHigh",baseName+" E_{T};E_{T} (GeV)",bins.etHigh,&OffPho::et);
63  addStdHist<OffPho,float>(histVec,baseName+"_etSC",baseName+" E^{SC}_{T};E^{SC}_{T} (GeV)",bins.et,&OffPho::etSC);
64  addStdHist<OffPho,float>(histVec,baseName+"_eta",baseName+" #eta;#eta",bins.eta,&OffPho::detEta);
65  addStdHist<OffPho,float>(histVec,baseName+"_phi",baseName+" #phi;#phi (rad)",bins.phi,&OffPho::phi);
66 
67  addStdHist<OffPho,float>(histVec,baseName+"_hOverE",baseName+" H/E; H/E",bins.hOverE,&OffPho::hOverE);
68  //----Morse
69  //addStdHist<OffPho,float>(histVec,baseName+"_r9",baseName+" R9 ; R9",bins.r9,&OffPho::r9);
70  //addStdHist<OffPho,float>(histVec,baseName+"_minr9",baseName+" MINR9 ; MINR9",bins.minr9,&OffPho::r9);
71  addStdHist<OffPho,float>(histVec,baseName+"_maxr9",baseName+" MAXR9 ; MAXR9",bins.maxr9,&OffPho::r9);
72  addStdHist<OffPho,float>(histVec,baseName+"_HLTenergy",baseName+" HLT Energy;HLT Energy (GeV)",bins.HLTenergy,&OffPho::hltEnergy);
73  addStdHist<OffPho,float>(histVec,baseName+"_HLTeta",baseName+" HLT #eta;HLT #eta",bins.HLTeta,&OffPho::hltEta);
74  addStdHist<OffPho,float>(histVec,baseName+"_HLTphi",baseName+" HLT #phi;HLT #phi (rad)",bins.HLTphi,&OffPho::hltPhi);
75  //-------
76  addStdHist<OffPho,float>(histVec,baseName+"_sigmaIEtaIEta",baseName+"#sigma_{i#etai#eta}; #sigma_{i#etai#eta}",bins.sigEtaEta,&OffPho::sigmaIEtaIEta);
77  addStdHist<OffPho,float>(histVec,baseName+"_e2x5Over5x5",baseName+"E^{2x5}/E^{5x5}; E^{2x5}/E^{5x5}",bins.e2x5,&OffPho::e2x5MaxOver5x5);
78  addStdHist<OffPho,float>(histVec,baseName+"_e1x5Over5x5",baseName+"E^{1x5}/E^{5x5}; E^{1x5}/E^{5x5}",bins.e1x5,&OffPho::e1x5Over5x5);
79  addStdHist<OffPho,float>(histVec,baseName+"_isolEM",baseName+"Isol EM; Isol EM (GeV)",bins.isolEm,&OffPho::isolEm);
80  addStdHist<OffPho,float>(histVec,baseName+"_isolHad",baseName+"Isol Had; Isol Had (GeV)",bins.isolHad,&OffPho::isolHad);
81  addStdHist<OffPho,float>(histVec,baseName+"_isolPtTrks",baseName+"Isol Pt Trks; Isol Pt Tracks (GeV/c)",bins.isolPtTrks,&OffPho::isolPtTrks);
82  addStdHist<OffPho,int>(histVec,baseName+"_isolNrTrks",baseName+"Isol Nr Trks; Isol Nr Tracks",bins.isolNrTrks,&OffPho::isolNrTrks);
83  // addStdHist<OffPho,float>(histVec,baseName+"_hltIsolTrks",baseName+"HLT Isol Trks; HLT Iso Tracks (GeV/c)",bins.isolPtTrks,&OffPho::hltIsolTrks);
84  //addStdHist<OffPho,float>(histVec,baseName+"_hltIsolHad",baseName+"HLT Isol Had; HLT Isol Had (GeV)",bins.isolPtTrks,&OffPho::hltIsolHad);
85  addStdHist<OffPho,float>(histVec,baseName+"_DeltaE",baseName+"HLT Energy - reco SC Energy;HLT Energy - reco SC Energy (GeV)",bins.deltaE,&OffPho::DeltaE);
86 
87  histVec.push_back(new MonElemManager2D<OffPho,float,float>(baseName+"_etaVsPhi",
88  baseName+" #eta vs #phi;#eta;#phi (rad)",
89  bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
90  bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
92  histVec.push_back(new MonElemManager2D<OffPho,float,float>(baseName+"_HLTetaVsHLTphi",
93  baseName+" HLT #eta vs HLT #phi;HLT #eta;HLT #phi (rad)",
94  bins.etaVsPhi.nrX,bins.etaVsPhi.xMin,bins.etaVsPhi.xMax,
95  bins.etaVsPhi.nrY,bins.etaVsPhi.yMin,bins.etaVsPhi.yMax,
97 }
98 
99 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)
100 {
101  initStdEffHists(histVec,filterName,baseName,bins.nr,bins.min,bins.max,vsVarFunc,masks);
102 }
103 
104 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)
105 {
106  initStdEffHists(histVec,filterName,baseName,bins.nr,bins.min,bins.max,vsVarFunc,masks);
107 }
108 
109 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)
110 {
111  //some convience typedefs, I hate typedefs but atleast here where they are defined is obvious
112  typedef EgHLTDQMVarCut<OffEle> VarCut;
113  typedef MonElemWithCutEBEE<OffEle,float> MonElemFloat;
114  int stdCutCode = masks.stdEle;
115 
116  //first do the zero and all cuts histograms
117  histVec.push_back(new MonElemFloat(baseName+"_noCuts",baseName+" NoCuts",nrBins,xMin,xMax,vsVarFunc));
118  histVec.push_back(new MonElemFloat(baseName+"_allCuts",baseName+" All Cuts",nrBins,xMin,xMax,vsVarFunc,
119  new VarCut(stdCutCode,&OffEle::cutCode)));
120 
121  //now for the n-1
122  histVec.push_back(new MonElemFloat(baseName+"_n1_dEtaIn",baseName+" N1 #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
123  new VarCut(~EgCutCodes::DETAIN&stdCutCode,&OffEle::cutCode)));
124  histVec.push_back(new MonElemFloat(baseName+"_n1_dPhiIn",baseName+" N1 #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
125  new VarCut(~EgCutCodes::DPHIIN&stdCutCode,&OffEle::cutCode)));
126  histVec.push_back(new MonElemFloat(baseName+"_n1_sigmaIEtaIEta",baseName+" N1 #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
127  new VarCut(~EgCutCodes::SIGMAIETAIETA&stdCutCode,&OffEle::cutCode)));
128  histVec.push_back(new MonElemFloat(baseName+"_n1_hOverE",baseName+" N1 H/E",nrBins,xMin,xMax,vsVarFunc,
129  new VarCut(~EgCutCodes::HADEM&stdCutCode,&OffEle::cutCode)));
130  /* histVec.push_back(new MonElemFloat(baseName+"_n1_isolEm",baseName+" N1 Isol Em",nrBins,xMin,xMax,vsVarFunc,
131  new VarCut(~EgCutCodes::ISOLEM&stdCutCode,&OffEle::cutCode)));
132  histVec.push_back(new MonElemFloat(baseName+"_n1_isolHad",baseName+" N1 Isol Had",nrBins,xMin,xMax,vsVarFunc,
133  new VarCut(~EgCutCodes::ISOLHAD&stdCutCode,&OffEle::cutCode)));
134  histVec.push_back(new MonElemFloat(baseName+"_n1_isolPtTrks",baseName+" N1 Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
135  new VarCut(~EgCutCodes::ISOLPTTRKS&stdCutCode,&OffEle::cutCode)));*/
136  histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolEm",baseName+" N1 HLT Isol Em",nrBins,xMin,xMax,vsVarFunc,
137  new VarCut(~EgCutCodes::HLTISOLEM&stdCutCode,&OffEle::cutCode)));
138  histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolHad",baseName+" N1 HLT Isol Had",nrBins,xMin,xMax,vsVarFunc,
139  new VarCut(~EgCutCodes::HLTISOLHAD&stdCutCode,&OffEle::cutCode)));
140  histVec.push_back(new MonElemFloat(baseName+"_n1_hltIsolTrksEle",baseName+" N1 HLT Isol Tracks Ele ",nrBins,xMin,xMax,vsVarFunc,
141  new VarCut(~EgCutCodes::HLTISOLTRKSELE&stdCutCode,&OffEle::cutCode)));
142  histVec.push_back(new MonElemFloat(baseName+"_single_dEtaIn",baseName+" Single #Delta#eta_{in}",nrBins,xMin,xMax,vsVarFunc,
143  new VarCut(EgCutCodes::DETAIN,&OffEle::cutCode)));
144  histVec.push_back(new MonElemFloat(baseName+"_single_dPhiIn",baseName+" Single #Delta#phi_{in}",nrBins,xMin,xMax,vsVarFunc,
145  new VarCut(EgCutCodes::DPHIIN,&OffEle::cutCode)));
146  histVec.push_back(new MonElemFloat(baseName+"_single_sigmaIEtaIEta",baseName+" Single #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
148  histVec.push_back(new MonElemFloat(baseName+"_single_hOverE",baseName+" Single H/E",nrBins,xMin,xMax,vsVarFunc,
149  new VarCut(EgCutCodes::HADEM,&OffEle::cutCode)));
150  /* histVec.push_back(new MonElemFloat(baseName+"_single_isolEm",baseName+" Single Isol Em",nrBins,xMin,xMax,vsVarFunc,
151  new VarCut(EgCutCodes::ISOLEM,&OffEle::cutCode)));
152  histVec.push_back(new MonElemFloat(baseName+"_single_isolHad",baseName+" Single Isol Had",nrBins,xMin,xMax,vsVarFunc,
153  new VarCut(EgCutCodes::ISOLHAD,&OffEle::cutCode)));
154  histVec.push_back(new MonElemFloat(baseName+"_single_isolPtTrks",baseName+" Single Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
155  new VarCut(EgCutCodes::ISOLPTTRKS,&OffEle::cutCode)));*/
156  histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolEm",baseName+" Single HLT Isol Em",nrBins,xMin,xMax,vsVarFunc,
157  new VarCut(EgCutCodes::HLTISOLEM,&OffEle::cutCode)));
158  histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolHad",baseName+" Single HLT Isol Had",nrBins,xMin,xMax,vsVarFunc,
160  histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolTrksEle",baseName+" Single HLT Isol Tracks Ele ",nrBins,xMin,xMax,vsVarFunc,
162  /*histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolTrksPho",baseName+" Single HLT Isol Tracks Pho ",nrBins,xMin,xMax,vsVarFunc,
163  new VarCut(EgCutCodes::HLTISOLTRKSPHO,&OffEle::cutCode)));*/
164 
165 }
166 
167 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)
168 {
169  //some convenience typedefs, I hate typedefs but atleast here where they are defined is obvious
170  typedef EgHLTDQMVarCut<OffPho> VarCut;
171  typedef MonElemWithCutEBEE<OffPho,float> MonElemFloat;
172  int stdCutCode = masks.stdPho;
173 
174  histVec.push_back(new MonElemFloat(baseName+"_noCuts",baseName+" NoCuts",nrBins,xMin,xMax,vsVarFunc));
175  histVec.push_back(new MonElemFloat(baseName+"_allCuts",baseName+" All Cuts",nrBins,xMin,xMax,vsVarFunc,
176  new VarCut(stdCutCode,&OffPho::cutCode)));
177 
178 
179  histVec.push_back(new MonElemFloat(baseName+"_n1_sigmaIEtaIEta",baseName+" N1 #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
180  new VarCut(~EgCutCodes::SIGMAIETAIETA&stdCutCode,&OffPho::cutCode)));
181  //-----Morse------
182  histVec.push_back(new MonElemFloat(baseName+"_n1_hOverE",baseName+" N1 H/E",nrBins,xMin,xMax,vsVarFunc,
183  new VarCut(~EgCutCodes::HADEM&stdCutCode,&OffPho::cutCode)));//---BUG FIX!!--
184  /*histVec.push_back(new MonElemFloat(baseName+"_n1_minr9",baseName+" N1 MINR9",nrBins,xMin,xMax,vsVarFunc,
185  new VarCut(~EgCutCodes::MINR9&stdCutCode,&OffPho::cutCode)));
186  histVec.push_back(new MonElemFloat(baseName+"_n1_maxr9",baseName+" N1 MAXR9",nrBins,xMin,xMax,vsVarFunc,
187  new VarCut(~EgCutCodes::MAXR9&stdCutCode,&OffPho::cutCode)));*/
188  //----------------
189  histVec.push_back(new MonElemFloat(baseName+"_n1_isolEm",baseName+" N1 Isol Em",nrBins,xMin,xMax,vsVarFunc,
190  new VarCut(~EgCutCodes::ISOLEM&stdCutCode,&OffPho::cutCode)));
191  histVec.push_back(new MonElemFloat(baseName+"_n1_isolHad",baseName+" N1 Isol Had",nrBins,xMin,xMax,vsVarFunc,
192  new VarCut(~EgCutCodes::ISOLHAD&stdCutCode,&OffPho::cutCode)));
193  histVec.push_back(new MonElemFloat(baseName+"_n1_isolPtTrks",baseName+" N1 Pt Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
194  new VarCut(~EgCutCodes::ISOLPTTRKS&stdCutCode,&OffPho::cutCode)));
195  histVec.push_back(new MonElemFloat(baseName+"_n1_isolNrTrks",baseName+" N1 Nr Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
196  new VarCut(~EgCutCodes::ISOLNRTRKS&stdCutCode,&OffPho::cutCode)));
197 
198  histVec.push_back(new MonElemFloat(baseName+"_single_hOverE",baseName+" Single H/E",nrBins,xMin,xMax,vsVarFunc,
199  new VarCut(EgCutCodes::HADEM,&OffPho::cutCode)));
200  histVec.push_back(new MonElemFloat(baseName+"_single_sigmaIEtaIEta",baseName+" Single #sigma_{i#etai#eta}",nrBins,xMin,xMax,vsVarFunc,
202  histVec.push_back(new MonElemFloat(baseName+"_single_isolEm",baseName+" Single Isol Em",nrBins,xMin,xMax,vsVarFunc,
203  new VarCut(~EgCutCodes::ISOLEM,&OffPho::cutCode)));
204  histVec.push_back(new MonElemFloat(baseName+"_single_isolHad",baseName+" Single Isol Had",nrBins,xMin,xMax,vsVarFunc,
205  new VarCut(~EgCutCodes::ISOLHAD,&OffPho::cutCode)));
206  histVec.push_back(new MonElemFloat(baseName+"_single_isolPtTrks",baseName+" Single Pt Isol Tracks",nrBins,xMin,xMax,vsVarFunc,
207  new VarCut(~EgCutCodes::ISOLPTTRKS,&OffPho::cutCode)));
208  /*histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolHad",baseName+" Single HLT Isol Had",nrBins,xMin,xMax,vsVarFunc,
209  new VarCut(EgCutCodes::HLTISOLHAD,&OffPho::cutCode)));
210  histVec.push_back(new MonElemFloat(baseName+"_single_hltIsolTrksPho",baseName+" Single HLT Isol Tracks Pho ",nrBins,xMin,xMax,vsVarFunc,
211  new VarCut(EgCutCodes::HLTISOLTRKSPHO,&OffPho::cutCode)));*/
212 
213 
214 }
215 
216 
217 //we own the passed in cut, so we give it to the first mon element and then clone it after that
218 //only currently used for trigger tag and probe
219 void MonElemFuncs::initStdEleCutHists(std::vector<MonElemWithCutBase<OffEle>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins,EgHLTDQMCut<OffEle>* cut)
220 {
221  histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_et",
222  baseName+" E_{T};E_{T} (GeV)",
223  bins.et.nr,bins.et.min,bins.et.max,&OffEle::et,cut));
224  histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_eta",
225  baseName+" #eta;#eta",
226  bins.eta.nr,bins.eta.min,bins.eta.max,
227  &OffEle::detEta,cut ? cut->clone(): NULL));
228  histVec.push_back(new MonElemWithCutEBEE<OffEle,float>(baseName+"_phi",
229  baseName+" #phi;#phi (rad)",
230  bins.phi.nr,bins.phi.min,bins.phi.max,
231  &OffEle::phi,cut ? cut->clone():NULL));
232  histVec.push_back(new MonElemWithCutEBEE<OffEle,int>(baseName+"_nVertex",
233  baseName+" nVertex;nVertex",
234  bins.nVertex.nr,bins.nVertex.min,bins.nVertex.max,
235  &OffEle::NVertex,cut ? cut->clone():NULL));
236  /* histVec.push_back(new MonElemWithCutEBEE<OffEle,int>(baseName+"_charge",
237  baseName+" Charge; charge",
238  bins.charge.nr,bins.charge.min,bins.charge.max,
239  &OffEle::charge,cut ? cut->clone():NULL)); */
240 }
241 
242 
243 void MonElemFuncs::initStdPhoCutHists(std::vector<MonElemWithCutBase<OffPho>*>& histVec,const std::string& filterName,const std::string& baseName,const BinData& bins,EgHLTDQMCut<OffPho>* cut)
244 {
245  histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_et",
246  baseName+" E_{T};E_{T} (GeV)",
247  bins.et.nr,bins.et.min,bins.et.max,&OffPho::et,cut));
248  histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_eta",
249  baseName+" #eta;#eta",
250  bins.eta.nr,bins.eta.min,bins.eta.max,
251  &OffPho::detEta,cut ? cut->clone(): NULL));
252  histVec.push_back(new MonElemWithCutEBEE<OffPho,float>(baseName+"_phi",
253  baseName+" #phi;#phi (rad)",
254  bins.phi.nr,bins.phi.min,bins.phi.max,
255  &OffPho::phi,cut ? cut->clone():NULL));
256  /* histVec.push_back(new MonElemWithCutEBEE<OffPho,int>(baseName+"_charge",
257  baseName+" Charge; charge",
258  bins.charge.nr,bins.charge.min,bins.charge.max,
259  &OffPho::charge,cut ? cut->clone():NULL)); */
260 }
261 
262 //we transfer ownership of eleCut to addTrigLooseTrigHist which transfers it to the eleMonElems
263 void MonElemFuncs::initTightLooseTrigHists(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins,EgHLTDQMCut<OffEle>* eleCut)
264 {
265  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
266  std::vector<std::string> splitString;
267  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
268  if(splitString.size()!=2) continue; //format incorrect
269  const std::string& tightTrig = splitString[0];
270  const std::string& looseTrig = splitString[1];
271  //this step is necessary as we want to transfer ownership of eleCut to the addTrigLooseTrigHist func on the last iteration
272  //but clone it before that
273  //perhaps my object ownership rules need to be re-evalulated
274  if(trigNr!=tightLooseTrigs.size()-2) addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut->clone(),"gsfEle",bins);
275  else addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle",bins);
276  }
277 }
278 
279 
280 void MonElemFuncs::initTightLooseTrigHists(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins,EgHLTDQMCut<OffPho>* phoCut)
281 {
282  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
283  std::vector<std::string> splitString;
284  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
285  if(splitString.size()!=2) continue; //format incorrect
286  const std::string& tightTrig = splitString[0];
287  const std::string& looseTrig = splitString[1];
288 
289  //this step is necessary as we want to transfer ownership of phoCut to the addTrigLooseTrigHist func on the last iteration
290  //but clone it before that
291  //perhaps my object ownership rules need to be re-evalulated
292  if(trigNr!=tightLooseTrigs.size()-2) addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut->clone(),"pho",bins);
293  else addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho",bins);
294  }
295 }
296 
297 
298 
299 
300 //there is nothing electron specific here, will template at some point
302  const std::string& tightTrig,const std::string& looseTrig,
303  EgHLTDQMCut<OffEle>* eleCut,
304  const std::string& histId,const BinData& bins)
305 {
306  MonElemContainer<OffEle>* passMonElem = NULL;
307  passMonElem = new MonElemContainer<OffEle>(tightTrig+"_"+looseTrig+"_"+histId+"_passTrig","",
308  &(*(new EgMultiCut<OffEle>) <<
309  new EgObjTrigCut<OffEle>(TrigCodes::getCode(tightTrig+":"+looseTrig),EgObjTrigCut<OffEle>::AND) <<
310  eleCut->clone()));
311 
312 
313  MonElemContainer<OffEle>* failMonElem = NULL;
314  failMonElem = new MonElemContainer<OffEle>(tightTrig+"_"+looseTrig+"_"+histId+"_failTrig","",
315  &(*(new EgMultiCut<OffEle>) <<
317  eleCut));
318 
319  MonElemFuncs::initStdEleHists(passMonElem->monElems(),tightTrig+"_"+looseTrig,passMonElem->name(),bins);
320  MonElemFuncs::initStdEleHists(failMonElem->monElems(),tightTrig+"_"+looseTrig,failMonElem->name(),bins);
321  eleMonElems.push_back(passMonElem);
322  eleMonElems.push_back(failMonElem);
323 }
324 
325 
326 //there is nothing photon specific here, will template at some point
328  const std::string& tightTrig,const std::string& looseTrig,
329  EgHLTDQMCut<OffPho>* phoCut,
330  const std::string& histId,const BinData& bins)
331 {
332  MonElemContainer<OffPho>* passMonElem = NULL;
333  passMonElem = new MonElemContainer<OffPho>(tightTrig+"_"+looseTrig+"_"+histId+"_passTrig","",
334  &(*(new EgMultiCut<OffPho>) <<
335  new EgObjTrigCut<OffPho>(TrigCodes::getCode(tightTrig+":"+looseTrig),EgObjTrigCut<OffPho>::AND) <<
336  phoCut->clone()));
337 
338 
339  MonElemContainer<OffPho>* failMonElem = NULL;
340  failMonElem = new MonElemContainer<OffPho>(tightTrig+"_"+looseTrig+"_"+histId+"_failTrig","",
341  &(*(new EgMultiCut<OffPho>) <<
343  phoCut));
344 
345  MonElemFuncs::initStdPhoHists(passMonElem->monElems(),tightTrig+"_"+looseTrig,passMonElem->name(),bins);
346  MonElemFuncs::initStdPhoHists(failMonElem->monElems(),tightTrig+"_"+looseTrig,failMonElem->name(),bins);
347  phoMonElems.push_back(passMonElem);
348  phoMonElems.push_back(failMonElem);
349 }
350 
351 
352 
353 //we transfer ownership of eleCut to the monitor elements
354 void MonElemFuncs::initTightLooseTrigHistsTrigCuts(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
355 {
356  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
357  std::vector<std::string> splitString;
358  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
359  if(splitString.size()!=2) continue; //format incorrect
360  const std::string& tightTrig = splitString[0];
361  const std::string& looseTrig = splitString[1];
363  addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle_trigCuts",bins);
364  }
365 }
366 
367 //we transfer ownership of phoCut to the monitor elements
368 void MonElemFuncs::initTightLooseTrigHistsTrigCuts(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
369 {
370  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
371  std::vector<std::string> splitString;
372  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
373  if(splitString.size()!=2) continue; //format incorrect
374  const std::string& tightTrig = splitString[0];
375  const std::string& looseTrig = splitString[1];
377  addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho_trigCuts",bins);
378  }
379 }
380 
381 
382 //we transfer ownership of eleCut to the monitor elements
383 void MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
384 {
385  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
386  std::vector<std::string> splitString;
387  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
388  if(splitString.size()!=2) continue; //format incorrect
389  const std::string& tightTrig = splitString[0];
390  const std::string& looseTrig = splitString[1];
392  addTightLooseTrigHist(eleMonElems,tightTrig,looseTrig,eleCut,"gsfEle_trigCuts",bins);
393  }
394 }
395 
396 
397 //we transfer ownership of phoCut to the monitor elements
398 void MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string>& tightLooseTrigs,const BinData& bins)
399 {
400  for(size_t trigNr=0;trigNr<tightLooseTrigs.size();trigNr++){
401  std::vector<std::string> splitString;
402  boost::split(splitString,tightLooseTrigs[trigNr],boost::is_any_of(std::string(":")));
403  if(splitString.size()!=2) continue; //format incorrect
404  const std::string& tightTrig = splitString[0];
405  const std::string& looseTrig = splitString[1];
407  addTightLooseTrigHist(phoMonElems,tightTrig,looseTrig,phoCut,"pho_trigCuts",bins);
408  }
409 }
410 
411 
412 
413 //tag and probe trigger efficiencies
414 //this is to measure the trigger efficiency with respect to a fully selected offline electron
415 //using a tag and probe technique (note: this will be different to the trigger efficiency normally calculated)
416 void MonElemFuncs::initTrigTagProbeHists(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::vector<std::string> filterNames,int cutMask,const BinData& bins)
417 {
418  for(size_t filterNr=0;filterNr<filterNames.size();filterNr++){
419 
420  std::string trigName(filterNames[filterNr]);
421  // float etCutValue = trigTools::getSecondEtThresFromName(trigName);
422  float etCutValue = 0.;
423  //std::cout<<"TrigName= "<<trigName<<" etCutValue= "<<etCutValue<<std::endl;
424  MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFiltesr"),cutMask,&OffEle::cutCode));
425  //this is all that pass trigtagprobecut
426  MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_all",bins,new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC));
427  //this is all that pass trigtagprobecut and the probe passes the test trigger
428  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)));
429  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is NOT a tag
430  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)));
431  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is also a tag
432  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) ));
433  //this is all that pass trigtagprobecut and the probe fails the test trigger
434  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)));
435  /*
436  monElemCont->monElems().push_back(new MonElemMgrEBEE<OffEle,float>(trigName+"_"+monElemCont->name()+"_gsfEle_all_etUnCut",monElemCont->name()+"_gsfEle_all E_{T} (Uncut);E_{T} (GeV)",
437  bins.et.nr,bins.et.min,bins.et.max,&OffEle::et));
438  monElemCont->cutMonElems().push_back(new MonElemWithCutEBEE<OffEle,float>(trigName+"_"+monElemCont->name()+"_gsfEle_pass_etUnCut",monElemCont->name()+"_gsfEle_pass E_{T} (Uncut);E_{T} (GeV)",
439  bins.et.nr,bins.et.min,bins.et.max,&OffEle::et,new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));*/
440  eleMonElems.push_back(monElemCont);
441  } //end filter names loop
442 
443 }
444 
445 //Only one at a time so I can set the folder
446 void MonElemFuncs::initTrigTagProbeHist(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::string filterName,int cutMask,const BinData& bins)
447 {
448  std::string trigName(filterName);
449  //float etCutValue = 1.1*trigTools::getSecondEtThresFromName(filterName);
450  float etCutValue = 0.;
451  //std::cout<<"TrigName= "<<trigName<<" etCutValue= "<<etCutValue<<std::endl;
452  MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffEle::cutCode));
453  //this is all that pass trigtagprobecut
454  MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_gsfEle_all",bins,new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC));
455  //this is all that pass trigtagprobecut and the probe passes the test trigger
456  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)));
457  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is NOT a tag
458  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)));
459  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is also a tag
460  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) ));
461  //this is all that pass trigtagprobecut and the probe fails the test trigger
462  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)));
463  /*
464  monElemCont->monElems().push_back(new MonElemMgrEBEE<OffEle,float>(trigName+"_"+monElemCont->name()+"_gsfEle_all_etUnCut",monElemCont->name()+"_gsfEle_all E_{T} (Uncut);E_{T} (GeV)",
465  bins.et.nr,bins.et.min,bins.et.max,&OffEle::et));
466  monElemCont->cutMonElems().push_back(new MonElemWithCutEBEE<OffEle,float>(trigName+"_"+monElemCont->name()+"_gsfEle_pass_etUnCut",monElemCont->name()+"_gsfEle_pass E_{T} (Uncut);E_{T} (GeV)",
467  bins.et.nr,bins.et.min,bins.et.max,&OffEle::et,new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigName),EgObjTrigCut<OffEle>::AND)));*/
468  eleMonElems.push_back(monElemCont);
469 }
470 
471 
472 void MonElemFuncs::initTrigTagProbeHist_2Leg(std::vector<MonElemContainer<OffEle>*>& eleMonElems,const std::string filterName,int cutMask,const BinData& bins)
473 {
474 
475  std::string trigNameLeg1 = filterName.substr(0,filterName.find("::"));
476  std::string trigNameLeg2 = filterName.substr(filterName.find("::")+2);
477 
478  float etCutValue = 0.;
479  MonElemContainer<OffEle>* monElemCont = new MonElemContainer<OffEle>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_New(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffEle::cutCode));
480  //this is all that pass trigtagprobecut
481  //MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigNameLeg2,trigNameLeg2+"_"+monElemCont->name()+"_gsfEle_allEt20",bins,new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC));
482  //this is all that pass trigtagprobecut and the probe passes the first trigger
483  //MonElemFuncs::initStdEleCutHists(monElemCont->cutMonElems(),trigNameLeg2,trigNameLeg2+"_"+monElemCont->name()+"_gsfEle_passEt20",bins,&(*(new EgMultiCut<OffEle>) << new EgGreaterCut<OffEle,float>(etCutValue,&OffEle::etSC) << new EgObjTrigCut<OffEle>(TrigCodes::getCode(trigNameLeg1),EgObjTrigCut<OffEle>::AND)));
484  //this is all that pass trigtagprobecut and the probe passes the second trigger and fails the first trigger
485  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)));
486 
487 }
488 
489 
490 //Now same for photons
491 void MonElemFuncs::initTrigTagProbeHists(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::vector<std::string> filterNames,int cutMask,const BinData& bins)
492 {
493  for(size_t filterNr=0;filterNr<filterNames.size();filterNr++){
494 
495  std::string trigName(filterNames[filterNr]);
496  //float etCutValue = trigTools::getSecondEtThresFromName(trigName);
497  float etCutValue = 0.;
498  //std::cout<<"TrigName= "<<trigName<<" etCutValue= "<<etCutValue<<std::endl;
499  MonElemContainer<OffPho>* monElemCont = new MonElemContainer<OffPho>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_NewPho(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffPho::cutCode));
500  //this is all that pass trigtagprobecut
501  MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_all",bins,new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC));
502  //this is all that pass trigtagprobecut and the probe passes the test trigger
503  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)));
504  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is NOT a tag
505  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)));
506  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is also a tag
507  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) ));
508  //this is all that pass trigtagprobecut and the probe fails the test trigger
509  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)));
510  /*
511  monElemCont->monElems().push_back(new MonElemMgrEBEE<OffPho,float>(trigName+"_"+monElemCont->name()+"_pho_all_etUnCut",monElemCont->name()+"_gsfEle_all E_{T} (Uncut);E_{T} (GeV)",
512  bins.et.nr,bins.et.min,bins.et.max,&OffPho::et));
513  monElemCont->cutMonElems().push_back(new MonElemWithCutEBEE<OffPho,float>(trigName+"_"+monElemCont->name()+"_pho_pass_etUnCut",monElemCont->name()+"_gsfEle_pass E_{T} (Uncut);E_{T} (GeV)",
514  bins.et.nr,bins.et.min,bins.et.max,&OffPho::et,new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));*/
515  phoMonElems.push_back(monElemCont);
516  } //end filter names loop
517 
518 }
519 
520 void MonElemFuncs::initTrigTagProbeHist(std::vector<MonElemContainer<OffPho>*>& phoMonElems,const std::string filterName,int cutMask,const BinData& bins)
521 {
522  std::string trigName(filterName);
523  //float etCutValue = 1.1*trigTools::getSecondEtThresFromName(trigName);
524  float etCutValue = 0.;
525  //std::cout<<"TrigName= "<<trigName<<" etCutValue= "<<etCutValue<<std::endl;
526  MonElemContainer<OffPho>* monElemCont = new MonElemContainer<OffPho>("trigTagProbe","Trigger Tag and Probe",new EgTrigTagProbeCut_NewPho(TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17TrackIsolFilter"),TrigCodes::getCode("hltEle32CaloIdTCaloIsoTTrkIdTTrkIsoTSC17HEDoubleFilter"),cutMask,&OffPho::cutCode));
527  //this is all that pass trigtagprobecut
528  MonElemFuncs::initStdPhoCutHists(monElemCont->cutMonElems(),trigName,trigName+"_"+monElemCont->name()+"_pho_all",bins,new EgGreaterCut<OffPho,float>(etCutValue,&OffPho::etSC));
529  //this is all that pass trigtagprobecut and the probe passes the test trigger
530  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)));
531  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is NOT a tag
532  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)));
533  //this is all that pass trigtagprobecut and the probe passes the test trigger and the probe is also a tag
534  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) ));
535  //this is all that pass trigtagprobecut and the probe fails the test trigger
536  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)));
537  /*
538  monElemCont->monElems().push_back(new MonElemMgrEBEE<OffPho,float>(trigName+"_"+monElemCont->name()+"_pho_all_etUnCut",monElemCont->name()+"_gsfEle_all E_{T} (Uncut);E_{T} (GeV)",
539  bins.et.nr,bins.et.min,bins.et.max,&OffPho::et));
540  monElemCont->cutMonElems().push_back(new MonElemWithCutEBEE<OffPho,float>(trigName+"_"+monElemCont->name()+"_pho_pass_etUnCut",monElemCont->name()+"_gsfEle_pass E_{T} (Uncut);E_{T} (GeV)",
541  bins.et.nr,bins.et.min,bins.et.max,&OffPho::et,new EgObjTrigCut<OffPho>(TrigCodes::getCode(trigName),EgObjTrigCut<OffPho>::AND)));*/
542  phoMonElems.push_back(monElemCont);
543 }
544 
545 
546 
547 
float e1x5Over5x5() const
Definition: EgHLTOffPho.h:126
float e2x5MaxOver5x5() const
Definition: EgHLTOffEle.h:157
float detEta() const
Definition: EgHLTOffEle.h:125
static TrigBitSet getCode(const std::string &descript)
Data1D isolNrTrks
Definition: EgHLTBinData.h:60
float epIn() const
Definition: EgHLTOffEle.h:148
float et() const
Definition: EgHLTOffPho.h:101
float isolHad() const
Definition: EgHLTOffPho.h:131
const std::string & name() const
float r9() const
Definition: EgHLTOffEle.h:160
float isolPtTrks() const
Definition: EgHLTOffPho.h:133
void initTightLooseTrigHists(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > &tightLooseTrigs, const BinData &bins, EgHLTDQMCut< OffEle > *eleCut)
float invEInvP() const
Definition: EgHLTOffEle.h:163
float DeltaE() const
Definition: EgHLTOffPho.h:144
#define NULL
Definition: scimark2.h:8
void initStdEleCutHists(std::vector< MonElemWithCutBase< OffEle > * > &histVec, const std::string &filterName, const std::string &baseName, const BinData &bins, EgHLTDQMCut< OffEle > *cut=NULL)
float et() const
Definition: EgHLTOffEle.h:117
void initTightLooseDiObjTrigHistsTrigCuts(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > &tightLooseTrigs, const BinData &bins)
float hltEta() const
Definition: EgHLTOffPho.h:141
float dPhiIn() const
Definition: EgHLTOffEle.h:145
int trigCutsCutCode(const TrigCodes::TrigBitSet &trigger) const
Definition: EgHLTOffPho.cc:14
void initStdEleHists(std::vector< MonElemManagerBase< OffEle > * > &histVec, const std::string &filterName, const std::string &baseName, const BinData &bins)
std::vector< std::string > splitString(const std::string &fLine)
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)
float hltEnergy() const
Definition: EgHLTOffEle.h:186
float energy() const
Definition: EgHLTOffPho.h:103
Data1D isolPtTrks
Definition: EgHLTBinData.h:59
float detEta() const
Definition: EgHLTOffPho.h:108
void initStdPhoCutHists(std::vector< MonElemWithCutBase< OffPho > * > &histVec, const std::string &filterName, const std::string &baseName, const BinData &bins, EgHLTDQMCut< OffPho > *cut=NULL)
float hOverE() const
Definition: EgHLTOffPho.h:116
float dEtaIn() const
Definition: EgHLTOffEle.h:144
float phi() const
Definition: EgHLTOffEle.h:121
float hltEta() const
Definition: EgHLTOffEle.h:185
float DeltaE() const
Definition: EgHLTOffEle.h:188
float r9() const
Definition: EgHLTOffPho.h:127
void initTrigTagProbeHists(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > filterNames, int cutMask, const BinData &bins)
float sigmaIEtaIEta() const
Definition: EgHLTOffEle.h:154
virtual EgHLTDQMCut< T > * clone() const =0
float e2x5MaxOver5x5() const
Definition: EgHLTOffPho.h:125
float hltPhi() const
Definition: EgHLTOffEle.h:184
float hltPhi() const
Definition: EgHLTOffPho.h:140
float hltIsolHad() const
Definition: EgHLTOffEle.h:175
void initTrigTagProbeHist_2Leg(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::string filterName, int cutMask, const BinData &bins)
int cutCode() const
Definition: EgHLTOffEle.h:211
float epOut() const
Definition: EgHLTOffEle.h:149
float energy() const
Definition: EgHLTOffEle.h:119
float etSC() const
Definition: EgHLTOffPho.h:106
Data1D HLTenergy
Definition: EgHLTBinData.h:52
float sigmaIEtaIEta() const
Definition: EgHLTOffPho.h:122
float etSC() const
Definition: EgHLTOffEle.h:122
Data1D sigEtaEta
Definition: EgHLTBinData.h:44
float hltIsolTrksEle() const
Definition: EgHLTOffEle.h:173
float phi() const
Definition: EgHLTOffPho.h:105
int trigCutsCutCode(const TrigCodes::TrigBitSet &trigger) const
Definition: EgHLTOffEle.cc:18
std::vector< MonElemManagerBase< T > * > & monElems()
int isolNrTrks() const
Definition: EgHLTOffPho.h:132
void addTightLooseTrigHist(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::string &tightTrig, const std::string &looseTrig, EgHLTDQMCut< OffEle > *eleCut, const std::string &histId, const BinData &bins)
int cutCode() const
Definition: EgHLTOffPho.h:147
float e1x5Over5x5() const
Definition: EgHLTOffEle.h:158
int NVertex() const
Definition: EgHLTOffEle.h:107
void initTrigTagProbeHist(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::string filterName, int cutMask, const BinData &bins)
void initStdPhoHists(std::vector< MonElemManagerBase< OffPho > * > &histVec, const std::string &filterName, const std::string &baseName, const BinData &bins)
float hOverE() const
Definition: EgHLTOffEle.h:143
double split
Definition: MVATrainer.cc:139
float isolEm() const
Definition: EgHLTOffPho.h:130
void initTightLooseTrigHistsTrigCuts(std::vector< MonElemContainer< OffEle > * > &eleMonElems, const std::vector< std::string > &tightLooseTrigs, const BinData &bins)
std::vector< MonElemWithCutBase< T > * > & cutMonElems()
float hltEnergy() const
Definition: EgHLTOffPho.h:142
float hltIsolEm() const
Definition: EgHLTOffEle.h:176
static const uint32_t masks[]
Definition: CaloRecHit.cc:12