#include <TrackingRegionsFromBeamSpotAndL2Tau.h>
Public Member Functions | |
virtual std::vector < TrackingRegion * > | regions (const edm::Event &e, const edm::EventSetup &es) const |
TrackingRegionsFromBeamSpotAndL2Tau (const edm::ParameterSet &conf) | |
virtual | ~TrackingRegionsFromBeamSpotAndL2Tau () |
Private Attributes | |
edm::InputTag | m_beamSpotTag |
float | m_deltaEta |
float | m_deltaPhi |
float | m_jetMaxEta |
int | m_jetMaxN |
float | m_jetMinPt |
edm::InputTag | m_jetSrc |
std::string | m_measurementTrackerName |
float | m_originHalfLength |
float | m_originRadius |
bool | m_precise |
float | m_ptMin |
bool | m_searchOpt |
float | m_whereToUseMeasurementTracker |
class TrackingRegionsFromBeamSpotAndL2Tau plugin for creating eta-phi TrackingRegions in directions of L2 taus
Definition at line 24 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
TrackingRegionsFromBeamSpotAndL2Tau::TrackingRegionsFromBeamSpotAndL2Tau | ( | const edm::ParameterSet & | conf | ) | [inline, explicit] |
Definition at line 28 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), m_beamSpotTag, m_deltaEta, m_deltaPhi, m_jetMaxEta, m_jetMaxN, m_jetMinPt, m_jetSrc, m_measurementTrackerName, m_originHalfLength, m_originRadius, m_precise, m_ptMin, m_searchOpt, and m_whereToUseMeasurementTracker.
{ edm::LogInfo ("TrackingRegionsFromBeamSpotAndL2Tau") << "Enter the TrackingRegionsFromBeamSpotAndL2Tau"; edm::ParameterSet regionPSet = conf.getParameter<edm::ParameterSet>("RegionPSet"); m_ptMin = regionPSet.getParameter<double>("ptMin"); m_originRadius = regionPSet.getParameter<double>("originRadius"); m_originHalfLength = regionPSet.getParameter<double>("originHalfLength"); m_deltaEta = regionPSet.getParameter<double>("deltaEta"); m_deltaPhi = regionPSet.getParameter<double>("deltaPhi"); m_jetSrc = regionPSet.getParameter<edm::InputTag>("JetSrc"); m_jetMinPt = regionPSet.getParameter<double>("JetMinPt"); m_jetMaxEta = regionPSet.getParameter<double>("JetMaxEta"); m_jetMaxN = regionPSet.getParameter<int>("JetMaxN"); m_beamSpotTag = regionPSet.getParameter<edm::InputTag>("beamSpot"); m_precise = regionPSet.getParameter<bool>("precise"); if (regionPSet.exists("searchOpt")) m_searchOpt = regionPSet.getParameter<bool>("searchOpt"); else m_searchOpt = false; m_measurementTrackerName =""; m_whereToUseMeasurementTracker=0; if (regionPSet.exists("measurementTrackerName")) { m_measurementTrackerName = regionPSet.getParameter<std::string>("measurementTrackerName"); if (regionPSet.exists("whereToUseMeasurementTracker")) m_whereToUseMeasurementTracker = regionPSet.getParameter<double>("whereToUseMeasurementTracker"); } }
virtual TrackingRegionsFromBeamSpotAndL2Tau::~TrackingRegionsFromBeamSpotAndL2Tau | ( | ) | [inline, virtual] |
Definition at line 59 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
{}
virtual std::vector<TrackingRegion* > TrackingRegionsFromBeamSpotAndL2Tau::regions | ( | const edm::Event & | e, |
const edm::EventSetup & | es | ||
) | const [inline, virtual] |
Implements TrackingRegionProducer.
Definition at line 62 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
References abs, reco::Candidate::eta(), edm::Event::getByLabel(), i, edm::HandleBase::isValid(), metsig::jet, m_beamSpotTag, m_deltaEta, m_deltaPhi, m_jetMaxEta, m_jetMaxN, m_jetMinPt, m_jetSrc, m_measurementTrackerName, m_originHalfLength, m_originRadius, m_precise, m_ptMin, m_searchOpt, m_whereToUseMeasurementTracker, reco::Candidate::momentum(), reco::Candidate::pt(), query::result, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
{ std::vector<TrackingRegion* > result; // use beam spot to pick up the origin edm::Handle<reco::BeamSpot> bsHandle; e.getByLabel( m_beamSpotTag, bsHandle); if(!bsHandle.isValid()) return result; const reco::BeamSpot & bs = *bsHandle; GlobalPoint origin(bs.x0(), bs.y0(), bs.z0()); // pick up the candidate objects of interest edm::Handle< reco::CandidateView > objects; e.getByLabel( m_jetSrc, objects ); size_t n_objects = objects->size(); if (n_objects == 0) return result; // create maximum JetMaxN tracking regions in directions of // highest pt jets that are above threshold and are within allowed eta // (we expect that jet collection was sorted in decreasing pt order) int n_regions = 0; for (size_t i =0; i < n_objects && n_regions < m_jetMaxN; ++i) { const reco::Candidate & jet = (*objects)[i]; if ( jet.pt() < m_jetMinPt || std::abs(jet.eta()) > m_jetMaxEta ) continue; GlobalVector direction(jet.momentum().x(), jet.momentum().y(), jet.momentum().z()); RectangularEtaPhiTrackingRegion* etaphiRegion = new RectangularEtaPhiTrackingRegion( direction, origin, m_ptMin, m_originRadius, m_originHalfLength, m_deltaEta, m_deltaPhi, m_whereToUseMeasurementTracker, m_precise, m_measurementTrackerName, m_searchOpt ); result.push_back(etaphiRegion); ++n_regions; } //std::cout<<"nregions = "<<n_regions<<std::endl; return result; }
Definition at line 124 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_deltaEta [private] |
Definition at line 115 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_deltaPhi [private] |
Definition at line 116 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_jetMaxEta [private] |
Definition at line 119 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
int TrackingRegionsFromBeamSpotAndL2Tau::m_jetMaxN [private] |
Definition at line 120 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_jetMinPt [private] |
Definition at line 118 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
Definition at line 117 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
std::string TrackingRegionsFromBeamSpotAndL2Tau::m_measurementTrackerName [private] |
Definition at line 121 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_originHalfLength [private] |
Definition at line 114 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_originRadius [private] |
Definition at line 113 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
bool TrackingRegionsFromBeamSpotAndL2Tau::m_precise [private] |
Definition at line 125 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
float TrackingRegionsFromBeamSpotAndL2Tau::m_ptMin [private] |
Definition at line 112 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
bool TrackingRegionsFromBeamSpotAndL2Tau::m_searchOpt [private] |
Definition at line 123 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().
Definition at line 122 of file TrackingRegionsFromBeamSpotAndL2Tau.h.
Referenced by regions(), and TrackingRegionsFromBeamSpotAndL2Tau().