ATLAS Offline Software
TrackCnv_p1.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 //-----------------------------------------------------------------------------
6 //
7 // file: TrackCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 #include "TrkTrack/Track.h"
12 
13 //including old enumerate schema
15 
16 //-----------------------------------------------------------------------------
17 // Persistent to transient
18 //-----------------------------------------------------------------------------
20  Trk::Track *transObj,
21  MsgStream &log )
22 {
23 // transObj->m_author = static_cast<Trk::Track::TrackAuthor>( persObj->m_author );
24 // transObj->m_particleHypo = static_cast<Trk::ParticleHypothesis>( persObj->m_particleHypo );
25  transObj->m_fitQuality.reset(createTransFromPStore( &m_fqCnv, persObj->m_fitQuality, log ));
26 
27  //ensure we delete the ptr
28  std::unique_ptr<Trk::TrackStates> sink(
30  //move copy
31  transObj->m_trackStateVector = std::move(sink);
32 
33 //forwarding the TrackInfo from old to new version
35  std::vector< unsigned int> properties;
36  std::vector< unsigned int> patternReco;
37 
38  switch(static_cast<TrackAuthor_old>(persObj->m_author))
39  {
40  case unknown_old:
41 
42  case iPat_old:
44  break;
45  case iPatBremFit_old:
48  break;
49  case xKalman_old:
51  break;
52  case xKalmanBremFit_old:
55  break;
56  case iPatLegacyCnv_old:
58  patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
59  break;
62  patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
64  break;
65  case MooreLegacyCnv_old:
66  patternReco.push_back(Trk::TrackInfo::MooreLegacyCnv);
67  break;
70  break;
71  case Muonboy_old:
72  patternReco.push_back(Trk::TrackInfo::Muonboy);
73  break;
76  patternReco.push_back(Trk::TrackInfo::xKalmanLegacyCnv);
77  break;
80  patternReco.push_back(Trk::TrackInfo::xKalmanLegacyCnv);
82  break;
83  case KalmanFitter_old:
85  break;
86  case MuidComb_old:
87  patternReco.push_back(Trk::TrackInfo::MuidComb);
88  break;
89  case MuidStandAlone_old:
90  patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
91  break;
92  case MuidLowPt_old:
93  patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
95  break;
96  case STACO_old:
97  patternReco.push_back(Trk::TrackInfo::STACO);
98  break;
99  case StacoLowPt_old:
100  patternReco.push_back(Trk::TrackInfo::STACO);
102  break;
103  case TrigIDSCAN:
104  patternReco.push_back(Trk::TrackInfo::TrigIDSCAN);
105  break;
106  case TrigSiTrack_old:
107  patternReco.push_back(Trk::TrackInfo::TrigSiTrack);
108  break;
109  case TrigTRTxK_old:
110  patternReco.push_back(Trk::TrackInfo::TrigTRTxK);
111  break;
112  case TrigTRTLUT_old:
113  patternReco.push_back(Trk::TrackInfo::TrigTRTLUT);
114  break;
117  break;
119  patternReco.push_back(Trk::TrackInfo::SiSPSeededFinder);
120  break;
123  break;
127  break;
130  break;
133  break;
134  case KalmanDNAFitter_old:
136  break;
138  patternReco.push_back(Trk::TrackInfo::TRTSeededTrackFinder);
139  break;
140  case TRT_StandAlone_old:
141  patternReco.push_back(Trk::TrackInfo::TRTStandalone);
142  break;
144  break;
145  }//end of switch author method
146 
148 
149 //setting properties
150  unsigned int pro_size = properties.size();
151  unsigned int pat_size = patternReco.size();
152  if(pro_size) for(unsigned int i = 0;i<pro_size;++i)
153  info.setTrackProperties(static_cast<Trk::TrackInfo::TrackProperties>(properties[i]));
154 
155  if(pat_size) for(unsigned int i = 0;i<pat_size;++i)
156  info.setPatternRecognitionInfo(static_cast<Trk::TrackInfo::TrackPatternRecoInfo>(patternReco[i]));
157 
158  transObj->m_trackInfo = info;
159 }
160 
161 //-----------------------------------------------------------------------------
162 // Transient to persistent
163 //-----------------------------------------------------------------------------
165  Trk::Track_p1 *,
166  MsgStream & )
167 {
168  throw std::runtime_error("TrackCnv_p1::transToPers is deprecated!");
169 }
grepfile.info
info
Definition: grepfile.py:38
Trk::Track_p1::m_author
unsigned int m_author
Definition: Track_p1.h:23
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
TrackCnv_p1::transToPers
virtual void transToPers(const Trk::Track *, Trk::Track_p1 *, MsgStream &)
Definition: TrackCnv_p1.cxx:164
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_p1::m_trackState
std::vector< TPObjRef > m_trackState
Definition: Track_p1.h:28
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
TRT_StandAlone_old
@ TRT_StandAlone_old
TRT standalone.
Definition: TrackInfoEnum_old.h:98
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
DeterministicAnnealingFilter_old
@ DeterministicAnnealingFilter_old
Adpative track fitter with fuzzy hit assignment.
Definition: TrackInfoEnum_old.h:89
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
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
TrackCnv_p1::m_trackStateVectorCnv
TrackStateOSVectorCnv_p1 m_trackStateVectorCnv
Definition: TrackCnv_p1.h:43
TrackCnv_p1::persToTrans
virtual void persToTrans(const Trk::Track_p1 *, Trk::Track *, MsgStream &)
Definition: TrackCnv_p1.cxx:19
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
TrackCnv_p1.h
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::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
Trk::Track_p1::m_particleHypo
unsigned int m_particleHypo
Definition: Track_p1.h:24
Trk::TrackInfo::GlobalChi2Fitter
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:56
Trk::Track_p1
Definition: Track_p1.h:19
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
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrackCnv_p1::m_fqCnv
FitQualityCnv_p1 * m_fqCnv
Definition: TrackCnv_p1.h:42
xKalmanBremFit_old
@ xKalmanBremFit_old
Definition: TrackInfoEnum_old.h:26
TrackInfoEnum_old.h
Trk::Track_p1::m_fitQuality
TPObjRef m_fitQuality
Definition: Track_p1.h:26
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
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
Trk::TrackInfo::xKalman
@ xKalman
tracks produced by xKalman
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:47
ITPConverterFor::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...
Definition: TPConverter.h:172
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