CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TSGForOI Class Reference

Create L3MuonTrajectorySeeds from L2 Muons updated at vertex in an outside in manner. More...

#include <TSGForOI.h>

Inheritance diagram for TSGForOI:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void produce (edm::StreamID sid, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
 
 TSGForOI (const edm::ParameterSet &iConfig)
 
 ~TSGForOI () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

double calculateSFFromL2 (const reco::TrackRef track) const
 Function used to calculate the dynamic error SF by analysing the L2. More...
 
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. More...
 
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. More...
 
double match_Chi2 (const TrajectoryStateOnSurface &tsos1, const TrajectoryStateOnSurface &tsos2) const
 

Private Attributes

const bool adjustErrorsDynamicallyForHitless_
 
const bool adjustErrorsDynamicallyForHits_
 Whether or not to use an automatically calculated scale-factor value. More...
 
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecordestimatorToken_
 Estimator used to find dets and TrajectoryMeasurements. More...
 
const double eta1_
 
const double eta2_
 
const double fixedErrorRescalingForHitless_
 
const double fixedErrorRescalingForHits_
 How much to rescale errors from the L2 (fixed error vs pT, eta) More...
 
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordgeometryToken_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
const double maxEtaForTOB_
 Maximum eta value to activate searching in the TOB. More...
 
const edm::EDGetTokenT< MeasurementTrackerEventmeasurementTrackerTag_
 
const double minEtaForTEC_
 Minimum eta value to activate searching in the TEC. More...
 
const unsigned int numOfHitsToTry_
 How many hits to try per layer. More...
 
const unsigned int numOfLayersToTry_
 How many layers to try. More...
 
const unsigned int numOfMaxSeedsParam_
 Maximum number of seeds for each L2. More...
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorAlongToken_
 
const std::string propagatorName_
 Counters and flags for the implementation. More...
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorOppositeToken_
 
const double pT1_
 pT, eta ranges and scale factor values More...
 
const double pT2_
 
const double pT3_
 
const double SF1_
 
const double SF2_
 
const double SF3_
 
const double SF4_
 
const double SF5_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordshpOppositeToken_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordsmartOppositeToken_
 
const edm::EDGetTokenT< reco::TrackCollectionsrc_
 Labels for input collections. More...
 
const std::string theCategory
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtmpTkGeometryToken_
 
const double tsosDiff_
 Distance of TSOSs to trigger using hits or not. More...
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
const std::unique_ptr< TrajectoryStateUpdatorupdator_
 KFUpdator defined in constructor. More...
 
const bool useHitLessSeeds_
 
const bool useStereoLayersInTEC_
 Switch ON to use Stereo layers instead of using every layer in TEC. More...
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Create L3MuonTrajectorySeeds from L2 Muons updated at vertex in an outside in manner.

Author
Benjamin Radburn-Smith, Santiago Folgueras

Definition at line 33 of file TSGForOI.h.

Constructor & Destructor Documentation

◆ TSGForOI()

TSGForOI::TSGForOI ( const edm::ParameterSet iConfig)
explicit

Definition at line 16 of file TSGForOI.cc.

17  : src_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("src"))),
18  estimatorToken_(esConsumes(edm::ESInputTag("", (iConfig.getParameter<std::string>("estimator"))))),
23  smartOppositeToken_(esConsumes(edm::ESInputTag("", "hltESPSmartPropagatorAnyOpposite"))),
24  shpOppositeToken_(esConsumes(edm::ESInputTag("", "hltESPSteppingHelixPropagatorOpposite"))),
25  numOfMaxSeedsParam_(iConfig.getParameter<uint32_t>("maxSeeds")),
26  numOfLayersToTry_(iConfig.getParameter<int32_t>("layersToTry")),
27  numOfHitsToTry_(iConfig.getParameter<int32_t>("hitsToTry")),
28  fixedErrorRescalingForHits_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHits")),
29  fixedErrorRescalingForHitless_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHitless")),
30  adjustErrorsDynamicallyForHits_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHits")),
31  adjustErrorsDynamicallyForHitless_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHitless")),
32  minEtaForTEC_(iConfig.getParameter<double>("minEtaForTEC")),
33  maxEtaForTOB_(iConfig.getParameter<double>("maxEtaForTOB")),
34  useHitLessSeeds_(iConfig.getParameter<bool>("UseHitLessSeeds")),
35  useStereoLayersInTEC_(iConfig.getParameter<bool>("UseStereoLayersInTEC")),
36  updator_(new KFUpdator()),
38  consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("MeasurementTrackerEvent"))),
39  pT1_(iConfig.getParameter<double>("pT1")),
40  pT2_(iConfig.getParameter<double>("pT2")),
41  pT3_(iConfig.getParameter<double>("pT3")),
42  eta1_(iConfig.getParameter<double>("eta1")),
43  eta2_(iConfig.getParameter<double>("eta2")),
44  SF1_(iConfig.getParameter<double>("SF1")),
45  SF2_(iConfig.getParameter<double>("SF2")),
46  SF3_(iConfig.getParameter<double>("SF3")),
47  SF4_(iConfig.getParameter<double>("SF4")),
48  SF5_(iConfig.getParameter<double>("SF5")),
49  tsosDiff_(iConfig.getParameter<double>("tsosDiff")),
50  propagatorName_(iConfig.getParameter<std::string>("propagatorName")),
51  theCategory(string("Muon|RecoMuon|TSGForOI")),
54  produces<std::vector<TrajectorySeed> >();
55 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const double tsosDiff_
Distance of TSOSs to trigger using hits or not.
Definition: TSGForOI.h:95
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
Definition: TSGForOI.h:101
const std::string propagatorName_
Counters and flags for the implementation.
Definition: TSGForOI.h:98
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > estimatorToken_
Estimator used to find dets and TrajectoryMeasurements.
Definition: TSGForOI.h:45
const double SF3_
Definition: TSGForOI.h:92
const double maxEtaForTOB_
Maximum eta value to activate searching in the TOB.
Definition: TSGForOI.h:75
const double minEtaForTEC_
Minimum eta value to activate searching in the TEC.
Definition: TSGForOI.h:72
const double fixedErrorRescalingForHits_
How much to rescale errors from the L2 (fixed error vs pT, eta)
Definition: TSGForOI.h:64
const std::unique_ptr< TrajectoryStateUpdator > updator_
KFUpdator defined in constructor.
Definition: TSGForOI.h:85
const edm::ESGetToken< Propagator, TrackingComponentsRecord > smartOppositeToken_
Definition: TSGForOI.h:51
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: TSGForOI.h:50
const double eta2_
Definition: TSGForOI.h:91
const bool useHitLessSeeds_
Definition: TSGForOI.h:79
const unsigned int numOfLayersToTry_
How many layers to try.
Definition: TSGForOI.h:58
const double SF1_
Definition: TSGForOI.h:92
const bool useStereoLayersInTEC_
Switch ON to use Stereo layers instead of using every layer in TEC.
Definition: TSGForOI.h:82
const double SF5_
Definition: TSGForOI.h:92
const bool adjustErrorsDynamicallyForHitless_
Definition: TSGForOI.h:69
const double pT1_
pT, eta ranges and scale factor values
Definition: TSGForOI.h:90
const double SF4_
Definition: TSGForOI.h:92
const double pT2_
Definition: TSGForOI.h:90
const double eta1_
Definition: TSGForOI.h:91
const double pT3_
Definition: TSGForOI.h:90
const edm::EDGetTokenT< reco::TrackCollection > src_
Labels for input collections.
Definition: TSGForOI.h:42
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
Definition: TSGForOI.h:47
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tmpTkGeometryToken_
Definition: TSGForOI.h:48
const bool adjustErrorsDynamicallyForHits_
Whether or not to use an automatically calculated scale-factor value.
Definition: TSGForOI.h:68
const edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Definition: TSGForOI.h:87
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAlongToken_
Definition: TSGForOI.h:100
const unsigned int numOfMaxSeedsParam_
Maximum number of seeds for each L2.
Definition: TSGForOI.h:55
const std::string theCategory
Definition: TSGForOI.h:99
const double SF2_
Definition: TSGForOI.h:92
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > geometryToken_
Definition: TSGForOI.h:49
const unsigned int numOfHitsToTry_
How many hits to try per layer.
Definition: TSGForOI.h:61
const edm::ESGetToken< Propagator, TrackingComponentsRecord > shpOppositeToken_
Definition: TSGForOI.h:52
const double fixedErrorRescalingForHitless_
Definition: TSGForOI.h:65

