1 #ifndef RecoTracker_TkTrackingRegions_L1MuonSeededTrackingRegionsProducer_h 2 #define RecoTracker_TkTrackingRegions_L1MuonSeededTrackingRegionsProducer_h 25 #include "CLHEP/Vector/ThreeVector.h" 61 l1MinPt_(iConfig.getParameter<double>(
"L1MinPt")),
62 l1MaxEta_(iConfig.getParameter<double>(
"L1MaxEta")),
64 minPtBarrel_(iConfig.getParameter<double>(
"SetMinPtBarrelTo")),
65 minPtEndcap_(iConfig.getParameter<double>(
"SetMinPtEndcapTo")),
72 if (modeString ==
"BeamSpotFixed")
74 else if (modeString ==
"BeamSpotSigma")
76 else if (modeString ==
"VerticesFixed")
78 else if (modeString ==
"VerticesSigma")
81 edm::LogError(
"L1MuonSeededTrackingRegionsProducer") <<
"Unknown mode string: " << modeString;
99 edm::LogError(
"L1MuonSeededTrackingRegionsProducer") <<
"Size of ptRanges does not be less than 2" << std::endl;
104 <<
"Size of deltaEtas does not match number of pt bins." << std::endl;
109 <<
"Size of deltaPhis does not match number of pt bins." << std::endl;
132 <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
150 desc.add<
double>(
"L1MinPt", -1.);
151 desc.add<
double>(
"L1MaxEta", 5.0);
152 desc.add<
unsigned int>(
"L1MinQuality", 0);
153 desc.add<
double>(
"SetMinPtBarrelTo", 3.5);
154 desc.add<
double>(
"SetMinPtEndcapTo", 1.0);
155 desc.add<
bool>(
"CentralBxOnly",
true);
161 descRegion.add<
int>(
"maxNRegions", 10);
164 descRegion.add<
int>(
"maxNVertices", 1);
165 descRegion.add<
double>(
"ptMin", 0.0);
166 descRegion.add<
double>(
"originRadius", 0.2);
167 descRegion.add<
double>(
"zErrorBeamSpot", 24.2);
168 descRegion.add<std::vector<double>>(
"ptRanges", {0., 1.e9});
169 descRegion.add<std::vector<double>>(
"deltaEtas", {0.35});
170 descRegion.add<std::vector<double>>(
"deltaPhis", {0.2});
171 descRegion.add<
bool>(
"precise",
true);
172 descRegion.add<
double>(
"nSigmaZVertex", 3.);
173 descRegion.add<
double>(
"zErrorVetex", 0.2);
174 descRegion.add<
double>(
"nSigmaZBeamSpot", 4.);
175 descRegion.add<
std::string>(
"whereToUseMeasurementTracker",
"Never");
177 descRegion.add<
bool>(
"searchOpt",
false);
182 psd0.
addUntracked<std::vector<std::string>>(
"Propagators", {
"SteppingHelixPropagatorAny"});
183 psd0.add<
bool>(
"RPCLayers",
false);
184 psd0.addUntracked<
bool>(
"UseMuonNavigation",
false);
187 descriptions.
add(
"hltIterL3MuonPixelTracksTrackingRegions",
desc);
192 std::vector<std::unique_ptr<TrackingRegion>>
result;
197 if (muColl->
size() == 0)
210 std::vector<std::pair<GlobalPoint, float>> origins;
214 origins.push_back(std::make_pair(
220 for (reco::VertexCollection::const_iterator
v =
vertices->begin();
223 if (
v->isFake() || !
v->isValid())
226 origins.push_back(std::make_pair(
GlobalPoint(
v->x(),
v->y(),
v->z()),
231 if (origins.empty()) {
232 origins.push_back(std::make_pair(
261 float eta =
it->eta();
266 float phi =
it->phi();
268 int valid_charge =
it->hwChargeValid();
284 CLHEP::Hep3Vector vec(0., 1., 0.);
293 detLayer =
service_->detLayerGeometry()->idToLayer(theid);
306 detLayer =
service_->detLayerGeometry()->idToLayer(theid);
350 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
367 edm::LogInfo(
"L1MuonSeededTrackingRegionsProducer") <<
"produced " << n_regions <<
" regions";
static constexpr double sigma_x_
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const bool centralBxOnly_
T getParameter(std::string const &) const
static constexpr int l1MuonTF_link_EMTFP_f_
virtual const Surface::PositionType & position() const
Returns position of the surface.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const std::string propagatorName_
Sin< T >::type sin(const T &t)
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
std::vector< Vertex > VertexCollection
collection of Vertex objects
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
std::vector< double > m_deltaEtas
const double minPtEndcap_
edm::EDGetTokenT< l1t::MuonBxCollection > token_input
Log< level::Error, false > LogError
static constexpr double sigma_qbpt_invalid_charge_
std::vector< double > m_deltaPhis
~L1MuonSeededTrackingRegionsProducer() override=default
static constexpr double sigma_qbpt_endcap_
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
static const double deltaEta
static constexpr double sigma_lambda_
const_iterator begin(int bx) const
unsigned size(int bx) const
U second(std::pair< T, U > const &p)
static constexpr double sigma_y_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr double sigma_qbpt_barrel_
static constexpr int l1MuonTF_link_EMTFN_f_
Cos< T >::type cos(const T &t)
const double minPtBarrel_
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const unsigned l1MinQuality_
edm::EDGetTokenT< reco::VertexCollection > token_vertex
Log< level::Info, false > LogInfo
std::unique_ptr< MuonServiceProxy > service_
static constexpr int l1MuonTF_link_EMTFP_i_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_field
std::vector< double > m_ptRanges
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void add(std::string const &label, ParameterSetDescription const &psetDescription)
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
const_iterator end(int bx) const
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &iEvent, const edm::EventSetup &iSetup) const override
L1MuonSeededTrackingRegionsProducer(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
static constexpr int l1MuonTF_link_EMTFN_i_
static constexpr double sigma_phi_
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker