60 consumes<reco::GsfElectronCollection>(
edm::InputTag(gsfElectronCollectionProducer_, gsfElectronCollection_));
62 consumes<reco::ConversionCollection>(
edm::InputTag(conversionCollectionProducer_, conversionCollection_));
64 isRunCentrally_ = pset.
getParameter<
bool>(
"isRunCentrally");
67 eleExpectedHitsInnerMax_ = pset.
getParameter<
int>(
"eleExpectedHitsInnerMax");
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");
116 h_elePtAll_ = ibooker.
book1D(
"elePtAll",
"# of Electrons", ptBin, ptMin, ptMax);
117 h_eleEtaAll_ = ibooker.
book1D(
"eleEtaAll",
"# of Electrons", etaBin, etaMin, etaMax);
118 h_elePhiAll_ = ibooker.
book1D(
"elePhiAll",
"# of Electrons", phiBin, phiMin, phiMax);
120 h_elePtPass_ = ibooker.
book1D(
"elePtPass",
"# of Electrons", ptBin, ptMin, ptMax);
121 h_eleEtaPass_ = ibooker.
book1D(
"eleEtaPass",
"# of Electrons", etaBin, etaMin, etaMax);
122 h_elePhiPass_ = ibooker.
book1D(
"elePhiPass",
"# of Electrons", phiBin, phiMin, phiMax);
124 h_elePtFail_ = ibooker.
book1D(
"elePtFail",
"# of Electrons", ptBin, ptMin, ptMax);
125 h_eleEtaFail_ = ibooker.
book1D(
"eleEtaFail",
"# of Electrons", etaBin, etaMin, etaMax);
126 h_elePhiFail_ = ibooker.
book1D(
"elePhiFail",
"# of Electrons", phiBin, phiMin, phiMax);
128 h_convPt_ = ibooker.
book1D(
"convPt",
"# of Electrons", ptBin, ptMin, ptMax);
129 h_convEta_ = ibooker.
book1D(
"convEta",
"# of Electrons", etaBin, etaMin, etaMax);
130 h_convPhi_ = ibooker.
book1D(
"convPhi",
"# of Electrons", phiBin, phiMin, phiMax);
131 h_convRho_ = ibooker.
book1D(
"convRho",
"# of Electrons", rhoBin, rhoMin, rhoMax);
132 h_convZ_ = ibooker.
book1D(
"convZ",
"# of Electrons", zBin, zMin, zMax);
133 h_convProb_ = ibooker.
book1D(
"convProb",
"# of Electrons", 100, 0.0, 1.0);
135 h_convLeadTrackpt_ = ibooker.
book1D(
"convLeadTrackpt",
"# of Electrons", trackptBin, trackptMin, trackptMax);
137 h_convTrailTrackpt_ = ibooker.
book1D(
"convTrailTrackpt",
"# of Electrons", trackptBin, trackptMin, trackptMax);
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_
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;
176 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product primary Vertex Collection " 185 edm::LogError(
"ElectronConversionRejectionValidator") <<
"Error! Can't get the product beamspot Collection " 192 for (reco::GsfElectronCollection::const_iterator iele = gsfElectronCollection.begin();
193 iele != gsfElectronCollection.end();
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());
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());
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static HepMC::IO_HEPEVT conv
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setCurrentFolder(std::string const &fullpath)
ElectronConversionRejectionValidator(const edm::ParameterSet &)
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
~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
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
T const * product() const
const Point & position() const
position
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references