1 #ifndef PointSeededTrackingRegionsProducer_h 2 #define PointSeededTrackingRegionsProducer_h 22 #include <TLorentzVector.h> 65 else edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
101 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
102 if (m_nSigmaZBeamSpot < 0.)
103 edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
113 descPoints.
add<std::vector<double>> (
"eta", {0.} );
114 descPoints.
add<std::vector<double>> (
"phi", {0.} );
118 desc.
add<
int>(
"maxNRegions", 10);
121 desc.
add<
int>(
"maxNVertices", 1);
123 desc.
add<
double>(
"ptMin", 0.9);
124 desc.
add<
double>(
"originRadius", 0.2);
125 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
126 desc.
add<
double>(
"deltaEta", 0.5);
127 desc.
add<
double>(
"deltaPhi", 0.5);
128 desc.
add<
bool>(
"precise",
true);
130 desc.
add<
double>(
"nSigmaZVertex", 3.);
131 desc.
add<
double>(
"zErrorVetex", 0.2);
132 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
134 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
137 desc.
add<
bool>(
"searchOpt",
false);
146 descriptions.
add(
"pointSeededTrackingRegion", descRegion);
153 std::vector<std::unique_ptr<TrackingRegion> >
result;
158 if( !bs.
isValid() )
return result;
164 std::vector< std::pair< GlobalPoint, float > > origins;
168 origins.push_back( std::make_pair( default_origin,
175 for (reco::VertexCollection::const_iterator iv = vertices->begin(),
ev = vertices->end();
177 if ( iv->isFake() || !iv->isValid() )
continue;
179 origins.push_back( std::make_pair(
GlobalPoint( iv->x(), iv->y(), iv->z() ),
185 if ( origins.empty() ) {
186 origins.push_back( std::make_pair( default_origin,
196 measurementTracker = hmte.
product();
212 for (
size_t j=0; j<origins.size() && n_regions <
m_maxNRegions; ++j) {
214 result.push_back( std::make_unique<RectangularEtaPhiTrackingRegion>(
230 edm::LogInfo (
"PointSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
T getParameter(std::string const &) const
double z0() const
z coordinate
std::vector< double > phiPoints
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PointSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Sin< T >::type sin(const T &t)
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::VertexCollection > token_vertex
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double z0Error() const
error on z
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
T const * product() const
double sigmaZ() const
sigma z
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual ~PointSeededTrackingRegionsProducer()
double y0() const
y coordinate
bool isUninitialized() const
std::vector< double > etaPoints
double x0() const
x coordinate