◆ ~TSGForOI()

TSGForOI::~TSGForOI ( )
override

Definition at line 57 of file TSGForOI.cc.

57 {}

Member Function Documentation

◆ calculateSFFromL2()

double TSGForOI::calculateSFFromL2 ( const reco::TrackRef  track) const
private

Function used to calculate the dynamic error SF by analysing the L2.

Definition at line 355 of file TSGForOI.cc.

References funct::abs(), eta1_, eta2_, LogTrace, pT1_, pT2_, pT3_, SF1_, SF2_, SF3_, SF4_, SF5_, theCategory, and HLT_2022v14_cff::track.

Referenced by findSeedsOnLayer().

355  {
356  double theSF = 1.0;
357  // L2 direction vs pT blowup - as was previously done:
358  // Split into 4 pT ranges: <pT1_, pT1_<pT2_, pT2_<pT3_, <pT4_: 13,30,70
359  // Split into 2 eta ranges for the middle two pT ranges: 1.0,1.4
360  double abseta = std::abs(track->eta());
361  if (track->pt() <= pT1_)
362  theSF = SF1_;
363  if (track->pt() > pT1_ && track->pt() <= pT2_) {
364  if (abseta <= eta1_)
365  theSF = SF3_;
366  if (abseta > eta1_ && abseta <= eta2_)
367  theSF = SF2_;
368  if (abseta > eta2_)
369  theSF = SF3_;
370  }
371  if (track->pt() > pT2_ && track->pt() <= pT3_) {
372  if (abseta <= eta1_)
373  theSF = SF5_;
374  if (abseta > eta1_ && abseta <= eta2_)
375  theSF = SF4_;
376  if (abseta > eta2_)
377  theSF = SF5_;
378  }
379  if (track->pt() > pT3_)
380  theSF = SF5_;
381 
382  LogTrace(theCategory) << "TSGForOI::calculateSFFromL2: SF has been calculated as: " << theSF;
383  return theSF;
384 }
const double SF3_
Definition: TSGForOI.h:92
#define LogTrace(id)
const double eta2_
Definition: TSGForOI.h:91
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double SF1_
Definition: TSGForOI.h:92
const double SF5_
Definition: TSGForOI.h:92
const double pT1_
pT, eta ranges and scale factor values
Definition: TSGForOI.h:90
const double SF4_
Definition: TSGForOI.h:92
const double pT2_
Definition: TSGForOI.h:90
const double eta1_
Definition: TSGForOI.h:91
const double pT3_
Definition: TSGForOI.h:90
const std::string theCategory
Definition: TSGForOI.h:99
const double SF2_
Definition: TSGForOI.h:92

