37 outputFileName_ = pset.
getParameter<
string>(
"OutputFileName");
38 inputFileName_ = pset.
getParameter<std::string>(
"InputFileName");
39 isRunCentrally_= pset.
getParameter<
bool>(
"isRunCentrally");
42 etMin = parameters_.getParameter<
double>(
"etMin");
43 etMax = parameters_.getParameter<
double>(
"etMax");
44 etBin = parameters_.getParameter<
int>(
"etBin");
47 etaMin = parameters_.getParameter<
double>(
"etaMin");
48 etaMax = parameters_.getParameter<
double>(
"etaMax");
49 etaBin = parameters_.getParameter<
int>(
"etaBin");
50 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
52 phiMin = parameters_.getParameter<
double>(
"phiMin");
53 phiMax = parameters_.getParameter<
double>(
"phiMax");
54 phiBin = parameters_.getParameter<
int>(
"phiBin");
56 rMin = parameters_.getParameter<
double>(
"rMin");
57 rMax = parameters_.getParameter<
double>(
"rMax");
58 rBin = parameters_.getParameter<
int>(
"rBin");
60 zMin = parameters_.getParameter<
double>(
"zMin");
61 zMax = parameters_.getParameter<
double>(
"zMax");
62 zBin = parameters_.getParameter<
int>(
"zBin");
84 if(standAlone_) runPostprocessing();
90 if(!standAlone_) runPostprocessing();
99 std::string simInfoPathName =
"EgammaV/PhotonValidator/SimulationInfo/";
100 std::string convPathName =
"EgammaV/PhotonValidator/ConversionInfo/";
101 std::string effPathName =
"EgammaV/PhotonValidator/Efficiencies/";
102 std::string photonPathName =
"EgammaV/PhotonValidator/Photons/";
104 if(batch_)
dbe_->
open(inputFileName_);
108 string histname =
"recoEffVsEta";
109 phoRecoEffEta_ =
dbe_->
book1D(histname,
"Photon reconstruction efficiency vs simulated #eta",etaBin,
etaMin,
etaMax);
110 histname =
"recoEffVsPhi";
111 phoRecoEffPhi_ =
dbe_->
book1D(histname,
"Photon reconstruction efficiency vs simulated #phi",phiBin,
phiMin,
phiMax);
112 histname =
"recoEffVsEt";
113 phoRecoEffEt_ =
dbe_->
book1D(histname,
"Photon reconstruction efficiency vs simulated Et",etBin,
etMin,
etMax) ;
115 histname =
"deadChVsEta";
116 phoDeadChEta_ =
dbe_->
book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated #eta",etaBin,
etaMin,
etaMax);
117 histname =
"deadChVsPhi";
118 phoDeadChPhi_ =
dbe_->
book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated #phi",phiBin,
phiMin,
phiMax);
119 histname =
"deadChVsEt";
120 phoDeadChEt_ =
dbe_->
book1D(histname,
"Fraction of photons with >=1 dead Xtal vs simulated Et",etBin,
etMin,
etMax) ;
122 if ( ! isRunCentrally_ ) {
123 histname =
"convVsEt";
124 convVsEt_[0] =
dbe_->
book1D(histname+
"Barrel",
"Fraction of good conversions in R9<0.93 vs Et ",etBin,
etMin,
etMax) ;
125 convVsEt_[1] =
dbe_->
book1D(histname+
"Endcap",
"Fraction of good conversions in R9<0.93 vs Et ",etBin,
etMin,
etMax) ;
131 histname =
"convEffVsEtaTwoTracks";
134 histname =
"convEffVsPhiTwoTracks";
137 histname =
"convEffVsRTwoTracks";
138 convEffRTwoTracks_ =
dbe_->
book1D(histname,histname,rBin,rMin, rMax);
140 histname =
"convEffVsZTwoTracks";
141 convEffZTwoTracks_ =
dbe_->
book1D(histname,histname,zBin,zMin,zMax);
143 histname =
"convEffVsEtTwoTracks";
146 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
148 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
150 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
151 convEffRTwoTracksAndVtxProbGT0_ =
dbe_->
book1D(histname,histname,rBin,rMin,rMax);
152 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
153 convEffRTwoTracksAndVtxProbGT0005_ =
dbe_->
book1D(histname,histname,rBin,rMin,rMax);
155 histname =
"convEffVsEtaOneTrack";
157 histname =
"convEffVsROneTrack";
158 convEffROneTrack_ =
dbe_->
book1D(histname,histname,rBin,rMin, rMax);
159 histname =
"convEffVsEtOneTrack";
162 histname =
"convFakeRateVsEtaTwoTracks";
164 histname =
"convFakeRateVsPhiTwoTracks";
166 histname =
"convFakeRateVsRTwoTracks";
167 convFakeRateRTwoTracks_ =
dbe_->
book1D(histname,histname,rBin,rMin, rMax);
168 histname =
"convFakeRateVsZTwoTracks";
169 convFakeRateZTwoTracks_ =
dbe_->
book1D(histname,histname,zBin,zMin,zMax);
170 histname =
"convFakeRateVsEtTwoTracks";
173 histname =
"bkgEffVsEta";
174 bkgRecoEffEta_ =
dbe_->
book1D(histname,
"Bkg reconstruction efficiency vs simulated #eta",etaBin,
etaMin,
etaMax);
175 histname =
"bkgEffVsPhi";
176 bkgRecoEffPhi_ =
dbe_->
book1D(histname,
"Bkg reconstruction efficiency vs simulated #phi",phiBin,
phiMin,
phiMax);
177 histname =
"bkgEffVsEt";
178 bkgRecoEffEt_ =
dbe_->
book1D(histname,
"Bkg reconstruction efficiency vs simulated Et",etBin,
etMin,
etMax) ;
180 histname =
"deadChVsEtaBkg";
181 bkgDeadChEta_ =
dbe_->
book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated #eta",etaBin,
etaMin,
etaMax);
182 histname =
"deadChVsPhiBkg";
183 bkgDeadChPhi_ =
dbe_->
book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated #phi",phiBin,
phiMin,
phiMax);
184 histname =
"deadChVsEtBkg";
185 bkgDeadChEt_ =
dbe_->
book1D(histname,
"Fraction of bkg with >=1 dead Xtal vs simulated Et",etBin,
etMin,
etMax) ;
190 if ( ! isRunCentrally_ ) {
191 dividePlots(
dbe_->
get(effPathName+
"convVsEtBarrel"),
dbe_->
get(photonPathName+
"EtR9Less093ConvBarrel"),
dbe_->
get(photonPathName+
"EtR9Less093Barrel"),
"effic");
192 dividePlots(
dbe_->
get(effPathName+
"convVsEtEndcap"),
dbe_->
get(photonPathName+
"EtR9Less093ConvEndcap"),
dbe_->
get(photonPathName+
"EtR9Less093Endcap"),
"effic");
195 dividePlots(
dbe_->
get(effPathName+
"recoEffVsEta"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoEta"),
dbe_->
get(simInfoPathName+
"h_SimPhoEta"),
"effic");
196 dividePlots(
dbe_->
get(effPathName+
"recoEffVsPhi"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoPhi"),
dbe_->
get(simInfoPathName+
"h_SimPhoPhi"),
"effic");
197 dividePlots(
dbe_->
get(effPathName+
"recoEffVsEt"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoEt"),
dbe_->
get(simInfoPathName+
"h_SimPhoEt"),
"effic");
199 dividePlots(
dbe_->
get(effPathName+
"deadChVsEta"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoBadChEta"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoEta"),
"effic");
200 dividePlots(
dbe_->
get(effPathName+
"deadChVsPhi"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoBadChPhi"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoPhi"),
"effic");
201 dividePlots(
dbe_->
get(effPathName+
"deadChVsEt"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoBadChEt"),
dbe_->
get(simInfoPathName+
"h_MatchedSimPhoEt"),
"effic");
204 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEta"),
"effic");
205 dividePlots(
dbe_->
get(effPathName+
"convEffVsPhiTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksPhi"),
dbe_->
get(simInfoPathName+
"h_VisSimConvPhi"),
"effic");
206 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
dbe_->
get(simInfoPathName+
"h_VisSimConvR"),
"effic");
207 dividePlots(
dbe_->
get(effPathName+
"convEffVsZTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksZ"),
dbe_->
get(simInfoPathName+
"h_VisSimConvZ"),
"effic");
208 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtTwoTracks"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEt"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEt"),
"effic");
209 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
210 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
211 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
212 dividePlots(
dbe_->
get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0005"),
dbe_->
get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
214 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtaOneTrack"),
dbe_->
get(simInfoPathName+
"h_SimConvOneMTracksEta"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEta"),
"effic");
215 dividePlots(
dbe_->
get(effPathName+
"convEffVsROneTrack"),
dbe_->
get(simInfoPathName+
"h_SimConvOneMTracksR"),
dbe_->
get(simInfoPathName+
"h_VisSimConvR"),
"effic");
216 dividePlots(
dbe_->
get(effPathName+
"convEffVsEtOneTrack"),
dbe_->
get(simInfoPathName+
"h_SimConvOneMTracksEt"),
dbe_->
get(simInfoPathName+
"h_VisSimConvEt"),
"effic");
218 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsEtaTwoTracks"),
dbe_->
get(convPathName+
"h_RecoConvTwoMTracksEta"),
dbe_->
get(convPathName+
"h_RecoConvTwoTracksEta"),
"fakerate");
219 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsPhiTwoTracks"),
dbe_->
get(convPathName+
"h_RecoConvTwoMTracksPhi"),
dbe_->
get(convPathName+
"h_RecoConvTwoTracksPhi"),
"fakerate");
220 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsRTwoTracks"),
dbe_->
get(convPathName+
"h_RecoConvTwoMTracksR"),
dbe_->
get(convPathName+
"h_RecoConvTwoTracksR"),
"fakerate");
221 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsZTwoTracks"),
dbe_->
get(convPathName+
"h_RecoConvTwoMTracksZ"),
dbe_->
get(convPathName+
"h_RecoConvTwoTracksZ"),
"fakerate");
222 dividePlots(
dbe_->
get(effPathName+
"convFakeRateVsEtTwoTracks"),
dbe_->
get(convPathName+
"h_RecoConvTwoMTracksEt"),
dbe_->
get(convPathName+
"h_RecoConvTwoTracksEt"),
"fakerate");
225 dividePlots(
dbe_->
get(effPathName+
"bkgEffVsEta"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetEta"),
dbe_->
get(simInfoPathName+
"h_SimJetEta"),
"effic");
226 dividePlots(
dbe_->
get(effPathName+
"bkgEffVsPhi"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetPhi"),
dbe_->
get(simInfoPathName+
"h_SimJetPhi"),
"effic");
227 dividePlots(
dbe_->
get(effPathName+
"bkgEffVsEt"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetEt"),
dbe_->
get(simInfoPathName+
"h_SimJetEt"),
"effic");
229 dividePlots(
dbe_->
get(effPathName+
"deadChVsEtaBkg"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetBadChEta"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetEta"),
"effic");
230 dividePlots(
dbe_->
get(effPathName+
"deadChVsPhiBkg"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetBadChPhi"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetPhi"),
"effic");
231 dividePlots(
dbe_->
get(effPathName+
"deadChVsEtBkg"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetBadChEt"),
dbe_->
get(simInfoPathName+
"h_MatchedSimJetEt"),
"effic");
235 if(standAlone_)
dbe_->
save(outputFileName_);
236 else if(batch_)
dbe_->
save(inputFileName_);
258 else if (type==
"fakerate")
282 err =
sqrt( value*(1-value) / denominator);
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setVerbose(unsigned level)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
PhotonPostprocessing(const edm::ParameterSet &pset)
bool etMin(const PFCandidate &cand, double cut)
virtual ~PhotonPostprocessing()
virtual void runPostprocessing()
double getBinContent(int binx) const
get content of bin (1-D)
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator, std::string type)
int getNbinsX(void) const
get # of bins in X-axis
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void setCurrentFolder(const std::string &fullpath)
virtual void analyze(const edm::Event &, const edm::EventSetup &)