Public Member Functions | |
math::XYZPoint | impactPoint (const reco::Track &track) const |
TrackPropagatorToCalo () | |
void | update (const edm::EventSetup &eventSetup) |
Private Attributes | |
const MagneticField * | magneticField_ |
uint32_t | magneticFieldCacheId_ |
const Propagator * | propagator_ |
uint32_t | propagatorCacheId_ |
Definition at line 41 of file JPTJetAnalyzer.cc.
jptJetAnalysis::TrackPropagatorToCalo::TrackPropagatorToCalo | ( | ) |
Definition at line 717 of file JPTJetAnalyzer.cc.
: magneticField_(NULL), propagator_(NULL), magneticFieldCacheId_(0), propagatorCacheId_(0) {}
math::XYZPoint jptJetAnalysis::TrackPropagatorToCalo::impactPoint | ( | const reco::Track & | track | ) | const [inline] |
Definition at line 746 of file JPTJetAnalyzer.cc.
References magneticField_, JetTracksAssociationDRCalo::propagateTrackToCalorimeter(), and propagator_.
{ return JetTracksAssociationDRCalo::propagateTrackToCalorimeter(track,*magneticField_,*propagator_); }
void jptJetAnalysis::TrackPropagatorToCalo::update | ( | const edm::EventSetup & | eventSetup | ) |
Definition at line 724 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; } }
const MagneticField* jptJetAnalysis::TrackPropagatorToCalo::magneticField_ [private] |
Definition at line 48 of file JPTJetAnalyzer.cc.
Referenced by impactPoint(), and update().
uint32_t jptJetAnalysis::TrackPropagatorToCalo::magneticFieldCacheId_ [private] |
Definition at line 50 of file JPTJetAnalyzer.cc.
Referenced by update().
const Propagator* jptJetAnalysis::TrackPropagatorToCalo::propagator_ [private] |
Definition at line 49 of file JPTJetAnalyzer.cc.
Referenced by impactPoint(), and update().
uint32_t jptJetAnalysis::TrackPropagatorToCalo::propagatorCacheId_ [private] |
Definition at line 51 of file JPTJetAnalyzer.cc.
Referenced by update().