◆ fillDescriptions()

void TSGForOI::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 481 of file TSGForOI.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_2022v14_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

481  {
483  desc.add<edm::InputTag>("src", edm::InputTag("hltL2Muons", "UpdatedAtVtx"));
484  desc.add<int>("layersToTry", 1);
485  desc.add<double>("fixedErrorRescaleFactorForHitless", 2.0);
486  desc.add<int>("hitsToTry", 1);
487  desc.add<bool>("adjustErrorsDynamicallyForHits", false);
488  desc.add<bool>("adjustErrorsDynamicallyForHitless", false);
489  desc.add<edm::InputTag>("MeasurementTrackerEvent", edm::InputTag("hltSiStripClusters"));
490  desc.add<bool>("UseHitLessSeeds", true);
491  desc.add<bool>("UseStereoLayersInTEC", false);
492  desc.add<std::string>("estimator", "hltESPChi2MeasurementEstimator100");
493  desc.add<double>("maxEtaForTOB", 1.2);
494  desc.add<double>("minEtaForTEC", 0.8);
495  desc.addUntracked<bool>("debug", true);
496  desc.add<double>("fixedErrorRescaleFactorForHits", 2.0);
497  desc.add<unsigned int>("maxSeeds", 1);
498  desc.add<double>("pT1", 13.0);
499  desc.add<double>("pT2", 30.0);
500  desc.add<double>("pT3", 70.0);
501  desc.add<double>("eta1", 1.0);
502  desc.add<double>("eta2", 1.4);
503  desc.add<double>("SF1", 3.0);
504  desc.add<double>("SF2", 4.0);
505  desc.add<double>("SF3", 5.0);
506  desc.add<double>("SF4", 7.0);
507  desc.add<double>("SF5", 10.0);
508  desc.add<double>("tsosDiff", 0.03);
509  desc.add<std::string>("propagatorName", "PropagatorWithMaterial");
510  descriptions.add("TSGForOI", desc);
511 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ findSeedsOnLayer()

void TSGForOI::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
private

Function to find seeds on a given layer.

Definition at line 282 of file TSGForOI.cc.

References adjustErrorsDynamicallyForHitless_, adjustErrorsDynamicallyForHits_, calculateSFFromL2(), fixedErrorRescalingForHitless_, fixedErrorRescalingForHits_, phase1PixelTopology::layer, LogTrace, makeSeedsFromHits(), numOfLayersToTry_, oppositeToMomentum, MillePedeFileConverter_cfg::out, trajectoryStateTransform::persistentState(), L1TMuonDQMOffline_cfi::propagatorAlong, theCategory, and useHitLessSeeds_.

Referenced by produce().

294  {
295  if (numSeedsMade > numOfMaxSeeds)
296  return;
297  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: numSeedsMade = " << numSeedsMade
298  << " , layerCount = " << layerCount << endl;
299 
300  double errorSFHits = 1.0;
301  double errorSFHitless = 1.0;
303  errorSFHits = fixedErrorRescalingForHits_;
304  else
305  errorSFHits = calculateSFFromL2(l2);
307  errorSFHitless = fixedErrorRescalingForHitless_;
308 
309  // Hitless: TO Be discarded from here at some point.
310  if (useHitLessSeeds_) {
311  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start hitless" << endl;
312  std::vector<GeometricSearchDet::DetWithState> dets;
313  layer.compatibleDetsV(tsosAtIP, propagatorAlong, *estimatorH, dets);
314  if (!dets.empty()) {
315  auto const& detOnLayer = dets.front().first;
316  auto const& tsosOnLayer = dets.front().second;
317  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: tsosOnLayer " << tsosOnLayer << endl;
318  if (!tsosOnLayer.isValid()) {
319  edm::LogInfo(theCategory) << "ERROR!: Hitless TSOS is not valid!";
320  } else {
321  // calculate SF from L2 (only once -- if needed)
322  if (!analysedL2 && adjustErrorsDynamicallyForHitless_) {
323  errorSFHitless = calculateSFFromL2(l2);
324  analysedL2 = true;
325  }
326 
327  dets.front().second.rescaleError(errorSFHitless);
328  PTrajectoryStateOnDet const& ptsod =
329  trajectoryStateTransform::persistentState(tsosOnLayer, detOnLayer->geographicalId().rawId());
331  out->push_back(TrajectorySeed(ptsod, rHC, oppositeToMomentum));
332  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOD (Hitless) done " << endl;
333  numSeedsMade++;
334  }
335  }
336  }
337 
338  // Hits:
339  if (layerCount > numOfLayersToTry_)
340  return;
341  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start Hits" << endl;
342  if (makeSeedsFromHits(tTopo,
343  layer,
344  tsosAtIP,
345  *out,
347  *measurementTrackerH,
348  estimatorH,
349  numSeedsMade,
350  errorSFHits,
351  l2->eta()))
352  ++layerCount;
353 }
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:386
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
#define LogTrace(id)
constexpr std::array< uint8_t, layerIndexSize > layer
const double fixedErrorRescalingForHits_
How much to rescale errors from the L2 (fixed error vs pT, eta)
Definition: TSGForOI.h:64
const bool useHitLessSeeds_
Definition: TSGForOI.h:79
const unsigned int numOfLayersToTry_
How many layers to try.
Definition: TSGForOI.h:58
const bool adjustErrorsDynamicallyForHitless_
Definition: TSGForOI.h:69
Log< level::Info, false > LogInfo
double calculateSFFromL2(const reco::TrackRef track) const
Function used to calculate the dynamic error SF by analysing the L2.
Definition: TSGForOI.cc:355
const bool adjustErrorsDynamicallyForHits_
Whether or not to use an automatically calculated scale-factor value.
Definition: TSGForOI.h:68
const std::string theCategory
Definition: TSGForOI.h:99
const double fixedErrorRescalingForHitless_
Definition: TSGForOI.h:65

◆ makeSeedsFromHits()

int TSGForOI::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
private

Function to find hits on layers and create seeds from updated TSOS.

Definition at line 386 of file TSGForOI.cc.

References MeasurementDetWithData::fastMeasurements(), newFWLiteAna::found, MeasurementDetWithData::isNull(), TrajectoryStateOnSurface::isValid(), phase1PixelTopology::layer, LogTrace, HLTSiStripMonitoring_cff::measurementTracker, eostools::move(), numOfHitsToTry_, oppositeToMomentum, MillePedeFileConverter_cfg::out, trajectoryStateTransform::persistentState(), L1TMuonDQMOffline_cfi::propagatorAlong, edm::OwnVector< T, P >::push_back(), DetId::rawId(), TrajectoryStateOnSurface::rescaleError(), fileCollector::seed, edm::OwnVector< T, P >::size(), jetUpdater_cfi::sort, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecIsStereo(), updator_, and useStereoLayersInTEC_.

Referenced by findSeedsOnLayer().

395  {
396  // Error Rescaling:
397  TrajectoryStateOnSurface onLayer(tsosAtIP);
398  onLayer.rescaleError(errorSF);
399 
400  std::vector<GeometricSearchDet::DetWithState> dets;
401  layer.compatibleDetsV(onLayer, propagatorAlong, *estimatorH, dets);
402 
403  // Find Measurements on each DetWithState:
404  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: find measurements on each detWithState " << dets.size() << endl;
405  std::vector<TrajectoryMeasurement> meas;
406  for (std::vector<GeometricSearchDet::DetWithState>::iterator it = dets.begin(); it != dets.end(); ++it) {
407  MeasurementDetWithData det = measurementTracker.idToDet(it->first->geographicalId());
408  if (det.isNull()) {
409  continue;
410  }
411  if (!it->second.isValid())
412  continue; //Skip if TSOS is not valid
413 
414  std::vector<TrajectoryMeasurement> mymeas =
415  det.fastMeasurements(it->second, onLayer, propagatorAlong, *estimatorH); //Second TSOS is not used
416  for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2;
417  ++it2) {
418  if (it2->recHit()->isValid())
419  meas.push_back(*it2); //Only save those which are valid
420  }
421  }
422 
423  // Update TSOS using TMs after sorting, then create Trajectory Seed and put into vector:
424  LogTrace("TSGForOI")
425  << "TSGForOI::findSeedsOnLayer: Update TSOS using TMs after sorting, then create Trajectory Seed, number of TM = "
426  << meas.size() << endl;
427  unsigned int found = 0;
428  std::sort(meas.begin(), meas.end(), TrajMeasLessEstim());
429  for (std::vector<TrajectoryMeasurement>::const_iterator it = meas.begin(); it != meas.end(); ++it) {
430  TrajectoryStateOnSurface updatedTSOS = updator_->update(it->forwardPredictedState(), *it->recHit());
431  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOS for TM " << found << endl;
432  if (not updatedTSOS.isValid())
433  continue;
434 
435  // CHECK if is StereoLayer:
436  if (useStereoLayersInTEC_ && (fabs(l2Eta) > 0.8 && fabs(l2Eta) < 1.6)) {
437  DetId detid = ((*it).recHit()->hit())->geographicalId();
438  if (detid.subdetId() == StripSubdetector::TEC) {
439  if (!tTopo->tecIsStereo(detid.rawId()))
440  break; // try another layer
441  }
442  }
443 
445  seedHits.push_back(*it->recHit()->hit());
446  PTrajectoryStateOnDet const& pstate =
447  trajectoryStateTransform::persistentState(updatedTSOS, it->recHit()->geographicalId().rawId());
448  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: number of seedHits: " << seedHits.size() << endl;
449  TrajectorySeed seed(pstate, std::move(seedHits), oppositeToMomentum);
450  out.push_back(seed);
451  found++;
452  numSeedsMade++;
453  if (found == numOfHitsToTry_)
454  break;
455  }
456  return found;
457 }
static constexpr auto TEC
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
#define LogTrace(id)
constexpr std::array< uint8_t, layerIndexSize > layer
void push_back(D *&d)
Definition: OwnVector.h:326
const std::unique_ptr< TrajectoryStateUpdator > updator_
KFUpdator defined in constructor.
Definition: TSGForOI.h:85
size_type size() const
Definition: OwnVector.h:300
const bool useStereoLayersInTEC_
Switch ON to use Stereo layers instead of using every layer in TEC.
Definition: TSGForOI.h:82
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
bool tecIsStereo(const DetId &id) const
def move(src, dest)
Definition: eostools.py:511
const unsigned int numOfHitsToTry_
How many hits to try per layer.
Definition: TSGForOI.h:61

