CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
MuonTrackingRegionBuilder Class Reference

#include <MuonTrackingRegionBuilder.h>

Inheritance diagram for MuonTrackingRegionBuilder:
TrackingRegionProducer

Public Member Functions

 MuonTrackingRegionBuilder (const edm::ParameterSet &par, edm::ConsumesCollector &iC)
 Constructor. More...
 
 MuonTrackingRegionBuilder (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
std::unique_ptr< RectangularEtaPhiTrackingRegionregion (const reco::TrackRef &) const
 Define tracking region. More...
 
std::unique_ptr< RectangularEtaPhiTrackingRegionregion (const reco::Track &t) const
 
std::unique_ptr< RectangularEtaPhiTrackingRegionregion (const reco::Track &, const edm::Event &, const edm::EventSetup &) const
 
std::vector< std::unique_ptr< TrackingRegion > > regions (const edm::Event &, const edm::EventSetup &) const override
 Create Region of Interest. More...
 
void setEvent (const edm::Event &, const edm::EventSetup &)
 Pass the Event to the algo at each event. More...
 
 ~MuonTrackingRegionBuilder () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingRegionProducer
virtual ~TrackingRegionProducer ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 Add Fill Descriptions. More...
 
static void fillDescriptionsHLT (edm::ParameterSetDescription &descriptions)
 
static void fillDescriptionsOffline (edm::ParameterSetDescription &descriptions)
 

Private Member Functions

void build (const edm::ParameterSet &, edm::ConsumesCollector &)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordbfieldToken
 
edm::EDGetTokenT< reco::TrackCollectioninputCollectionToken
 
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecordmsmakerToken
 
double theDeltaEta
 
double theDeltaPhi
 
double theDeltaR
 
double theEtaMin
 
double theEtaRegionPar1
 
double theEtaRegionPar2
 
const edm::EventtheEvent
 
const edm::EventSetuptheEventSetup
 
double theHalfZ
 
int theMaxRegions
 
edm::EDGetTokenT< MeasurementTrackerEventtheMeasurementTrackerToken
 
double theNsigmaDz
 
double theNsigmaEta
 
double theNsigmaPhi
 
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
 
double thePhiMin
 
double thePhiRegionPar1
 
double thePhiRegionPar2
 
bool thePrecise
 
double thePtMin
 
bool useFixedEta
 
bool useFixedPhi
 
bool useFixedPt
 
bool useFixedZ
 
bool useVertex
 
edm::EDGetTokenT< reco::VertexCollectionvertexCollectionToken
 

Detailed Description

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 42 of file MuonTrackingRegionBuilder.h.

Constructor & Destructor Documentation

◆ MuonTrackingRegionBuilder() [1/2]

MuonTrackingRegionBuilder::MuonTrackingRegionBuilder ( const edm::ParameterSet par,
edm::ConsumesCollector iC 
)
inlineexplicit

Constructor.

Definition at line 45 of file MuonTrackingRegionBuilder.h.

References build().

45 { build(par, iC); }
void build(const edm::ParameterSet &, edm::ConsumesCollector &)

◆ MuonTrackingRegionBuilder() [2/2]

MuonTrackingRegionBuilder::MuonTrackingRegionBuilder ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 46 of file MuonTrackingRegionBuilder.h.

References build().

46 { build(par, iC); }
void build(const edm::ParameterSet &, edm::ConsumesCollector &)

◆ ~MuonTrackingRegionBuilder()

MuonTrackingRegionBuilder::~MuonTrackingRegionBuilder ( )
inlineoverride

Destructor.

Definition at line 49 of file MuonTrackingRegionBuilder.h.

49 {}

Member Function Documentation

◆ build()

void MuonTrackingRegionBuilder::build ( const edm::ParameterSet par,
edm::ConsumesCollector iC 
)
private

Class: MuonTrackingRegionBuilder

Build a TrackingRegion around a standalone muon

Author
N. Neumeister Purdue University
A. Everett Purdue University

Definition at line 37 of file MuonTrackingRegionBuilder.cc.

References beamSpotToken, bfieldToken, edm::ConsumesCollector::consumes(), edm::ConsumesCollector::esConsumes(), edm::ParameterSet::getParameter(), inputCollectionToken, RectangularEtaPhiTrackingRegion::intToUseMeasurementTracker(), RectangularEtaPhiTrackingRegion::kNever, msmakerToken, 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().

37  {
38  // Adjust errors on Eta, Phi, Z
39  theNsigmaEta = par.getParameter<double>("Rescale_eta");
40  theNsigmaPhi = par.getParameter<double>("Rescale_phi");
41  theNsigmaDz = par.getParameter<double>("Rescale_Dz");
42 
43  // Upper limits parameters
44  theEtaRegionPar1 = par.getParameter<double>("EtaR_UpperLimit_Par1");
45  theEtaRegionPar2 = par.getParameter<double>("EtaR_UpperLimit_Par2");
46  thePhiRegionPar1 = par.getParameter<double>("PhiR_UpperLimit_Par1");
47  thePhiRegionPar2 = par.getParameter<double>("PhiR_UpperLimit_Par2");
48 
49  // Flag to switch to use Vertices instead of BeamSpot
50  useVertex = par.getParameter<bool>("UseVertex");
51 
52  // Flag to use fixed limits for Eta, Phi, Z, pT
53  useFixedZ = par.getParameter<bool>("Z_fixed");
54  useFixedPt = par.getParameter<bool>("Pt_fixed");
55  useFixedPhi = par.getParameter<bool>("Phi_fixed");
56  useFixedEta = par.getParameter<bool>("Eta_fixed");
57 
58  // Minimum value for pT
59  thePtMin = par.getParameter<double>("Pt_min");
60 
61  // Minimum value for Phi
62  thePhiMin = par.getParameter<double>("Phi_min");
63 
64  // Minimum value for Eta
65  theEtaMin = par.getParameter<double>("Eta_min");
66 
67  // The static region size along the Z direction
68  theHalfZ = par.getParameter<double>("DeltaZ");
69 
70  // The transverse distance of the region from the BS/PV
71  theDeltaR = par.getParameter<double>("DeltaR");
72 
73  // The static region size in Eta
74  theDeltaEta = par.getParameter<double>("DeltaEta");
75 
76  // The static region size in Phi
77  theDeltaPhi = par.getParameter<double>("DeltaPhi");
78 
79  // Maximum number of regions to build when looping over Muons
80  theMaxRegions = par.getParameter<int>("maxRegions");
81 
82  // Flag to use precise??
83  thePrecise = par.getParameter<bool>("precise");
84 
85  // perigee reference point ToDo: Check this
89  iC.consumes<MeasurementTrackerEvent>(par.getParameter<edm::InputTag>("MeasurementTrackerName"));
90  }
91 
92  // Vertex collection and Beam Spot
95 
96  // Input muon collection
98 
99  bfieldToken = iC.esConsumes();
100  if (thePrecise) {
101  msmakerToken = iC.esConsumes();
102  }
103 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > msmakerToken
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfieldToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
static UseMeasurementTracker intToUseMeasurementTracker(int value)
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken

◆ fillDescriptions()

void MuonTrackingRegionBuilder::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Add Fill Descriptions.

Definition at line 268 of file MuonTrackingRegionBuilder.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillDescriptionsHLT(), fillDescriptionsOffline(), and edm::ConfigurationDescriptions::setComment().

268  {
269  {
272  descriptions.add("MuonTrackingRegionBuilder", desc);
273  }
274  {
277  descriptions.add("MuonTrackingRegionBuilderHLT", desc);
278  }
279  descriptions.setComment(
280  "Build a TrackingRegion around a standalone muon. Options to define region around beamspot or primary vertex and "
281  "dynamic regions are included.");
282 }
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptionsOffline(edm::ParameterSetDescription &descriptions)
static void fillDescriptionsHLT(edm::ParameterSetDescription &descriptions)

◆ fillDescriptionsHLT()

void MuonTrackingRegionBuilder::fillDescriptionsHLT ( edm::ParameterSetDescription descriptions)
static

Definition at line 283 of file MuonTrackingRegionBuilder.cc.

References submitPVResolutionJobs::desc, and HLT_2022v15_cff::InputTag.

Referenced by L3MuonTrajectoryBuilder::fillDescriptions(), and fillDescriptions().

283  {
284  desc.add<double>("EtaR_UpperLimit_Par1", 0.25);
285  desc.add<double>("DeltaR", 0.2);
286  desc.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot"));
287  desc.add<int>("OnDemand", -1);
288  desc.add<edm::InputTag>("vertexCollection", edm::InputTag("pixelVertices"));
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);
298  desc.add<edm::InputTag>("MeasurementTrackerName", edm::InputTag("hltESPMeasurementTracker"));
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);
309  desc.add<edm::InputTag>("input", edm::InputTag("hltL2Muons", "UpdatedAtVtx"));
310 }

