#include <GlobalTrackingRegionWithVerticesProducer.h>
Public Member Functions | |
GlobalTrackingRegionWithVerticesProducer (const edm::ParameterSet &cfg) | |
virtual std::vector < TrackingRegion * > | regions (const edm::Event &ev, const edm::EventSetup &) const |
virtual | ~GlobalTrackingRegionWithVerticesProducer () |
Private Attributes | |
edm::InputTag | theBeamSpotTag |
double | theFixedError |
double | theNSigmaZ |
double | theOriginRadius |
bool | thePrecise |
double | thePtMin |
double | theSigmaZVertex |
bool | theUseFixedError |
bool | theUseFoundVertices |
edm::InputTag | vertexCollName |
Definition at line 14 of file GlobalTrackingRegionWithVerticesProducer.h.
GlobalTrackingRegionWithVerticesProducer::GlobalTrackingRegionWithVerticesProducer | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 18 of file GlobalTrackingRegionWithVerticesProducer.h.
References edm::ParameterSet::getParameter(), theBeamSpotTag, theFixedError, theNSigmaZ, theOriginRadius, thePrecise, thePtMin, theSigmaZVertex, theUseFixedError, theUseFoundVertices, and vertexCollName.
{ edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet"); thePtMin = regionPSet.getParameter<double>("ptMin"); theOriginRadius = regionPSet.getParameter<double>("originRadius"); theNSigmaZ = regionPSet.getParameter<double>("nSigmaZ"); theBeamSpotTag = regionPSet.getParameter<edm::InputTag>("beamSpot"); thePrecise = regionPSet.getParameter<bool>("precise"); theSigmaZVertex = regionPSet.getParameter<double>("sigmaZVertex"); theFixedError = regionPSet.getParameter<double>("fixedError"); theUseFoundVertices = regionPSet.getParameter<bool>("useFoundVertices"); theUseFixedError = regionPSet.getParameter<bool>("useFixedError"); vertexCollName = regionPSet.getParameter<edm::InputTag>("VertexCollection"); }
virtual GlobalTrackingRegionWithVerticesProducer::~GlobalTrackingRegionWithVerticesProducer | ( | ) | [inline, virtual] |
Definition at line 36 of file GlobalTrackingRegionWithVerticesProducer.h.
{}
virtual std::vector<TrackingRegion* > GlobalTrackingRegionWithVerticesProducer::regions | ( | const edm::Event & | ev, |
const edm::EventSetup & | |||
) | const [inline, virtual] |
Implements TrackingRegionProducer.
Definition at line 39 of file GlobalTrackingRegionWithVerticesProducer.h.
References Exception, edm::Event::getByLabel(), edm::HandleBase::isValid(), query::result, reco::BeamSpot::sigmaZ(), theBeamSpotTag, theFixedError, theNSigmaZ, theOriginRadius, thePrecise, thePtMin, theSigmaZVertex, theUseFixedError, theUseFoundVertices, GoodVertex_cfg::vertexCollection, vertexCollName, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
{ std::vector<TrackingRegion* > result; GlobalPoint theOrigin; edm::Handle<reco::BeamSpot> bsHandle; ev.getByLabel( theBeamSpotTag, bsHandle); double bsSigmaZ; if(bsHandle.isValid()) { const reco::BeamSpot & bs = *bsHandle; bsSigmaZ = theNSigmaZ*bs.sigmaZ(); theOrigin = GlobalPoint(bs.x0(), bs.y0(), bs.z0()); }else{ throw cms::Exception("Seeding") << "ERROR: input beamSpot is not valid in GlobalTrackingRegionWithVertices"; } if(theUseFoundVertices) { edm::Handle<reco::VertexCollection> vertexCollection; ev.getByLabel(vertexCollName,vertexCollection); for(reco::VertexCollection::const_iterator iV=vertexCollection->begin(); iV != vertexCollection->end() ; iV++) { if (iV->isFake() || !iV->isValid()) continue; GlobalPoint theOrigin_ = GlobalPoint(iV->x(),iV->y(),iV->z()); double theOriginHalfLength_ = (theUseFixedError ? theFixedError : (iV->zError())*theSigmaZVertex); result.push_back( new GlobalTrackingRegion(thePtMin, theOrigin_, theOriginRadius, theOriginHalfLength_, thePrecise) ); } if (result.empty()) { result.push_back( new GlobalTrackingRegion(thePtMin, theOrigin, theOriginRadius, bsSigmaZ, thePrecise) ); } } else { result.push_back( new GlobalTrackingRegion(thePtMin, theOrigin, theOriginRadius, bsSigmaZ, thePrecise) ); } return result; }
Definition at line 84 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
double GlobalTrackingRegionWithVerticesProducer::theFixedError [private] |
Definition at line 87 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
double GlobalTrackingRegionWithVerticesProducer::theNSigmaZ [private] |
Definition at line 83 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
double GlobalTrackingRegionWithVerticesProducer::theOriginRadius [private] |
Definition at line 82 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
bool GlobalTrackingRegionWithVerticesProducer::thePrecise [private] |
Definition at line 88 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
double GlobalTrackingRegionWithVerticesProducer::thePtMin [private] |
Definition at line 81 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
double GlobalTrackingRegionWithVerticesProducer::theSigmaZVertex [private] |
Definition at line 86 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
bool GlobalTrackingRegionWithVerticesProducer::theUseFixedError [private] |
Definition at line 91 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
Definition at line 90 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().
Definition at line 92 of file GlobalTrackingRegionWithVerticesProducer.h.
Referenced by GlobalTrackingRegionWithVerticesProducer(), and regions().