◆ match_Chi2()

double TSGForOI::match_Chi2 ( const TrajectoryStateOnSurface tsos1,
const TrajectoryStateOnSurface tsos2 
) const
private

Definition at line 462 of file TSGForOI.cc.

References TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), visualization-live-secondInstance_cfg::m, LocalTrajectoryError::matrix(), findQualityFiles::v, and LocalTrajectoryParameters::vector().

Referenced by produce().

462  {
463  if (!tsos1.isValid() || !tsos2.isValid())
464  return -1.;
465 
467  AlgebraicSymMatrix55 m(tsos1.localError().matrix() + tsos2.localError().matrix());
468 
469  bool ierr = !m.Invert();
470 
471  if (ierr) {
472  edm::LogInfo("TSGForOI") << "Error inverting covariance matrix";
473  return -1;
474  }
475 
476  double est = ROOT::Math::Similarity(v, m);
477 
478  return est;
479 }
const LocalTrajectoryError & localError() const
const LocalTrajectoryParameters & localParameters() const
AlgebraicVector5 vector() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Log< level::Info, false > LogInfo
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const AlgebraicSymMatrix55 & matrix() const

◆ produce()

void TSGForOI::produce ( edm::StreamID  sid,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overridevirtual

Init variables

Surface used to make a TSOS at the PCA to the beamline

Read ESHandles

Read L2 track collection

Implements edm::global::EDProducerBase.

Definition at line 59 of file TSGForOI.cc.

References funct::abs(), alongMomentum, Plane::build(), estimatorToken_, findSeedsOnLayer(), geometryToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), iEvent, trajectoryStateTransform::initialFreeState(), trajectoryStateTransform::innerStateOnSurface(), TrackerGeometry::isThere(), TrajectoryStateOnSurface::isValid(), LogTrace, magfieldToken_, match_Chi2(), maxEtaForTOB_, measurementTrackerTag_, minEtaForTEC_, eostools::move(), numOfMaxSeedsParam_, oppositeToMomentum, MillePedeFileConverter_cfg::out, GeomDetEnumerators::P2OTEC, FreeTrajectoryState::position(), edm::ESHandle< T >::product(), L1TMuonDQMOffline_cfi::propagatorAlong, propagatorAlongToken_, L1TMuonDQMOffline_cfi::propagatorOpposite, propagatorOppositeToken_, mps_fire::result, SetPropagationDirection(), shpOppositeToken_, smartOppositeToken_, src_, theCategory, tmpTkGeometryToken_, tsosDiff_, and tTopoToken_.

