110 std::vector<std::unique_ptr<TrackingRegion>>
result;
116 for (
auto it = tracks->cbegin(), ed = tracks->cend(); it != ed && nRegions <
theMaxRegions; ++it) {
117 result.push_back(
region(*it, ev, es));
148 double pt = staTrack.
pt();
152 GlobalVector forSmallMomentum(innerMomentum.x(), innerMomentum.y(), innerMomentum.z());
153 if (staTrack.
p() <= 1.5) {
154 pt =
std::abs(forSmallMomentum.perp());
168 vertexPos =
GlobalPoint(bs->x0(), bs->y0(), bs->z0());
175 if (vtxHandleFlag && !vertexCollection->empty()) {
177 reco::VertexCollection::const_iterator vtx = vertexCollection->begin();
178 if (!vtx->isFake() && vtx->isValid()) {
179 vertexPos =
GlobalPoint(vtx->x(), vtx->y(), vtx->z());
194 double region_dEta = 0;
195 double region_dPhi = 0;
209 if (pt > 10. && pt < 100.) {
223 double region_dPhi1 =
std::min(phi, dphi);
224 double region_dEta1 =
std::min(eta, deta);
237 measurementTracker = hmte.
product();
246 auto region = std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
259 LogDebug(
"MuonTrackingRegionBuilder") <<
"the region parameters are:\n"
260 <<
"\n dirVector: " << dirVector <<
"\n vertexPos: " << vertexPos
261 <<
"\n minPt: " << minPt <<
"\n deltaR:" << deltaR <<
"\n deltaZ:" << deltaZ
262 <<
"\n region_dEta:" << region_dEta <<
"\n region_dPhi:" << region_dPhi
263 <<
"\n on demand parameter: " <<
static_cast<int>(
theOnDemand);
272 descriptions.
add(
"MuonTrackingRegionBuilder", desc);
277 descriptions.
add(
"MuonTrackingRegionBuilderHLT", desc);
280 "Build a TrackingRegion around a standalone muon. Options to define region around beamspot or primary vertex and "
281 "dynamic regions are included.");
284 desc.
add<
double>(
"EtaR_UpperLimit_Par1", 0.25);
285 desc.
add<
double>(
"DeltaR", 0.2);
287 desc.
add<
int>(
"OnDemand", -1);
289 desc.
add<
double>(
"Rescale_phi", 3.0);
290 desc.
add<
bool>(
"Eta_fixed",
false);
291 desc.
add<
double>(
"Rescale_eta", 3.0);
292 desc.
add<
double>(
"PhiR_UpperLimit_Par2", 0.2);
293 desc.
add<
double>(
"Eta_min", 0.05);
294 desc.
add<
bool>(
"Phi_fixed",
false);
295 desc.
add<
double>(
"Phi_min", 0.05);
296 desc.
add<
double>(
"PhiR_UpperLimit_Par1", 0.6);
297 desc.
add<
double>(
"EtaR_UpperLimit_Par2", 0.15);
299 desc.
add<
bool>(
"UseVertex",
false);
300 desc.
add<
double>(
"Rescale_Dz", 3.0);
301 desc.
add<
bool>(
"Pt_fixed",
false);
302 desc.
add<
bool>(
"Z_fixed",
true);
303 desc.
add<
double>(
"Pt_min", 1.5);
304 desc.
add<
double>(
"DeltaZ", 15.9);
305 desc.
add<
double>(
"DeltaEta", 0.2);
306 desc.
add<
double>(
"DeltaPhi", 0.2);
307 desc.
add<
int>(
"maxRegions", 1);
308 desc.
add<
bool>(
"precise",
true);
313 desc.
add<
double>(
"EtaR_UpperLimit_Par1", 0.25);
314 desc.
add<
double>(
"DeltaR", 0.2);
316 desc.
add<
int>(
"OnDemand", -1);
318 desc.
add<
double>(
"Rescale_phi", 3.0);
319 desc.
add<
bool>(
"Eta_fixed",
false);
320 desc.
add<
double>(
"Rescale_eta", 3.0);
321 desc.
add<
double>(
"PhiR_UpperLimit_Par2", 0.2);
322 desc.
add<
double>(
"Eta_min", 0.05);
323 desc.
add<
bool>(
"Phi_fixed",
false);
324 desc.
add<
double>(
"Phi_min", 0.05);
325 desc.
add<
double>(
"PhiR_UpperLimit_Par1", 0.6);
326 desc.
add<
double>(
"EtaR_UpperLimit_Par2", 0.15);
328 desc.
add<
bool>(
"UseVertex",
false);
329 desc.
add<
double>(
"Rescale_Dz", 3.0);
330 desc.
add<
bool>(
"Pt_fixed",
false);
331 desc.
add<
bool>(
"Z_fixed",
true);
332 desc.
add<
double>(
"Pt_min", 1.5);
333 desc.
add<
double>(
"DeltaZ", 15.9);
334 desc.
add<
double>(
"DeltaEta", 0.2);
335 desc.
add<
double>(
"DeltaPhi", 0.2);
336 desc.
add<
int>(
"maxRegions", 1);
337 desc.
add<
bool>(
"precise",
true);
double p() const
momentum vector magnitude
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
const edm::EventSetup * theEventSetup
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
double etaError() const
error on eta
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > msmakerToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Add Fill Descriptions.
std::vector< Vertex > VertexCollection
collection of Vertex objects
auto const & tracks
cannot be loose
const Vector & momentum() const
track momentum vector
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
bool getData(T &iHolder) const
const edm::Event * theEvent
void build(const edm::ParameterSet &, edm::ConsumesCollector &)
double pt() const
track transverse momentum
void setEvent(const edm::Event &, const edm::EventSetup &)
Pass the Event to the algo at each event.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfieldToken
double phiError() const
error on phi
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &, const edm::EventSetup &) const override
Create Region of Interest.
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
static void fillDescriptionsOffline(edm::ParameterSetDescription &descriptions)
static UseMeasurementTracker intToUseMeasurementTracker(int value)
static void fillDescriptionsHLT(edm::ParameterSetDescription &descriptions)
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken