CMS 3D CMS Logo

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

#include <TkTransientTrackingRecHitBuilderESProducer.h>

Inheritance diagram for TkTransientTrackingRecHitBuilderESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::shared_ptr< TransientTrackingRecHitBuilderproduce (const TransientRecHitRecord &)
 
 TkTransientTrackingRecHitBuilderESProducer (const edm::ParameterSet &p)
 
virtual ~TkTransientTrackingRecHitBuilderESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

std::shared_ptr< TransientTrackingRecHitBuilder_builder
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 14 of file TkTransientTrackingRecHitBuilderESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file TkTransientTrackingRecHitBuilderESProducer.cc.

27 {}

Member Function Documentation

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

Definition at line 30 of file TkTransientTrackingRecHitBuilderESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), BPhysicsValidation_cfi::pname, createTree::pp, edm::ESHandle< T >::product(), lumiContext::sname, and AlCaHLTBitMon_QueryRunRegistry::string.

30  {
31 // if (_propagator){
32 // delete _propagator;
33 // _propagator = 0;
34 // }
35 
38  std::string mname = pset_.getParameter<std::string>("Matcher");
39 
40 
46  const SiStripRecHitMatcher * mp ;
47 
48  if (sname == "Fake") {
49  sp = 0;
50  }else{
51  iRecord.getRecord<TkStripCPERecord>().get( sname, se );
52  sp = se.product();
53  }
54 
55  if (pname == "Fake") {
56  pp = 0;
57  }else{
58  iRecord.getRecord<TkPixelCPERecord>().get( pname, pe );
59  pp = pe.product();
60  }
61 
62  if (mname == "Fake") {
63  mp = 0;
64  }else{
65  iRecord.getRecord<TkStripCPERecord>().get( mname, me );
66  mp = me.product();
67  }
68 
69  bool computeCoarseLocalPositionFromDisk = pset_.getParameter<bool>("ComputeCoarseLocalPositionFromDisk");
70  if (computeCoarseLocalPositionFromDisk)
71  edm::LogWarning("TkTransientTrackingRecHitBuilderESProducer")<<" The tracking rec hit positions and errors are not a persistent in data formats.\n"
72  <<" They are not available from disk.\n"
73  <<" However, TkTransientTrackingRecHitBuilderESProducer::ComputeCoarseLocalPositionFromDisk=True \n"
74  <<" will make the coarse estimation of this position/error available without track refit.\n"
75  <<" Position/error obtained from rechit with already defined position/error are not recomputed.\n"
76  <<" Position/error obtained from track refit are precise.";
77 
79  iRecord.getRecord<TrackerDigiGeometryRecord>().get( pDD );
80 
81  //For Phase2 upgrade
82  std::string p2OTname = "";
83  if(pset_.existsAs<std::string>("Phase2StripCPE")){
84  p2OTname = pset_.getParameter<std::string>("Phase2StripCPE");
85  }
88 
89  if (p2OTname != "") {
90  iRecord.getRecord<TkStripCPERecord>().get( p2OTname, p2OTe );
91  p2OTp = p2OTe.product();
92  _builder = std::make_shared<TkTransientTrackingRecHitBuilder>(pDD.product(), pp, p2OTp);
93  } else {
94  _builder = std::make_shared<TkTransientTrackingRecHitBuilder>(pDD.product(), pp, sp, mp, computeCoarseLocalPositionFromDisk);
95  }
96 
97  return _builder;
98 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
std::shared_ptr< TransientTrackingRecHitBuilder > _builder
Definition: sp.h:21
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

std::shared_ptr<TransientTrackingRecHitBuilder> TkTransientTrackingRecHitBuilderESProducer::_builder
private

Definition at line 20 of file TkTransientTrackingRecHitBuilderESProducer.h.

edm::ParameterSet TkTransientTrackingRecHitBuilderESProducer::pset_
private

Definition at line 21 of file TkTransientTrackingRecHitBuilderESProducer.h.