59  {
61  unsigned int numOfMaxSeeds = numOfMaxSeedsParam_;
62  unsigned int numSeedsMade = 0;
63  bool analysedL2 = false;
64  unsigned int layerCount = 0;
65 
68 
70  edm::Handle<MeasurementTrackerEvent> measurementTrackerH;
74  edm::ESHandle<Propagator> propagatorOppositeH = iSetup.getHandle(propagatorOppositeToken_);
77 
78  iEvent.getByToken(measurementTrackerTag_, measurementTrackerH);
79 
82  iEvent.getByToken(src_, l2TrackCol);
83 
84  // The product:
85  std::unique_ptr<std::vector<TrajectorySeed> > result(new std::vector<TrajectorySeed>());
86 
87  // Get vector of Detector layers once:
88  std::vector<BarrelDetLayer const*> const& tob = measurementTrackerH->geometricSearchTracker()->tobLayers();
89  std::vector<ForwardDetLayer const*> const& tecPositive =
90  tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC)
91  ? measurementTrackerH->geometricSearchTracker()->posTidLayers()
92  : measurementTrackerH->geometricSearchTracker()->posTecLayers();
93  std::vector<ForwardDetLayer const*> const& tecNegative =
94  tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC)
95  ? measurementTrackerH->geometricSearchTracker()->negTidLayers()
96  : measurementTrackerH->geometricSearchTracker()->negTecLayers();
97  const TrackerTopology* tTopo = &iSetup.getData(tTopoToken_);
98 
99  // Get the suitable propagators:
100  std::unique_ptr<Propagator> propagatorAlong = SetPropagationDirection(*propagatorAlongH, alongMomentum);
101  std::unique_ptr<Propagator> propagatorOpposite = SetPropagationDirection(*propagatorOppositeH, oppositeToMomentum);
102 
105 
106  // Loop over the L2's and make seeds for all of them:
107  LogTrace(theCategory) << "TSGForOI::produce: Number of L2's: " << l2TrackCol->size();
108  for (unsigned int l2TrackColIndex(0); l2TrackColIndex != l2TrackCol->size(); ++l2TrackColIndex) {
109  const reco::TrackRef l2(l2TrackCol, l2TrackColIndex);
110  std::unique_ptr<std::vector<TrajectorySeed> > out(new std::vector<TrajectorySeed>());
111  LogTrace("TSGForOI") << "TSGForOI::produce: L2 muon pT, eta, phi --> " << l2->pt() << " , " << l2->eta() << " , "
112  << l2->phi() << endl;
113 
115  dummyPlane->move(fts.position() - dummyPlane->position());
116  TrajectoryStateOnSurface tsosAtIP = TrajectoryStateOnSurface(fts, *dummyPlane);
117  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatIP: " << tsosAtIP << std::endl;
118 
119  // get the TSOS on the innermost layer of the L2.
120  TrajectoryStateOnSurface tsosAtMuonSystem =
121  trajectoryStateTransform::innerStateOnSurface(*l2, *geometryH, magfieldH.product());
122  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatMuonSystem: " << tsosAtMuonSystem << endl;
123 
124  LogTrace("TSGForOI") << "TSGForOI::produce: Check the error of the L2 parameter and use hit seeds if big errors"
125  << 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,
154  **it,
155  tsosAtIP,
156  *(propagatorAlong.get()),
157  *(propagatorOpposite.get()),
158  l2,
159  estimatorH,
160  measurementTrackerH,
161  numSeedsMade,
162  numOfMaxSeeds,
163  layerCount,
164  analysedL2,
165  out);
166  }
167  if (useBoth) {
168  numSeedsMade = 0;
169  for (auto it = tob.rbegin(); it != tob.rend(); ++it) { //This goes from outermost to innermost layer
170  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TOB layer " << layerCount << endl;
171  findSeedsOnLayer(tTopo,
172  **it,
173  tsosAtMuonSystem,
174  *(propagatorOpposite.get()),
175  *(propagatorOpposite.get()),
176  l2,
177  estimatorH,
178  measurementTrackerH,
179  numSeedsMade,
180  numOfMaxSeeds,
181  layerCount,
182  analysedL2,
183  out);
184  }
185  }
186  }
187  // Reset Number of seeds if in overlap region:
188 
189  if (std::abs(l2->eta()) > minEtaForTEC_ && std::abs(l2->eta()) < maxEtaForTOB_) {
190  numSeedsMade = 0;
191  }
192 
193  // ENDCAP+
194  if (l2->eta() > minEtaForTEC_) {
195  layerCount = 0;
196  for (auto it = tecPositive.rbegin(); it != tecPositive.rend(); ++it) {
197  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
198  findSeedsOnLayer(tTopo,
199  **it,
200  tsosAtIP,
201  *(propagatorAlong.get()),
202  *(propagatorOpposite.get()),
203  l2,
204  estimatorH,
205  measurementTrackerH,
206  numSeedsMade,
207  numOfMaxSeeds,
208  layerCount,
209  analysedL2,
210  out);
211  }
212  if (useBoth) {
213  numSeedsMade = 0;
214  for (auto it = tecPositive.rbegin(); it != tecPositive.rend(); ++it) {
215  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
216  findSeedsOnLayer(tTopo,
217  **it,
218  tsosAtMuonSystem,
219  *(propagatorOpposite.get()),
220  *(propagatorOpposite.get()),
221  l2,
222  estimatorH,
223  measurementTrackerH,
224  numSeedsMade,
225  numOfMaxSeeds,
226  layerCount,
227  analysedL2,
228  out);
229  }
230  }
231  }
232 
233  // ENDCAP-
234  if (l2->eta() < -minEtaForTEC_) {
235  layerCount = 0;
236  for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) {
237  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
238  findSeedsOnLayer(tTopo,
239  **it,
240  tsosAtIP,
241  *(propagatorAlong.get()),
242  *(propagatorOpposite.get()),
243  l2,
244  estimatorH,
245  measurementTrackerH,
246  numSeedsMade,
247  numOfMaxSeeds,
248  layerCount,
249  analysedL2,
250  out);
251  }
252  if (useBoth) {
253  numSeedsMade = 0;
254  for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) {
255  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
256  findSeedsOnLayer(tTopo,
257  **it,
258  tsosAtMuonSystem,
259  *(propagatorOpposite.get()),
260  *(propagatorOpposite.get()),
261  l2,
262  estimatorH,
263  measurementTrackerH,
264  numSeedsMade,
265  numOfMaxSeeds,
266  layerCount,
267  analysedL2,
268  out);
269  }
270  }
271  }
272 
273  for (std::vector<TrajectorySeed>::iterator it = out->begin(); it != out->end(); ++it) {
274  result->push_back(*it);
275  }
276  } //L2Collection
277  edm::LogInfo(theCategory) << "TSGForOI::produce: number of seeds made: " << result->size();
278 
279  iEvent.put(std::move(result));
280 }
const double tsosDiff_
Distance of TSOSs to trigger using hits or not.
Definition: TSGForOI.h:95
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
Definition: TSGForOI.h:101
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > estimatorToken_
Estimator used to find dets and TrajectoryMeasurements.
Definition: TSGForOI.h:45
const double maxEtaForTOB_
Maximum eta value to activate searching in the TOB.
Definition: TSGForOI.h:75
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:282
#define LogTrace(id)
static PlanePointer build(Args &&... args)
Definition: Plane.h:33
GlobalPoint position() const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
const double minEtaForTEC_
Minimum eta value to activate searching in the TEC.
Definition: TSGForOI.h:72
int iEvent
Definition: GenABIO.cc:224
T const * product() const
Definition: ESHandle.h:86
const edm::ESGetToken< Propagator, TrackingComponentsRecord > smartOppositeToken_
Definition: TSGForOI.h:51
bool isThere(GeomDetEnumerators::SubDetector subdet) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: TSGForOI.h:50
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool getData(T &iHolder) const
Definition: EventSetup.h:122
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
double match_Chi2(const TrajectoryStateOnSurface &tsos1, const TrajectoryStateOnSurface &tsos2) const
Definition: TSGForOI.cc:462
Log< level::Info, false > LogInfo
const edm::EDGetTokenT< reco::TrackCollection > src_
Labels for input collections.
Definition: TSGForOI.h:42
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
Definition: TSGForOI.h:47
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tmpTkGeometryToken_
Definition: TSGForOI.h:48
const edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Definition: TSGForOI.h:87
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAlongToken_
Definition: TSGForOI.h:100
const unsigned int numOfMaxSeedsParam_
Maximum number of seeds for each L2.
Definition: TSGForOI.h:55
const std::string theCategory
Definition: TSGForOI.h:99
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > geometryToken_
Definition: TSGForOI.h:49
def move(src, dest)
Definition: eostools.py:511
const edm::ESGetToken< Propagator, TrackingComponentsRecord > shpOppositeToken_
Definition: TSGForOI.h:52
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)

