CMS 3D CMS Logo

Public Member Functions | Private Attributes

ES_HitMatchingAlgorithm_globalgeometry< T > Class Template Reference

#include <HitMatchingAlgorithm_globalgeometry.h>

Inheritance diagram for ES_HitMatchingAlgorithm_globalgeometry< T >:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 ES_HitMatchingAlgorithm_globalgeometry (const edm::ParameterSet &p)
 Constructor.
boost::shared_ptr
< HitMatchingAlgorithm< T > > 
produce (const HitMatchingAlgorithmRecord &record)
 Implement the producer.
virtual ~ES_HitMatchingAlgorithm_globalgeometry ()
 Destructor.

Private Attributes

boost::shared_ptr
< HitMatchingAlgorithm< T > > 
_theAlgo
 Data members.
double mIPWidth
double mPtThreshold

Detailed Description

template<typename T>
class ES_HitMatchingAlgorithm_globalgeometry< T >

********************** DECLARATION OF THE ALGORITHM TO THE FRAMEWORK **********************

Definition at line 144 of file HitMatchingAlgorithm_globalgeometry.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 154 of file HitMatchingAlgorithm_globalgeometry.h.

References edm::ESProducer::setWhatProduced().

                                                                        :
                                            mPtThreshold( p.getParameter< double >("minPtThreshold") ),
                                            mIPWidth( p.getParameter< double >("ipWidth") )
    {
      setWhatProduced( this );
    }
template<typename T >
virtual ES_HitMatchingAlgorithm_globalgeometry< T >::~ES_HitMatchingAlgorithm_globalgeometry ( ) [inline, virtual]

Destructor.

Definition at line 162 of file HitMatchingAlgorithm_globalgeometry.h.

{}

Member Function Documentation

template<typename T >
boost::shared_ptr< HitMatchingAlgorithm< T > > ES_HitMatchingAlgorithm_globalgeometry< T >::produce ( const HitMatchingAlgorithmRecord record) [inline]

Implement the producer.

Get magnetic field

Calculate scaling factor based on B and Pt threshold

Definition at line 165 of file HitMatchingAlgorithm_globalgeometry.h.

References ES_HitMatchingAlgorithm_globalgeometry< T >::_theAlgo, alignCSCRings::e, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), ES_HitMatchingAlgorithm_globalgeometry< T >::mIPWidth, and ES_HitMatchingAlgorithm_globalgeometry< T >::mPtThreshold.

    { 
      edm::ESHandle< MagneticField > magnet;
      record.getRecord< IdealMagneticFieldRecord >().get(magnet);
      double mMagneticFieldStrength = magnet->inTesla(GlobalPoint(0,0,0)).z();

      double mCompatibilityScalingFactor = (CLHEP::c_light * mMagneticFieldStrength) / (100.0 * 2.0e+9 * mPtThreshold);

      edm::ESHandle< StackedTrackerGeometry > StackedTrackerGeomHandle;
      record.getRecord< StackedTrackerGeometryRecord >().get( StackedTrackerGeomHandle );
  
      HitMatchingAlgorithm< T >* HitMatchingAlgo =
        new HitMatchingAlgorithm_globalgeometry< T >( &(*StackedTrackerGeomHandle),
                                                                   mCompatibilityScalingFactor,
                                                                   mIPWidth );

      _theAlgo = boost::shared_ptr< HitMatchingAlgorithm< T > >( HitMatchingAlgo );
      return _theAlgo;
    }

Member Data Documentation

template<typename T >
boost::shared_ptr< HitMatchingAlgorithm< T > > ES_HitMatchingAlgorithm_globalgeometry< T >::_theAlgo [private]
template<typename T >
double ES_HitMatchingAlgorithm_globalgeometry< T >::mIPWidth [private]
template<typename T >
double ES_HitMatchingAlgorithm_globalgeometry< T >::mPtThreshold [private]