CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TkTransientTrackingRecHitBuilderESProducer Class Reference
Inheritance diagram for TkTransientTrackingRecHitBuilderESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< TransientTrackingRecHitBuilderproduce (const TransientRecHitRecord &)
 
 TkTransientTrackingRecHitBuilderESProducer (const edm::ParameterSet &p)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

bool const computeCoarseLocalPositionFromDisk_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
 
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > > p2OTToken_
 
const std::string pname_
 
std::optional< edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > > ppToken_
 
std::optional< edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > > spToken_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 30 of file TkTransientTrackingRecHitBuilderESProducer.cc.

Constructor & Destructor Documentation

◆ TkTransientTrackingRecHitBuilderESProducer()

TkTransientTrackingRecHitBuilderESProducer::TkTransientTrackingRecHitBuilderESProducer ( const edm::ParameterSet p)

Definition at line 50 of file TkTransientTrackingRecHitBuilderESProducer.cc.

References HltBtagPostValidation_cff::c, geomToken_, mpToken_, AlCaHLTBitMon_ParallelJobs::p, p2OTToken_, pname_, ppToken_, edm::ESProducer::setWhatProduced(), spToken_, and AlCaHLTBitMon_QueryRunRegistry::string.

51  : pname_(p.getParameter<std::string>("PixelCPE")),
52  computeCoarseLocalPositionFromDisk_(p.getParameter<bool>("ComputeCoarseLocalPositionFromDisk")) {
53  std::string const myname = p.getParameter<std::string>("ComponentName");
54  auto c = setWhatProduced(this, myname);
55  geomToken_ = c.consumes();
56 
57  std::string const sname = p.getParameter<std::string>("StripCPE");
58  if (sname != "Fake") {
59  spToken_ = c.consumes(edm::ESInputTag("", sname));
60  }
61 
62  if (pname_ != "Fake") {
63  ppToken_ = c.consumes(edm::ESInputTag("", pname_));
64  }
65 
66  auto const mname = p.getParameter<std::string>("Matcher");
67  if (mname != "Fake") {
68  mpToken_ = c.consumes(edm::ESInputTag("", mname));
69  }
70 
71  auto const P2otname = p.getParameter<std::string>("Phase2StripCPE");
72  if (!P2otname.empty()) {
73  p2OTToken_ = c.consumes(edm::ESInputTag("", P2otname));
74  }
75 }
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
std::optional< edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > > ppToken_
std::optional< edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > > spToken_
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > > p2OTToken_

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 118 of file TkTransientTrackingRecHitBuilderESProducer.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

118  {
120  desc.add<std::string>("ComponentName", "Fake");
121  desc.add<bool>("ComputeCoarseLocalPositionFromDisk", false);
122  desc.add<std::string>("StripCPE", "Fake")->setComment("Using \"Fake\" disables use of StripCPE");
123  desc.add<std::string>("PixelCPE", "Fake")->setComment("Using \"Fake\" disables use of PixelCPE");
124  desc.add<std::string>("Matcher", "Fake")->setComment("Using \"Fake\" disables use of SiStripRecHitMatcher");
125  desc.add<std::string>("Phase2StripCPE", "")->setComment("Using empty string disables use of Phase2StripCPE");
126  descriptions.addWithDefaultLabel(desc);
127 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

std::unique_ptr< TransientTrackingRecHitBuilder > TkTransientTrackingRecHitBuilderESProducer::produce ( const TransientRecHitRecord iRecord)

Definition at line 77 of file TkTransientTrackingRecHitBuilderESProducer.cc.

References computeCoarseLocalPositionFromDisk_, createTree::dd, geomToken_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), mpToken_, p2OTToken_, pname_, createTree::pp, ppToken_, and spToken_.

78  {
79  if (pname_ == "PixelCPEFast") {
80  edm::LogWarning("TkTransientTrackingRecHitBuilderESProducer")
81  << "\n\t\t WARNING!\n 'PixelCPEFast' has been chosen as PixelCPE choice.\n"
82  << " Track angles will NOT be used in the CPE estimation!\n";
83  }
84 
85  const StripClusterParameterEstimator* sp = nullptr;
86  if (spToken_ && !p2OTToken_) { // no strips in Phase-2
87  sp = &iRecord.get(*spToken_);
88  }
89 
90  const PixelClusterParameterEstimator* pp = nullptr;
91  if (ppToken_) {
92  pp = &iRecord.get(*ppToken_);
93  }
94 
95  const SiStripRecHitMatcher* mp = nullptr;
96  if (mpToken_) {
97  mp = &iRecord.get(*mpToken_);
98  }
99 
101  edm::LogWarning("TkTransientTrackingRecHitBuilderESProducer")
102  << " The tracking rec hit positions and errors are not a persistent in data formats.\n"
103  << " They are not available from disk.\n"
104  << " However, TkTransientTrackingRecHitBuilderESProducer::ComputeCoarseLocalPositionFromDisk=True \n"
105  << " will make the coarse estimation of this position/error available without track refit.\n"
106  << " Position/error obtained from rechit with already defined position/error are not recomputed.\n"
107  << " Position/error obtained from track refit are precise.";
108 
109  auto const& dd = iRecord.get(geomToken_);
110 
111  //For Phase2 upgrade
112  if (p2OTToken_) {
113  return std::make_unique<TkTransientTrackingRecHitBuilder>(&dd, pp, &iRecord.get(*p2OTToken_));
114  }
115  return std::make_unique<TkTransientTrackingRecHitBuilder>(&dd, pp, sp, mp, computeCoarseLocalPositionFromDisk_);
116 }
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
string dd
Definition: createTree.py:154
std::optional< edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > > ppToken_
Log< level::Warning, false > LogWarning
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::optional< edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > > spToken_
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > > p2OTToken_

Member Data Documentation

◆ computeCoarseLocalPositionFromDisk_

bool const TkTransientTrackingRecHitBuilderESProducer::computeCoarseLocalPositionFromDisk_
private

Definition at line 45 of file TkTransientTrackingRecHitBuilderESProducer.cc.

Referenced by produce().

◆ geomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> TkTransientTrackingRecHitBuilderESProducer::geomToken_
private

◆ mpToken_

std::optional<edm::ESGetToken<SiStripRecHitMatcher, TkStripCPERecord> > TkTransientTrackingRecHitBuilderESProducer::mpToken_
private

◆ p2OTToken_

std::optional<edm::ESGetToken<ClusterParameterEstimator<Phase2TrackerCluster1D>, TkPhase2OTCPERecord> > TkTransientTrackingRecHitBuilderESProducer::p2OTToken_
private

◆ pname_

const std::string TkTransientTrackingRecHitBuilderESProducer::pname_
private

◆ ppToken_

std::optional<edm::ESGetToken<PixelClusterParameterEstimator, TkPixelCPERecord> > TkTransientTrackingRecHitBuilderESProducer::ppToken_
private

◆ spToken_

std::optional<edm::ESGetToken<StripClusterParameterEstimator, TkStripCPERecord> > TkTransientTrackingRecHitBuilderESProducer::spToken_
private