#include <EgammaHLTPixelMatchElectronAlgo.h>
Public Member Functions | |
EgammaHLTPixelMatchElectronAlgo (const edm::ParameterSet &conf) | |
void | run (edm::Event &, reco::ElectronCollection &) |
void | setupES (const edm::EventSetup &setup) |
~EgammaHLTPixelMatchElectronAlgo () | |
Private Member Functions | |
void | process (edm::Handle< reco::TrackCollection > tracksH, reco::ElectronCollection &outEle, Global3DPoint &bs) |
Private Attributes | |
edm::InputTag | BSProducer_ |
edm::ESHandle < GeometricSearchTracker > | theGeomSearchTracker |
edm::ESHandle< MagneticField > | theMagField |
edm::InputTag | trackProducer_ |
Class to reconstruct electron tracks from electron pixel seeds keep track of information about the initiating supercluster
Description: top algorithm producing TrackCandidate and Electron objects from supercluster driven pixel seeded Ckf tracking for HLT
Definition at line 76 of file EgammaHLTPixelMatchElectronAlgo.h.
EgammaHLTPixelMatchElectronAlgo::EgammaHLTPixelMatchElectronAlgo | ( | const edm::ParameterSet & | conf | ) |
Definition at line 52 of file EgammaHLTPixelMatchElectronAlgo.cc.
: trackProducer_( conf.getParameter<edm::InputTag>("TrackProducer") ), BSProducer_( conf.getParameter<edm::InputTag>("BSProducer") ) {}
EgammaHLTPixelMatchElectronAlgo::~EgammaHLTPixelMatchElectronAlgo | ( | ) |
Definition at line 57 of file EgammaHLTPixelMatchElectronAlgo.cc.
{ // delete theInitialStateEstimator; //delete theNavigationSchool; //delete theTrajectoryCleaner; }
void EgammaHLTPixelMatchElectronAlgo::process | ( | edm::Handle< reco::TrackCollection > | tracksH, |
reco::ElectronCollection & | outEle, | ||
Global3DPoint & | bs | ||
) | [private] |
Definition at line 90 of file EgammaHLTPixelMatchElectronAlgo.cc.
References reco::TrackBase::charge(), i, TrajectoryStateTransform::innerFreeState(), PV3DBase< T, PVType, FrameType >::mag(), TrajectoryStateClosestToPoint::momentum(), edm::ESHandle< T >::product(), edm::Handle< T >::product(), reco::Electron::setSuperCluster(), matplotRender::t, theMagField, testEve_cfg::tracks, reco::TrackBase::vertex(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by run().
{ const TrackCollection *tracks=tracksH.product(); for (unsigned int i=0;i<tracks->size();++i) { const Track & t=(*tracks)[i]; const TrackRef trackRef = edm::Ref<TrackCollection>(tracksH,i); edm::RefToBase<TrajectorySeed> seed = trackRef->extra()->seedRef(); ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>(); edm::RefToBase<CaloCluster> caloCluster = elseed->caloCluster() ; SuperClusterRef scRef = caloCluster.castTo<SuperClusterRef>() ; //const SuperClusterRef & scRef=elseed->superCluster(); // Get the momentum at vertex (not at the innermost layer) TSCPBuilderNoMaterial tscpBuilder; TrajectoryStateTransform tsTransform; FreeTrajectoryState fts = tsTransform.innerFreeState(t,theMagField.product()); TrajectoryStateClosestToPoint tscp = tscpBuilder(fts, bs ); float scale = scRef->energy()/tscp.momentum().mag(); const math::XYZTLorentzVector momentum(tscp.momentum().x()*scale, tscp.momentum().y()*scale, tscp.momentum().z()*scale, scRef->energy()); Electron ele(t.charge(),momentum, t.vertex() ); ele.setSuperCluster(scRef); edm::Ref<TrackCollection> myRef(tracksH,i); ele.setTrack(myRef); outEle.push_back(ele); } // loop over tracks }
void EgammaHLTPixelMatchElectronAlgo::run | ( | edm::Event & | e, |
reco::ElectronCollection & | outEle | ||
) |
Definition at line 71 of file EgammaHLTPixelMatchElectronAlgo.cc.
References BSProducer_, edm::Event::getByLabel(), process(), and trackProducer_.
Referenced by EgammaHLTPixelMatchElectronProducers::produce().
{ // get the input edm::Handle<TrackCollection> tracksH; // e.getByLabel(trackLabel_,trackInstanceName_,tracksH); e.getByLabel(trackProducer_,tracksH); //Get the Beam Spot position edm::Handle<reco::BeamSpot> recoBeamSpotHandle; // iEvent.getByType(recoBeamSpotHandle); e.getByLabel(BSProducer_,recoBeamSpotHandle); // gets its position const BeamSpot::Point& BSPosition = recoBeamSpotHandle->position(); Global3DPoint bs(BSPosition.x(),BSPosition.y(),0); process(tracksH,outEle,bs); return; }
void EgammaHLTPixelMatchElectronAlgo::setupES | ( | const edm::EventSetup & | setup | ) |
Definition at line 65 of file EgammaHLTPixelMatchElectronAlgo.cc.
References edm::EventSetup::get(), theGeomSearchTracker, and theMagField.
Referenced by EgammaHLTPixelMatchElectronProducers::produce().
{ //services es.get<TrackerRecoGeometryRecord>().get(theGeomSearchTracker); es.get<IdealMagneticFieldRecord>().get(theMagField); }
Definition at line 97 of file EgammaHLTPixelMatchElectronAlgo.h.
Referenced by run().
edm::ESHandle<GeometricSearchTracker> EgammaHLTPixelMatchElectronAlgo::theGeomSearchTracker [private] |
Definition at line 104 of file EgammaHLTPixelMatchElectronAlgo.h.
Referenced by setupES().
Definition at line 103 of file EgammaHLTPixelMatchElectronAlgo.h.
Definition at line 96 of file EgammaHLTPixelMatchElectronAlgo.h.
Referenced by run().