101 std::vector<std::unique_ptr<TrackingRegion>>
result;
107 for (
auto it = tracks->cbegin(), ed = tracks->cend(); it != ed && nRegions <
theMaxRegions; ++it) {
108 result.push_back(
region(*it,ev));
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);
258 desc.
add<
double>(
"EtaR_UpperLimit_Par1",0.25);
259 desc.
add<
double>(
"DeltaR",0.2);
261 desc.
add<
int>(
"OnDemand",-1);
263 desc.
add<
double>(
"Rescale_phi",3.0);
264 desc.
add<
bool>(
"Eta_fixed",
false);
265 desc.
add<
double>(
"Rescale_eta",3.0);
266 desc.
add<
double>(
"PhiR_UpperLimit_Par2",0.2);
267 desc.
add<
double>(
"Eta_min",0.05);
268 desc.
add<
bool>(
"Phi_fixed",
false);
269 desc.
add<
double>(
"Phi_min",0.05);
270 desc.
add<
double>(
"PhiR_UpperLimit_Par1",0.6);
271 desc.
add<
double>(
"EtaR_UpperLimit_Par2",0.15);
273 desc.
add<
bool>(
"UseVertex",
false);
274 desc.
add<
double>(
"Rescale_Dz",3.0);
275 desc.
add<
bool>(
"Pt_fixed",
false);
276 desc.
add<
bool>(
"Z_fixed",
true);
277 desc.
add<
double>(
"Pt_min",1.5);
278 desc.
add<
double>(
"DeltaZ",15.9);
279 desc.
add<
double>(
"DeltaEta",0.2);
280 desc.
add<
double>(
"DeltaPhi",0.2);
281 desc.
add<
int>(
"maxRegions",1);
282 desc.
add<
bool>(
"precise",
true);
284 descriptions.
add(
"MuonTrackingRegionBuilder",desc);
288 desc.
add<
double>(
"EtaR_UpperLimit_Par1",0.25);
289 desc.
add<
double>(
"DeltaR",0.2);
291 desc.
add<
int>(
"OnDemand",-1);
293 desc.
add<
double>(
"Rescale_phi",3.0);
294 desc.
add<
bool>(
"Eta_fixed",
false);
295 desc.
add<
double>(
"Rescale_eta",3.0);
296 desc.
add<
double>(
"PhiR_UpperLimit_Par2",0.2);
297 desc.
add<
double>(
"Eta_min",0.05);
298 desc.
add<
bool>(
"Phi_fixed",
false);
299 desc.
add<
double>(
"Phi_min",0.05);
300 desc.
add<
double>(
"PhiR_UpperLimit_Par1",0.6);
301 desc.
add<
double>(
"EtaR_UpperLimit_Par2",0.15);
303 desc.
add<
bool>(
"UseVertex",
false);
304 desc.
add<
double>(
"Rescale_Dz",3.0);
305 desc.
add<
bool>(
"Pt_fixed",
false);
306 desc.
add<
bool>(
"Z_fixed",
true);
307 desc.
add<
double>(
"Pt_min",1.5);
308 desc.
add<
double>(
"DeltaZ",15.9);
309 desc.
add<
double>(
"DeltaEta",0.2);
310 desc.
add<
double>(
"DeltaPhi",0.2);
311 desc.
add<
int>(
"maxRegions",1);
312 desc.
add<
bool>(
"precise",
true);
314 descriptions.
add(
"hltMuonTrackingRegionBuilder",desc);
316 descriptions.
setComment(
"Build a TrackingRegion around a standalone muon. Options to define region around beamspot or primary vertex and dynamic regions are included.");
double p() const
momentum vector magnitude
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
static void fillDescriptions(edm::ParameterSetDescription &descriptions)
Add Fill Descriptions.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
virtual void setEvent(const edm::Event &)
Pass the Event to the algo at each event.
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
double etaError() const
error on eta
std::vector< Vertex > VertexCollection
collection of Vertex objects
const Vector & momentum() const
track momentum vector
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
const edm::Event * theEvent
void setComment(std::string const &value)
void build(const edm::ParameterSet &, edm::ConsumesCollector &)
double pt() const
track transverse momentum
double phiError() const
error on phi
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double deltaR(double eta1, double eta2, double phi1, double phi2)
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken
virtual 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
bool isUninitialized() const
static UseMeasurementTracker intToUseMeasurementTracker(int value)
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken