ATLAS Offline Software
Loading...
Searching...
No Matches
IParticleHandle_Muon.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_Muon //
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#ifdef BUILDVP1LIGHT
34 #include "CLHEP/Units/SystemOfUnits.h"
35#endif // BUILDVP1LIGHT
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//AOD
46
47//____________________________________________________________________
49public:
51 const xAOD::Muon * muon = nullptr;
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
57};
58
59//____________________________________________________________________
61 : IParticleHandleBase(ch), m_d(new Imp)
62{
63 m_d->theclass = this;
64 m_d->muon = tp;
65 m_d->collHandle = dynamic_cast<IParticleCollHandle_Muon*>(ch);
66 m_d->sep=0;
67 m_d->line=0;
68}
69
70//____________________________________________________________________
72{
73 if (m_d->line) m_d->line->unref();
74 if (m_d->sep) m_d->sep->unref();
75 delete m_d;
76}
77
79 return 0!=m_d->sep;
80}
82 VP1Msg::messageVerbose("IParticleHandle_Muon::clear3DObjects()");
83
84 if (m_d->line) {
85 m_d->line->unref();
86 m_d->line=0;
87 }
88 if (m_d->sep) {
89 m_d->sep->unref();
90 m_d->sep=0;
91 }
92}
93
94// SoNode* IParticleHandle_Muon::nodes(){
95// // VP1Msg::messageVerbose("IParticleHandle_Muon::nodes with m_d->sep="+VP1Msg::str(m_d->sep));
96//
97// if (m_d->sep)
98// return m_d->sep; // FIXME - do we need to check if anything need to be redrawn?
99// if (!m_d->sep) {
100// m_d->sep = new SoSeparator();
101// m_d->sep->ref();
102// }
103//
104// int iver(0);
105// unsigned npointsused(0);
106//
107// // Loop through the TP and find the parameters & create points & get momenta for line interpolation
108// std::vector<Amg::Vector3D> positions;
109// std::vector<Amg::Vector3D> momenta;
110//
111// const Trk::Perigee& peri = m_d->muon->primaryTrackParticle()->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
112//
113// // std::cout<<peri.position()<<std::endl;
114// // std::cout<<p4.X()<<", "<<p4.Y()<<", "<<p4.Z()<<std::endl;
115//
116// const IParticleCollHandle_Muon* collHandleTrk = dynamic_cast<const IParticleCollHandle_Muon*>(collHandle());
117// // FIXME - this ugly...
118//
119// float x,y,z;
120// unsigned int iMinusOne=0;
121//
122// for (unsigned int i=0; i<m_d->muon->primaryTrackParticle()->numberOfParameters()+1 ; ++i){
123// // std::cout<<"i:"<<i<<"/"<<m_d->muon->primaryTrackParticle()->numberOfParameters()+1<<std::endl;
124// if (0==i) {
125// // 1st position - set 'first' to false a few lines further down...
126// x = peri.position().x();
127// y = peri.position().y();
128// z = peri.position().z();
129// momenta.push_back(Amg::Vector3D(momentum().x(),
130// momentum().y(),
131// momentum().z()));
132// } else {
133// // Other positions
134// iMinusOne=i-1;
135// x = m_d->muon->primaryTrackParticle()->parameterX(iMinusOne);
136// y = m_d->muon->primaryTrackParticle()->parameterY(iMinusOne);
137// z = m_d->muon->primaryTrackParticle()->parameterZ(iMinusOne);
138// momenta.push_back(Amg::Vector3D(m_d->muon->primaryTrackParticle()->parameterPX(iMinusOne),
139// m_d->muon->primaryTrackParticle()->parameterPY(iMinusOne),
140// m_d->muon->primaryTrackParticle()->parameterPZ(iMinusOne)));
141// }
142// positions.push_back(Amg::Vector3D(x,y,z));
143// } // end of loop.
144//
145// // Create new lineset etc
146// m_d->line = new SoLineSet();
147// m_d->line->ref();
148// SoVertexProperty * vertices = new SoVertexProperty();
149// iver=0;
150// // For the moment, lets just draw the lines.
151// // std::cout<<"About to loop over "<<positions.size()<<" points to make line"<<std::endl;
152//
153// for (unsigned int i=1; i<positions.size(); ++i){
154// // std::cout<<"i: "<<i<<" at ("<<positions[i].x()<<","<<positions[i].y()<<","<<positions[i].z()<<")"<<std::endl;
155// unsigned int maxCount=10;
156// for (unsigned int count=0; count<maxCount;++count){
157// float fraction=count/(float)maxCount;
158// Amg::Vector3D point1(positions[i-1]+fraction*momenta[i-1]);
159// Amg::Vector3D point2(positions[i]-(1.0-fraction)*momenta[i]);
160// Amg::Vector3D tangent = point1+fraction*(point2-point1);
161// vertices->vertex.set1Value(iver++,tangent.x(),tangent.y(),tangent.z());
162// npointsused++;
163// }
164// }
165//
166// // Add to SoLine set
167// m_d->line->numVertices.set1Value(0,npointsused);
168// m_d->line->vertexProperty = vertices;
169// // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
170// m_d->sep->addChild(collHandleTrk->material());
171// // ^^ FIXME - should rearrange so we don't need to reset material
172// m_d->sep->addChild(m_d->line);
173//
174// // points->vertexProperty = vertices2;
175//
176// return m_d->sep;
177// }
178
180 VP1Msg::messageVerbose("IParticleHandle_Muon::nodes with d->sep="+VP1Msg::str(m_d->sep));
181
182 if (m_d->sep) {
183 VP1Msg::messageVerbose("IParticleHandle_Muon::nodes() - already have sep so not doing anything.");
184 return m_d->sep;
185 }
186 if (!m_d->sep) {
187 m_d->sep = new SoSeparator();
188 m_d->sep->ref();
189 }
190
193
194 return m_d->sep;
195}
196
198 // Okay. so let's make the containers to hold them...
199 SoPointSet* parameterPoints = new SoPointSet;
200 SoVertexProperty* vertices2 = new SoVertexProperty;
201
202 int i = 0;
203 QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> > parAndPoses = parametersAndPositions();
204
205 for (std::pair<xAOD::ParameterPosition, Amg::Vector3D> parpos : parAndPoses ) {
206 Amg::Vector3D pos = parpos.second;
207 vertices2->vertex.set1Value(i++,pos.x(),pos.y(),pos.z());
208 }
209
210 parameterPoints->numPoints=i;
211 parameterPoints->vertexProperty = vertices2;
212
213 // m_d->sep->addChild(m_d->collHandle->collSettingsButton().defaultParameterMaterial());
214 m_d->sep->addChild(parameterPoints);
215
216}
217
219
220 std::vector<Amg::Vector3D> positions, momenta;
221
222 const xAOD::TrackParticle* trackparticle = m_d->muon->primaryTrackParticle();
223 if (!trackparticle) {
224 VP1Msg::message("ERROR : no primary track particle associated with this Muon. Can't visualise it.");
225 return;
226 }
227#if defined BUILDVP1LIGHT
228 positions.push_back(position());
229 momenta. push_back(momentum());
230#else
231 const Trk::Perigee& peri = trackparticle->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
232
233 positions.push_back(Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()));
234 momenta. push_back(Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
235 VP1Msg::messageVerbose("IParticleHandle_Muon::addLine_FromTrackParticle - has "+QString::number(trackparticle->numberOfParameters())+" extra parameters.");
236 #endif // BUILDVP1LIGHT
237 for (unsigned int i=0; i<trackparticle->numberOfParameters() ; ++i){
238 // std::cout<<"i:"<<i<<"/"<<m_d->trackparticle->numberOfParameters()+1<<std::endl;
239
240 positions.push_back(Amg::Vector3D(trackparticle->parameterX(i),
241 trackparticle->parameterY(i),
242 trackparticle->parameterZ(i)));
243 momenta.push_back(Amg::Vector3D( trackparticle->parameterPX(i),
244 trackparticle->parameterPY(i),
245 trackparticle->parameterPZ(i)));
246 } // end of loop.
247
248 if ( positions.size()<2 ) {
249 VP1Msg::messageVerbose("IParticleHandle_Muon::addLine_FromTrackParticle - WARNING - not enough points to make a line.");
250 return;
251 }
252
253 fillLineFromSplineFit(positions, momenta);
254
255 // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
256 m_d->sep->addChild(m_d->collHandle->material());
257 // ^^ FIXME - should rearrange so we don't need to reset material
258
259 m_d->sep->addChild(m_d->line);
260}
261
263 float x = a.x() + (b.x()-a.x())*t;
264 float y = a.y() + (b.y()-a.y())*t;
265 float z = a.z() + (b.z()-a.z())*t;
266 output = Amg::Vector3D(x,y,z);
267}
268
270 // DeCasteljau subdivision
271 Amg::Vector3D ab,bc,cd,abbc,bccd;
272 linear(ab, a,b,t); // point between a and b (green)
273 linear(bc, b,c,t); // point between b and c (green)
274 linear(cd, c,d,t); // point between c and d (green)
275 linear(abbc, ab,bc,t); // point between ab and bc (blue)
276 linear(bccd, bc,cd,t); // point between bc and cd (blue)
277 linear(output, abbc,bccd,t); // point on the bezier-curve (black)
278}
279
280void IParticleHandle_Muon::fillLineFromSplineFit(const std::vector<Amg::Vector3D>& positions, const std::vector<Amg::Vector3D>&momenta){
281 int iver(0);
282 unsigned int npointsused(0);
283 // Create new lineset etc
284 m_d->line = new SoLineSet();
285 m_d->line->ref();
286
287 // For the moment, lets just draw the lines.
288 // std::cout<<"About to loop over "<<positions.size()<<" points to make line"<<std::endl;
289 SoVertexProperty * vertices = new SoVertexProperty();
290
291 for (unsigned int i=1; i<positions.size(); ++i){
292 // 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;
293 // unsigned int maxCount=m_d->collHandle->collSettingsButton().numOfStepsForInterpolation();
294 unsigned int maxCount=4;
295 float scale = ( (positions[i]-positions[i-1]).mag() )/2.0;
296 Amg::Vector3D p0(positions[i-1]);
297 Amg::Vector3D p1(positions[i-1]+(scale * momenta[i-1].unit() ) );
298 Amg::Vector3D p2(positions[i] -(scale * momenta[i].unit() ) );
299 Amg::Vector3D p3(positions[i]);
300 // std::cout<<"p0: "<<p0<<"\np1: "<<p1<<"\np2: "<<p2<<"\np3: "<<p3<<std::endl;
301
302 for (unsigned int count=0; count<maxCount;++count){
303 float t=count/(float)maxCount;
304 Amg::Vector3D pos;
305 bezier(pos, p0, p1, p2, p3, t);
306 // std::cout<<"i: "<<count<<" \tat ("<<pos.x()<<","<<pos.y()<<","<<pos.z()<<")"<<" \tmomdelta = ("<<momdelta.x()<<","<<momdelta.y()<<","<<momdelta.z()<<")"<<std::endl;
307
308 // pos = pos + momdelta;
309 vertices->vertex.set1Value(iver++,pos.x(),pos.y(),pos.z());
310
311 npointsused++;
312 }
313 }
314 // Add to SoLine set
315 m_d->line->numVertices.set1Value(0,npointsused);
316 m_d->line->vertexProperty = vertices;
317
318}
319
320//____________________________________________________________________
322{
323 QStringList l;
324 l << "Muon:";
326 switch (m_d->muon->muonType()){
327 case xAOD::Muon::Combined:
328 l << "Type = Combined";
329 break;
330 case xAOD::Muon::MuonStandAlone:
331 l << "Type = MuonStandAlone";
332 break;
333 case xAOD::Muon::SegmentTagged:
334 l << "Type = SegmentTagged";
335 break;
336 case xAOD::Muon::CaloTagged:
337 l << "Type = CaloTagged";
338 break;
339 case xAOD::Muon::SiliconAssociatedForwardMuon:
340 l << "Type = SiliconAssociatedForwardMuon";
341 break;
342 default:
343 l << "Type = Unknown";
344 }
345
346 switch (m_d->muon->quality()){
347 case xAOD::Muon::Tight:
348 l << "Quality = Tight";
349 break;
350 case xAOD::Muon::Medium:
351 l << "Quality = Medium";
352 break;
353 case xAOD::Muon::Loose:
354 l << "Quality = Loose";
355 break;
356 case xAOD::Muon::VeryLoose:
357 l << "Quality = VeryLoose";
358 break;
359 default:
360 l << "Quality = Unknown";
361 }
362
363 return l;
364}
365
366//____________________________________________________________________
367#if defined BUILDVP1LIGHT
369 {
372 return Amg::Vector3D();
373 }
374 double phi = m_d->muon->primaryTrackParticle()->phi0();
375 double theta = m_d->muon->primaryTrackParticle()->theta();
376
377 // decide the sign of the charge
378 double qop = m_d->muon->primaryTrackParticle()->qOverP();
379 // if(qop < 0.)
380 // m_chargeDef->setCharge(-1.);
381 // else
382 // m_chargeDef->setCharge(1.);
383 static constexpr double INVALID_P(10e9);
384 static constexpr double INVALID_QOP(10e-9);
385
386 // check qoverp is physical
387 double p = 0.;
388 if(qop != 0.)
389 p = fabs(1./qop);
390 else
391 {
392 // qop is unphysical. No momentum measurement.
393 p = INVALID_P;
394 qop = INVALID_QOP;
395 }
396
398
399 return mom;
400 }
401#else
403 {
404 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
405 m_d->collHandle->printMsgNoTrackParticle();
406 return Amg::Vector3D();
407 }
408 //return Amg::Vector3D(); // RMB test
409 const Trk::Perigee& p = m_d->muon->primaryTrackParticle()->perigeeParameters();
410 return p.momentum();
411 }
412#endif //
413
414//____________________________________________________________________
415// TODO: probably, we can move this function to the common base class for all trackparticles
416#if defined BUILDVP1LIGHT
418 {
421 return Amg::Vector3D();
422 }
423 double d0 = m_d->muon->primaryTrackParticle()->d0();
424 double z0 = m_d->muon->primaryTrackParticle()->z0();
425 double phi = m_d->muon->primaryTrackParticle()->phi0();
426
427 // glopos[Amg::x] = - locpos[Trk::d0]*sin(phi);
428 // glopos[Amg::y] = locpos[Trk::d0]*cos(phi);
429 // glopos[Amg::z] = locpos[Trk::z0];
430
431
432 const Amg::Vector3D pos = Amg::Vector3D(- d0*sin(phi), d0*cos(phi), z0);
433
434 return pos;
435 }
436#else
438 {
439 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
440 m_d->collHandle->printMsgNoTrackParticle();
441 return Amg::Vector3D();
442 }
443 const Trk::Perigee& p = m_d->muon->primaryTrackParticle()->perigeeParameters();
444 return p.position(); // TODO: check what this returns
445 }
446#endif
447
448//____________________________________________________________________
450{
451 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
452 m_d->collHandle->printMsgNoTrackParticle();
453 }
454 return *(m_d->muon->primaryTrackParticle());
455}
456
457//____________________________________________________________________
459{
460 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
461 m_d->collHandle->printMsgNoTrackParticle();
462 return 0.0;
463 }
464 return m_d->muon->primaryTrackParticle()->charge();
465}
466
467//____________________________________________________________________
469{
470 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
471 m_d->collHandle->printMsgNoTrackParticle();
472 return 0;
473 }
474 return static_cast<unsigned int>(m_d->muon->quality());
475}
476
478{
479 return *(m_d->muon);
480}
481
483 switch (m_d->muon->muonType()) {
484 case xAOD::Muon::Combined:
485 return QString("Combined");
486 case xAOD::Muon::MuonStandAlone:
487 return QString("MuonStandAlone");
488 case xAOD::Muon::SegmentTagged:
489 return QString("SegmentTagged");
490 case xAOD::Muon::CaloTagged:
491 return QString("CaloTagged");
492 case xAOD::Muon::SiliconAssociatedForwardMuon:
493 return QString("SiliconAssociatedForwardMuon");
494 default:
495 return QString("Unknown Muon type");
496 }
497}
498
500 switch (m_d->muon->quality()) {
501 case xAOD::Muon::Tight:
502 return QString("Tight");
503 case xAOD::Muon::Medium:
504 return QString("Medium");
505 case xAOD::Muon::Loose:
506 return QString("Loose");
507 case xAOD::Muon::VeryLoose:
508 return QString("VeryLoose");
509 default:
510 return QString("Unknown Muon quality");
511 }
512}
513
514// //____________________________________________________________________
515// unsigned IParticleHandle_Muon::summaryValue(xAOD::SummaryType type) const
516// {
517// uint8_t num = 0;
518// if (m_d->muon->summaryValue(num,type)){
519// return num;
520// }
521// // else...
522// VP1Msg::message("IParticleHandle_Muon::getSummaryValue - unable to retrieve the requested enum: "+VP1Msg::str(type));
523// return 999999;
524// }
525
526
528{
529
530 QString l("");
531 l+= "|P|=";
532 l+= VP1Msg::str(momentum().mag()/SYSTEM_OF_UNITS::GeV)+" [GeV], ";
533 l+= muonTypeString() + ", ";
534 l+= qualityString();
535 return l;
536}
537
538void IParticleHandle_Muon::fillObjectBrowser( QList<QTreeWidgetItem *>& listOfItems)
539{
540 IParticleHandleBase::fillObjectBrowser(listOfItems); // Obligatory!
541
542 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
543 m_d->collHandle->printMsgNoTrackParticle();
544 return;
545 }
546
547
548 QTreeWidgetItem* TSOSitem = new QTreeWidgetItem(browserTreeItem());
549 TSOSitem->setText(0, QString("Def. Parameters [d0,z0,phi0,theta,qOverP]" ) );
550 QString dParameters("(");
551 dParameters+=QString::number(m_d->muon->primaryTrackParticle()->d0());
552 dParameters+=", ";
553 dParameters+=QString::number(m_d->muon->primaryTrackParticle()->z0());
554 dParameters+=", ";
555 dParameters+=QString::number(m_d->muon->primaryTrackParticle()->phi0());
556 dParameters+=", ";
557 dParameters+=QString::number(m_d->muon->primaryTrackParticle()->theta());
558 dParameters+=", ";
559 dParameters+=QString::number(m_d->muon->primaryTrackParticle()->qOverP());
560 dParameters+=")";
561 TSOSitem->setText(1, dParameters );
562
563 for (unsigned int i=0; i<m_d->muon->primaryTrackParticle()->numberOfParameters() ; ++i){
564 QTreeWidgetItem* TSOSitem = new QTreeWidgetItem(browserTreeItem());
565 TSOSitem->setText(0, QString("Parameter "+QString::number( i+1 ) ) );
566 QString pos(", Position = (");
567 pos+=QString::number(m_d->muon->primaryTrackParticle()->parameterX(i));
568 pos+=", ";
569 pos+=QString::number(m_d->muon->primaryTrackParticle()->parameterY(i));
570 pos+=", ";
571 pos+=QString::number(m_d->muon->primaryTrackParticle()->parameterZ(i));
572 pos+=")";
573
574 switch (m_d->muon->primaryTrackParticle()->parameterPosition(i)){
575 case xAOD::BeamLine:
576 TSOSitem->setText(1, QString("BeamLine" )+pos );
577 break;
579 TSOSitem->setText(1, QString("FirstMeasurement")+pos );
580 break;
582 TSOSitem->setText(1, QString("LastMeasurement" )+pos );
583 break;
585 TSOSitem->setText(1, QString("CalorimeterEntrance")+pos );
586 break;
588 TSOSitem->setText(1, QString("CalorimeterExit" )+pos );
589 break;
591 TSOSitem->setText(1, QString("MuonSpectrometerEntrance")+pos );
592 break;
593 default:
594 TSOSitem->setText(1, QString("Undefined")+pos );
595 }
596 }
597
598 // TODO - add more.
599}
600
601const QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> >& IParticleHandle_Muon::parametersAndPositions() const {
602 // 1st position
603 if (!m_d->parametersAndPositions.isEmpty())
604 return m_d->parametersAndPositions;
605
606 typedef std::pair<xAOD::ParameterPosition, Amg::Vector3D> paramAndPos;
607
608 #if defined BUILDVP1LIGHT
609 m_d->parametersAndPositions.append(paramAndPos(xAOD::BeamLine, position() ) );
610 #else
611 if( !(m_d->collHandle->hasPrimaryTrackParticleInfo()) ) {
612 m_d->collHandle->printMsgNoTrackParticle();
613 return m_d->parametersAndPositions;
614 }
615 const Trk::Perigee& peri = m_d->muon->primaryTrackParticle()->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
616 m_d->parametersAndPositions.append(paramAndPos(xAOD::BeamLine, Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z()) ) );
617 #endif // BUILDVP1LIGHT
618
619 float x,y,z;
620 for (unsigned int i=0; i<m_d->muon->primaryTrackParticle()->numberOfParameters() ; ++i){
621 x = m_d->muon->primaryTrackParticle()->parameterX(i);
622 y = m_d->muon->primaryTrackParticle()->parameterY(i);
623 z = m_d->muon->primaryTrackParticle()->parameterZ(i);
624
625 m_d->parametersAndPositions.append(paramAndPos(m_d->muon->primaryTrackParticle()->parameterPosition(i), Amg::Vector3D(x,y,z)));
626 }
627 return m_d->parametersAndPositions;
628}
Scalar phi() const
phi method
Scalar theta() const
theta method
Scalar mag() const
mag 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
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
IParticleHandleBase(IParticleCollHandleBase *)
virtual QStringList baseInfo() const
IParticleHandle_Muon * theclass
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
IParticleCollHandle_Muon * collHandle
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
unsigned int quality() const
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
virtual void clear3DObjects()
Delete objects.
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
virtual Amg::Vector3D position() const
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
virtual SoNode * nodes()
Returns the 3Dobjects.
virtual double charge() const
Returns unknown() in case of trouble.
virtual Amg::Vector3D momentum() const
const xAOD::IParticle & iParticle() const
void fillLineFromSplineFit(const std::vector< Amg::Vector3D > &positions, const std::vector< Amg::Vector3D > &momenta)
const xAOD::Muon & muon() const
IParticleHandle_Muon(IParticleCollHandleBase *, const xAOD::Muon *)
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.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
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.
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
float parameterPY(unsigned int index) const
Returns the parameter y momentum component, for 'index'.
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
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
constexpr double INVALID_P(10e9)
constexpr double INVALID_QOP(10e-9)
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
@ 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.