12 numOfLayersToTry_(iConfig.getParameter<int32_t>(
"layersToTry")),
13 numOfHitsToTry_(iConfig.getParameter<int32_t>(
"hitsToTry")),
14 fixedErrorRescalingForHits_(iConfig.getParameter<double>(
"fixedErrorRescaleFactorForHits")),
15 fixedErrorRescalingForHitless_(iConfig.getParameter<double>(
"fixedErrorRescaleFactorForHitless")),
16 adjustErrorsDyanmicallyForHits_(iConfig.getParameter<bool>(
"adjustErrorsDyanmicallyForHits")),
17 adjustErrorsDyanmicallyForHitless_(iConfig.getParameter<bool>(
"adjustErrorsDyanmicallyForHitless")),
18 estimatorName_(iConfig.getParameter<std::
string>(
"estimator")),
20 minEtaForTEC_(iConfig.getParameter<double>(
"minEtaForTEC")),
21 maxEtaForTOB_(iConfig.getParameter<double>(
"maxEtaForTOB")),
22 useHitlessSeeds_(iConfig.getParameter<bool>(
"UseHitlessSeeds")),
23 useHybridSeeds_(iConfig.getParameter<bool>(
"UseHybridSeeds")),
26 pT1_(iConfig.getParameter<double>(
"pT1")),
27 pT2_(iConfig.getParameter<double>(
"pT2")),
28 pT3_(iConfig.getParameter<double>(
"pT3")),
29 eta1_(iConfig.getParameter<double>(
"eta1")),
30 eta2_(iConfig.getParameter<double>(
"eta2")),
31 SF1_(iConfig.getParameter<double>(
"SF1")),
32 SF2_(iConfig.getParameter<double>(
"SF2")),
33 SF3_(iConfig.getParameter<double>(
"SF3")),
34 SF4_(iConfig.getParameter<double>(
"SF4")),
35 SF5_(iConfig.getParameter<double>(
"SF5")),
36 tsosDiffDeltaR_(iConfig.getParameter<double>(
"tsosDiffDeltaR"))
39 produces<std::vector<TrajectorySeed> >();
60 std::auto_ptr<std::vector<TrajectorySeed> >
result(
new std::vector<TrajectorySeed>());
63 std::vector<BarrelDetLayer const*>
const& tob =
measurementTracker_->geometricSearchTracker()->tobLayers();
64 std::vector<ForwardDetLayer const*>
const& tecPositive =
measurementTracker_->geometricSearchTracker()->posTecLayers();
65 std::vector<ForwardDetLayer const*>
const& tecNegative =
measurementTracker_->geometricSearchTracker()->negTecLayers();
78 for (
unsigned int l2TrackColIndex(0);l2TrackColIndex!=l2TrackCol->size();++l2TrackColIndex){
80 std::auto_ptr<std::vector<TrajectorySeed> >
out(
new std::vector<TrajectorySeed>());
97 if (outerTkStateInside.isValid() && outerTkStateOutside.
isValid()){
113 for (
auto it=tob.rbegin(); it!=tob.rend(); ++it) {
114 findSeedsOnLayer(**it, tsosAtIP, tsosAtMuonSystem, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2, out);
126 for (
auto it=tecPositive.rbegin(); it!=tecPositive.rend(); ++it) {
127 findSeedsOnLayer(**it, tsosAtIP, tsosAtMuonSystem, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2, out);
134 for (
auto it=tecNegative.rbegin(); it!=tecNegative.rend(); ++it) {
135 findSeedsOnLayer(**it, tsosAtIP, tsosAtMuonSystem, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2, out);
139 for (std::vector<TrajectorySeed>::iterator it=out->begin(); it!=out->end(); ++it){
140 result->push_back(*it);
155 std::auto_ptr<std::vector<TrajectorySeed> >&
out) {
158 double errorSFHits_=1.0;
159 double errorSFHitless_=1.0;
164 std::vector< GeometricSearchDet::DetWithState > dets;
167 auto const& detOnLayer = dets.front().first;
168 auto const& tsosOnLayer = dets.front().second;
171 if (!tsosOnLayer.isValid()){
175 errorSFHitless_=
calculateSFFromL2(layer,tsosAtMuonSystem,tsosOnLayer,propagatorOpposite,l2);
182 if (!tsosOnLayer.isValid()){
186 dets.front().second.rescaleError(errorSFHitless_);
219 if (track->pt()>
pT1_ && track->pt()<=
pT2_){
224 if (track->pt()>
pT2_ && track->pt()<=
pT3_){
238 std::vector<TrajectorySeed> &
out,
241 const double errorSF) {
243 std::vector< GeometricSearchDet::DetWithState > dets;
247 std::vector<TrajectoryMeasurement> meas;
248 for (std::vector<GeometricSearchDet::DetWithState>::iterator it=dets.begin(); it!=dets.end(); ++it) {
253 if (!it->second.isValid())
continue;
256 it->second.rescaleError(errorSF);
259 for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2; ++it2) {
260 if (it2->recHit()->isValid()) meas.push_back(*it2);
265 unsigned int found = 0;
267 for (std::vector<TrajectoryMeasurement>::const_iterator it=meas.begin(); it!=meas.end(); ++it) {
271 seedHits.
push_back(*it->recHit()->hit());
286 desc.
add<
int>(
"layersToTry",1);
287 desc.
add<
double>(
"fixedErrorRescaleFactorForHitless",2.0);
288 desc.
add<
int>(
"hitsToTry",1);
289 desc.
add<
bool>(
"adjustErrorsDyanmicallyForHits",
false);
290 desc.
add<
bool>(
"adjustErrorsDyanmicallyForHitless",
false);
292 desc.
add<
bool>(
"UseHitlessSeeds",
true);
293 desc.
add<
bool>(
"UseHybridSeeds",
false);
294 desc.
add<
std::string>(
"estimator",
"hltESPChi2MeasurementEstimator100");
295 desc.
add<
double>(
"maxEtaForTOB",1.2);
296 desc.
add<
double>(
"minEtaForTEC",0.8);
298 desc.
add<
double>(
"fixedErrorRescaleFactorForHits",2.0);
299 desc.
add<
unsigned int>(
"maxSeeds",1);
300 desc.
add<
double>(
"pT1",13.0);
301 desc.
add<
double>(
"pT2",30.0);
302 desc.
add<
double>(
"pT3",70.0);
303 desc.
add<
double>(
"eta1",1.0);
304 desc.
add<
double>(
"eta2",1.4);
305 desc.
add<
double>(
"SF1",3.0);
306 desc.
add<
double>(
"SF2",4.0);
307 desc.
add<
double>(
"SF3",5.0);
308 desc.
add<
double>(
"SF4",7.0);
309 desc.
add<
double>(
"SF5",10.0);
310 desc.
add<
double>(
"tsosDiffDeltaR",0.03);
311 descriptions.
add(
"TSGForOI",desc);
const std::string estimatorName_
Estimator used to find dets and TrajectoryMeasurements.
TkRotation< Scalar > RotationType
T getParameter(std::string const &) const
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
const double tsosDiffDeltaR_
Difference in deltaR of TSOSs to trigger using hits in hybrid.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const bool useHitlessSeeds_
Switch to use hitless seeds or not.
void findSeedsOnLayer(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, const TrajectoryStateOnSurface &tsosAtMuonSystem, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const reco::TrackRef l2, std::auto_ptr< std::vector< TrajectorySeed > > &seeds)
Function to find seeds on a given layer.
std::unique_ptr< TrajectoryStateUpdator > updator_
KFUpdator defined in constructor.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< Propagator > propagatorAlong_
const bool adjustErrorsDyanmicallyForHits_
Whether or not to use an automatically calculated SF value.
std::vector< Track > TrackCollection
collection of Tracks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESHandle< MagneticField > magfield_
const double maxEtaForTOB_
Maximum eta value to activate searching in the TOB.
Point3DBase< Scalar, GlobalTag > PositionType
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
unsigned int numSeedsMade_
const double minEtaForTEC_
Minimum eta value to activate searching in the TEC.
bool foundCompatibleDet_
Counters and flags for the implementation.
const double fixedErrorRescalingForHits_
How much to rescale errors from STA for fixed option.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
const unsigned int numOfLayersToTry_
How many layers to try.
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Create L3MuonTrajectorySeeds from L2 Muons updated at vertex in an outside in manner.
unsigned int numOfMaxSeeds_
Maximum number of seeds for each L2.
double deltaR(double eta1, double eta2, double phi1, double phi2)
const double pT1_
pT, eta ranges and scale factor values
GlobalPoint position() const
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const bool useHybridSeeds_
Switch to use hitless + hits for seeds depending on the L2 properties.
const edm::EDGetTokenT< reco::TrackCollection > src_
Labels for input collections.
edm::ESHandle< Chi2MeasurementEstimatorBase > estimator_
Plane::PlanePointer dummyPlane_
Surface used to make a TSOS at the PCA to the beamline.
edm::ESHandle< Propagator > propagatorOpposite_
GlobalVector globalMomentum() const
TSGForOI(const edm::ParameterSet &iConfig)
double calculateSFFromL2(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtMuonSystem, const TrajectoryStateOnSurface &tsosOnLayer, const Propagator &propagatorOpposite, const reco::TrackRef track)
Function used to calculate the dynamic error SF by analysing the L2.
const edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
edm::ESHandle< GlobalTrackingGeometry > geometry_
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
edm::Handle< MeasurementTrackerEvent > measurementTracker_
const bool adjustErrorsDyanmicallyForHitless_
const unsigned int numOfHitsToTry_
How many hits to try on same layer.
const double fixedErrorRescalingForHitless_
int makeSeedsFromHits(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &state, std::vector< TrajectorySeed > &out, const Propagator &propagatorAlong, const MeasurementTrackerEvent &mte, double errorSF)
Function to find hits on layers and create seeds from updated TSOS.