43 verbosity_ =
pset.getUntrackedParameter<
int>(
"Verbosity");
46 gsfElectronCollectionProducer_ =
pset.getParameter<
std::string>(
"gsfElectronProducer");
47 gsfElectronCollection_ =
pset.getParameter<
std::string>(
"gsfElectronCollection");
49 conversionCollectionProducer_ =
pset.getParameter<
std::string>(
"convProducer");
50 conversionCollection_ =
pset.getParameter<
std::string>(
"conversionCollection");
53 consumes<reco::GsfElectronCollection>(
edm::InputTag(gsfElectronCollectionProducer_, gsfElectronCollection_));
55 consumes<reco::ConversionCollection>(
edm::InputTag(conversionCollectionProducer_, conversionCollection_));
57 isRunCentrally_ =
pset.getParameter<
bool>(
"isRunCentrally");
59 elePtMin_ =
pset.getParameter<
double>(
"elePtMin");
60 eleExpectedHitsInnerMax_ =
pset.getParameter<
int>(
"eleExpectedHitsInnerMax");
61 eleD0Max_ =
pset.getParameter<
double>(
"eleD0Max");
62 offline_pvToken_ = consumes<reco::VertexCollection>(
76 double ptMin = parameters_.getParameter<
double>(
"ptMin");
77 double ptMax = parameters_.getParameter<
double>(
"ptMax");
78 int ptBin = parameters_.getParameter<
int>(
"ptBin");
80 double trackptMin = parameters_.getParameter<
double>(
"trackptMin");
81 double trackptMax = parameters_.getParameter<
double>(
"trackptMax");
82 int trackptBin = parameters_.getParameter<
int>(
"trackptBin");
84 double etaMin = parameters_.getParameter<
double>(
"etaMin");
85 double etaMax = parameters_.getParameter<
double>(
"etaMax");
86 int etaBin = parameters_.getParameter<
int>(
"etaBin");
90 int phiBin = parameters_.getParameter<
int>(
"phiBin");
92 double rhoMin = parameters_.getParameter<
double>(
"rhoMin");
93 double rhoMax = parameters_.getParameter<
double>(
"rhoMax");
94 int rhoBin = parameters_.getParameter<
int>(
"rhoBin");
96 double zMin = parameters_.getParameter<
double>(
"zMin");
97 double zMax = parameters_.getParameter<
double>(
"zMax");
98 int zBin = parameters_.getParameter<
int>(
"zBin");
126 h_convProb_ = ibooker.
book1D(
"convProb",
"# of Electrons", 100, 0.0, 1.0);
132 h_convLog10TrailTrackpt_ = ibooker.
book1D(
"convLog10TrailTrackpt",
"# of Electrons",
ptBin, -2.0, 3.0);
134 h_convLeadTrackAlgo_ = ibooker.
book1D(
"convLeadTrackAlgo",
139 h_convTrailTrackAlgo_ = ibooker.
book1D(
"convLeadTrackAlgo",
150 LogInfo(
"ElectronConversionRejectionValidator")
151 <<
"ElectronConversionRejectionValidator Analyzing event number: " <<
e.id() <<
" Global Counter " << nEvt_
155 auto convHandle =
e.getHandle(convToken_);
156 if (!convHandle.isValid()) {
157 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Conversion collection " << std::endl;
162 auto gsfElectronHandle =
e.getHandle(gsfElecToken_);
164 if (!gsfElectronHandle.isValid()) {
165 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Electron collection " << std::endl;
170 auto vertexHandle =
e.getHandle(offline_pvToken_);
171 if (!vertexHandle.isValid()) {
172 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product primary Vertex Collection " 178 auto bsHandle =
e.getHandle(beamspotToken_);
179 if (!bsHandle.isValid()) {
180 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product beamspot Collection " 192 if (iele->pt() < elePtMin_)
195 eleExpectedHitsInnerMax_)
201 h_elePtAll_->Fill(iele->pt());
202 h_eleEtaAll_->Fill(iele->eta());
203 h_elePhiAll_->Fill(iele->phi());
208 if (
conv ==
nullptr) {
209 h_elePtPass_->Fill(iele->pt());
210 h_eleEtaPass_->Fill(iele->eta());
211 h_elePhiPass_->Fill(iele->phi());
219 h_elePtFail_->Fill(iele->pt());
220 h_eleEtaFail_->Fill(iele->eta());
221 h_elePhiFail_->Fill(iele->phi());
225 h_convPt_->Fill(convmom.rho());
226 h_convEta_->Fill(convmom.eta());
227 h_convPhi_->Fill(convmom.phi());
228 h_convRho_->Fill(
conv->conversionVertex().position().rho());
229 h_convZ_->Fill(
conv->conversionVertex().position().z());
233 if (
conv->tracks().size() < 2)
241 if (tk1->
pt() >= tk2->
pt()) {
248 h_convLeadTrackpt_->Fill(tklead->
pt());
249 h_convTrailTrackpt_->Fill(tktrail->
pt());
250 h_convLog10TrailTrackpt_->Fill(log10(tktrail->
pt()));
251 h_convLeadTrackAlgo_->Fill(tklead->
algo());
252 h_convTrailTrackAlgo_->Fill(tktrail->
algo());
const Point & position() const
position
virtual void setCurrentFolder(std::string const &fullpath)
const Point & position() const
position
ElectronConversionRejectionValidator(const edm::ParameterSet &)
Log< level::Error, false > LogError
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
double pt() const
track transverse momentum
~ElectronConversionRejectionValidator() override
Abs< T >::type abs(const T &t)
float ChiSquaredProbability(double chiSquared, double nrDOF)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
TrackAlgorithm algo() const
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())