CMS 3D CMS Logo

Public Member Functions | Private Attributes

TkTransientTrackingRecHitBuilderESProducer Class Reference

#include <TkTransientTrackingRecHitBuilderESProducer.h>

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

List of all members.

Public Member Functions

boost::shared_ptr
< TransientTrackingRecHitBuilder
produce (const TransientRecHitRecord &)
 TkTransientTrackingRecHitBuilderESProducer (const edm::ParameterSet &p)
virtual ~TkTransientTrackingRecHitBuilderESProducer ()

Private Attributes

boost::shared_ptr
< TransientTrackingRecHitBuilder
_builder
edm::ParameterSet pset_

Detailed Description

Definition at line 14 of file TkTransientTrackingRecHitBuilderESProducer.h.


Constructor & Destructor Documentation

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

Definition at line 19 of file TkTransientTrackingRecHitBuilderESProducer.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_ParallelJobs::p.

{
  std::string myname = p.getParameter<std::string>("ComponentName");
  pset_ = p;
  setWhatProduced(this,myname);
}
TkTransientTrackingRecHitBuilderESProducer::~TkTransientTrackingRecHitBuilderESProducer ( ) [virtual]

Definition at line 26 of file TkTransientTrackingRecHitBuilderESProducer.cc.

{}

Member Function Documentation

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

Definition at line 29 of file TkTransientTrackingRecHitBuilderESProducer.cc.

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

                                                                                        { 
//   if (_propagator){
//     delete _propagator;
//     _propagator = 0;
//   }

  std::string sname = pset_.getParameter<std::string>("StripCPE");
  std::string pname = pset_.getParameter<std::string>("PixelCPE");
  std::string mname = pset_.getParameter<std::string>("Matcher");
  
  edm::ESHandle<StripClusterParameterEstimator> se; 
  edm::ESHandle<PixelClusterParameterEstimator> pe; 
  edm::ESHandle<SiStripRecHitMatcher>           me; 
  const StripClusterParameterEstimator * sp ;
  const PixelClusterParameterEstimator * pp ;
  const SiStripRecHitMatcher           * mp ;
    
  if (sname == "Fake") {
    sp = 0;
  }else{
    iRecord.getRecord<TkStripCPERecord>().get( sname, se );     
    sp = se.product();
  }
  
  if (pname == "Fake") {
    pp = 0;
  }else{
    iRecord.getRecord<TkPixelCPERecord>().get( pname, pe );     
    pp = pe.product();
  }
  
  if (mname == "Fake") {
    mp = 0;
  }else{
    iRecord.getRecord<TkStripCPERecord>().get( mname, me );     
    mp = me.product();
  }

  bool computeCoarseLocalPositionFromDisk = pset_.getParameter<bool>("ComputeCoarseLocalPositionFromDisk");
  if (computeCoarseLocalPositionFromDisk)
    edm::LogWarning("TkTransientTrackingRecHitBuilderESProducer")<<" The tracking rec hit positions and errors are not a persistent in data formats.\n"
                                                                 <<" They are not available from disk.\n"
                                                                 <<" However, TkTransientTrackingRecHitBuilderESProducer::ComputeCoarseLocalPositionFromDisk=True \n"
                                                                 <<" will make the coarse estimation of this position/error available without track refit.\n"
                                                                 <<" Position/error obtained from rechit with already defined position/error are not recomputed.\n"
                                                                 <<" Position/error obtained from track refit are precise.";
  
  edm::ESHandle<TrackerGeometry> pDD;
  iRecord.getRecord<TrackerDigiGeometryRecord>().get( pDD );     
  
  _builder  = boost::shared_ptr<TransientTrackingRecHitBuilder>(new TkTransientTrackingRecHitBuilder(pDD.product(), pp, sp, mp, computeCoarseLocalPositionFromDisk));
  return _builder;
}

Member Data Documentation

Definition at line 20 of file TkTransientTrackingRecHitBuilderESProducer.h.

Definition at line 21 of file TkTransientTrackingRecHitBuilderESProducer.h.