ATLAS Offline Software
Loading...
Searching...
No Matches
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(
29 m_trackStateVectorCnv.createTransient(&persObj->m_trackState, log));
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:
47 properties.push_back(Trk::TrackInfo::BremFit);
48 break;
49 case xKalman_old:
51 break;
54 properties.push_back(Trk::TrackInfo::BremFit);
55 break;
58 patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
59 break;
62 patternReco.push_back(Trk::TrackInfo::iPatLegacyCnv);
63 properties.push_back(Trk::TrackInfo::BremFit);
64 break;
66 patternReco.push_back(Trk::TrackInfo::MooreLegacyCnv);
67 break;
69 properties.push_back(Trk::TrackInfo::BremFit);
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);
81 properties.push_back(Trk::TrackInfo::BremFit);
82 break;
85 break;
86 case MuidComb_old:
87 patternReco.push_back(Trk::TrackInfo::MuidComb);
88 break;
90 patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
91 break;
92 case MuidLowPt_old:
93 patternReco.push_back(Trk::TrackInfo::MuidStandAlone);
94 properties.push_back(Trk::TrackInfo::LowPtTrack);
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);
101 properties.push_back(Trk::TrackInfo::LowPtTrack);
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;
126 properties.push_back(Trk::TrackInfo::BremFit);
127 break;
130 break;
133 break;
136 break;
138 patternReco.push_back(Trk::TrackInfo::TRTSeededTrackFinder);
139 break;
141 patternReco.push_back(Trk::TrackInfo::TRTStandalone);
142 break;
144 break;
145 }//end of switch author method
146
147 Trk::TrackInfo info(fitter , static_cast<Trk::ParticleHypothesis>(persObj->m_particleHypo));
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//-----------------------------------------------------------------------------
166 MsgStream & )
167{
168 throw std::runtime_error("TrackCnv_p1::transToPers is deprecated!");
169}
TrackAuthor_old
@ DistributedKalmanFilter_old
Fast Kalman filter from HLT with simplified material effects.
@ KalmanDNAFitter_old
Tracks from Kalman DNA Fitter.
@ GaussianSumFilter_old
Tracks from Gaussian Sum Filter.
@ xKalman_old
tracks produced directly from xKalman
@ TRT_StandAlone_old
TRT standalone.
@ TrigSiTrack_old
TrigInDetTracks produced by TrigSiTrack, running at trigger LVL2.
@ GlobalChi2FitterBremFit_old
Track's from Thijs' global chi^2 fitter, with Brem fit.
@ unknown_old
Track author not defined.
@ iPatLegacyCnv_old
tracks converted to Trk::Tracks from iPat tracks
@ MuidStandAlone_old
MuID track which is produced using Muon Spectrometer only.
@ iPatBremFit_old
@ iPat_old
tracks produced directly from iPat
@ TRT_SeededTrackFinder_old
Tracks from Back Tracking.
@ TrigIDSCAN
TrigInDetTracks produced by TrigIDSCAN, running at trigger LVL2.
@ GlobalChi2Fitter_old
Track's from Thijs' global chi^2 fitter.
@ xKalmanLegacyCnvBremFit_old
@ Muonboy_old
tracks produced from MuonBoy
@ MooreLegacyCnvBremFit_old
@ MuidLowPt_old
Low MuID track.
@ NumberOfTrackAuthors_old
maximum number of enums
@ STACO_old
tracks produced by STACO
@ DeterministicAnnealingFilter_old
Adpative track fitter with fuzzy hit assignment.
@ KalmanFitter_old
tracks produced by the Kalman Fitter
@ StacoLowPt_old
Low tracks produced by STACO.
@ xKalmanLegacyCnv_old
tracks converted to Trk::Tracks from xkalman tracks
@ MuidComb_old
MuID combined track (i.e.
@ iPatLegacyCnvBremFit_old
@ xKalmanBremFit_old
@ TrigTRTLUT_old
TrigInDetTracks produced by TrigTRTLUT, running at trigger LVL2.
@ MooreLegacyCnv_old
tracks converted to Trk::Tracks from Moore tracks
@ SiSPSeededTrackFinder_old
Tracks from the SiSpacePointSeededTrackFinder.
@ TrigTRTxK_old
TrigInDetTracks produced by TrigTRTxK, running at trigger LVL2.
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
FitQualityCnv_p1 * m_fqCnv
Definition TrackCnv_p1.h:42
virtual void transToPers(const Trk::Track *, Trk::Track_p1 *, MsgStream &)
virtual void persToTrans(const Trk::Track_p1 *, Trk::Track *, MsgStream &)
TrackStateOSVectorCnv_p1 m_trackStateVectorCnv
Definition TrackCnv_p1.h:43
Contains information about the 'fitter' of this track.
TrackFitter
enums to identify who created this track and what propertis does it have.
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
@ KalmanFitter
tracks produced by the Kalman Fitter
@ DeterministicAnnealingFilter
Adpative track fitter with fuzzy hit assignment.
@ DistributedKalmanFilter
Fast Kalman filter from HLT with simplified material effects.
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter.
@ BremFit
A brem fit was performed on this track.
@ iPatLegacyCnv
Added because of compilation problems.
@ TRTSeededTrackFinder
Tracks from TRT Seeded Track finder.
@ TrigTRTxK
TrigInDetTracks produced by TrigTRTxK, running at trigger LVL2.
@ MooreLegacyCnv
Back compatibility with old type of ESD.
@ TrigIDSCAN
TrigInDetTracks produced by TrigIDSCAN, running at trigger LVL2.
@ TrigSiTrack
TrigInDetTracks produced by TrigSiTrack, running at trigger LVL2.
@ MuidComb
Back compatibility with older ESD versions.
@ SiSPSeededFinder
Tracks from SiSPSeedFinder.
@ TrigTRTLUT
TrigInDetTracks produced by TrigTRTLUT, running at trigger LVL2.
@ xKalmanLegacyCnv
Added because of compilation problems.
unsigned int m_particleHypo
Definition Track_p1.h:24
unsigned int m_author
Definition Track_p1.h:23
std::vector< TPObjRef > m_trackState
Definition Track_p1.h:28
TPObjRef m_fitQuality
Definition Track_p1.h:26
Trk::TrackInfo m_trackInfo
This is a class which stores the identity of where the track was created, fitted, which properties th...
std::unique_ptr< TrackStates > m_trackStateVector
TrackStateOnSurface.
std::unique_ptr< FitQuality > m_fitQuality
A pointer to the Track's FitQuality.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.