◆ fillDescriptionsOffline()

void MuonTrackingRegionBuilder::fillDescriptionsOffline ( edm::ParameterSetDescription descriptions)
static

Definition at line 312 of file MuonTrackingRegionBuilder.cc.

References submitPVResolutionJobs::desc, and HLT_2022v15_cff::InputTag.

Referenced by HIMuonTrackingRegionProducer::fillDescriptions(), and fillDescriptions().

312  {
313  desc.add<double>("EtaR_UpperLimit_Par1", 0.25);
314  desc.add<double>("DeltaR", 0.2);
315  desc.add<edm::InputTag>("beamSpot", edm::InputTag(""));
316  desc.add<int>("OnDemand", -1);
317  desc.add<edm::InputTag>("vertexCollection", edm::InputTag(""));
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);
327  desc.add<edm::InputTag>("MeasurementTrackerName", edm::InputTag(""));
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);
338  desc.add<edm::InputTag>("input", edm::InputTag(""));
339 }

◆ region() [1/3]

std::unique_ptr< RectangularEtaPhiTrackingRegion > MuonTrackingRegionBuilder::region ( const reco::TrackRef track) const

Define tracking region.

Definition at line 127 of file MuonTrackingRegionBuilder.cc.

References HLT_2022v15_cff::track.

