25 #include "TLorentzVector.h" 70 desc.addUntracked<
double>(
"maxEta", 2.4);
71 desc.addUntracked<
double>(
"minPt", 5);
72 desc.addUntracked<
double>(
"maxDeltaPhiInEB", 0.15);
73 desc.addUntracked<
double>(
"maxDeltaEtaInEB", 0.007);
74 desc.addUntracked<
double>(
"maxHOEEB", 0.12);
75 desc.addUntracked<
double>(
"maxSigmaiEiEEB", 0.01);
76 desc.addUntracked<
double>(
"maxDeltaPhiInEE", 0.1);
77 desc.addUntracked<
double>(
"maxDeltaEtaInEE", 0.009);
78 desc.addUntracked<
double>(
"maxHOEEB_", .10);
79 desc.addUntracked<
double>(
"maxSigmaiEiEEE", 0.03);
80 desc.addUntracked<
double>(
"maxNormChi2", 10);
81 desc.addUntracked<
double>(
"maxD0", 0.02);
82 desc.addUntracked<
double>(
"maxDz", 20.);
83 desc.addUntracked<
unsigned int>(
"minPixelHits", 1);
84 desc.addUntracked<
unsigned int>(
"minStripHits", 8);
85 desc.addUntracked<
double>(
"maxIso", 0.3);
86 desc.addUntracked<
double>(
"minPtHighest", 24);
87 desc.addUntracked<
double>(
"minInvMass", 75);
88 desc.addUntracked<
double>(
"maxInvMass", 105);
93 : electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
97 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
98 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
99 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", 0.15)),
100 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", 0.007)),
101 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", 0.12)),
102 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", 0.01)),
103 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", 0.1)),
104 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", 0.009)),
105 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
106 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", 0.03)),
107 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
108 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
109 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
110 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
111 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
112 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
113 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
114 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 75)),
115 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 105)) {
116 produces<reco::TrackCollection>(
"");
132 for (
auto const& ele : *electronColl) {
133 if (!ele.ecalDriven())
138 if (!(ele.isEB() || ele.isEE()))
141 double hOverE = ele.hadronicOverEm();
142 double sigmaee = ele.sigmaIetaIeta();
143 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
144 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
151 }
else if (ele.isEE()) {
163 double chi2 = trk->chi2();
164 double ndof = trk->ndof();
169 double trkd0 = trk->d0();
171 trkd0 = -(trk->dxy(
beamSpot->position()));
173 edm::LogError(
"ZtoEEElectronTrackProducer") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
194 outputTColl->push_back(*tk);
198 <<
"Error >> Failed to get ElectronCollection for label: " <<
electronTag_;
int numberOfValidPixelHits() const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const double minPtHighest_
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.
~ZtoEEElectronTrackProducer() override=default
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 ;
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
#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_
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_