#include <L3MumuTrackingRegion.h>
Public Member Functions | |
L3MumuTrackingRegion (const edm::ParameterSet &cfg) | |
virtual std::vector < TrackingRegion * > | regions (const edm::Event &ev, const edm::EventSetup &es) const |
virtual | ~L3MumuTrackingRegion () |
Private Attributes | |
double | m_howToUseMeasurementTracker |
std::string | m_measurementTracker |
bool | m_searchOpt |
double | theDeltaEta |
double | theDeltaPhi |
edm::InputTag | theInputTrkSrc |
double | theOriginHalfLength |
double | theOriginRadius |
double | theOriginZPos |
double | thePtMin |
std::string | theVertexSrc |
bool | useVtxTks |
Definition at line 15 of file L3MumuTrackingRegion.h.
L3MumuTrackingRegion::L3MumuTrackingRegion | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 19 of file L3MumuTrackingRegion.h.
References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), m_howToUseMeasurementTracker, m_measurementTracker, m_searchOpt, theDeltaEta, theDeltaPhi, theInputTrkSrc, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and useVtxTks.
{ edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet"); theVertexSrc = regionPSet.getParameter<std::string>("vertexSrc"); theInputTrkSrc = regionPSet.getParameter<edm::InputTag>("TrkSrc"); useVtxTks = regionPSet.getParameter<bool>("UseVtxTks"); thePtMin = regionPSet.getParameter<double>("ptMin"); theOriginRadius = regionPSet.getParameter<double>("originRadius"); theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength"); theOriginZPos = regionPSet.getParameter<double>("vertexZDefault"); theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion"); theDeltaPhi = regionPSet.getParameter<double>("deltaPhiRegion"); if (regionPSet.exists("searchOpt")){ m_searchOpt = regionPSet.getParameter<bool>("searchOpt"); } else{ m_searchOpt = false; } m_measurementTracker =""; m_howToUseMeasurementTracker=0; if (regionPSet.exists("measurementTrackerName")){ m_measurementTracker = regionPSet.getParameter<std::string>("measurementTrackerName"); if (regionPSet.exists("howToUseMeasurementTracker")){ m_howToUseMeasurementTracker = regionPSet.getParameter<double>("howToUseMeasurementTracker"); } } }
virtual L3MumuTrackingRegion::~L3MumuTrackingRegion | ( | ) | [inline, virtual] |
Definition at line 51 of file L3MumuTrackingRegion.h.
{}
virtual std::vector<TrackingRegion* > L3MumuTrackingRegion::regions | ( | const edm::Event & | ev, |
const edm::EventSetup & | es | ||
) | const [inline, virtual] |
Implements TrackingRegionProducer.
Definition at line 53 of file L3MumuTrackingRegion.h.
References edm::Event::getByLabel(), m_howToUseMeasurementTracker, m_measurementTracker, m_searchOpt, edm::Handle< T >::product(), query::result, theDeltaEta, theDeltaPhi, theInputTrkSrc, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and useVtxTks.
{ 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.; } if (useVtxTks) { for(ci=vertCollection.begin();ci!=vertCollection.end();ci++) for (reco::Vertex::trackRef_iterator trackIt = ci->tracks_begin();trackIt != ci->tracks_end();trackIt++){ reco::TrackRef iTrk = (*trackIt).castTo<reco::TrackRef>() ; GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz()); result.push_back( new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(ci->z())), thePtMin, theOriginRadius, deltaZVertex, theDeltaEta, theDeltaPhi, m_howToUseMeasurementTracker, true, m_measurementTracker, m_searchOpt) ); } return result; } } edm::Handle<reco::TrackCollection> trks; ev.getByLabel(theInputTrkSrc, trks); for(reco::TrackCollection::const_iterator iTrk = trks->begin();iTrk != trks->end();iTrk++) { GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz()); result.push_back( new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(originz)), thePtMin, theOriginRadius, deltaZVertex, theDeltaEta, theDeltaPhi, m_howToUseMeasurementTracker, true, m_measurementTracker, m_searchOpt) ); } return result; }
double L3MumuTrackingRegion::m_howToUseMeasurementTracker [private] |
Definition at line 122 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
std::string L3MumuTrackingRegion::m_measurementTracker [private] |
Definition at line 121 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
bool L3MumuTrackingRegion::m_searchOpt [private] |
Definition at line 123 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::theDeltaEta [private] |
Definition at line 119 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::theDeltaPhi [private] |
Definition at line 120 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
Definition at line 110 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::theOriginHalfLength [private] |
Definition at line 116 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::theOriginRadius [private] |
Definition at line 115 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::theOriginZPos [private] |
Definition at line 117 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
double L3MumuTrackingRegion::thePtMin [private] |
Definition at line 114 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
std::string L3MumuTrackingRegion::theVertexSrc [private] |
Definition at line 109 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().
bool L3MumuTrackingRegion::useVtxTks [private] |
Definition at line 112 of file L3MumuTrackingRegion.h.
Referenced by L3MumuTrackingRegion(), and regions().