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
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
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 >, TkStripCPERecord > > 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={})
 
- 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 58 of file TkTransientTrackingRecHitBuilderESProducer.cc.

59  : computeCoarseLocalPositionFromDisk_(p.getParameter<bool>("ComputeCoarseLocalPositionFromDisk")) {
60  std::string const myname = p.getParameter<std::string>("ComponentName");
61  auto c = setWhatProduced(this, myname);
62  c.setConsumes(geomToken_);
63 
64  std::string const sname = p.getParameter<std::string>("StripCPE");
65  if (sname != "Fake") {
66  setConsumes(c, spToken_, sname);
67  }
68 
69  std::string const pname = p.getParameter<std::string>("PixelCPE");
70  if (pname != "Fake") {
71  setConsumes(c, ppToken_, pname);
72  }
73 
74  auto const mname = p.getParameter<std::string>("Matcher");
75  if (mname != "Fake") {
76  setConsumes(c, mpToken_, mname);
77  }
78 
79  auto const P2otname = p.getParameter<std::string>("Phase2StripCPE");
80  if (!P2otname.empty()) {
81  setConsumes(c, p2OTToken_, P2otname);
82  }
83 }

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 120 of file TkTransientTrackingRecHitBuilderESProducer.cc.

120  {
122 
123  desc.add<std::string>("ComponentName");
124  desc.add<bool>("ComputeCoarseLocalPositionFromDisk");
125  desc.add<std::string>("StripCPE")->setComment("Using \"Fake\" disables use of StripCPE");
126  desc.add<std::string>("PixelCPE")->setComment("Using \"Fake\" disables use of PixelCPE");
127  desc.add<std::string>("Matcher")->setComment("Using \"Fake\" disables use of SiStripRecHitMatcher");
128  desc.add<std::string>("Phase2StripCPE", "")->setComment("Using empty string disables use of Phase2StripCPE");
129 
130  descriptions.addDefault(desc);
131 }

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

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

Definition at line 85 of file TkTransientTrackingRecHitBuilderESProducer.cc.

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

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>, TkStripCPERecord> > 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::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
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:138
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
StripClusterParameterEstimator
Definition: StripClusterParameterEstimator.h:25
TkTransientTrackingRecHitBuilderESProducer::p2OTToken_
std::optional< edm::ESGetToken< ClusterParameterEstimator< Phase2TrackerCluster1D >, TkStripCPERecord > > p2OTToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:43
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
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
edm::LogWarning
Definition: MessageLogger.h:141
TkTransientTrackingRecHitBuilderESProducer::mpToken_
std::optional< edm::ESGetToken< SiStripRecHitMatcher, TkStripCPERecord > > mpToken_
Definition: TkTransientTrackingRecHitBuilderESProducer.cc:41
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
createTree.pp
pp
Definition: createTree.py:17
SiStripRecHitMatcher
Definition: SiStripRecHitMatcher.h:25
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99