Member Data Documentation

◆ adjustErrorsDynamicallyForHitless_

const bool TSGForOI::adjustErrorsDynamicallyForHitless_
private

Definition at line 69 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ adjustErrorsDynamicallyForHits_

const bool TSGForOI::adjustErrorsDynamicallyForHits_
private

Whether or not to use an automatically calculated scale-factor value.

Definition at line 68 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ estimatorToken_

const edm::ESGetToken<Chi2MeasurementEstimatorBase, TrackingComponentsRecord> TSGForOI::estimatorToken_
private

Estimator used to find dets and TrajectoryMeasurements.

Definition at line 45 of file TSGForOI.h.

Referenced by produce().

◆ eta1_

const double TSGForOI::eta1_
private

Definition at line 91 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ eta2_

const double TSGForOI::eta2_
private

Definition at line 91 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ fixedErrorRescalingForHitless_

const double TSGForOI::fixedErrorRescalingForHitless_
private

Definition at line 65 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ fixedErrorRescalingForHits_

const double TSGForOI::fixedErrorRescalingForHits_
private

How much to rescale errors from the L2 (fixed error vs pT, eta)

Definition at line 64 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ geometryToken_

const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> TSGForOI::geometryToken_
private

Definition at line 49 of file TSGForOI.h.

Referenced by produce().

