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

const bool computeCoarseLocalPositionFromDisk_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
 
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > > p2OTToken_
 
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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &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 49 of file TkTransientTrackingRecHitBuilderESProducer.cc.

50  : computeCoarseLocalPositionFromDisk_(p.getParameter<bool>("ComputeCoarseLocalPositionFromDisk")) {
51  std::string const myname = p.getParameter<std::string>("ComponentName");
52  auto c = setWhatProduced(this, myname);
53  geomToken_ = c.consumes();
54 
55  std::string const sname = p.getParameter<std::string>("StripCPE");
56  if (sname != "Fake") {
57  spToken_ = c.consumes(edm::ESInputTag("", sname));
58  }
59 
60  std::string const pname = p.getParameter<std::string>("PixelCPE");
61  if (pname != "Fake") {
62  ppToken_ = c.consumes(edm::ESInputTag("", pname));
63  }
64 
65  auto const mname = p.getParameter<std::string>("Matcher");
66  if (mname != "Fake") {
67  mpToken_ = c.consumes(edm::ESInputTag("", mname));
68  }
69 
70  auto const P2otname = p.getParameter<std::string>("Phase2StripCPE");
71  if (!P2otname.empty()) {
72  p2OTToken_ = c.consumes(edm::ESInputTag("", P2otname));
73  }
74 }

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

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 111 of file TkTransientTrackingRecHitBuilderESProducer.cc.

111  {
113 
114  desc.add<std::string>("ComponentName");
115  desc.add<bool>("ComputeCoarseLocalPositionFromDisk");
116  desc.add<std::string>("StripCPE")->setComment("Using \"Fake\" disables use of StripCPE");
117  desc.add<std::string>("PixelCPE")->setComment("Using \"Fake\" disables use of PixelCPE");
118  desc.add<std::string>("Matcher")->setComment("Using \"Fake\" disables use of SiStripRecHitMatcher");
119  desc.add<std::string>("Phase2StripCPE", "")->setComment("Using empty string disables use of Phase2StripCPE");
120 
121  descriptions.addDefault(desc);
122 }

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

◆ produce()

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

Definition at line 76 of file TkTransientTrackingRecHitBuilderESProducer.cc.

77  {
78  const StripClusterParameterEstimator* sp = nullptr;
79  if (spToken_) {
80  sp = &iRecord.get(*spToken_);
81  }
82 
83  const PixelClusterParameterEstimator* pp = nullptr;
84  if (ppToken_) {
85  pp = &iRecord.get(*ppToken_);
86  }
87 
88  const SiStripRecHitMatcher* mp = nullptr;
89  if (mpToken_) {
90  mp = &iRecord.get(*mpToken_);
91  }
92 
94  edm::LogWarning("TkTransientTrackingRecHitBuilderESProducer")
95  << " The tracking rec hit positions and errors are not a persistent in data formats.\n"
96  << " They are not available from disk.\n"
97  << " However, TkTransientTrackingRecHitBuilderESProducer::ComputeCoarseLocalPositionFromDisk=True \n"
98  << " will make the coarse estimation of this position/error available without track refit.\n"
99  << " Position/error obtained from rechit with already defined position/error are not recomputed.\n"
100  << " Position/error obtained from track refit are precise.";
101 
102  auto const& dd = iRecord.get(geomToken_);
103 
104  //For Phase2 upgrade
105  if (p2OTToken_) {
106  return std::make_unique<TkTransientTrackingRecHitBuilder>(&dd, pp, &iRecord.get(*p2OTToken_));
107  }
108  return std::make_unique<TkTransientTrackingRecHitBuilder>(&dd, pp, sp, mp, computeCoarseLocalPositionFromDisk_);
109 }

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

Member Data Documentation

◆ computeCoarseLocalPositionFromDisk_

const bool TkTransientTrackingRecHitBuilderESProducer::computeCoarseLocalPositionFromDisk_
private

Definition at line 44 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

◆ ppToken_

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

◆ spToken_

std::optional<edm::ESGetToken<StripClusterParameterEstimator, TkStripCPERecord> > TkTransientTrackingRecHitBuilderESProducer::spToken_
private
TkTransientTrackingRecHitBuilderESProducer::ppToken_
std::optional< edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > > ppToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:40
PixelClusterParameterEstimator
Definition: PixelClusterParameterEstimator.h:15
edm::ESInputTag
Definition: ESInputTag.h:87
TkTransientTrackingRecHitBuilderESProducer::spToken_
std::optional< edm::ESGetToken< StripClusterParameterEstimator, TkStripCPERecord > > spToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:39
TkTransientTrackingRecHitBuilderESProducer::geomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:42
TkTransientTrackingRecHitBuilderESProducer::computeCoarseLocalPositionFromDisk_
const bool computeCoarseLocalPositionFromDisk_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:44
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
StripClusterParameterEstimator
Definition: StripClusterParameterEstimator.h:25
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
unpackData-CaloStage2.pname
pname
Definition: unpackData-CaloStage2.py:76
createTree.dd
string dd
Definition: createTree.py:154
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TkTransientTrackingRecHitBuilderESProducer::mpToken_
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:41
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TkTransientTrackingRecHitBuilderESProducer::p2OTToken_
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkPhase2OTCPERecord > > p2OTToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:43
createTree.pp
pp
Definition: createTree.py:17
SiStripRecHitMatcher
Definition: SiStripRecHitMatcher.h:24
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99