ATLAS Offline Software
Loading...
Searching...
No Matches
IParticleHandle_TrackParticle.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
7// //
8// Implementation of class IParticleHandle_TrackParticle //
9// //
10// //
12
13// Local
16#include "AODSysCommonData.h"
18
19//VP1
20#include "VP1Base/VP1Msg.h"
21
22//SoCoin
23#include <Inventor/C/errors/debugerror.h>
24#include <Inventor/nodes/SoLineSet.h>
25#include <Inventor/nodes/SoPointSet.h>
26#include <Inventor/nodes/SoVertexProperty.h>
27#include <Inventor/nodes/SoMaterial.h>
28#include <Inventor/nodes/SoCone.h>
29#include <Inventor/nodes/SoSeparator.h>
30#include <Inventor/nodes/SoTranslation.h>
31#include <Inventor/nodes/SoRotationXYZ.h>
32
33#ifndef BUILDVP1LIGHT
35#endif
36
37// System of units
38#ifdef BUILDVP1LIGHT
39 #include "GeoModelKernel/Units.h"
40 #define SYSTEM_OF_UNITS GeoModelKernelUnits // --> 'GeoModelKernelUnits::cm'
41#else
42 #include "GaudiKernel/SystemOfUnits.h"
43 #define SYSTEM_OF_UNITS Gaudi::Units // --> 'Gaudi::Units::cm'
44#endif
45
46
47//____________________________________________________________________
49public:
53
54 SoSeparator * sep = nullptr; // everything hangs from this.
55 SoLineSet * line = nullptr;//This represents the line(s) representing the trackparticle. Can be interpolated.
56 QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> > parametersAndPositions; // cache - do we really need this?
57 QList< Amg::Vector3D > positionsToWrite; // FIXME - this is just a quick hack so we can easily dump the points used in the lines to JSON
58
59};
60
61//____________________________________________________________________
63 : IParticleHandleBase(ch), m_d(new Imp)
64{
65 m_d->theclass = this;
66 m_d->trackparticle = tp;
67 m_d->collHandle = dynamic_cast<IParticleCollHandle_TrackParticle*>(ch);
68 m_d->sep=0;
69 m_d->line=0;
70}
71
72//____________________________________________________________________
74{
75 if (m_d->line) m_d->line->unref();
76 if (m_d->sep) m_d->sep->unref();
77 delete m_d;
78}
79
81 return 0!=m_d->sep;
82}
84 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::clear3DObjects()");
85
86 if (m_d->line) {
87 m_d->line->unref();
88 m_d->line=0;
89 }
90 if (m_d->sep) {
91 m_d->sep->unref();
92 m_d->sep=0;
93 }
94
95 // Wipe caches
96 m_d->positionsToWrite.clear();
97 m_d->parametersAndPositions.clear();
98}
99
101 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::nodes with d->sep="+VP1Msg::str(m_d->sep));
102
103 if (m_d->sep) {
104 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::nodes() - already have sep so not doing anything.");
105 return m_d->sep;
106 }
107 if (!m_d->sep) {
108 m_d->sep = new SoSeparator();
109 m_d->sep->ref();
110 }
111
112 bool fromTrack=m_d->collHandle->collSettingsButton().useExistingParameters();
113
114 if (fromTrack) {
116 } else {
117 #ifndef BUILDVP1LIGHT
119 #endif // BUILDVP1LIGHT
120 }
121
122 if (m_d->collHandle->collSettingsButton().showParameters())
124
125 return m_d->sep;
126}
127
129 // Points:
130 SoPointSet* parameterPoints = 0;
131 SoVertexProperty * vertices2 = 0;
132
133 // std::cout<<"showing parameters... have "<<m_d->trackparticle->numberOfParameters()+1<<" to draw"<<std::endl;
134
135 // Okay. so let's make the containers to hold them...
136 parameterPoints = new SoPointSet;
137 vertices2 = new SoVertexProperty;
138
139 int i = 0;
140 bool colourByParamType = m_d->collHandle->collSettingsButton().colourParametersByType();
141 QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> > parAndPoses = parametersAndPositions();
142
143 for (std::pair<xAOD::ParameterPosition, Amg::Vector3D> parpos : parAndPoses ) {
144 Amg::Vector3D pos = parpos.second;
145
146 if (colourByParamType) {
147 // Okay, so we treat each point separately & add materials as we go...
148 m_d->sep->addChild(m_d->collHandle->collSettingsButton().parameterMaterial(parpos.first));
149 vertices2->vertex.set1Value(0,pos.x(),pos.y(),pos.z());
150 parameterPoints->numPoints=1;
151 parameterPoints->vertexProperty = vertices2;
152 m_d->sep->addChild(parameterPoints);
153 parameterPoints = new SoPointSet; // reset for next point
154 vertices2 = new SoVertexProperty;
155 } else { // Not colouring by type
156 vertices2->vertex.set1Value(i++,pos.x(),pos.y(),pos.z());
157 }
158 }
159
160 if (colourByParamType) {
161 // In this case, we don't need the last Nodes created in the loop.
162 parameterPoints->unref();
163 vertices2->unref();
164
165 } else {
166 parameterPoints->numPoints=i;
167 parameterPoints->vertexProperty = vertices2;
168 m_d->sep->addChild(static_cast<const IParticleCollHandle_TrackParticle*>(collHandle())->collSettingsButton().defaultParameterMaterial());
169 m_d->sep->addChild(parameterPoints);
170 }
171}
172
174
175 std::vector<Amg::Vector3D> positions, momenta;
176
177#if defined BUILDVP1LIGHT
178 positions.push_back(position());
179 momenta. push_back(momentum());
180#else
181 const Trk::Perigee& peri = m_d->trackparticle->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
182
183 positions.push_back(Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
184 momenta. push_back(Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
185 // std::cout<<"i:"<<0<<"/"<<m_d->trackparticle->numberOfParameters()+1<<": ("<<peri.position().x()<<","<<peri.position().y()<<","<<peri.position().z()<<")"<<std::endl;
186#endif // BUILDVP1LIGHT
187
188
189 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::addLine_FromTrackParticle - has "+QString::number(m_d->trackparticle->numberOfParameters())+" extra parameters.");
190 for (unsigned int i=0; i<m_d->trackparticle->numberOfParameters() ; ++i){
191 // std::cout<<"i:"<<i+1<<"/"<<m_d->trackparticle->numberOfParameters()+1<<": ("<<m_d->trackparticle->parameterX(i)<<","<<m_d->trackparticle->parameterY(i)<<","<<m_d->trackparticle->parameterZ(i)<<")"<<std::endl;
192
193 positions.push_back(Amg::Vector3D(m_d->trackparticle->parameterX(i),
194 m_d->trackparticle->parameterY(i),
195 m_d->trackparticle->parameterZ(i)));
196 momenta.push_back(Amg::Vector3D( m_d->trackparticle->parameterPX(i),
197 m_d->trackparticle->parameterPY(i),
198 m_d->trackparticle->parameterPZ(i)));
199
200 } // end of loop.
201
202 // if ( positions.size()<2 ) VP1Msg::messageVerbose("IParticleHandle_TrackParticle::addLine_FromTrackParticle - WARNING - not enough points to make a line.");
203
204 fillLineFromSplineFit(positions, momenta);
205
206 // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
207 m_d->sep->addChild(m_d->collHandle->material());
208 // ^^ FIXME - should rearrange so we don't need to reset material
209
210 m_d->sep->addChild(m_d->line);
211}
212
214 float x = a.x() + (b.x()-a.x())*t;
215 float y = a.y() + (b.y()-a.y())*t;
216 float z = a.z() + (b.z()-a.z())*t;
217 output = Amg::Vector3D(x,y,z);
218}
219
221 // DeCasteljau subdivision
222 Amg::Vector3D ab,bc,cd,abbc,bccd;
223 linear(ab, a,b,t); // point between a and b (green)
224 linear(bc, b,c,t); // point between b and c (green)
225 linear(cd, c,d,t); // point between c and d (green)
226 linear(abbc, ab,bc,t); // point between ab and bc (blue)
227 linear(bccd, bc,cd,t); // point between bc and cd (blue)
228 linear(output, abbc,bccd,t); // point on the bezier-curve (black)
229}
230
231void IParticleHandle_TrackParticle::fillLineFromSplineFit(const std::vector<Amg::Vector3D>& positions, const std::vector<Amg::Vector3D>&momenta){
232 int iver(0);
233 unsigned int npointsused(0);
234 // Create new lineset etc
235 m_d->line = new SoLineSet();
236 m_d->line->ref();
237
238 // For the moment, lets just draw the lines.
239 SoVertexProperty * vertices = new SoVertexProperty();
240
241 // std::cout<<"About to loop over "<<positions.size()<<" points to make line"<<std::endl;
242 // for (unsigned int i=0; i<positions.size(); ++i){
243 // std::cout<<"i: "<<i<<" at ("<<positions[i].x()<<","<<positions[i].y()<<","<<positions[i].z()<<")"<<" \tmom = ("<<momenta[i].x()<<","<<momenta[i].y()<<","<<momenta[i].z()<<")"<<std::endl;
244 // }
245
246 // std::cout<<"Now do interpolations."<<std::endl;
247
248 bool useExistingParams = m_d->collHandle->collSettingsButton().useExistingParameters();
249
250 for (unsigned int i=1; i<positions.size(); ++i){
251 // std::cout<<"i: "<<i<<" at ("<<positions[i].x()<<","<<positions[i].y()<<","<<positions[i].z()<<")"<<" \tmom = ("<<momenta[i].x()<<","<<momenta[i].y()<<","<<momenta[i].z()<<")"<<std::endl;
252
253 if (useExistingParams){
254 float scale = ( (positions[i]-positions[i-1]).mag() )/3.0; // want to split curve into three parts
255 Amg::Vector3D p0(positions[i-1]); // first position
256 Amg::Vector3D p1(positions[i-1]+(scale * momenta[i-1].unit() ) ); // move 1/3 or the way towards next point, but following momentum direction
257 Amg::Vector3D p2(positions[i] -(scale * momenta[i].unit() ) ); // back 1/3 from second point, but following momentum direction
258 Amg::Vector3D p3(positions[i]);
259 // std::cout<<"p0: ("<<p0[0]<<", "<<p0[1]<<", "<<p0[2]<<") "<<std::endl;
260 // std::cout<<"p1: ("<<p1[0]<<", "<<p1[1]<<", "<<p1[2]<<") "<<std::endl;
261 // std::cout<<"p2: ("<<p2[0]<<", "<<p2[1]<<", "<<p2[2]<<") "<<std::endl;
262 // std::cout<<"p3: ("<<p3[0]<<", "<<p3[1]<<", "<<p3[2]<<") "<<std::endl;
263
264 unsigned int maxCount=m_d->collHandle->collSettingsButton().numOfStepsForInterpolation();
265 for (unsigned int count=1; count<=maxCount;++count){
266 float t=static_cast<float>(count)/static_cast<float>(maxCount);
267 Amg::Vector3D pos;
268 bezier(pos, p0, p1, p2, p3, t);
269 // std::cout<<"j: "<<count<<" \tat ("<<pos.x()<<","<<pos.y()<<","<<pos.z()<<")"<<std::endl;
270
271 // pos = pos + momdelta;
272 vertices->vertex.set1Value(iver++,pos.x(),pos.y(),pos.z());
273 m_d->positionsToWrite.append(pos);
274
275 npointsused++;
276 }
277 } else {
278 vertices->vertex.set1Value(iver++,positions[i].x(),positions[i].y(),positions[i].z());
279 m_d->positionsToWrite.append(positions[i]);
280 npointsused++;
281 }
282 }
283
284 // Add final point.
285
286
287
288 // Add to SoLine set
289 m_d->line->numVertices.set1Value(0,npointsused);
290 m_d->line->vertexProperty = vertices;
291
292}
293
294#ifndef BUILDVP1LIGHT
296 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::addLine_Extrapolated().");
297
298 const Trk::Perigee& peri = m_d->trackparticle->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
299
300 Trk::CurvilinearParameters startParameters(peri.position(),peri.momentum(),peri.charge());
302 // ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
305
306 // we want to extrapolate outwards only for muon tracks
309
310 // call the extrapolation engine
312 if (!engine) {
313 VP1Msg::messageVerbose("No extrapolator engine available. Aborting.");
314 return;
315 }
316
317 std::vector<Amg::Vector3D> positions;
318 std::vector<Amg::Vector3D> momenta;
319
320 // Add start positions
321 positions.push_back(Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
322 momenta. push_back(Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
323
324
325 Trk::ExtrapolationCode eCode = engine->extrapolate(ecc);
326
327 // end the parameters if there
328 if (eCode.isSuccess()){
329 // loop over the collected information
330 for (auto& es : ecc.extrapolationSteps){
331
332 // continue if we have parameters
333 const Trk::TrackParameters* parameters = es.parameters;
334 if (parameters){
335 // take what you need -> position etc
336
337 // finally delete the parameters
338 Amg::Vector3D pos = parameters->position();
339 Amg::Vector3D mom = parameters->momentum();
340 positions.push_back(pos);
341 momenta.push_back(mom);
342
343 delete parameters;
344 }
345 }//
346
347 Amg::Vector3D pos = ecc.endParameters->position();
348 Amg::Vector3D mom = ecc.endParameters->momentum();
349 positions.push_back(pos);
350 momenta.push_back(mom);
351 // and delete the final parameter
352 delete ecc.endParameters;
353 } else {
354 VP1Msg::messageVerbose("IParticleHandle_TrackParticle::addLine_Extrapolated() - extrapolation failed.");
355 }
356 fillLineFromSplineFit(positions, momenta);
357 // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
358 m_d->sep->addChild(m_d->collHandle->material());
359 // ^^ FIXME - should rearrange so we don't need to reset material
360
361
362 m_d->sep->addChild(m_d->line);
363}
364#endif // BUILDVP1LIGHT
365
366//____________________________________________________________________
368{
369 QStringList l;
370 l << "TrackParticle:";
372 return l;
373}
374
375//____________________________________________________________________
376#if defined BUILDVP1LIGHT
378 {
379 double phi = m_d->trackparticle->phi0();
380 double theta = m_d->trackparticle->theta();
381
382 // decide the sign of the charge
383 double qop = m_d->trackparticle->qOverP();
384 // if(qop < 0.)
385 // m_chargeDef->setCharge(-1.);
386 // else
387 // m_chargeDef->setCharge(1.);
388 static constexpr double INVALID_P(10e9);
389 static constexpr double INVALID_QOP(10e-9);
390
391 // check qoverp is physical
392 double p = 0.;
393 if(qop != 0.)
394 p = fabs(1./qop);
395 else
396 {
397 // qop is unphysical. No momentum measurement.
398 p = INVALID_P;
399 qop = INVALID_QOP;
400 }
401
403
404 return mom;
405 }
406#else
408 {
409 const Trk::Perigee& p = m_d->trackparticle->perigeeParameters();
410 return p.momentum();
411 }
412#endif // BUILDVP1LIGHT
413
414//____________________________________________________________________
415// TODO: probably, we can move this function to the common base class for all trackparticles
416#if defined BUILDVP1LIGHT
418 {
419 double d0 = m_d->trackparticle->d0();
420 double z0 = m_d->trackparticle->z0();
421 double phi = m_d->trackparticle->phi0();
422
423 // glopos[Amg::x] = - locpos[Trk::d0]*sin(phi);
424 // glopos[Amg::y] = locpos[Trk::d0]*cos(phi);
425 // glopos[Amg::z] = locpos[Trk::z0];
426
427
428 const Amg::Vector3D pos = Amg::Vector3D(- d0*sin(phi), d0*cos(phi), z0);
429
430 return pos;
431 }
432#else
434 {
435 const Trk::Perigee& p = m_d->trackparticle->perigeeParameters();
436 return p.position(); // TODO: check what this returns
437 }
438#endif
439
440
441//____________________________________________________________________
443{
444 return *(m_d->trackparticle);
445}
446
447//____________________________________________________________________
449{
450 return m_d->trackparticle->charge();
451}
452
453//____________________________________________________________________
455{
456 uint8_t num = 0;
457 if (m_d->trackparticle->summaryValue(num,type)){
458 return num;
459 }
460 // else...
461 VP1Msg::message("IParticleHandle_TrackParticle::getSummaryValue - unable to retrieve the requested enum: "+VP1Msg::str(type));
462 return 999999;
463}
464
465//____________________________________________________________________
470
471//____________________________________________________________________
476//____________________________________________________________________
481//____________________________________________________________________
486//____________________________________________________________________
491//____________________________________________________________________
496//____________________________________________________________________
501
503{
504 QString l("");
505 //l+= "|P|="+VP1Msg::str(momentum().mag()/SYSTEM_OF_UNITS::GeV)+" [GeV], ";
506 l+= "Pix["+QString::number(getNPixelHits())+"], ";
507 l+= "SCT["+QString::number(getNSCTHits())+"], " ;
508 l+= "TRT["+QString::number(getNTRTHits())+"], ";
509 l+= "Muon prec. layers/holes [";
510 l+= QString::number(getNMuonPrecisionLayers())+"/"+QString::number(getNMuonPrecisionHoleLayers())+"]";
511 return l;
512}
513
514void IParticleHandle_TrackParticle::fillObjectBrowser( QList<QTreeWidgetItem *>& listOfItems)
515{
516 IParticleHandleBase::fillObjectBrowser(listOfItems); // Obligatory!
517
518 QTreeWidgetItem* TSOSitem = new QTreeWidgetItem(browserTreeItem());
519 TSOSitem->setText(0, QString("Def. Parameters " ) );
520 QString dParameters("(");
521 dParameters+=QString::number(m_d->trackparticle->d0());
522 dParameters+=", ";
523 dParameters+=QString::number(m_d->trackparticle->z0());
524 dParameters+=", ";
525 dParameters+=QString::number(m_d->trackparticle->phi0());
526 dParameters+=", ";
527 dParameters+=QString::number(m_d->trackparticle->theta());
528 dParameters+=", ";
529 dParameters+=QString::number(m_d->trackparticle->qOverP());
530 dParameters+=")";
531 TSOSitem->setText(1, dParameters );
532
533 for (unsigned int i=0; i<m_d->trackparticle->numberOfParameters() ; ++i){
534 QTreeWidgetItem* TSOSitem = new QTreeWidgetItem(browserTreeItem());
535 TSOSitem->setText(0, QString("Parameter "+QString::number( i+1 ) ) );
536 QString pos(", Position = (");
537 pos+=QString::number(m_d->trackparticle->parameterX(i));
538 pos+=", ";
539 pos+=QString::number(m_d->trackparticle->parameterY(i));
540 pos+=", ";
541 pos+=QString::number(m_d->trackparticle->parameterZ(i));
542 pos+=")";
543
544 switch (m_d->trackparticle->parameterPosition(i)){
545 case xAOD::BeamLine:
546 TSOSitem->setText(1, QString("BeamLine" )+pos );
547 break;
549 TSOSitem->setText(1, QString("FirstMeasurement")+pos );
550 break;
552 TSOSitem->setText(1, QString("LastMeasurement" )+pos );
553 break;
555 TSOSitem->setText(1, QString("CalorimeterEntrance")+pos );
556 break;
558 TSOSitem->setText(1, QString("CalorimeterExit" )+pos );
559 break;
561 TSOSitem->setText(1, QString("MuonSpectrometerEntrance")+pos );
562 break;
563 default:
564 TSOSitem->setText(1, QString("Undefined")+pos );
565 }
566 }
567
568 // TODO - add more.
569}
570
571const QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> >& IParticleHandle_TrackParticle::parametersAndPositions() const {
572 // 1st position
573 if (!m_d->parametersAndPositions.isEmpty())
574 return m_d->parametersAndPositions;
575
576 typedef std::pair<xAOD::ParameterPosition, Amg::Vector3D> paramAndPos;
577
578#if defined BUILDVP1LIGHT
579 m_d->parametersAndPositions.append(paramAndPos(xAOD::BeamLine, position() ) );
580#else
581 const Trk::Perigee& peri = m_d->trackparticle->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
582 m_d->parametersAndPositions.append(paramAndPos(xAOD::BeamLine, Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()) ) );
583#endif // BUILDVP1LIGHT
584
585 float x,y,z;
586 for (unsigned int i=0; i<m_d->trackparticle->numberOfParameters() ; ++i){
587 x = m_d->trackparticle->parameterX(i);
588 y = m_d->trackparticle->parameterY(i);
589 z = m_d->trackparticle->parameterZ(i);
590
591 m_d->parametersAndPositions.append(paramAndPos(m_d->trackparticle->parameterPosition(i), Amg::Vector3D(x,y,z)));
592 }
593 VP1Msg::messageVerbose("TrackParticle parametersAndPositions() - returning this many positions : "+VP1Msg::str(m_d->parametersAndPositions.size()) );
594 return m_d->parametersAndPositions;
595}
596
598 str << "\"chi2\":"<<m_d->trackparticle->chiSquared () <<", ";
599 str << "\"dof\":" <<m_d->trackparticle->numberDoF () <<", ";
600 str << "\"dparams\": ["
601 << m_d->trackparticle->d0() <<", "
602 << m_d->trackparticle->z0() <<", "
603 << m_d->trackparticle->phi0() <<", "
604 << m_d->trackparticle->theta() <<", "
605 << m_d->trackparticle->qOverP()
606 << "], \"pos\": [";
607 bool first = true;
608 for (auto pos: m_d->positionsToWrite){
609 if (first){
610 first = false;
611 } else {
612 str <<",";
613 }
614 str << "["<<pos.x()<<","<<pos.y()<<","<<pos.z()<<"]";
615 }
616 str << "] ";
617}
618
Scalar phi() const
phi method
Scalar theta() const
theta method
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
static Double_t a
#define y
#define x
#define z
const AODSysCommonData * common() const
const AODCollHandleBase * collHandle() const
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
const Trk::IExtrapolationEngine * extrapolator() const
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
IParticleHandleBase(IParticleCollHandleBase *)
virtual QStringList baseInfo() const
IParticleCollHandle_TrackParticle * collHandle
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
virtual unsigned summaryValue(xAOD::SummaryType type) const
virtual void clear3DObjects()
Delete objects.
virtual double charge() const
Returns unknown() in case of trouble.
virtual void dumpToJSON(std::ofstream &) const
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
QString shortInfo() const
This returns the information shown about the object in the object browser.
virtual SoNode * nodes()
Returns the 3Dobjects.
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
void fillLineFromSplineFit(const std::vector< Amg::Vector3D > &positions, const std::vector< Amg::Vector3D > &momenta)
Fill d->line with a SoLineSet made from a spline fit between the information in positions and momenta...
void addLine_FromTrackParticle()
Make the line, but only using information on the track (a spline fit will be done from the parameters...
virtual QString type() const
return very short word with type (maybe link with collection type?)
IParticleHandle_TrackParticle(IParticleCollHandleBase *, const xAOD::TrackParticle *)
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
void addLine_Extrapolated()
Extrapolate the initial track parameters to get the line (a spline fit is done between the extrapolat...
const xAOD::IParticle & iParticle() const
templated class as an input-output object of the extrapolation, only public members,...
void addConfigurationMode(ExtrapolationMode::eMode em)
add a configuration mode
T * endParameters
by pointer - are newly created and can be optionally 0
std::vector< ExtrapolationStep< T > > extrapolationSteps
parameters on sensitive detector elements
bool isSuccess() const
return success
Extrapolation engine interface for Charged and Neutral parameters, it serves as the Master extrapolat...
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
double charge() const
Returns the charge.
static void messageVerbose(const QString &)
Definition VP1Msg.cxx:84
static void message(const QString &, IVP1System *sys=0)
Definition VP1Msg.cxx:30
static QString str(const QString &s)
Definition VP1String.h:49
Class providing the definition of the 4-vector interface.
float z0() const
Returns the parameter.
float theta() const
Returns the parameter, which has range 0 to .
float d0() const
Returns the parameter.
float qOverP() const
Returns the parameter.
float phi0() const
Returns the parameter, which has range to .
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
Eigen::Matrix< double, 3, 1 > Vector3D
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
SummaryType
Enumerates the different types of information stored in Summary.
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ MuonSpectrometerEntrance
Parameter defined at the entrance to the Muon Spectrometer.
@ BeamLine
Parameter defined at the Vertex/Beamline.
@ CalorimeterExit
Parameter defined at the exit of the calorimeter.
@ CalorimeterEntrance
Parameter defined at the entrance to the calorimeter.
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
@ LastMeasurement
Parameter defined at the position of the last measurement.