◆ magfieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> TSGForOI::magfieldToken_
private

Definition at line 47 of file TSGForOI.h.

Referenced by produce().

◆ maxEtaForTOB_

const double TSGForOI::maxEtaForTOB_
private

Maximum eta value to activate searching in the TOB.

Definition at line 75 of file TSGForOI.h.

Referenced by produce().

◆ measurementTrackerTag_

const edm::EDGetTokenT<MeasurementTrackerEvent> TSGForOI::measurementTrackerTag_
private

Definition at line 87 of file TSGForOI.h.

Referenced by produce().

◆ minEtaForTEC_

const double TSGForOI::minEtaForTEC_
private

Minimum eta value to activate searching in the TEC.

Definition at line 72 of file TSGForOI.h.

Referenced by produce().

◆ numOfHitsToTry_

const unsigned int TSGForOI::numOfHitsToTry_
private

How many hits to try per layer.

Definition at line 61 of file TSGForOI.h.

Referenced by makeSeedsFromHits().

◆ numOfLayersToTry_

const unsigned int TSGForOI::numOfLayersToTry_
private

How many layers to try.

Definition at line 58 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ numOfMaxSeedsParam_

const unsigned int TSGForOI::numOfMaxSeedsParam_
private

Maximum number of seeds for each L2.

