53 consumes<reco::GsfElectronCollection>(
edm::InputTag(gsfElectronCollectionProducer_, gsfElectronCollection_));
55 consumes<reco::ConversionCollection>(
edm::InputTag(conversionCollectionProducer_, conversionCollection_));
57 isRunCentrally_ = pset.
getParameter<
bool>(
"isRunCentrally");
60 eleExpectedHitsInnerMax_ = pset.
getParameter<
int>(
"eleExpectedHitsInnerMax");
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");
109 h_elePtAll_ = ibooker.
book1D(
"elePtAll",
"# of Electrons", ptBin, ptMin, ptMax);
110 h_eleEtaAll_ = ibooker.
book1D(
"eleEtaAll",
"# of Electrons", etaBin, etaMin, etaMax);
111 h_elePhiAll_ = ibooker.
book1D(
"elePhiAll",
"# of Electrons", phiBin, phiMin, phiMax);
113 h_elePtPass_ = ibooker.
book1D(
"elePtPass",
"# of Electrons", ptBin, ptMin, ptMax);
114 h_eleEtaPass_ = ibooker.
book1D(
"eleEtaPass",
"# of Electrons", etaBin, etaMin, etaMax);
115 h_elePhiPass_ = ibooker.
book1D(
"elePhiPass",
"# of Electrons", phiBin, phiMin, phiMax);
117 h_elePtFail_ = ibooker.
book1D(
"elePtFail",
"# of Electrons", ptBin, ptMin, ptMax);
118 h_eleEtaFail_ = ibooker.
book1D(
"eleEtaFail",
"# of Electrons", etaBin, etaMin, etaMax);
119 h_elePhiFail_ = ibooker.
book1D(
"elePhiFail",
"# of Electrons", phiBin, phiMin, phiMax);
121 h_convPt_ = ibooker.
book1D(
"convPt",
"# of Electrons", ptBin, ptMin, ptMax);
122 h_convEta_ = ibooker.
book1D(
"convEta",
"# of Electrons", etaBin, etaMin, etaMax);
123 h_convPhi_ = ibooker.
book1D(
"convPhi",
"# of Electrons", phiBin, phiMin, phiMax);
124 h_convRho_ = ibooker.
book1D(
"convRho",
"# of Electrons", rhoBin, rhoMin, rhoMax);
125 h_convZ_ = ibooker.
book1D(
"convZ",
"# of Electrons", zBin, zMin, zMax);
126 h_convProb_ = ibooker.
book1D(
"convProb",
"# of Electrons", 100, 0.0, 1.0);
128 h_convLeadTrackpt_ = ibooker.
book1D(
"convLeadTrackpt",
"# of Electrons", trackptBin, trackptMin, trackptMax);
130 h_convTrailTrackpt_ = ibooker.
book1D(
"convTrailTrackpt",
"# of Electrons", trackptBin, trackptMin, trackptMax);
132 h_convLog10TrailTrackpt_ = ibooker.
book1D(
"convLog10TrailTrackpt",
"# of Electrons", ptBin, -2.0, 3.0);
134 h_convLeadTrackAlgo_ = ibooker.
book1D(
136 h_convTrailTrackAlgo_ = ibooker.
book1D(
144 LogInfo(
"ElectronConversionRejectionValidator")
145 <<
"ElectronConversionRejectionValidator Analyzing event number: " << e.
id() <<
" Global Counter " << nEvt_
149 auto convHandle = e.
getHandle(convToken_);
150 if (!convHandle.isValid()) {
151 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Conversion collection " << std::endl;
156 auto gsfElectronHandle = e.
getHandle(gsfElecToken_);
158 if (!gsfElectronHandle.isValid()) {
159 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the Electron collection " << std::endl;
164 auto vertexHandle = e.
getHandle(offline_pvToken_);
165 if (!vertexHandle.isValid()) {
166 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product primary Vertex Collection "
172 auto bsHandle = e.
getHandle(beamspotToken_);
173 if (!bsHandle.isValid()) {
174 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product beamspot Collection "
181 for (reco::GsfElectronCollection::const_iterator iele = gsfElectronCollection.begin();
182 iele != gsfElectronCollection.end();
186 if (iele->pt() < elePtMin_)
189 eleExpectedHitsInnerMax_)
191 if (
std::abs(iele->gsfTrack()->dxy(thevtx.position())) > eleD0Max_)
195 h_elePtAll_->Fill(iele->pt());
196 h_eleEtaAll_->Fill(iele->eta());
197 h_elePhiAll_->Fill(iele->phi());
202 if (conv ==
nullptr) {
203 h_elePtPass_->Fill(iele->pt());
204 h_eleEtaPass_->Fill(iele->eta());
205 h_elePhiPass_->Fill(iele->phi());
213 h_elePtFail_->Fill(iele->pt());
214 h_eleEtaFail_->Fill(iele->eta());
215 h_elePhiFail_->Fill(iele->phi());
219 h_convPt_->Fill(convmom.rho());
220 h_convEta_->Fill(convmom.eta());
221 h_convPhi_->Fill(convmom.phi());
227 if (conv->
tracks().size() < 2)
235 if (tk1->
pt() >= tk2->
pt()) {
242 h_convLeadTrackpt_->Fill(tklead->
pt());
243 h_convTrailTrackpt_->Fill(tktrail->
pt());
244 h_convLog10TrailTrackpt_->Fill(log10(tktrail->
pt()));
245 h_convLeadTrackAlgo_->Fill(tklead->
algo());
246 h_convTrailTrackAlgo_->Fill(tktrail->
algo());
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
T getUntrackedParameter(std::string const &, T const &) const
virtual void setCurrentFolder(std::string const &fullpath)
ElectronConversionRejectionValidator(const edm::ParameterSet &)
Log< level::Error, false > LogError
const Point & position() const
position
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
TrackAlgorithm algo() const
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
~ElectronConversionRejectionValidator() override
double pt() const
track transverse momentum
Abs< T >::type abs(const T &t)
double chi2() const
chi-squares
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
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
T getParameter(std::string const &) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int etaBin(const l1t::HGCalMulticluster *cl)
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references