84 if (!electronCollection.isValid())
91 bool isIsolatedBarrel;
93 bool isConvertedBarrel;
94 bool isIsolatedEndcap;
96 bool isConvertedEndcap;
99 int elIsAcceptedEB = 0;
100 int elIsAcceptedEE = 0;
102 std::vector<TLorentzVector>
LV;
104 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
105 recoElectron != electronCollection->end();
107 if (recoElectron->et() <= 25)
111 double IsoTrk = (recoElectron->dr03TkSumPt() / recoElectron->et());
112 double IsoEcal = (recoElectron->dr03EcalRecHitSumEt() / recoElectron->et());
113 double IsoHcal = (recoElectron->dr03HcalTowerSumEt() / recoElectron->et());
114 double HE = (recoElectron->hcalOverEcal());
118 float DeltaPhiTkClu = recoElectron->deltaPhiSuperClusterTrackAtVtx();
119 float DeltaEtaTkClu = recoElectron->deltaEtaSuperClusterTrackAtVtx();
120 float sigmaIeIe = recoElectron->sigmaIetaIeta();
124 float Dcot = recoElectron->convDcot();
125 float Dist = recoElectron->convDist();
126 int NumberOfExpectedInnerHits =
131 isIsolatedBarrel =
false;
133 isConvertedBarrel =
false;
134 isIsolatedEndcap =
false;
136 isConvertedEndcap =
false;
140 if (fabs(recoElectron->eta()) <= 1.4442) {
142 if (IsoTrk < 0.09 && IsoEcal < 0.07 && IsoHcal < 0.10) {
143 isIsolatedBarrel =
true;
147 if (fabs(DeltaEtaTkClu) < 0.004 && fabs(DeltaPhiTkClu) < 0.06 && sigmaIeIe < 0.01 && HE < 0.04) {
152 if ((fabs(Dist) >= 0.02 || fabs(Dcot) >= 0.02) && NumberOfExpectedInnerHits <= 1.0) {
153 isConvertedBarrel =
true;
157 if (isIsolatedBarrel && isIDBarrel && isConvertedBarrel) {
161 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
167 if (fabs(recoElectron->eta()) >= 1.5660 && fabs(recoElectron->eta()) <= 2.5000) {
169 if (IsoTrk < 0.04 && IsoEcal < 0.05 && IsoHcal < 0.025) {
170 isIsolatedEndcap =
true;
174 if (fabs(DeltaEtaTkClu) < 0.007 && fabs(DeltaPhiTkClu) < 0.03 && sigmaIeIe < 0.031 && HE < 0.15) {
179 if ((fabs(Dcot) > 0.02 || fabs(Dist) > 0.02) && NumberOfExpectedInnerHits <= 1.0) {
180 isConvertedEndcap =
true;
183 if (isIsolatedEndcap && isIDEndcap && isConvertedEndcap) {
187 recoElectron->momentum().x(), recoElectron->momentum().y(), recoElectron->momentum().z(), recoElectron->p());
194 if (elIsAccepted > 1) {
195 double e_ee_invMass = 0;
196 if (
LV.size() == 2) {
197 TLorentzVector e_pair =
LV[0] +
LV[1];
198 e_ee_invMass = e_pair.M();
201 if (elIsAcceptedEB == 2) {
204 if (elIsAcceptedEE == 2) {
207 if (elIsAcceptedEB == 1 && elIsAcceptedEE == 1) {
MonitorElement * h_ee_invMass_EB
bool getByToken(EDGetToken token, Handle< PROD > &result) const
math::XYZTLorentzVectorD LV
const edm::EDGetTokenT< reco::GsfElectronCollection > electronCollectionToken_
MonitorElement * h_ee_invMass_EE
MonitorElement * h_ee_invMass_BB
const edm::EDGetTokenT< reco::GsfTrackCollection > trackCollectionToken_