CMS 3D CMS Logo

TSGForOI.cc
Go to the documentation of this file.
1 
9 
10 #include <memory>
11 
12 using namespace edm;
13 using namespace std;
14 
16  src_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("src"))),
17  numOfMaxSeedsParam_(iConfig.getParameter<uint32_t>("maxSeeds")),
18  numOfLayersToTry_(iConfig.getParameter<int32_t>("layersToTry")),
19  numOfHitsToTry_(iConfig.getParameter<int32_t>("hitsToTry")),
20  fixedErrorRescalingForHits_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHits")),
21  fixedErrorRescalingForHitless_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHitless")),
22  adjustErrorsDynamicallyForHits_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHits")),
23  adjustErrorsDynamicallyForHitless_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHitless")),
24  estimatorName_(iConfig.getParameter<std::string>("estimator")),
25  minEtaForTEC_(iConfig.getParameter<double>("minEtaForTEC")),
26  maxEtaForTOB_(iConfig.getParameter<double>("maxEtaForTOB")),
27  useHitLessSeeds_(iConfig.getParameter<bool>("UseHitLessSeeds")),
28  useStereoLayersInTEC_(iConfig.getParameter<bool>("UseStereoLayersInTEC")),
29  updator_(new KFUpdator()),
30  measurementTrackerTag_(consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("MeasurementTrackerEvent"))),
31  pT1_(iConfig.getParameter<double>("pT1")),
32  pT2_(iConfig.getParameter<double>("pT2")),
33  pT3_(iConfig.getParameter<double>("pT3")),
34  eta1_(iConfig.getParameter<double>("eta1")),
35  eta2_(iConfig.getParameter<double>("eta2")),
36  SF1_(iConfig.getParameter<double>("SF1")),
37  SF2_(iConfig.getParameter<double>("SF2")),
38  SF3_(iConfig.getParameter<double>("SF3")),
39  SF4_(iConfig.getParameter<double>("SF4")),
40  SF5_(iConfig.getParameter<double>("SF5")),
41  tsosDiff_(iConfig.getParameter<double>("tsosDiff")),
42  propagatorName_(iConfig.getParameter<std::string>("propagatorName")),
43  theCategory(string("Muon|RecoMuon|TSGForOI"))
44 {
45  produces<std::vector<TrajectorySeed> >();
46 }
47 
48 
50 }
51 
52 
55  unsigned int numOfMaxSeeds = numOfMaxSeedsParam_;
56  unsigned int numSeedsMade=0;
57  bool analysedL2 = false;
58  unsigned int layerCount = 0;
59 
60 
63 
65  edm::Handle<MeasurementTrackerEvent> measurementTrackerH;
68  edm::ESHandle<Propagator> propagatorAlongH;
69  edm::ESHandle<Propagator> propagatorOppositeH;
70  edm::ESHandle<TrackerGeometry> tmpTkGeometryH;
72 
73  iSetup.get<IdealMagneticFieldRecord>().get(magfieldH);
74  iSetup.get<TrackingComponentsRecord>().get(propagatorName_, propagatorOppositeH);
75  iSetup.get<TrackingComponentsRecord>().get(propagatorName_, propagatorAlongH);
76  iSetup.get<GlobalTrackingGeometryRecord>().get(geometryH);
77  iSetup.get<TrackerDigiGeometryRecord>().get(tmpTkGeometryH);
78  iSetup.get<TrackingComponentsRecord>().get(estimatorName_,estimatorH);
79  iEvent.getByToken(measurementTrackerTag_, measurementTrackerH);
80 
83  iEvent.getByToken(src_, l2TrackCol);
84 
85  // The product:
86  std::unique_ptr<std::vector<TrajectorySeed> > result(new std::vector<TrajectorySeed>());
87 
88  // Get vector of Detector layers once:
89  std::vector<BarrelDetLayer const*> const& tob = measurementTrackerH->geometricSearchTracker()->tobLayers();
90  std::vector<ForwardDetLayer const*> const& tecPositive = tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC) ?
91  measurementTrackerH->geometricSearchTracker()->posTidLayers() :
92  measurementTrackerH->geometricSearchTracker()->posTecLayers();
93  std::vector<ForwardDetLayer const*> const& tecNegative = tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC) ?
94  measurementTrackerH->geometricSearchTracker()->negTidLayers() :
95  measurementTrackerH->geometricSearchTracker()->negTecLayers();
96  edm::ESHandle<TrackerTopology> tTopo_handle;
97  iSetup.get<TrackerTopologyRcd>().get(tTopo_handle);
98  const TrackerTopology* tTopo = tTopo_handle.product();
99 
100  // Get the suitable propagators:
101  std::unique_ptr<Propagator> propagatorAlong = SetPropagationDirection(*propagatorAlongH,alongMomentum);
102  std::unique_ptr<Propagator> propagatorOpposite = SetPropagationDirection(*propagatorOppositeH,oppositeToMomentum);
103 
104  edm::ESHandle<Propagator> SmartOpposite;
105  edm::ESHandle<Propagator> SHPOpposite;
106  iSetup.get<TrackingComponentsRecord>().get("hltESPSmartPropagatorAnyOpposite", SmartOpposite);
107  iSetup.get<TrackingComponentsRecord>().get("hltESPSteppingHelixPropagatorOpposite", SHPOpposite);
108 
109  // Loop over the L2's and make seeds for all of them:
110  LogTrace(theCategory) << "TSGForOI::produce: Number of L2's: " << l2TrackCol->size();
111  for (unsigned int l2TrackColIndex(0);l2TrackColIndex!=l2TrackCol->size();++l2TrackColIndex){
112  const reco::TrackRef l2(l2TrackCol, l2TrackColIndex);
113  std::unique_ptr<std::vector<TrajectorySeed> > out(new std::vector<TrajectorySeed>());
114  LogTrace("TSGForOI") << "TSGForOI::produce: L2 muon pT, eta, phi --> " << l2->pt() << " , " << l2->eta() << " , " << l2->phi() << endl;
115 
117  dummyPlane->move(fts.position() - dummyPlane->position());
118  TrajectoryStateOnSurface tsosAtIP = TrajectoryStateOnSurface(fts, *dummyPlane);
119  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatIP: " << tsosAtIP << std::endl;
120 
121  // get the TSOS on the innermost layer of the L2.
122  TrajectoryStateOnSurface tsosAtMuonSystem = trajectoryStateTransform::innerStateOnSurface(*l2, *geometryH, magfieldH.product());
123  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatMuonSystem: " << tsosAtMuonSystem <<endl;
124 
125  LogTrace("TSGForOI") << "TSGForOI::produce: Check the error of the L2 parameter and use hit seeds if big errors" << endl;
126  StateOnTrackerBound fromInside(propagatorAlong.get());
127  TrajectoryStateOnSurface outerTkStateInside = fromInside(fts);
128 
129  StateOnTrackerBound fromOutside(&*SmartOpposite);
130  TrajectoryStateOnSurface outerTkStateOutside = fromOutside(tsosAtMuonSystem);
131 
132  // for now only checking if the two positions (using updated and not-updated) agree withing certain extent,
133  // will probably have to design something fancier for the future.
134  auto dist=0.0;
135  bool useBoth = false;
136  if (outerTkStateInside.isValid() && outerTkStateOutside.isValid()){
137  dist = match_Chi2(outerTkStateInside,outerTkStateOutside);
138  }
139  if (dist>tsosDiff_){
140  useBoth = true;
141  }
142 
143  numSeedsMade=0;
144  analysedL2 = false;
145 
146  // if both TSOSs agree, use only the one at vertex, as it uses more information. If they do not agree, search for seed based on both
147 
148  // BARREL
149  if (std::abs(l2->eta()) < maxEtaForTOB_) {
150  layerCount = 0;
151  for (auto it=tob.rbegin(); it!=tob.rend(); ++it) { //This goes from outermost to innermost layer
152  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TOB layer " << layerCount << endl;
153  findSeedsOnLayer(tTopo, **it, tsosAtIP, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2,
154  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
155  }
156  if (useBoth){
157  numSeedsMade=0;
158  for (auto it=tob.rbegin(); it!=tob.rend(); ++it) { //This goes from outermost to innermost layer
159  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TOB layer " << layerCount << endl;
160  findSeedsOnLayer(tTopo, **it, tsosAtMuonSystem, *(propagatorOpposite.get()), *(propagatorOpposite.get()), l2,
161  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
162  }
163  }
164  }
165  // Reset Number of seeds if in overlap region:
166 
167  if (std::abs(l2->eta())>minEtaForTEC_ && std::abs(l2->eta())<maxEtaForTOB_){
168  numSeedsMade=0;
169  }
170 
171  // ENDCAP+
172  if (l2->eta() > minEtaForTEC_) {
173  layerCount = 0;
174  for (auto it=tecPositive.rbegin(); it!=tecPositive.rend(); ++it) {
175  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
176  findSeedsOnLayer(tTopo, **it, tsosAtIP, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2,
177  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
178  }
179  if (useBoth){
180  numSeedsMade=0;
181  for (auto it=tecPositive.rbegin(); it!=tecPositive.rend(); ++it) {
182  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
183  findSeedsOnLayer(tTopo, **it, tsosAtMuonSystem, *(propagatorOpposite.get()), *(propagatorOpposite.get()), l2,
184  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
185  }
186  }
187  }
188 
189  // ENDCAP-
190  if (l2->eta() < -minEtaForTEC_) {
191  layerCount = 0;
192  for (auto it=tecNegative.rbegin(); it!=tecNegative.rend(); ++it) {
193  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
194  findSeedsOnLayer(tTopo, **it, tsosAtIP, *(propagatorAlong.get()), *(propagatorOpposite.get()), l2,
195  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
196  }
197  if (useBoth){
198  numSeedsMade=0;
199  for (auto it=tecNegative.rbegin(); it!=tecNegative.rend(); ++it) {
200  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
201  findSeedsOnLayer(tTopo, **it, tsosAtMuonSystem, *(propagatorOpposite.get()), *(propagatorOpposite.get()), l2,
202  estimatorH, measurementTrackerH, numSeedsMade, numOfMaxSeeds, layerCount, analysedL2, out);
203  }
204  }
205  }
206 
207 
208 
209  for (std::vector<TrajectorySeed>::iterator it=out->begin(); it!=out->end(); ++it){
210  result->push_back(*it);
211  }
212  } //L2Collection
213  edm::LogInfo(theCategory) << "TSGForOI::produce: number of seeds made: " << result->size();
214 
215  iEvent.put(std::move(result));
216 }
217 
219  const TrackerTopology* tTopo,
220  const GeometricSearchDet &layer,
221  const TrajectoryStateOnSurface &tsosAtIP,
224  const reco::TrackRef l2,
226  edm::Handle<MeasurementTrackerEvent>& measurementTrackerH,
227  unsigned int& numSeedsMade,
228  unsigned int& numOfMaxSeeds,
229  unsigned int& layerCount,
230  bool& analysedL2,
231  std::unique_ptr<std::vector<TrajectorySeed> >& out) const{
232 
233  if (numSeedsMade>numOfMaxSeeds) return;
234  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: numSeedsMade = " << numSeedsMade << " , layerCount = " << layerCount << endl;
235 
236  double errorSFHits=1.0;
237  double errorSFHitless=1.0;
239  else errorSFHits = calculateSFFromL2(l2);
241 
242  // Hitless: TO Be discarded from here at some point.
243  if (useHitLessSeeds_) {
244  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start hitless" << endl;
245  std::vector< GeometricSearchDet::DetWithState > dets;
246  layer.compatibleDetsV(tsosAtIP, propagatorAlong, *estimatorH, dets);
247  if (!dets.empty()) {
248  auto const& detOnLayer = dets.front().first;
249  auto const& tsosOnLayer = dets.front().second;
250  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: tsosOnLayer " << tsosOnLayer << endl;
251  if (!tsosOnLayer.isValid()){
252  edm::LogInfo(theCategory) << "ERROR!: Hitless TSOS is not valid!";
253  }
254  else{
255  // calculate SF from L2 (only once -- if needed)
256  if (!analysedL2 && adjustErrorsDynamicallyForHitless_) {
257  errorSFHitless=calculateSFFromL2(l2);
258  analysedL2=true;
259  }
260 
261  dets.front().second.rescaleError(errorSFHitless);
262  PTrajectoryStateOnDet const& ptsod = trajectoryStateTransform::persistentState(tsosOnLayer,detOnLayer->geographicalId().rawId());
264  out->push_back(TrajectorySeed(ptsod,rHC,oppositeToMomentum));
265  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOD (Hitless) done " << endl;
266  numSeedsMade++;
267  }
268  }
269  }
270 
271  // Hits:
272  if (layerCount>numOfLayersToTry_) return;
273  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start Hits" <<endl;
274  if (makeSeedsFromHits(tTopo, layer, tsosAtIP, *out, propagatorAlong, *measurementTrackerH, estimatorH, numSeedsMade, errorSFHits, l2->eta())) ++layerCount;
275 }
276 
278 
279  double theSF=1.0;
280  // L2 direction vs pT blowup - as was previously done:
281  // Split into 4 pT ranges: <pT1_, pT1_<pT2_, pT2_<pT3_, <pT4_: 13,30,70
282  // Split into 2 eta ranges for the middle two pT ranges: 1.0,1.4
283  double abseta = std::abs(track->eta());
284  if (track->pt()<=pT1_) theSF=SF1_;
285  if (track->pt()>pT1_ && track->pt()<=pT2_){
286  if (abseta<=eta1_) theSF=SF3_;
287  if (abseta>eta1_ && abseta<=eta2_) theSF=SF2_;
288  if (abseta>eta2_) theSF=SF3_;
289  }
290  if (track->pt()>pT2_ && track->pt()<=pT3_){
291  if (abseta<=eta1_) theSF=SF5_;
292  if (abseta>eta1_ && abseta<=eta2_) theSF=SF4_;
293  if (abseta>eta2_) theSF=SF5_;
294  }
295  if (track->pt()>pT3_) theSF=SF5_;
296 
297  LogTrace(theCategory) << "TSGForOI::calculateSFFromL2: SF has been calculated as: " << theSF;
298  return theSF;
299 }
300 
301 
303  const TrackerTopology* tTopo,
304  const GeometricSearchDet &layer,
305  const TrajectoryStateOnSurface &tsosAtIP,
306  std::vector<TrajectorySeed> &out,
308  const MeasurementTrackerEvent &measurementTracker,
310  unsigned int& numSeedsMade,
311  const double errorSF,
312  const double l2Eta) const{
313 
314  // Error Rescaling:
315  TrajectoryStateOnSurface onLayer(tsosAtIP);
316  onLayer.rescaleError(errorSF);
317 
318  std::vector< GeometricSearchDet::DetWithState > dets;
319  layer.compatibleDetsV(onLayer, propagatorAlong, *estimatorH, dets);
320 
321  // Find Measurements on each DetWithState:
322  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: find measurements on each detWithState " << dets.size() << endl;
323  std::vector<TrajectoryMeasurement> meas;
324  for (std::vector<GeometricSearchDet::DetWithState>::iterator it=dets.begin(); it!=dets.end(); ++it) {
325  MeasurementDetWithData det = measurementTracker.idToDet(it->first->geographicalId());
326  if (det.isNull()) {
327  continue;
328  }
329  if (!it->second.isValid()) continue; //Skip if TSOS is not valid
330 
331  std::vector < TrajectoryMeasurement > mymeas = det.fastMeasurements(it->second, onLayer, propagatorAlong, *estimatorH); //Second TSOS is not used
332  for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2; ++it2) {
333  if (it2->recHit()->isValid()) meas.push_back(*it2); //Only save those which are valid
334  }
335  }
336 
337 
338  // Update TSOS using TMs after sorting, then create Trajectory Seed and put into vector:
339  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Update TSOS using TMs after sorting, then create Trajectory Seed, number of TM = " << meas.size() << endl;
340  unsigned int found = 0;
341  std::sort(meas.begin(), meas.end(), TrajMeasLessEstim());
342  for (std::vector<TrajectoryMeasurement>::const_iterator it=meas.begin(); it!=meas.end(); ++it) {
343  TrajectoryStateOnSurface updatedTSOS = updator_->update(it->forwardPredictedState(), *it->recHit());
344  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOS for TM " << found << endl;
345  if (not updatedTSOS.isValid()) continue;
346 
347  // CHECK if is StereoLayer:
348  if (useStereoLayersInTEC_ && (fabs(l2Eta) > 0.8 && fabs(l2Eta) < 1.6)) {
349  DetId detid = ((*it).recHit()->hit())->geographicalId();
350  if (detid.subdetId() == StripSubdetector::TEC) {
351  if (!tTopo->tecIsStereo(detid.rawId())) break; // try another layer
352  }
353  }
354 
356  seedHits.push_back(*it->recHit()->hit());
357  PTrajectoryStateOnDet const& pstate = trajectoryStateTransform::persistentState(updatedTSOS, it->recHit()->geographicalId().rawId());
358  TrajectorySeed seed(pstate, std::move(seedHits), oppositeToMomentum);
359  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: number of seedHits: " << seedHits.size() << endl;
360  out.push_back(seed);
361  found++;
362  numSeedsMade++;
363  if (found == numOfHitsToTry_) break;
364  }
365  return found;
366 }
367 //
370 
372  const TrajectoryStateOnSurface& tsos2) const{
373 
374  if ( !tsos1.isValid() || !tsos2.isValid() ) return -1.;
375 
377  AlgebraicSymMatrix55 m(tsos1.localError().matrix() + tsos2.localError().matrix());
378 
379  bool ierr = !m.Invert();
380 
381  if ( ierr ) {
382  edm::LogInfo("TSGForOI") << "Error inverting covariance matrix";
383  return -1;
384  }
385 
386  double est = ROOT::Math::Similarity(v,m);
387 
388  return est;
389 
390 }
391 
392 
395  desc.add<edm::InputTag>("src",edm::InputTag("hltL2Muons","UpdatedAtVtx"));
396  desc.add<int>("layersToTry",1);
397  desc.add<double>("fixedErrorRescaleFactorForHitless",2.0);
398  desc.add<int>("hitsToTry",1);
399  desc.add<bool>("adjustErrorsDynamicallyForHits",false);
400  desc.add<bool>("adjustErrorsDynamicallyForHitless",false);
401  desc.add<edm::InputTag>("MeasurementTrackerEvent",edm::InputTag("hltSiStripClusters"));
402  desc.add<bool>("UseHitLessSeeds",true);
403  desc.add<bool>("UseStereoLayersInTEC",false);
404  desc.add<std::string>("estimator","hltESPChi2MeasurementEstimator100");
405  desc.add<double>("maxEtaForTOB",1.2);
406  desc.add<double>("minEtaForTEC",0.8);
407  desc.addUntracked<bool>("debug",true);
408  desc.add<double>("fixedErrorRescaleFactorForHits",2.0);
409  desc.add<unsigned int>("maxSeeds",1);
410  desc.add<double>("pT1",13.0);
411  desc.add<double>("pT2",30.0);
412  desc.add<double>("pT3",70.0);
413  desc.add<double>("eta1",1.0);
414  desc.add<double>("eta2",1.4);
415  desc.add<double>("SF1",3.0);
416  desc.add<double>("SF2",4.0);
417  desc.add<double>("SF3",5.0);
418  desc.add<double>("SF4",7.0);
419  desc.add<double>("SF5",10.0);
420  desc.add<double>("tsosDiff",0.03);
421  desc.add<std::string>("propagatorName","PropagatorWithMaterial");
422  descriptions.add("TSGForOI",desc);
423 }
424 
const std::string estimatorName_
Estimator used to find dets and TrajectoryMeasurements.
Definition: TSGForOI.h:61
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void produce(edm::StreamID sid, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition: TSGForOI.cc:53
const LocalTrajectoryParameters & localParameters() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
const double tsosDiff_
Distance of TSOSs to trigger using hits or not.
Definition: TSGForOI.h:87
void findSeedsOnLayer(const TrackerTopology *tTopo, const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const reco::TrackRef l2, edm::ESHandle< Chi2MeasurementEstimatorBase > &estimator_, edm::Handle< MeasurementTrackerEvent > &measurementTrackerH, unsigned int &numSeedsMade, unsigned int &numOfMaxSeeds, unsigned int &layerCount, bool &analysedL2, std::unique_ptr< std::vector< TrajectorySeed > > &out) const
Function to find seeds on a given layer.
Definition: TSGForOI.cc:218
size_type size() const
Definition: OwnVector.h:264
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
const std::string propagatorName_
Counters and flags for the implementation.
Definition: TSGForOI.h:90
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TSGForOI.cc:393
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const double SF3_
Definition: TSGForOI.h:84
const double maxEtaForTOB_
Maximum eta value to activate searching in the TOB.
Definition: TSGForOI.h:67
bool isThere(GeomDetEnumerators::SubDetector subdet) const
~TSGForOI() override
Definition: TSGForOI.cc:49
AlgebraicVector5 vector() const
bool tecIsStereo(const DetId &id) const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
void push_back(D *&d)
Definition: OwnVector.h:290
const double minEtaForTEC_
Minimum eta value to activate searching in the TEC.
Definition: TSGForOI.h:64
int iEvent
Definition: GenABIO.cc:230
double match_Chi2(const TrajectoryStateOnSurface &tsos1, const TrajectoryStateOnSurface &tsos2) const
Definition: TSGForOI.cc:371
const double fixedErrorRescalingForHits_
How much to rescale errors from the L2 (fixed error vs pT, eta)
Definition: TSGForOI.h:53
const std::unique_ptr< TrajectoryStateUpdator > updator_
KFUpdator defined in constructor.
Definition: TSGForOI.h:77
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
const double eta2_
Definition: TSGForOI.h:83
static PlanePointer build(Args &&...args)
Definition: Plane.h:33
const bool useHitLessSeeds_
Definition: TSGForOI.h:71
const unsigned int numOfLayersToTry_
How many layers to try.
Definition: TSGForOI.h:47
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double SF1_
Definition: TSGForOI.h:84
double calculateSFFromL2(const reco::TrackRef track) const
Function used to calculate the dynamic error SF by analysing the L2.
Definition: TSGForOI.cc:277
const bool useStereoLayersInTEC_
Switch ON to use Stereo layers instead of using every layer in TEC.
Definition: TSGForOI.h:74
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const double SF5_
Definition: TSGForOI.h:84
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define LogTrace(id)
Create L3MuonTrajectorySeeds from L2 Muons updated at vertex in an outside in manner.
Definition: TSGForOI.h:33
const bool adjustErrorsDynamicallyForHitless_
Definition: TSGForOI.h:58
const double pT1_
pT, eta ranges and scale factor values
Definition: TSGForOI.h:82
const double SF4_
Definition: TSGForOI.h:84
Definition: DetId.h:18
GlobalPoint position() const
const double pT2_
Definition: TSGForOI.h:82
ROOT::Math::SVector< double, 5 > AlgebraicVector5
int makeSeedsFromHits(const TrackerTopology *tTopo, const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, std::vector< TrajectorySeed > &out, const Propagator &propagatorAlong, const MeasurementTrackerEvent &measurementTracker, edm::ESHandle< Chi2MeasurementEstimatorBase > &estimator_, unsigned int &numSeedsMade, const double errorSF, const double l2Eta) const
Function to find hits on layers and create seeds from updated TSOS.
Definition: TSGForOI.cc:302
const double eta1_
Definition: TSGForOI.h:83
const double pT3_
Definition: TSGForOI.h:82
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< reco::TrackCollection > src_
Labels for input collections.
Definition: TSGForOI.h:41
const bool adjustErrorsDynamicallyForHits_
Whether or not to use an automatically calculated scale-factor value.
Definition: TSGForOI.h:57
fixed size matrix
HLT enums.
T get() const
Definition: EventSetup.h:63
TSGForOI(const edm::ParameterSet &iConfig)
Definition: TSGForOI.cc:15
const edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Definition: TSGForOI.h:79
const unsigned int numOfMaxSeedsParam_
Maximum number of seeds for each L2.
Definition: TSGForOI.h:44
const std::string theCategory
Definition: TSGForOI.h:91
const double SF2_
Definition: TSGForOI.h:84
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
T const * product() const
Definition: ESHandle.h:86
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
def move(src, dest)
Definition: eostools.py:510
const unsigned int numOfHitsToTry_
How many hits to try per layer.
Definition: TSGForOI.h:50
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
const double fixedErrorRescalingForHitless_
Definition: TSGForOI.h:54