92 bool isIsolatedBarrel;
94 bool isConvertedBarrel;
95 bool isIsolatedEndcap;
97 bool isConvertedEndcap;
100 int elIsAcceptedEB = 0;
101 int elIsAcceptedEE = 0;
103 std::vector<TLorentzVector>
LV;
105 for (reco::GsfElectronCollection::const_iterator recoElectron =
electronCollection->begin();
108 if (recoElectron->et() <= 25)
112 double IsoTrk = (recoElectron->dr03TkSumPt() / recoElectron->et());
113 double IsoEcal = (recoElectron->dr03EcalRecHitSumEt() / recoElectron->et());
114 double IsoHcal = (recoElectron->dr03HcalTowerSumEt() / recoElectron->et());
115 double HE = (recoElectron->hcalOverEcal());
119 float DeltaPhiTkClu = recoElectron->deltaPhiSuperClusterTrackAtVtx();
120 float DeltaEtaTkClu = recoElectron->deltaEtaSuperClusterTrackAtVtx();
121 float sigmaIeIe = recoElectron->sigmaIetaIeta();
125 float Dcot = recoElectron->convDcot();
126 float Dist = recoElectron->convDist();
127 int NumberOfExpectedInnerHits =
132 isIsolatedBarrel =
false;
134 isConvertedBarrel =
false;
135 isIsolatedEndcap =
false;
137 isConvertedEndcap =
false;
141 if (fabs(recoElectron->eta()) <= 1.4442) {
143 if (IsoTrk < 0.09 && IsoEcal < 0.07 && IsoHcal < 0.10) {
144 isIsolatedBarrel =
true;
148 if (fabs(DeltaEtaTkClu) < 0.004 && fabs(DeltaPhiTkClu) < 0.06 && sigmaIeIe < 0.01 &&
HE < 0.04) {
153 if ((fabs(Dist) >= 0.02 || fabs(Dcot) >= 0.02) && NumberOfExpectedInnerHits <= 1.0) {
154 isConvertedBarrel =
true;
158 if (isIsolatedBarrel && isIDBarrel && isConvertedBarrel) {
162 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
168 if (fabs(recoElectron->eta()) >= 1.5660 && fabs(recoElectron->eta()) <= 2.5000) {
170 if (IsoTrk < 0.04 && IsoEcal < 0.05 && IsoHcal < 0.025) {
171 isIsolatedEndcap =
true;
175 if (fabs(DeltaEtaTkClu) < 0.007 && fabs(DeltaPhiTkClu) < 0.03 && sigmaIeIe < 0.031 &&
HE < 0.15) {
180 if ((fabs(Dcot) > 0.02 || fabs(Dist) > 0.02) && NumberOfExpectedInnerHits <= 1.0) {
181 isConvertedEndcap =
true;
184 if (isIsolatedEndcap && isIDEndcap && isConvertedEndcap) {
188 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
195 if (elIsAccepted > 1) {
196 double e_ee_invMass = 0;
197 if (
LV.size() == 2) {
198 TLorentzVector e_pair =
LV[0] +
LV[1];
199 e_ee_invMass = e_pair.M();
202 if (elIsAcceptedEB == 2) {
205 if (elIsAcceptedEE == 2) {
208 if (elIsAcceptedEB == 1 && elIsAcceptedEE == 1) {