45 {
47 using namespace InDet;
48
49
50 auto trackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
51 PerigeeSurface periSurf;
52 auto trackParameter = std::make_unique<Perigee>(4.0, 3.0, 2.0, 1.0, 0.001, periSurf);
53
54 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter), nullptr) );
55
56
57
58
59 Trk::CylinderSurface surface(1.0, 2*
M_PI, 4.0);
60 auto trackParameter2=surface.createUniqueParameters<5,Trk::Charged>(0.0,1.0,3.0,4.0,0.5,std::nullopt);
61 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter2), nullptr) );
62
63
66 DiscSurface discSf(amgTransf, 1.0, 2.0);
67 auto trackParameter3 = discSf.createUniqueParameters<5,Trk::Charged>(0.0,1.0,3.0,4.0,0.5,std::nullopt);
68 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter3), nullptr) );
69
70
72 PlaneSurface planeSf(amgTransf2, 1.0, 2.0);
73 auto trackParameter4 = planeSf.createUniqueParameters<5,Trk::Charged>(0.0,1.0,3.0,4.0,0.5,std::nullopt);
74 auto ebr = std::make_unique<EstimatedBremOnTrack>((0.7), -0.3,0.3, 0.03,planeSf);
75 std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type1(0);
77 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter4), std::move(ebr),type1) );
78
79 if (elements){
80
81 IdentifierHash idHash(0);
83
84
85 auto eloss = std::make_unique<Trk::EnergyLoss>((0.5),0.19);
86 auto scatt = Trk::ScatteringAngles(.1,.2,.3,.4);
87 std::bitset<Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes> mefPattern(0);
91
92
93
94 const PlaneSurface& planeDetElSf =
dynamic_cast<const PlaneSurface&
>(detEl->
surface());
95 auto trackParameter5 = planeDetElSf.
createUniqueParameters<5,Trk::Charged>(0.0,1.0,3.0,4.0,0.5,std::nullopt);
96
97 auto mefBase = std::make_unique<Trk::MaterialEffectsOnTrack>(70.7,scatt,std::move(eloss),planeDetElSf, mefPattern);
98 std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
100 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter5), std::move(mefBase), typePattern) );
101 }
102
105
106 auto trackParameter6 = std::make_unique<CurvilinearParameters>(pos,mom,1.0);
107 std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
109 trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter6), nullptr, typePattern) );
110
112 locCov.setIdentity();
113 locCov(0,0) = 0.001; locCov(1,1)=0.002;
114
116 const InDetDD::SiDetectorElement * detEl = *(elements->begin());
117 if (!detEl)
118 std::cerr<<"Unable to find any pixel Detector element!! Aborting this part of the test."<<std::endl;
119 else {
120 InDet::PixelClusterOnTrack* fakePix1
121 = new InDet::PixelClusterOnTrack();
125
128 unsigned int pix2 = 2832020859UL;
129 Identifier idPix2(pix2);
130 InDet::PixelClusterOnTrack* fakePix2
131 = new InDet::PixelClusterOnTrack();
136 locCov(0,0) = 0.001; locCov(1,1)=0.0135;
138 auto childrots = std::vector<const InDet::PixelClusterOnTrack*>();
139 childrots.push_back(fakePix1);
140 childrots.push_back(fakePix2);
141 auto assgnProb = std::vector<double>();
142 assgnProb.push_back(0.4);
143 assgnProb.push_back(0.6);
144 auto cProt = std::make_unique<InDet::CompetingPixelClustersOnTrack>(
145 std::move(childrots), std::move(assgnProb));
146 trackStateOnSurfaces->push_back(
147 new TrackStateOnSurface(std::move(cProt), nullptr, nullptr));
148 }
149 }
150
151
152 auto fitQuality = std::make_unique<FitQuality>(1.0, 2);
153
155
156 return new Trk::Track(info, std::move(trackStateOnSurfaces), std::move(fitQuality));
157}
#define AmgSymMatrix(dim)
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
virtual Identifier identify() const override final
identifier of this detector element (inline)
Trk::Surface & surface()
Element Surface.
const InDetDD::SiDetectorElement * m_detEl
corresponding detector element
std::unique_ptr< ParametersT< DIM, T, PlaneSurface > > createUniqueParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(DIM)> cov=std::nullopt) const
Use the Surface as a ParametersBase constructor, from local parameters.
@ ScatteringEffects
contains material effects due to multiple scattering
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
@ EnergyLossEffects
contains energy loss corrections
LocalParameters m_localParams
Amg::MatrixX m_localCovariance
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
@ BremPoint
This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBas...
@ Parameter
This TSOS contains a Trk::ParameterBase.
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.