34 outputFileName_ = pset.
getParameter<
string>(
"OutputFileName");
38 etMin = parameters_.getParameter<
double>(
"etMin");
39 etMax = parameters_.getParameter<
double>(
"etMax");
40 etBin = parameters_.getParameter<
int>(
"etBin");
42 etaMin = parameters_.getParameter<
double>(
"etaMin");
43 etaMax = parameters_.getParameter<
double>(
"etaMax");
44 etaBin = parameters_.getParameter<
int>(
"etaBin");
45 etaBin2 = parameters_.getParameter<
int>(
"etaBin2");
47 phiMin = parameters_.getParameter<
double>(
"phiMin");
48 phiMax = parameters_.getParameter<
double>(
"phiMax");
49 phiBin = parameters_.getParameter<
int>(
"phiBin");
51 rMin = parameters_.getParameter<
double>(
"rMin");
52 rMax = parameters_.getParameter<
double>(
"rMax");
53 rBin = parameters_.getParameter<
int>(
"rBin");
55 zMin = parameters_.getParameter<
double>(
"zMin");
56 zMax = parameters_.getParameter<
double>(
"zMax");
57 zBin = parameters_.getParameter<
int>(
"zBin");
79 if(standAlone_) runPostprocessing();
85 if(!standAlone_) runPostprocessing();
96 std::string simInfoPathName =
"EgammaV/ConversionValidator/SimulationInfo/";
97 std::string convPathName =
"EgammaV/ConversionValidator/ConversionInfo/";
98 std::string effPathName =
"EgammaV/ConversionValidator/EfficienciesAndFakeRate/";
101 if(batch_)
dbe_->open(inputFileName_);
103 dbe_->setCurrentFolder(effPathName);
108 histname =
"convEffVsPhiTwoTracks";
111 histname =
"convEffVsRTwoTracks";
114 histname =
"convEffVsZTwoTracks";
117 histname =
"convEffVsEtTwoTracks";
120 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0";
122 histname =
"convEffVsEtaTwoTracksAndVtxProbGT0005";
124 histname =
"convEffVsRTwoTracksAndVtxProbGT0";
125 convEffRTwoTracksAndVtxProbGT0_ =
dbe_->book1D(histname,histname,
rBin,
rMin,
rMax);
126 histname =
"convEffVsRTwoTracksAndVtxProbGT0005";
127 convEffRTwoTracksAndVtxProbGT0005_ =
dbe_->book1D(histname,histname,
rBin,
rMin,
rMax);
130 histname =
"convFakeRateVsEtaTwoTracks";
132 histname =
"convFakeRateVsPhiTwoTracks";
134 histname =
"convFakeRateVsRTwoTracks";
136 histname =
"convFakeRateVsZTwoTracks";
138 histname =
"convFakeRateVsEtTwoTracks";
142 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
dbe_->get(simInfoPathName+
"h_VisSimConvEta"),
"effic");
143 dividePlots(
dbe_->get(effPathName+
"convEffVsPhiTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksPhi"),
dbe_->get(simInfoPathName+
"h_VisSimConvPhi"),
"effic");
144 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
dbe_->get(simInfoPathName+
"h_VisSimConvR"),
"effic");
145 dividePlots(
dbe_->get(effPathName+
"convEffVsZTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksZ"),
dbe_->get(simInfoPathName+
"h_VisSimConvZ"),
"effic");
146 dividePlots(
dbe_->get(effPathName+
"convEffVsEtTwoTracks"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEt"),
dbe_->get(simInfoPathName+
"h_VisSimConvEt"),
"effic");
147 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
148 dividePlots(
dbe_->get(effPathName+
"convEffVsEtaTwoTracksAndVtxProbGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEtaAndVtxPGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksEta"),
"effic");
149 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
150 dividePlots(
dbe_->get(effPathName+
"convEffVsRTwoTracksAndVtxProbGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksRAndVtxPGT0005"),
dbe_->get(simInfoPathName+
"h_SimConvTwoMTracksR"),
"effic");
154 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsEtaTwoTracks"),
dbe_->get(convPathName+
"convEtaAss2"),
dbe_->get(convPathName+
"convEta2"),
"fakerate");
155 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsPhiTwoTracks"),
dbe_->get(convPathName+
"convPhiAss"),
dbe_->get(convPathName+
"convPhi"),
"fakerate");
156 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsRTwoTracks"),
dbe_->get(convPathName+
"convRAss"),
dbe_->get(convPathName+
"convR"),
"fakerate");
157 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsZTwoTracks"),
dbe_->get(convPathName+
"convZAss"),
dbe_->get(convPathName+
"convZ"),
"fakerate");
158 dividePlots(
dbe_->get(effPathName+
"convFakeRateVsEtTwoTracks"),
dbe_->get(convPathName+
"convPtAss"),
dbe_->get(convPathName+
"convPt"),
"fakerate");
162 if(standAlone_)
dbe_->save(outputFileName_);
163 else if(batch_)
dbe_->save(inputFileName_);
174 if (dividend==
nullptr || numerator==
nullptr || denominator==
nullptr)
return;
176 for (
int j=1; j<=numerator->
getNbinsX(); j++){
181 else if (type==
"fakerate")
203 if (dividend==
nullptr || numerator==
nullptr )
return;
205 for (
int j=1; j<=numerator->
getNbinsX(); j++){
208 err =
sqrt( value*(1-value) / denominator);
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void runPostprocessing()
void analyze(const edm::Event &, const edm::EventSetup &) override
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator, std::string type)
def setup(process, global_tag, zero_tesla=False)
void endRun(const edm::Run &, const edm::EventSetup &) override
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
ConversionPostprocessing(const edm::ParameterSet &pset)
~ConversionPostprocessing() override
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX() const
get # of bins in X-axis