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.
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(), stringResolutionProvider_cfi::eta, reco::TrackBase::etaError(), edm::Event::getByToken(), reco::Track::innerMomentum(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), LogDebug, hpstanc_transforms::max, MeasurementTrackerEventProducer_cfi::measurementTracker, min(), lostTracks_cfi::minPt, reco::TrackBase::momentum(), reco::TrackBase::p(), phi, reco::TrackBase::phiError(), edm::Handle< T >::product(), EnergyCorrector::pt, reco::TrackBase::pt(), region(), reco::BeamSpot::sigmaZ(), theDeltaEta, theDeltaPhi, theDeltaR, theEtaMin, theEtaRegionPar1, theEtaRegionPar2, theHalfZ, theMeasurementTrackerToken, theNsigmaDz, theNsigmaEta, theNsigmaPhi, theOnDemand, thePhiMin, thePhiRegionPar1, thePhiRegionPar2, thePrecise, thePtMin, useFixedEta, useFixedPhi, useFixedPt, useFixedZ, useVertex, particleFlowSuperClusterECAL_cfi::vertexCollection, vertexCollectionToken, badGlobalMuonTaggersAOD_cff::vtx, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
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());
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
double z0() const
z coordinate
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
double sigmaZ() const
sigma z
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
double y0() const
y coordinate
bool isUninitialized() const
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
double x0() const
x coordinate