ATLAS Offline Software
Static Public Member Functions | List of all members
FakeTrackBuilder Class Reference

#include <FakeTrackBuilder.h>

Collaboration diagram for FakeTrackBuilder:

Static Public Member Functions

static Trk::TrackbuildTrack (const InDetDD::SiDetectorElementCollection *elements)
 
static Trk::TrackbuildBrokenTrack (const InDetDD::SiDetectorElementCollection *elements)
 
static Rec::TrackParticlebuildTrackParticle (const InDetDD::SiDetectorElementCollection *elements)
 

Detailed Description

Definition at line 12 of file FakeTrackBuilder.h.

Member Function Documentation

◆ buildBrokenTrack()

Trk::Track * FakeTrackBuilder::buildBrokenTrack ( const InDetDD::SiDetectorElementCollection elements)
static

Definition at line 159 of file FakeTrackBuilder.cxx.

159  {
160  return nullptr;
161 }

◆ buildTrack()

Trk::Track * FakeTrackBuilder::buildTrack ( const InDetDD::SiDetectorElementCollection elements)
static

Definition at line 45 of file FakeTrackBuilder.cxx.

45  {
46  using namespace Trk;
47  using namespace InDet;
48  //unsigned int counter=0;
49  //std::cout<<counter++<<std::endl;
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  //parameters to TrackStateOnSurface are unique_ptr to: RIO_OnTrack, TrackParameters, MaterialEffectsBase
54  trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter), nullptr) );
55 
56  //std::cout<<counter++<<std::endl;
57 
58  // test state #1 - arbitrary TP AtaCylinder
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  // test state #2 - arbitrary TP AtaDisc
64  Amg::Translation3D amgtranslation(1.,2.,3.);
65  Amg::Transform3D amgTransf = Amg::Transform3D(amgtranslation);
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  // test state #3 - arbitrary AtaPlane + Estimated Brem
71  Amg::Transform3D amgTransf2(amgtranslation);
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  // test state #4 - AtaPlane at a valid detector element + MatEffects
81  IdentifierHash idHash(0); // should be first pixel
82  const InDetDD::SiDetectorElement * detEl = elements->getDetectorElement( idHash);
83 
84  // MaterialEffects
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  //std::cout<<counter++<<std::endl;
92 
93  //AtaPlane on det el
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);
99  typePattern.set(Trk::TrackStateOnSurface::Scatterer);
100  trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter5), std::move(mefBase), typePattern) );
101  }
102  //Curvi
103  Amg::Vector3D pos(1.0,2.0,3.0);
104  Amg::Vector3D mom(4.0,5.0,6.0);
105 
106  auto trackParameter6 = std::make_unique<CurvilinearParameters>(pos,mom,1.0);
107  std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern(0);
108  typePattern.set(Trk::TrackStateOnSurface::Parameter);
109  trackStateOnSurfaces->push_back( new TrackStateOnSurface(nullptr, std::move(trackParameter6), nullptr, typePattern) );
110 
111  AmgSymMatrix(2) locCov;
112  locCov.setIdentity(); // sets it to identity
113  locCov(0,0) = 0.001; locCov(1,1)=0.002;
114 
115  if (elements) {
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 {
121  = new InDet::PixelClusterOnTrack(); // make PRD-less ROT
122  fakePix1->m_detEl = detEl;
123  fakePix1->m_identifier = detEl->identify();
124  Amg::Vector2D locpos( 5.559011, 22.613205);
125  //2 Trk::LocalPosition locpos = Trk::LocalPosition( 7.315356, 21.303871);
126  fakePix1->m_localParams = Trk::LocalParameters(locpos);
127  fakePix1->m_localCovariance = locCov;
128  unsigned int pix2 = 2832020859UL; // CLHEP::bar l1 mod(6,0) index(309,122)
129  Identifier idPix2(pix2);
132  fakePix2->m_detEl = detEl;
133  fakePix2->m_identifier = idPix2;
134  locpos = Amg::Vector2D( 7.315356, 21.303871);
135  fakePix2->m_localParams = Trk::LocalParameters(locpos);
136  locCov(0,0) = 0.001; locCov(1,1)=0.0135;
137  fakePix2->m_localCovariance = locCov;
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  //create Track and add to collection
152  auto fitQuality = std::make_unique<FitQuality>(1.0, 2);
153 
155  //std::cout<<counter++<<std::endl;
156  return new Trk::Track(info, std::move(trackStateOnSurfaces), std::move(fitQuality));
157 }

◆ buildTrackParticle()

Rec::TrackParticle * FakeTrackBuilder::buildTrackParticle ( const InDetDD::SiDetectorElementCollection elements)
static

Definition at line 163 of file FakeTrackBuilder.cxx.

163  {
164  return nullptr;
165 }

The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
Trk::LocalParameters
Definition: LocalParameters.h:98
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
Trk::ScatteringAngles
represents a deflection of the track caused through multiple scattering in material.
Definition: ScatteringAngles.h:26
Trk::MaterialEffectsBase::FittedMaterialEffects
@ FittedMaterialEffects
contains values obtained by fitting the scatterer or e-loss
Definition: MaterialEffectsBase.h:56
Trk::DiscSurface
Definition: DiscSurface.h:54
Trk::undefined
@ undefined
Definition: ParticleHypothesis.h:38
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
Trk::Charged
Definition: Charged.h:27
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::PlaneSurface::createUniqueParameters
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.
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::MaterialEffectsBase::ScatteringEffects
@ ScatteringEffects
contains material effects due to multiple scattering
Definition: MaterialEffectsBase.h:45
Trk::TrackStateOnSurface::Parameter
@ Parameter
This TSOS contains a Trk::ParameterBase.
Definition: TrackStateOnSurface.h:140
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::TrackStateOnSurface::BremPoint
@ BremPoint
This represents a brem point on the track, and so will contain TrackParameters and MaterialEffectsBas...
Definition: TrackStateOnSurface.h:109
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MaterialEffectsBase::EnergyLossEffects
@ EnergyLossEffects
contains energy loss corrections
Definition: MaterialEffectsBase.h:48
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
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::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::RIO_OnTrack::m_identifier
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
Definition: RIO_OnTrack.h:149
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::TrackStateOnSurface::Scatterer
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
Definition: TrackStateOnSurface.h:113
InDetDD::SiDetectorElementCollection::getDetectorElement
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementCollection.cxx:15
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
InDet::PixelClusterOnTrack::m_detEl
const InDetDD::SiDetectorElement * m_detEl
corresponding detector element
Definition: PixelClusterOnTrack.h:172
Identifier
Definition: IdentifierFieldParser.cxx:14