Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:24

0001 #include "AnalysisDataFormats/TrackInfo/interface/TrackingRecHitInfo.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 
0004 using namespace reco;
0005 
0006 const LocalVector TrackingRecHitInfo::localTrackMomentumOnMono(StateType statetype) const {
0007   TrackingStates::const_iterator state = states_.find(statetype);
0008   if (state != states_.end())
0009     return state->second.localTrackMomentumOnMono();
0010   else
0011     edm::LogError("TrackingRecHitInfo") << "This state does not exist";
0012   return LocalVector(0, 0, 0);
0013 }
0014 
0015 const LocalVector TrackingRecHitInfo::localTrackMomentumOnStereo(StateType statetype) const {
0016   TrackingStates::const_iterator state = states_.find(statetype);
0017   if (state != states_.end())
0018     return state->second.localTrackMomentumOnStereo();
0019   else
0020     edm::LogError("TrackingRecHitInfo") << "This state does not exist";
0021   return LocalVector(0, 0, 0);
0022 }
0023 
0024 const LocalPoint TrackingRecHitInfo::localTrackPositionOnMono(StateType statetype) const {
0025   TrackingStates::const_iterator state = states_.find(statetype);
0026   if (state != states_.end())
0027     return state->second.localTrackPositionOnMono();
0028   else
0029     edm::LogError("TrackingRecHitInfo") << "This state does not exist";
0030   return LocalPoint(0, 0, 0);
0031 }
0032 
0033 const LocalPoint TrackingRecHitInfo::localTrackPositionOnStereo(StateType statetype) const {
0034   TrackingStates::const_iterator state = states_.find(statetype);
0035   if (state != states_.end())
0036     return state->second.localTrackPositionOnStereo();
0037   else
0038     edm::LogError("TrackingRecHitInfo") << "This state does not exist";
0039   return LocalPoint(0, 0, 0);
0040 }
0041 
0042 const PTrajectoryStateOnDet* TrackingRecHitInfo::stateOnDet(StateType statetype) const {
0043   TrackingStates::const_iterator state = states_.find(statetype);
0044   if (state != states_.end())
0045     return state->second.stateOnDet();
0046   else
0047     edm::LogError("TrackInfo") << "This rechit does not exist";
0048   return nullptr;
0049 }