Referenced by GlobalTrajectoryBuilderBase::defineRegionOfInterest(), region(), HIMuonTrackingRegionProducer::regions(), and regions().

127  {
128  return region(*track);
129 }
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.

◆ region() [2/3]

std::unique_ptr<RectangularEtaPhiTrackingRegion> MuonTrackingRegionBuilder::region ( const reco::Track t) const
inline

Definition at line 56 of file MuonTrackingRegionBuilder.h.

References region(), submitPVValidationJobs::t, theEvent, and theEventSetup.

56  {
57  return region(t, *theEvent, *theEventSetup);
58  }
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
const edm::EventSetup * theEventSetup

◆ region() [3/3]

std::unique_ptr< RectangularEtaPhiTrackingRegion > MuonTrackingRegionBuilder::region ( const reco::Track staTrack,
const edm::Event ev,
const edm::EventSetup es 
) const

Definition at line 142 of file MuonTrackingRegionBuilder.cc.

References funct::abs(), beamSpotToken, bfieldToken, cms::cuda::bs, PbPb_ZMuSkimMuonDPG_cff::deltaR, l1tTrackerHTMiss_cfi::deltaZ, PVValHelper::eta, reco::TrackBase::etaError(), makeMEIFBenchmarkPlots::ev, edm::EventSetup::getData(), reco::Track::innerMomentum(), edm::EDGetTokenT< T >::isUninitialized(), LogDebug, SiStripPI::max, HLTSiStripMonitoring_cff::measurementTracker, SiStripPI::min, PV_cfg::minPt, reco::TrackBase::momentum(), msmakerToken, reco::TrackBase::p(), phi, reco::TrackBase::phiError(), edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::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, spclusmultinvestigator_cfi::vertexCollection, vertexCollectionToken, and extraflags_cff::vtx.

