Build a TrackingRegion around a standalone muon
Options: Beamspot : Origin is defined by primary vertex Vertex : Origin is defined by primary vertex (first valid vertex in the VertexCollection) if no vertex is found the beamspot is used instead DynamicZError DynamicEtaError DynamicphiError
- Author
- N. Neumeister Purdue University
-
A. Everett Purdue University
Definition at line 40 of file MuonTrackingRegionBuilder.h.
Class: MuonTrackingRegionBuilder
Build a TrackingRegion around a standalone muon
- Author
- N. Neumeister Purdue University
-
A. Everett Purdue University
Definition at line 32 of file MuonTrackingRegionBuilder.cc.
References beamSpotToken, edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), inputCollectionToken, RectangularEtaPhiTrackingRegion::intToUseMeasurementTracker(), RectangularEtaPhiTrackingRegion::kNever, theDeltaEta, theDeltaPhi, theDeltaR, theEtaMin, theEtaRegionPar1, theEtaRegionPar2, theHalfZ, theMaxRegions, theMeasurementTrackerToken, theNsigmaDz, theNsigmaEta, theNsigmaPhi, theOnDemand, thePhiMin, thePhiRegionPar1, thePhiRegionPar2, thePrecise, thePtMin, useFixedEta, useFixedPhi, useFixedPt, useFixedZ, useVertex, and vertexCollectionToken.
Referenced by MuonTrackingRegionBuilder().
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
std::vector< Track > TrackCollection
collection of Tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
static UseMeasurementTracker intToUseMeasurementTracker(int value)
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
Definition at line 136 of file MuonTrackingRegionBuilder.cc.
References funct::abs(), beamSpotToken, deltaR(), eta, reco::TrackBase::etaError(), edm::Event::getByToken(), reco::Track::innerMomentum(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), LogDebug, bookConverter::max, HLT_25ns10e33_v2_cff::measurementTracker, min(), HLT_25ns10e33_v2_cff::minPt, reco::TrackBase::momentum(), reco::TrackBase::p(), phi, reco::TrackBase::phiError(), edm::Handle< T >::product(), EnergyCorrector::pt, reco::TrackBase::pt(), region(), theDeltaEta, theDeltaPhi, theDeltaR, theEtaMin, theEtaRegionPar1, theEtaRegionPar2, theHalfZ, theMeasurementTrackerToken, theNsigmaDz, theNsigmaEta, theNsigmaPhi, theOnDemand, thePhiMin, thePhiRegionPar1, thePhiRegionPar2, thePrecise, thePtMin, useFixedEta, useFixedPhi, useFixedPt, useFixedZ, useVertex, GoodVertex_cfg::vertexCollection, and vertexCollectionToken.
141 double pt = staTrack.
pt();
145 GlobalVector forSmallMomentum(innerMomentum.x(),innerMomentum.y(),innerMomentum.z());
146 if ( staTrack.
p() <= 1.5 ) {
147 pt =
std::abs(forSmallMomentum.perp());
161 vertexPos =
GlobalPoint(bs->x0(), bs->y0(), bs->z0());
168 if ( vtxHandleFlag && !vertexCollection->empty() ) {
170 reco::VertexCollection::const_iterator vtx = vertexCollection->begin();
171 if (!vtx->isFake() && vtx->isValid() ) {
172 vertexPos =
GlobalPoint(vtx->x(),vtx->y(),vtx->z());
187 double region_dEta = 0;
188 double region_dPhi = 0;
202 if ( pt > 10. && pt < 100. ) {
216 double region_dPhi1 =
std::min(phi,dphi);
217 double region_dEta1 =
std::min(eta,deta);
231 measurementTracker = hmte.
product();
234 auto region = std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector, vertexPos,
236 deltaZ, region_dEta, region_dPhi,
241 LogDebug(
"MuonTrackingRegionBuilder")<<
"the region parameters are:\n"
242 <<
"\n dirVector: "<<dirVector
243 <<
"\n vertexPos: "<<vertexPos
244 <<
"\n minPt: "<<minPt
245 <<
"\n deltaR:"<<deltaR
246 <<
"\n deltaZ:"<<deltaZ
247 <<
"\n region_dEta:"<<region_dEta
248 <<
"\n region_dPhi:"<<region_dPhi
249 <<
"\n on demand parameter: "<<
static_cast<int>(
theOnDemand);
double p() const
momentum vector magnitude
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
Global3DPoint GlobalPoint
double etaError() const
error on eta
const Vector & momentum() const
track momentum vector
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
double pt() const
track transverse momentum
double phiError() const
error on phi
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
Abs< T >::type abs(const T &t)
double deltaR(double eta1, double eta2, double phi1, double phi2)
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
bool isUninitialized() const
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken