1 #ifndef PointSeededTrackingRegionsProducer_h 2 #define PointSeededTrackingRegionsProducer_h 23 #include <TLorentzVector.h> 66 else edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
102 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
103 if (m_nSigmaZBeamSpot < 0.)
104 edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
114 descPoints.
add<std::vector<double>> (
"eta", {0.} );
115 descPoints.
add<std::vector<double>> (
"phi", {0.} );
119 desc.
add<
int>(
"maxNRegions", 10);
122 desc.
add<
int>(
"maxNVertices", 1);
124 desc.
add<
double>(
"ptMin", 0.9);
125 desc.
add<
double>(
"originRadius", 0.2);
126 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
127 desc.
add<
double>(
"deltaEta", 0.5);
128 desc.
add<
double>(
"deltaPhi", 0.5);
129 desc.
add<
bool>(
"precise",
true);
131 desc.
add<
double>(
"nSigmaZVertex", 3.);
132 desc.
add<
double>(
"zErrorVetex", 0.2);
133 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
135 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
138 desc.
add<
bool>(
"searchOpt",
false);
147 descriptions.
add(
"pointSeededTrackingRegion", descRegion);
154 std::vector<std::unique_ptr<TrackingRegion> >
result;
159 if( !bs.
isValid() )
return result;
165 std::vector< std::pair< GlobalPoint, float > > origins;
169 origins.push_back( std::make_pair( default_origin,
176 for (reco::VertexCollection::const_iterator iv = vertices->begin(),
ev = vertices->end();
178 if ( iv->isFake() || !iv->isValid() )
continue;
180 origins.push_back( std::make_pair(
GlobalPoint( iv->x(), iv->y(), iv->z() ),
186 if ( origins.empty() ) {
187 origins.push_back( std::make_pair( default_origin,
197 measurementTracker = hmte.
product();
213 for (
size_t j=0; j<origins.size() && n_regions <
m_maxNRegions; ++j) {
215 result.push_back( std::make_unique<RectangularEtaPhiTrackingRegion>(
231 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
T const * product() const
double sigmaZ() const
sigma z
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double y0() const
y coordinate
bool isUninitialized() const
std::vector< double > etaPoints
~PointSeededTrackingRegionsProducer() override
double x0() const
x coordinate