47 : trackProducer_(iC.consumes(conf.getParameter<
edm::
InputTag>(
"TrackProducer"))),
48 gsfTrackProducer_(iC.consumes(conf.getParameter<
edm::
InputTag>(
"GsfTrackProducer"))),
49 useGsfTracks_(conf.getParameter<
bool>(
"UseGsfTracks")),
101 for (
unsigned int i = 0;
i < tracksH->size(); ++
i) {
115 float scale = scRef->energy() / tscp.momentum().mag();
118 tscp.momentum().x() *
scale, tscp.momentum().y() *
scale, tscp.momentum().z() *
scale, scRef->energy());
120 Electron ele(trackRef->charge(), momentum, trackRef->vertex());
121 ele.setSuperCluster(scRef);
124 outEle.push_back(ele);
128 std::vector<unsigned int>
flag(gsfTracksH->size(), 0);
129 if (gsfTracksH->empty())
132 for (
unsigned int i = 0;
i < gsfTracksH->size() - 1; ++
i) {
140 float pin1 = trackRef1->pMode();
146 for (
unsigned int j =
i + 1;
j < gsfTracksH->size(); ++
j) {
154 float pin2 = trackRef2->pMode();
160 if (scRef1 == scRef2) {
161 bool isSameLayer =
false;
164 if (iGsfInnermostWithLostHits) {
166 }
else if (isSameLayer) {
167 if (fabs((scRef1->energy() / pin1) - 1) < fabs((scRef2->energy() / pin2) - 1))
176 for (
unsigned int i = 0;
i < gsfTracksH->size(); ++
i) {
193 float scale = scRef->energy() / innMom.
mag();
197 Electron ele(trackRef->charge(), momentum, trackRef->vertex());
198 ele.setSuperCluster(scRef);
200 ele.setGsfTrack(myRef);
201 outEle.push_back(ele);
210 auto nLostHits = nGsfTrack->missingInnerHits();
211 auto iLostHits = iGsfTrack->missingInnerHits();
213 if (nLostHits != iLostHits) {
214 return (nLostHits > iLostHits);