144  {
145  // get track momentum/direction at vertex
146  const math::XYZVector& mom = staTrack.momentum();
147  GlobalVector dirVector(mom.x(), mom.y(), mom.z());
148  double pt = staTrack.pt();
149 
150  // Fix for StandAlone tracks with low momentum
151  const math::XYZVector& innerMomentum = staTrack.innerMomentum();
152  GlobalVector forSmallMomentum(innerMomentum.x(), innerMomentum.y(), innerMomentum.z());
153  if (staTrack.p() <= 1.5) {
154  pt = std::abs(forSmallMomentum.perp());
155  }
156 
157  // initial vertex position - in the following it is replaced with beamspot/vertexing
158  GlobalPoint vertexPos(0.0, 0.0, 0.0);
159  // standard 15.9, if useVertex than use error from vertex
160  double deltaZ = theHalfZ;
161 
162  // retrieve beam spot information
164  bool bsHandleFlag = ev.getByToken(beamSpotToken, bs);
165 
166  // check the validity, otherwise vertexing
167  if (bsHandleFlag && bs.isValid() && !useVertex) {
168  vertexPos = GlobalPoint(bs->x0(), bs->y0(), bs->z0());
169  deltaZ = useFixedZ ? theHalfZ : bs->sigmaZ() * theNsigmaDz;
170  } else {
171  // get originZPos from list of reconstructed vertices (first or all)
173  bool vtxHandleFlag = ev.getByToken(vertexCollectionToken, vertexCollection);
174  // check if there exists at least one reconstructed vertex
175  if (vtxHandleFlag && !vertexCollection->empty()) {
176  // use the first vertex in the collection and assume it is the primary event vertex
177  reco::VertexCollection::const_iterator vtx = vertexCollection->begin();
178  if (!vtx->isFake() && vtx->isValid()) {
179  vertexPos = GlobalPoint(vtx->x(), vtx->y(), vtx->z());
180  deltaZ = useFixedZ ? theHalfZ : vtx->zError() * theNsigmaDz;
181  }
182  }
183  }
184 
185  // inizialize to the maximum possible value
186  double deta = 0.4;
187  double dphi = 0.6;
188 
189  // evaluate the dynamical region if possible
190  deta = theNsigmaEta * (staTrack.etaError());
191  dphi = theNsigmaPhi * (staTrack.phiError());
192 
193  // Region_Parametrizations to take into account possible L2 error matrix inconsistencies
194  double region_dEta = 0;
195  double region_dPhi = 0;
196  double eta = 0;
197  double phi = 0;
198 
199  // eta, pt parametrization from MC study (circa 2009?)
200  if (pt <= 10.) {
201  // angular coefficients
202  float acoeff_Phi = (thePhiRegionPar2 - thePhiRegionPar1) / 5;
203  float acoeff_Eta = (theEtaRegionPar2 - theEtaRegionPar1) / 5;
204 
205  eta = theEtaRegionPar1 + (acoeff_Eta) * (pt - 5.);
206  phi = thePhiRegionPar1 + (acoeff_Phi) * (pt - 5.);
207  }
208  // parametrization 2nd bin in pt from MC study
209  if (pt > 10. && pt < 100.) {
212  }
213  // parametrization 3rd bin in pt from MC study
214  if (pt >= 100.) {
215  // angular coefficients
216  float acoeff_Phi = (thePhiRegionPar1 - thePhiRegionPar2) / 900;
217  float acoeff_Eta = (theEtaRegionPar1 - theEtaRegionPar2) / 900;
218 
219  eta = theEtaRegionPar2 + (acoeff_Eta) * (pt - 100.);
220  phi = thePhiRegionPar2 + (acoeff_Phi) * (pt - 100.);
221  }
222 
223  double region_dPhi1 = std::min(phi, dphi);
224  double region_dEta1 = std::min(eta, deta);
225 
226  // decide to use either a parametrization or a dynamical region
227  region_dPhi = useFixedPhi ? theDeltaPhi : std::max(thePhiMin, region_dPhi1);
228  region_dEta = useFixedEta ? theDeltaEta : std::max(theEtaMin, region_dEta1);
229 
230  float deltaR = theDeltaR;
231  double minPt = useFixedPt ? thePtMin : std::max(thePtMin, pt * 0.6);
232 
236  ev.getByToken(theMeasurementTrackerToken, hmte);
237  measurementTracker = hmte.product();
238  }
239 
240  const auto& bfield = es.getData(bfieldToken);
241  const MultipleScatteringParametrisationMaker* msmaker = nullptr;
242  if (thePrecise) {
243  msmaker = &es.getData(msmakerToken);
244  }
245 
246  auto region = std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
247  vertexPos,
248  minPt,
249  deltaR,
250  deltaZ,
251  region_dEta,
252  region_dPhi,
253  bfield,
254  msmaker,
255  thePrecise,
256  theOnDemand,
258 
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);
264 
265  return region;
266 }
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
double p() const
momentum vector magnitude
Definition: TrackBase.h:632
T const * product() const
Definition: Handle.h:70
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:104
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > msmakerToken
minPt
Definition: PV_cfg.py:223
double pt() const
track transverse momentum
Definition: TrackBase.h:638
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bfieldToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker theOnDemand
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:665
edm::EDGetTokenT< reco::VertexCollection > vertexCollectionToken
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
double phiError() const
error on phi
Definition: TrackBase.h:767
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
double etaError() const
error on eta
Definition: TrackBase.h:764
#define LogDebug(id)

◆ regions()

std::vector< std::unique_ptr< TrackingRegion > > MuonTrackingRegionBuilder::regions ( const edm::Event ev,
const edm::EventSetup es 
) const
overridevirtual

Create Region of Interest.

Implements TrackingRegionProducer.

Definition at line 108 of file MuonTrackingRegionBuilder.cc.

References makeMEIFBenchmarkPlots::ev, inputCollectionToken, region(), mps_fire::result, theMaxRegions, and pwdgSkimBPark_cfi::tracks.

109  {
110  std::vector<std::unique_ptr<TrackingRegion>> result;
111 
113  ev.getByToken(inputCollectionToken, tracks);
114 
115  int nRegions = 0;
116  for (auto it = tracks->cbegin(), ed = tracks->cend(); it != ed && nRegions < theMaxRegions; ++it) {
117  result.push_back(region(*it, ev, es));
118  nRegions++;
119  }
120 
121  return result;
122 }
std::unique_ptr< RectangularEtaPhiTrackingRegion > region(const reco::TrackRef &) const
Define tracking region.
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken

