CMS 3D CMS Logo

Public Member Functions | Private Attributes

jptJetAnalysis::TrackPropagatorToCalo Class Reference

List of all members.

Public Member Functions

math::XYZPoint impactPoint (const reco::Track &track) const
 TrackPropagatorToCalo ()
void update (const edm::EventSetup &eventSetup)

Private Attributes

const MagneticFieldmagneticField_
uint32_t magneticFieldCacheId_
const Propagatorpropagator_
uint32_t propagatorCacheId_

Detailed Description

Definition at line 41 of file JPTJetAnalyzer.cc.


Constructor & Destructor Documentation

jptJetAnalysis::TrackPropagatorToCalo::TrackPropagatorToCalo ( )

Member Function Documentation

math::XYZPoint jptJetAnalysis::TrackPropagatorToCalo::impactPoint ( const reco::Track track) const [inline]
void jptJetAnalysis::TrackPropagatorToCalo::update ( const edm::EventSetup eventSetup)

Definition at line 712 of file JPTJetAnalyzer.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), edm::EventSetup::get(), edm::eventsetup::EventSetupRecord::get(), magneticField_, magneticFieldCacheId_, edm::ESHandle< T >::product(), propagator_, and propagatorCacheId_.

  {
    //update magnetic filed if necessary
    const IdealMagneticFieldRecord& magneticFieldRecord = eventSetup.get<IdealMagneticFieldRecord>();
    const uint32_t newMagneticFieldCacheId = magneticFieldRecord.cacheIdentifier();
    if ((newMagneticFieldCacheId != magneticFieldCacheId_) || !magneticField_) {
      edm::ESHandle<MagneticField> magneticFieldHandle;
      magneticFieldRecord.get(magneticFieldHandle);
      magneticField_ = magneticFieldHandle.product();
      magneticFieldCacheId_ = newMagneticFieldCacheId;
    }
    //update propagator if necessary
    const TrackingComponentsRecord& trackingComponentsRecord = eventSetup.get<TrackingComponentsRecord>();
    const uint32_t newPropagatorCacheId = trackingComponentsRecord.cacheIdentifier();
    if ((propagatorCacheId_ != newPropagatorCacheId) || !propagator_) {
      edm::ESHandle<Propagator> propagatorHandle;
      trackingComponentsRecord.get("SteppingHelixPropagatorAlong",propagatorHandle);
      propagator_ = propagatorHandle.product();
      propagatorCacheId_ = newPropagatorCacheId;
    }
  }

Member Data Documentation

Definition at line 48 of file JPTJetAnalyzer.cc.

Referenced by impactPoint(), and update().

Definition at line 50 of file JPTJetAnalyzer.cc.

Referenced by update().

Definition at line 49 of file JPTJetAnalyzer.cc.

Referenced by impactPoint(), and update().

Definition at line 51 of file JPTJetAnalyzer.cc.

Referenced by update().