#include <IsolationRegionAroundL3Muon.h>
Public Member Functions | |
IsolationRegionAroundL3Muon (const edm::ParameterSet &cfg) | |
virtual std::vector < TrackingRegion * > | regions (const edm::Event &ev, const edm::EventSetup &es) const |
virtual | ~IsolationRegionAroundL3Muon () |
Private Attributes | |
double | theDeltaEta |
double | theDeltaPhi |
edm::InputTag | theInputTrkSrc |
std::string | theMeasurementTrackerName |
double | theOriginHalfLength |
double | theOriginRadius |
double | theOriginZPos |
double | thePtMin |
std::string | theVertexSrc |
bool | theVertexZconstrained |
Definition at line 14 of file IsolationRegionAroundL3Muon.h.
IsolationRegionAroundL3Muon::IsolationRegionAroundL3Muon | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 18 of file IsolationRegionAroundL3Muon.h.
References edm::ParameterSet::getParameter(), theDeltaEta, theDeltaPhi, theInputTrkSrc, theMeasurementTrackerName, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and theVertexZconstrained.
{ edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet"); theVertexSrc = regionPSet.getParameter<std::string>("vertexSrc"); theInputTrkSrc = regionPSet.getParameter<edm::InputTag>("TrkSrc"); thePtMin = regionPSet.getParameter<double>("ptMin"); theOriginRadius = regionPSet.getParameter<double>("originRadius"); theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength"); theVertexZconstrained = regionPSet.getParameter<bool>("vertexZConstrained"); theOriginZPos = regionPSet.getParameter<double>("vertexZDefault"); theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion"); theDeltaPhi = regionPSet.getParameter<double>("deltaPhiRegion"); theMeasurementTrackerName = regionPSet.getParameter<std::string>("measurementTrackerName"); }
virtual IsolationRegionAroundL3Muon::~IsolationRegionAroundL3Muon | ( | ) | [inline, virtual] |
Definition at line 36 of file IsolationRegionAroundL3Muon.h.
{}
virtual std::vector<TrackingRegion* > IsolationRegionAroundL3Muon::regions | ( | const edm::Event & | ev, |
const edm::EventSetup & | es | ||
) | const [inline, virtual] |
Implements TrackingRegionProducer.
Definition at line 38 of file IsolationRegionAroundL3Muon.h.
References edm::Event::getByLabel(), edm::Handle< T >::product(), query::result, theDeltaEta, theDeltaPhi, theInputTrkSrc, theMeasurementTrackerName, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and theVertexZconstrained.
{ std::vector<TrackingRegion* > result; // optional constraint for vertex // get highest Pt pixel vertex (if existing) double deltaZVertex = theOriginHalfLength; double originz = theOriginZPos; if (theVertexSrc.length()>1) { edm::Handle<reco::VertexCollection> vertices; ev.getByLabel(theVertexSrc,vertices); const reco::VertexCollection vertCollection = *(vertices.product()); reco::VertexCollection::const_iterator ci = vertCollection.begin(); if (vertCollection.size()>0) { originz = ci->z(); } else { originz = theOriginZPos; deltaZVertex = 15.; } } edm::Handle<reco::TrackCollection> trks; ev.getByLabel(theInputTrkSrc, trks); for(reco::TrackCollection::const_iterator iTrk = trks->begin();iTrk != trks->end();iTrk++) { double vz = (theVertexZconstrained) ? iTrk->dz() : originz; GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz()); result.push_back( new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(vz)), thePtMin, theOriginRadius, deltaZVertex, theDeltaEta, theDeltaPhi, 0,true,theMeasurementTrackerName) ); } return result; }
double IsolationRegionAroundL3Muon::theDeltaEta [private] |
Definition at line 86 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
double IsolationRegionAroundL3Muon::theDeltaPhi [private] |
Definition at line 87 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
Definition at line 78 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
std::string IsolationRegionAroundL3Muon::theMeasurementTrackerName [private] |
Definition at line 88 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
double IsolationRegionAroundL3Muon::theOriginHalfLength [private] |
Definition at line 82 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
double IsolationRegionAroundL3Muon::theOriginRadius [private] |
Definition at line 81 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
double IsolationRegionAroundL3Muon::theOriginZPos [private] |
Definition at line 84 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
double IsolationRegionAroundL3Muon::thePtMin [private] |
Definition at line 80 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
std::string IsolationRegionAroundL3Muon::theVertexSrc [private] |
Definition at line 77 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().
bool IsolationRegionAroundL3Muon::theVertexZconstrained [private] |
Definition at line 83 of file IsolationRegionAroundL3Muon.h.
Referenced by IsolationRegionAroundL3Muon(), and regions().