ATLAS Offline Software
TrackCnv_p12.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TrkTrack/Track.h"
7 
8 //including old enumerate schema
10 
13 
14 static const FitQualityCnv_p1 fitQualityCnv;
15 
16 void TrackCnv_p12::persToTrans( const Trk::Track_p12 *persObj, Trk::Track *transObj, MsgStream &log ){
17  auto fitQuality = std::make_unique<Trk::FitQuality>();
18  fitQualityCnv.persToTrans(&persObj->m_fitQuality, fitQuality.get(), log);
19  transObj->m_fitQuality = std::move(fitQuality);
20  std::unique_ptr<Trk::TrackStates> sink(
22  // move copy
23  transObj->m_trackStateVector = std::move(sink);
24 
25 //forwarding the TrackInfo from old to new version
27  std::vector< unsigned int> properties;
28  std::vector< unsigned int> patternReco;
29 
30  switch(static_cast<TrackAuthor_old>(persObj->m_author))
31  {
32  case unknown_old:
33 
34  case iPat_old:
36  break;
37  case iPatBremFit_old:
40  break;
41  case xKalman_old:
43  break;
44  case xKalmanBremFit_old:
47  break;
48  case iPatLegacyCnv_old:
50  patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
51  break;
54  patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
56  break;
57  case MooreLegacyCnv_old:
58  patternReco.push_back(Trk::TrackInfo::MooreLegacyCnv);
59  break;
62  break;
63  case Muonboy_old:
64  patternReco.push_back(Trk::TrackInfo::Muonboy);
65  break;
68  patternReco.push_back(Trk::TrackInfo::xKalmanLegacyCnv);
69  break;
72  patternReco.push_back(Trk::TrackInfo::xKalmanLegacyCnv);
74  break;
75  case KalmanFitter_old:
77  break;
78  case MuidComb_old:
79  patternReco.push_back(Trk::TrackInfo::MuidComb);
80  break;
81  case MuidStandAlone_old:
82  patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
83  break;
84  case MuidLowPt_old:
85  patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
87  break;
88  case STACO_old:
89  patternReco.push_back(Trk::TrackInfo::STACO);
90  break;
91  case StacoLowPt_old:
92  patternReco.push_back(Trk::TrackInfo::STACO);
94  break;
95  case TrigIDSCAN:
96  patternReco.push_back(Trk::TrackInfo::TrigIDSCAN);
97  break;
98  case TrigSiTrack_old:
99  patternReco.push_back(Trk::TrackInfo::TrigSiTrack);
100  break;
101  case TrigTRTxK_old:
102  patternReco.push_back(Trk::TrackInfo::TrigTRTxK);
103  break;
104  case TrigTRTLUT_old:
105  patternReco.push_back(Trk::TrackInfo::TrigTRTLUT);
106  break;
109  break;
111  patternReco.push_back(Trk::TrackInfo::SiSPSeededFinder);
112  break;
115  break;
119  break;
122  break;
125  break;
126  case KalmanDNAFitter_old:
128  break;
130  patternReco.push_back(Trk::TrackInfo::TRTSeededTrackFinder);
131  break;
132  case TRT_StandAlone_old:
133  patternReco.push_back(Trk::TrackInfo::TRTStandalone);
134  break;
136  break;
137  }//end of switch author method
138 
140 
141 //setting properties
142  unsigned int pro_size = properties.size();
143  unsigned int pat_size = patternReco.size();
144  if(pro_size) for(unsigned int i = 0;i<pro_size;++i)
145  info.setTrackProperties(static_cast<Trk::TrackInfo::TrackProperties>(properties[i]));
146 
147  if(pat_size) for(unsigned int i = 0;i<pat_size;++i)
148  info.setPatternRecognitionInfo(static_cast<Trk::TrackInfo::TrackPatternRecoInfo>(patternReco[i]));
149 
150  transObj->m_trackInfo = info;
151 }
152 
153 
154 
155 void TrackCnv_p12::transToPers( const Trk::Track *, Trk::Track_p12 *, MsgStream & ){
156  throw std::runtime_error("TrackCnv_p12::transToPers is deprecated!");
157 }
grepfile.info
info
Definition: grepfile.py:38
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
GlobalChi2FitterBremFit_old
@ GlobalChi2FitterBremFit_old
Track's from Thijs' global chi^2 fitter, with Brem fit.
Definition: TrackInfoEnum_old.h:83
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
MuidComb_old
@ MuidComb_old
MuID combined track (i.e.
Definition: TrackInfoEnum_old.h:47
Trk::TrackInfo::GaussianSumFilter
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:53
Trk::TrackInfo::KalmanDNAFitter
@ KalmanDNAFitter
Kalman DNA Fitter.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:65
Trk::TrackInfo::DeterministicAnnealingFilter
@ DeterministicAnnealingFilter
Adpative track fitter with fuzzy hit assignment.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:62
GaussianSumFilter_old
@ GaussianSumFilter_old
Tracks from Gaussian Sum Filter.
Definition: TrackInfoEnum_old.h:74
StacoLowPt_old
@ StacoLowPt_old
Low tracks produced by STACO.
Definition: TrackInfoEnum_old.h:59
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::TrackInfo::iPatTrackFitter
@ iPatTrackFitter
tracks produced by iPat
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:44
GlobalChi2Fitter_old
@ GlobalChi2Fitter_old
Track's from Thijs' global chi^2 fitter.
Definition: TrackInfoEnum_old.h:80
Trk::TrackInfo::TrigTRTxK
@ TrigTRTxK
TrigInDetTracks produced by TrigTRTxK, running at trigger LVL2.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:141
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
Trk::Track_p12::m_fitQuality
FitQuality_p1 m_fitQuality
Definition: Track_p12.h:21
Trk::TrackInfo::MuidStandAlone
@ MuidStandAlone
MuidStandalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:165
TRT_SeededTrackFinder_old
@ TRT_SeededTrackFinder_old
Tracks from Back Tracking.
Definition: TrackInfoEnum_old.h:95
Trk::TrackInfo::LowPtTrack
@ LowPtTrack
A LowPt track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:93
Trk::TrackInfo::iPatLegacyCnv
@ iPatLegacyCnv
Added because of compilation problems.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:150
Trk::TrackInfo::Muonboy
@ Muonboy
Tracks from MuonBoy.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:117
SiSPSeededTrackFinder_old
@ SiSPSeededTrackFinder_old
Tracks from the SiSpacePointSeededTrackFinder.
Definition: TrackInfoEnum_old.h:77
xKalman_old
@ xKalman_old
tracks produced directly from xKalman
Definition: TrackInfoEnum_old.h:25
TrigIDSCAN
@ TrigIDSCAN
TrigInDetTracks produced by TrigIDSCAN, running at trigger LVL2.
Definition: TrackInfoEnum_old.h:62
MuidLowPt_old
@ MuidLowPt_old
Low MuID track.
Definition: TrackInfoEnum_old.h:53
NumberOfTrackAuthors_old
@ NumberOfTrackAuthors_old
maximum number of enums
Definition: TrackInfoEnum_old.h:101
FitQualityCnv_p1
Definition: FitQualityCnv_p1.h:22
TRT_StandAlone_old
@ TRT_StandAlone_old
TRT standalone.
Definition: TrackInfoEnum_old.h:98
FitQuality_p1.h
Trk::Track::m_fitQuality
std::unique_ptr< FitQuality > m_fitQuality
A pointer to the Track's FitQuality.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:293
xKalmanLegacyCnvBremFit_old
@ xKalmanLegacyCnvBremFit_old
Definition: TrackInfoEnum_old.h:41
Track.h
Trk::Track_p12::m_author
unsigned int m_author
Definition: Track_p12.h:19
DeterministicAnnealingFilter_old
@ DeterministicAnnealingFilter_old
Adpative track fitter with fuzzy hit assignment.
Definition: TrackInfoEnum_old.h:89
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
FitQualityCnv_p1::persToTrans
virtual void persToTrans(const Trk ::FitQuality_p1 *persObj, Trk ::FitQuality *transObj, MsgStream &log) const override
Definition: FitQualityCnv_p1.cxx:14
MooreLegacyCnv_old
@ MooreLegacyCnv_old
tracks converted to Trk::Tracks from Moore tracks
Definition: TrackInfoEnum_old.h:33
Muonboy_old
@ Muonboy_old
tracks produced from MuonBoy
Definition: TrackInfoEnum_old.h:37
TrigSiTrack_old
@ TrigSiTrack_old
TrigInDetTracks produced by TrigSiTrack, running at trigger LVL2.
Definition: TrackInfoEnum_old.h:65
unknown_old
@ unknown_old
Track author not defined.
Definition: TrackInfoEnum_old.h:17
KalmanFitter_old
@ KalmanFitter_old
tracks produced by the Kalman Fitter
Definition: TrackInfoEnum_old.h:44
Trk::TrackInfo::TrackFitter
TrackFitter
enums to identify who created this track and what propertis does it have.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::Track::m_trackStateVector
std::unique_ptr< TrackStates > m_trackStateVector
TrackStateOnSurface.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:248
Trk::TrackInfo::STACO
@ STACO
Tracks produced by STACO.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:123
iPat_old
@ iPat_old
tracks produced directly from iPat
Definition: TrackInfoEnum_old.h:20
Trk::TrackInfo::BremFit
@ BremFit
A brem fit was performed on this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:78
TrigTRTxK_old
@ TrigTRTxK_old
TrigInDetTracks produced by TrigTRTxK, running at trigger LVL2.
Definition: TrackInfoEnum_old.h:68
MuidStandAlone_old
@ MuidStandAlone_old
MuID track which is produced using Muon Spectrometer only.
Definition: TrackInfoEnum_old.h:50
STACO_old
@ STACO_old
tracks produced by STACO
Definition: TrackInfoEnum_old.h:56
KalmanDNAFitter_old
@ KalmanDNAFitter_old
Tracks from Kalman DNA Fitter.
Definition: TrackInfoEnum_old.h:92
Trk::TrackInfo::TrigTRTLUT
@ TrigTRTLUT
TrigInDetTracks produced by TrigTRTLUT, running at trigger LVL2.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:144
xKalmanLegacyCnv_old
@ xKalmanLegacyCnv_old
tracks converted to Trk::Tracks from xkalman tracks
Definition: TrackInfoEnum_old.h:40
Trk::Track::m_trackInfo
Trk::TrackInfo m_trackInfo
This is a class which stores the identity of where the track was created, fitted, which properties th...
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:304
TrigTRTLUT_old
@ TrigTRTLUT_old
TrigInDetTracks produced by TrigTRTLUT, running at trigger LVL2.
Definition: TrackInfoEnum_old.h:71
Trk::TrackInfo::TrigIDSCAN
@ TrigIDSCAN
TrigInDetTracks produced by TrigIDSCAN, running at trigger LVL2.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:135
DistributedKalmanFilter_old
@ DistributedKalmanFilter_old
Fast Kalman filter from HLT with simplified material effects.
Definition: TrackInfoEnum_old.h:86
Trk::TrackInfo::TRTSeededTrackFinder
@ TRTSeededTrackFinder
Tracks from TRT Seeded Track finder.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:114
Trk::GsfMeasurementUpdator::fitQuality
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
Definition: GsfMeasurementUpdator.cxx:845
Trk::TrackInfo::KalmanFitter
@ KalmanFitter
tracks produced by the Kalman Fitter
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:50
Trk::TrackInfo::SiSPSeededFinder
@ SiSPSeededFinder
Tracks from SiSPSeedFinder.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:102
FitQualityCnv_p1.h
Trk::TrackInfo::GlobalChi2Fitter
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:56
TrackCnv_p12::persToTrans
void persToTrans(const Trk::Track_p12 *persObj, Trk::Track *transObj, MsgStream &)
Definition: TrackCnv_p12.cxx:16
Trk::TrackInfo::MooreLegacyCnv
@ MooreLegacyCnv
Back compatibility with old type of ESD.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:171
Trk::TrackInfo::DistributedKalmanFilter
@ DistributedKalmanFilter
Fast Kalman filter from HLT with simplified material effects.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:59
TrackCnv_p12::transToPers
void transToPers(const Trk::Track *transObj, Trk::Track_p12 *persObj, MsgStream &)
Definition: TrackCnv_p12.cxx:155
Trk::Track_p12::m_particleHypo
unsigned int m_particleHypo
Definition: Track_p12.h:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrackCnv_p12::m_trackStateVectorCnv
TrackStateOSVectorCnv_p1 m_trackStateVectorCnv
Definition: TrackCnv_p12.h:37
Trk::Track_p12
Definition: Track_p12.h:15
xKalmanBremFit_old
@ xKalmanBremFit_old
Definition: TrackInfoEnum_old.h:26
TrackInfoEnum_old.h
Trk::TrackInfo::TrigSiTrack
@ TrigSiTrack
TrigInDetTracks produced by TrigSiTrack, running at trigger LVL2.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:138
TrackAuthor_old
TrackAuthor_old
Definition: TrackInfoEnum_old.h:15
iPatLegacyCnv_old
@ iPatLegacyCnv_old
tracks converted to Trk::Tracks from iPat tracks
Definition: TrackInfoEnum_old.h:29
Trk::TrackInfo::xKalmanLegacyCnv
@ xKalmanLegacyCnv
Added because of compilation problems.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:153
Trk::Track_p12::m_trackState
std::vector< TPObjRef > m_trackState
Definition: Track_p12.h:23
MooreLegacyCnvBremFit_old
@ MooreLegacyCnvBremFit_old
Definition: TrackInfoEnum_old.h:34
Trk::TrackInfo::TrackProperties
TrackProperties
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:75
iPatBremFit_old
@ iPatBremFit_old
Definition: TrackInfoEnum_old.h:22
iPatLegacyCnvBremFit_old
@ iPatLegacyCnvBremFit_old
Definition: TrackInfoEnum_old.h:30
Trk::TrackInfo::TrackPatternRecoInfo
TrackPatternRecoInfo
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:100
TrackCnv_p12.h
Trk::TrackInfo::xKalman
@ xKalman
tracks produced by xKalman
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:47
Trk::TrackInfo::MuidComb
@ MuidComb
Back compatibility with older ESD versions.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:174
Trk::TrackInfo::TRTStandalone
@ TRTStandalone
TRT Standalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:162
Trk::TrackInfo::Unknown
@ Unknown
Track fitter not defined.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:41