51 trackProducer_(conf.getParameter<edm::
InputTag>(
"TrackProducer")),
52 gsfTrackProducer_(conf.getParameter<edm::
InputTag>(
"GsfTrackProducer")),
53 useGsfTracks_(conf.getParameter<bool>(
"UseGsfTracks")),
54 bsProducer_(conf.getParameter<edm::
InputTag>(
"BSProducer")),
72 bool updateField(
false);
80 bool updateGeometry(
false);
82 updateGeometry =
true;
114 process(tracksH, gsfTracksH, outEle, bs);
123 for (
unsigned int i=0;
i<tracksH->size(); ++
i) {
138 float scale = scRef->energy()/tscp.momentum().mag();
141 tscp.momentum().y()*
scale,
142 tscp.momentum().z()*
scale,
145 Electron ele(trackRef->charge(), momentum, trackRef->vertex());
149 outEle.push_back(ele);
154 std::vector<unsigned int>
flag(gsfTracksH->size(), 0);
155 if (gsfTracksH->size() == 0)
158 for (
unsigned int i=0;
i<gsfTracksH->size()-1; ++
i) {
166 float pin1 = trackRef1->pMode();
172 for (
unsigned int j=
i+1;
j<gsfTracksH->size(); ++
j) {
180 float pin2 = trackRef2->pMode();
186 if (scRef1 == scRef2) {
187 bool isSameLayer =
false;
190 if (iGsfInnermostWithLostHits) {
192 }
else if(isSameLayer) {
193 if(fabs((scRef1->energy()/pin1)-1) < fabs((scRef2->energy()/pin2)-1))
202 for (
unsigned int i=0;
i<gsfTracksH->size(); ++
i) {
219 float scale = scRef->energy()/innMom.
mag();
225 Electron ele(trackRef->charge(), momentum, trackRef->vertex());
228 ele.setGsfTrack(myRef);
229 outEle.push_back(ele);
237 unsigned int nLostHits = nGsfTrack->trackerExpectedHitsInner().numberOfLostHits();
238 unsigned int iLostHits = iGsfTrack->trackerExpectedHitsInner().numberOfLostHits();
240 if (nLostHits!=iLostHits) {
241 return (nLostHits > iLostHits);
int unsigned long long cacheIDTDGeom_
unsigned long long cacheIdentifier() const
void process(edm::Handle< reco::TrackCollection > tracksH, edm::Handle< reco::GsfTrackCollection > gsfTracksH, reco::ElectronCollection &outEle, Global3DPoint &bs)
math::XYZPoint Point
point in the space
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
edm::InputTag bsProducer_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::ESHandle< MagneticField > magField_
MultiTrajectoryStateMode * mtsMode_
void run(edm::Event &, reco::ElectronCollection &)
edm::InputTag gsfTrackProducer_
edm::InputTag trackProducer_
bool isInnerMostWithLostHits(const reco::GsfTrackRef &, const reco::GsfTrackRef &, bool &)
void setupES(const edm::EventSetup &setup)
MultiTrajectoryStateTransform * mtsTransform_
std::vector< Electron > ElectronCollection
collectin of Electron objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
~EgammaHLTPixelMatchElectronAlgo()
T const * product() const
EgammaHLTPixelMatchElectronAlgo(const edm::ParameterSet &conf)
unsigned long long cacheIDMagField_
edm::ESHandle< TrackerGeometry > trackerGeom_
void setSuperCluster(const reco::SuperClusterRef &r)
set refrence to Photon component