◆ setEvent()

void MuonTrackingRegionBuilder::setEvent ( const edm::Event event,
const edm::EventSetup es 
)

Pass the Event to the algo at each event.

Definition at line 134 of file MuonTrackingRegionBuilder.cc.

References edmPickEvents::event, theEvent, and theEventSetup.

Referenced by HIMuonTrackingRegionProducer::regions(), and GlobalTrajectoryBuilderBase::setEvent().

134  {
135  theEvent = &event;
136  theEventSetup = &es;
137 }
const edm::EventSetup * theEventSetup

Member Data Documentation

◆ beamSpotToken

edm::EDGetTokenT<reco::BeamSpot> MuonTrackingRegionBuilder::beamSpotToken
private

Definition at line 105 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ bfieldToken

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> MuonTrackingRegionBuilder::bfieldToken
private

Definition at line 108 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ inputCollectionToken

edm::EDGetTokenT<reco::TrackCollection> MuonTrackingRegionBuilder::inputCollectionToken
private

Definition at line 107 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and regions().

◆ msmakerToken

Definition at line 109 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theDeltaEta

double MuonTrackingRegionBuilder::theDeltaEta
private

Definition at line 101 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theDeltaPhi

double MuonTrackingRegionBuilder::theDeltaPhi
private

Definition at line 100 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theDeltaR

double MuonTrackingRegionBuilder::theDeltaR
private

Definition at line 98 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theEtaMin

double MuonTrackingRegionBuilder::theEtaMin
private

Definition at line 97 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theEtaRegionPar1

double MuonTrackingRegionBuilder::theEtaRegionPar1
private

Definition at line 90 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theEtaRegionPar2

double MuonTrackingRegionBuilder::theEtaRegionPar2
private

Definition at line 91 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theEvent

const edm::Event* MuonTrackingRegionBuilder::theEvent
private

Definition at line 74 of file MuonTrackingRegionBuilder.h.

Referenced by region(), and setEvent().

◆ theEventSetup

const edm::EventSetup* MuonTrackingRegionBuilder::theEventSetup
private

Definition at line 75 of file MuonTrackingRegionBuilder.h.

Referenced by region(), and setEvent().

◆ theHalfZ

double MuonTrackingRegionBuilder::theHalfZ
private

Definition at line 99 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theMaxRegions

int MuonTrackingRegionBuilder::theMaxRegions
private

Definition at line 84 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and regions().

◆ theMeasurementTrackerToken

edm::EDGetTokenT<MeasurementTrackerEvent> MuonTrackingRegionBuilder::theMeasurementTrackerToken
private

Definition at line 104 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theNsigmaDz

double MuonTrackingRegionBuilder::theNsigmaDz
private

Definition at line 88 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theNsigmaEta

double MuonTrackingRegionBuilder::theNsigmaEta
private

Definition at line 86 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theNsigmaPhi

double MuonTrackingRegionBuilder::theNsigmaPhi
private

Definition at line 87 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ theOnDemand

RectangularEtaPhiTrackingRegion::UseMeasurementTracker MuonTrackingRegionBuilder::theOnDemand
private

Definition at line 103 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ thePhiMin

double MuonTrackingRegionBuilder::thePhiMin
private

Definition at line 96 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ thePhiRegionPar1

double MuonTrackingRegionBuilder::thePhiRegionPar1
private

Definition at line 92 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ thePhiRegionPar2

double MuonTrackingRegionBuilder::thePhiRegionPar2
private

Definition at line 93 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ thePrecise

bool MuonTrackingRegionBuilder::thePrecise
private

Definition at line 82 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ thePtMin

double MuonTrackingRegionBuilder::thePtMin
private

Definition at line 95 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ useFixedEta

bool MuonTrackingRegionBuilder::useFixedEta
private

Definition at line 81 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ useFixedPhi

bool MuonTrackingRegionBuilder::useFixedPhi
private

Definition at line 80 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ useFixedPt

bool MuonTrackingRegionBuilder::useFixedPt
private

Definition at line 79 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ useFixedZ

bool MuonTrackingRegionBuilder::useFixedZ
private

Definition at line 78 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ useVertex

bool MuonTrackingRegionBuilder::useVertex
private

Definition at line 77 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().

◆ vertexCollectionToken

edm::EDGetTokenT<reco::VertexCollection> MuonTrackingRegionBuilder::vertexCollectionToken
private

Definition at line 106 of file MuonTrackingRegionBuilder.h.

Referenced by build(), and region().