50 verbosity_ =
pset.getUntrackedParameter<
int>(
"Verbosity");
53 gsfElectronCollectionProducer_ =
pset.getParameter<
std::string>(
"gsfElectronProducer");
54 gsfElectronCollection_ =
pset.getParameter<
std::string>(
"gsfElectronCollection");
56 conversionCollectionProducer_ =
pset.getParameter<
std::string>(
"convProducer");
57 conversionCollection_ =
pset.getParameter<
std::string>(
"conversionCollection");
60 consumes<reco::GsfElectronCollection>(
edm::InputTag(gsfElectronCollectionProducer_, gsfElectronCollection_));
62 consumes<reco::ConversionCollection>(
edm::InputTag(conversionCollectionProducer_, conversionCollection_));
64 isRunCentrally_ =
pset.getParameter<
bool>(
"isRunCentrally");
66 elePtMin_ =
pset.getParameter<
double>(
"elePtMin");
67 eleExpectedHitsInnerMax_ =
pset.getParameter<
int>(
"eleExpectedHitsInnerMax");
68 eleD0Max_ =
pset.getParameter<
double>(
"eleD0Max");
69 offline_pvToken_ = consumes<reco::VertexCollection>(
83 double ptMin = parameters_.getParameter<
double>(
"ptMin");
84 double ptMax = parameters_.getParameter<
double>(
"ptMax");
85 int ptBin = parameters_.getParameter<
int>(
"ptBin");
87 double trackptMin = parameters_.getParameter<
double>(
"trackptMin");
88 double trackptMax = parameters_.getParameter<
double>(
"trackptMax");
89 int trackptBin = parameters_.getParameter<
int>(
"trackptBin");
91 double etaMin = parameters_.getParameter<
double>(
"etaMin");
92 double etaMax = parameters_.getParameter<
double>(
"etaMax");
93 int etaBin = parameters_.getParameter<
int>(
"etaBin");
97 int phiBin = parameters_.getParameter<
int>(
"phiBin");
99 double rhoMin = parameters_.getParameter<
double>(
"rhoMin");
100 double rhoMax = parameters_.getParameter<
double>(
"rhoMax");
101 int rhoBin = parameters_.getParameter<
int>(
"rhoBin");
103 double zMin = parameters_.getParameter<
double>(
"zMin");
104 double zMax = parameters_.getParameter<
double>(
"zMax");
105 int zBin = parameters_.getParameter<
int>(
"zBin");
133 h_convProb_ = ibooker.
book1D(
"convProb",
"# of Electrons", 100, 0.0, 1.0);
139 h_convLog10TrailTrackpt_ = ibooker.
book1D(
"convLog10TrailTrackpt",
"# of Electrons",
ptBin, -2.0, 3.0);
141 h_convLeadTrackAlgo_ = ibooker.
book1D(
143 h_convTrailTrackAlgo_ = ibooker.
book1D(
151 LogInfo(
"ElectronConversionRejectionValidator")
152 <<
"ElectronConversionRejectionValidator Analyzing event number: " <<
e.id() <<
" Global Counter " << nEvt_
157 e.getByToken(convToken_, convHandle);
159 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Conversion collection " << std::endl;
165 e.getByToken(gsfElecToken_, gsfElectronHandle);
167 if (!gsfElectronHandle.
isValid()) {
168 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Electron collection " << std::endl;
174 e.getByToken(offline_pvToken_, vertexHandle);
176 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product primary Vertex Collection "
183 e.getByToken(beamspotToken_, bsHandle);
185 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product beamspot Collection "
197 if (iele->pt() < elePtMin_)
200 eleExpectedHitsInnerMax_)
206 h_elePtAll_->Fill(iele->pt());
207 h_eleEtaAll_->Fill(iele->eta());
208 h_elePhiAll_->Fill(iele->phi());
213 if (
conv ==
nullptr) {
214 h_elePtPass_->Fill(iele->pt());
215 h_eleEtaPass_->Fill(iele->eta());
216 h_elePhiPass_->Fill(iele->phi());
224 h_elePtFail_->Fill(iele->pt());
225 h_eleEtaFail_->Fill(iele->eta());
226 h_elePhiFail_->Fill(iele->phi());
230 h_convPt_->Fill(convmom.rho());
231 h_convEta_->Fill(convmom.eta());
232 h_convPhi_->Fill(convmom.phi());
233 h_convRho_->Fill(
conv->conversionVertex().position().rho());
234 h_convZ_->Fill(
conv->conversionVertex().position().z());
238 if (
conv->tracks().size() < 2)
246 if (tk1->
pt() >= tk2->
pt()) {
253 h_convLeadTrackpt_->Fill(tklead->
pt());
254 h_convTrailTrackpt_->Fill(tktrail->
pt());
255 h_convLog10TrailTrackpt_->Fill(log10(tktrail->
pt()));
256 h_convLeadTrackAlgo_->Fill(tklead->
algo());
257 h_convTrailTrackAlgo_->Fill(tktrail->
algo());