Definition at line 55 of file TSGForOI.h.

Referenced by produce().

◆ propagatorAlongToken_

const edm::ESGetToken<Propagator, TrackingComponentsRecord> TSGForOI::propagatorAlongToken_
private

Definition at line 100 of file TSGForOI.h.

Referenced by produce().

◆ propagatorName_

const std::string TSGForOI::propagatorName_
private

Counters and flags for the implementation.

Definition at line 98 of file TSGForOI.h.

◆ propagatorOppositeToken_

const edm::ESGetToken<Propagator, TrackingComponentsRecord> TSGForOI::propagatorOppositeToken_
private

Definition at line 101 of file TSGForOI.h.

Referenced by produce().

◆ pT1_

const double TSGForOI::pT1_
private

pT, eta ranges and scale factor values

Definition at line 90 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ pT2_

const double TSGForOI::pT2_
private

Definition at line 90 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ pT3_

const double TSGForOI::pT3_
private

Definition at line 90 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ SF1_

const double TSGForOI::SF1_
private

Definition at line 92 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ SF2_

const double TSGForOI::SF2_
private

Definition at line 92 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ SF3_

const double TSGForOI::SF3_
private

Definition at line 92 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ SF4_

const double TSGForOI::SF4_
private

Definition at line 92 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ SF5_

const double TSGForOI::SF5_
private

Definition at line 92 of file TSGForOI.h.

Referenced by calculateSFFromL2().

◆ shpOppositeToken_

const edm::ESGetToken<Propagator, TrackingComponentsRecord> TSGForOI::shpOppositeToken_
private

Definition at line 52 of file TSGForOI.h.

Referenced by produce().

◆ smartOppositeToken_

const edm::ESGetToken<Propagator, TrackingComponentsRecord> TSGForOI::smartOppositeToken_
private

Definition at line 51 of file TSGForOI.h.

Referenced by produce().

◆ src_

const edm::EDGetTokenT<reco::TrackCollection> TSGForOI::src_
private

Labels for input collections.

Definition at line 42 of file TSGForOI.h.

Referenced by produce().

◆ theCategory

const std::string TSGForOI::theCategory
private

Definition at line 99 of file TSGForOI.h.

Referenced by calculateSFFromL2(), findSeedsOnLayer(), and produce().

◆ tmpTkGeometryToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TSGForOI::tmpTkGeometryToken_
private

Definition at line 48 of file TSGForOI.h.

Referenced by produce().

◆ tsosDiff_

const double TSGForOI::tsosDiff_
private

Distance of TSOSs to trigger using hits or not.

Definition at line 95 of file TSGForOI.h.

Referenced by produce().

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> TSGForOI::tTopoToken_
private

Definition at line 50 of file TSGForOI.h.

Referenced by produce().

◆ updator_

const std::unique_ptr<TrajectoryStateUpdator> TSGForOI::updator_
private

KFUpdator defined in constructor.

Definition at line 85 of file TSGForOI.h.

Referenced by makeSeedsFromHits().

◆ useHitLessSeeds_

const bool TSGForOI::useHitLessSeeds_
private

Switch ON (True) : use additional hits for seeds depending on the L2 properties (ignores numOfMaxSeeds_) Switch OFF (False): the numOfMaxSeeds_ defines if we will use hitless (numOfMaxSeeds_==1) or hitless+hits (numOfMaxSeeds_>1)

Definition at line 79 of file TSGForOI.h.

Referenced by findSeedsOnLayer().

◆ useStereoLayersInTEC_

const bool TSGForOI::useStereoLayersInTEC_
private

Switch ON to use Stereo layers instead of using every layer in TEC.

Definition at line 82 of file TSGForOI.h.

Referenced by makeSeedsFromHits().