13 #include "TLorentzVector.h" 21 : electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
25 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
26 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
27 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", 0.15)),
28 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", 0.007)),
29 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", 0.12)),
30 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", 0.01)),
31 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", 0.1)),
32 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", 0.009)),
33 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
34 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", 0.03)),
35 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
36 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
37 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
38 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
39 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
40 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
41 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
42 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
43 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120)) {
44 produces<reco::TrackCollection>(
"");
62 for (
auto const& ele : *electronColl) {
63 if (!ele.ecalDriven())
68 if (!(ele.isEB() || ele.isEE()))
71 double hOverE = ele.hadronicOverEm();
72 double sigmaee = ele.sigmaIetaIeta();
73 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
74 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
81 }
else if (ele.isEE()) {
93 double chi2 = trk->chi2();
94 double ndof = trk->ndof();
99 double trkd0 = trk->d0();
101 trkd0 = -(trk->dxy(
beamSpot->position()));
103 edm::LogError(
"ZtoEEElectronTrackProducer") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
105 if (std::fabs(trkd0) >=
maxD0_)
124 outputTColl->push_back(*tk);
128 <<
"Error >> Failed to get ElectronCollection for label: " <<
electronTag_;
int numberOfValidPixelHits() const
const double maxDeltaPhiInEB_
const edm::InputTag electronTag_
std::vector< Track > TrackCollection
collection of Tracks
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
bool isNonnull() const
Checks for non-null.
Log< level::Error, false > LogError
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
int numberOfValidStripHits() const
const double maxSigmaiEiEEE_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
#define DEFINE_FWK_MODULE(type)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
void produce(edm::StreamID streamID, edm::Event &iEvent, edm::EventSetup const &iSetup) const override
ZtoEEElectronTrackProducer(const edm::ParameterSet &)
const double maxSigmaiEiEEB_
const edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
~ZtoEEElectronTrackProducer() override
const double maxDeltaPhiInEE_
const double maxDeltaEtaInEE_
const double maxDeltaEtaInEB_
const double maxNormChi2_
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
const edm::InputTag bsTag_