ATLAS Offline Software
IParticleHandle_Electron.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_Electron //
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 "GeoModelKernel/Units.h"
35  #define SYSTEM_OF_UNITS GeoModelKernelUnits // so we will get, e.g., 'GeoModelKernelUnits::cm'
36 #else
37  //Athena
39  #define SYSTEM_OF_UNITS Gaudi::Units // so we will get, e.g., 'Gaudi::Units::cm'
40 #endif // BUILDVP1LIGHT
41 
42 //____________________________________________________________________
44 public:
46  const xAOD::Electron * electron = nullptr;
48 
49  SoSeparator * sep = nullptr; // everything hangs from this.
50  SoLineSet * line = nullptr;//This represents the line(s) representing the electron. Can be interpolated.
51  QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> > parametersAndPositions; // cache - do we really need this?
52  QList< Amg::Vector3D > positionsToWrite; // FIXME - this is just a quick hack so we can easily dump the points used in the lines to JSON
53 
54 };
55 
56 //____________________________________________________________________
58  : IParticleHandleBase(ch), m_d(new Imp)
59 {
60  m_d->theclass = this;
61  m_d->electron = tp;
62  m_d->collHandle = dynamic_cast<IParticleCollHandle_Electron*>(ch);
63  m_d->sep=0;
64  m_d->line=0;
65 }
66 
67 //____________________________________________________________________
69 {
70  if (m_d->line) m_d->line->unref();
71  if (m_d->sep) m_d->sep->unref();
72  delete m_d;
73 }
74 
76  return *(m_d->electron);
77 }
78 
80  return 0!=m_d->sep;
81 }
83  VP1Msg::messageVerbose("IParticleHandle_Electron::clear3DObjects()");
84 
85  if (m_d->line) {
86  m_d->line->unref();
87  m_d->line=0;
88  }
89  if (m_d->sep) {
90  m_d->sep->unref();
91  m_d->sep=0;
92  }
93 
94  // Wipe caches
95  m_d->positionsToWrite.clear();
96  m_d->parametersAndPositions.clear();
97 }
98 
100  VP1Msg::messageVerbose("IParticleHandle_Electron::nodes with m_d->sep="+VP1Msg::str(m_d->sep));
101 
102  if (m_d->sep) {
103  VP1Msg::messageVerbose("IParticleHandle_Electron::nodes() - already have sep so not doing anything.");
104  return m_d->sep;
105  }
106  if (!m_d->sep) {
107  m_d->sep = new SoSeparator();
108  m_d->sep->ref();
109  }
110 
112 
113  if (fromTrack) {
115  } else {
116  #ifndef BUILDVP1LIGHT
117  VP1Msg::messageVerbose( "addLine_Extrapolated()" );
119  #endif // BUILDVP1LIGHT
120  }
121 
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->electron->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_Electron*>(collHandle())->collSettingsButton().defaultParameterMaterial());
169  m_d->sep->addChild(parameterPoints);
170  }
171 }
172 
174 
175  std::vector<Amg::Vector3D> positions, momenta;
176 
177  const xAOD::TrackParticle* trackparticle = m_d->electron->trackParticle();
178  if (!trackparticle) {
179  VP1Msg::message("ERROR : no primary track particle associated with this Electron. Can't visualise it.");
180  return;
181  }
182 
183 #if defined BUILDVP1LIGHT
184  positions.push_back(position());
185  momenta. push_back(momentum());
186 #else
187  const Trk::Perigee& peri = trackparticle->perigeeParameters (); // FIXME - I'd quite like not to use anything which requires Athena ...
188 
189  positions.push_back(Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z())); // TODO: move to position()?
190  momenta. push_back(Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
191  // std::cout<<"i:"<<0<<"/"<<m_d->electron->numberOfParameters()+1<<": ("<<peri.position().x()<<","<<peri.position().y()<<","<<peri.position().z()<<")"<<std::endl;
192 #endif // BUILDVP1LIGHT
193 
194  VP1Msg::messageVerbose("IParticleHandle_Electron::addLine_FromElectron - has "+QString::number(trackparticle->numberOfParameters())+" extra parameters.");
195  for (unsigned int i=0; i<trackparticle->numberOfParameters() ; ++i){
196  // std::cout<<"i:"<<i+1<<"/"<<m_d->electron->numberOfParameters()+1<<": ("<<m_d->electron->parameterX(i)<<","<<m_d->electron->parameterY(i)<<","<<m_d->electron->parameterZ(i)<<")"<<std::endl;
197 
198  positions.push_back(Amg::Vector3D(trackparticle->parameterX(i),
199  trackparticle->parameterY(i),
200  trackparticle->parameterZ(i)));
201  momenta.push_back(Amg::Vector3D( trackparticle->parameterPX(i),
202  trackparticle->parameterPY(i),
203  trackparticle->parameterPZ(i)));
204  } // end of loop.
205 
206  // if ( positions.size()<2 ) VP1Msg::messageVerbose("IParticleHandle_Electron::addLine_FromElectron - WARNING - not enough points to make a line.");
207 
208  fillLineFromSplineFit(positions, momenta);
209 
210  // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
211  m_d->sep->addChild(m_d->collHandle->material());
212  // ^^ FIXME - should rearrange so we don't need to reset material
213 
214  m_d->sep->addChild(m_d->line);
215 }
216 
218  float x = a.x() + (b.x()-a.x())*t;
219  float y = a.y() + (b.y()-a.y())*t;
220  float z = a.z() + (b.z()-a.z())*t;
221  output = Amg::Vector3D(x,y,z);
222 }
223 
225  // DeCasteljau subdivision
226  Amg::Vector3D ab,bc,cd,abbc,bccd;
227  linear(ab, a,b,t); // point between a and b (green)
228  linear(bc, b,c,t); // point between b and c (green)
229  linear(cd, c,d,t); // point between c and d (green)
230  linear(abbc, ab,bc,t); // point between ab and bc (blue)
231  linear(bccd, bc,cd,t); // point between bc and cd (blue)
232  linear(output, abbc,bccd,t); // point on the bezier-curve (black)
233 }
234 
235 void IParticleHandle_Electron::fillLineFromSplineFit(const std::vector<Amg::Vector3D>& positions, const std::vector<Amg::Vector3D>&momenta){
236  int iver(0);
237  unsigned int npointsused(0);
238  // Create new lineset etc
239  m_d->line = new SoLineSet();
240  m_d->line->ref();
241 
242  // For the moment, lets just draw the lines.
243  SoVertexProperty * vertices = new SoVertexProperty();
244 
245  // std::cout<<"About to loop over "<<positions.size()<<" points to make line"<<std::endl;
246  // for (unsigned int i=0; i<positions.size(); ++i){
247  // 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;
248  // }
249 
250  // std::cout<<"Now do interpolations."<<std::endl;
251 
252  bool useExistingParams = m_d->collHandle->collSettingsButton().useExistingParameters();
253 
254  for (unsigned int i=1; i<positions.size(); ++i){
255  // 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;
256 
257  if (useExistingParams){
258  float scale = ( (positions[i]-positions[i-1]).mag() )/3.0; // want to split curve into three parts
259  Amg::Vector3D p0(positions[i-1]); // first position
260  Amg::Vector3D p1(positions[i-1]+(scale * momenta[i-1].unit() ) ); // move 1/3 or the way towards next point, but following momentum direction
261  Amg::Vector3D p2(positions[i] -(scale * momenta[i].unit() ) ); // back 1/3 from second point, but following momentum direction
262  Amg::Vector3D p3(positions[i]);
263  // std::cout<<"p0: ("<<p0[0]<<", "<<p0[1]<<", "<<p0[2]<<") "<<std::endl;
264  // std::cout<<"p1: ("<<p1[0]<<", "<<p1[1]<<", "<<p1[2]<<") "<<std::endl;
265  // std::cout<<"p2: ("<<p2[0]<<", "<<p2[1]<<", "<<p2[2]<<") "<<std::endl;
266  // std::cout<<"p3: ("<<p3[0]<<", "<<p3[1]<<", "<<p3[2]<<") "<<std::endl;
267 
268  unsigned int maxCount=m_d->collHandle->collSettingsButton().numOfStepsForInterpolation();
269  for (unsigned int count=1; count<=maxCount;++count){
270  float t=static_cast<float>(count)/static_cast<float>(maxCount);
272  bezier(pos, p0, p1, p2, p3, t);
273  // std::cout<<"j: "<<count<<" \tat ("<<pos.x()<<","<<pos.y()<<","<<pos.z()<<")"<<std::endl;
274 
275  // pos = pos + momdelta;
276  vertices->vertex.set1Value(iver++,pos.x(),pos.y(),pos.z());
277  m_d->positionsToWrite.append(pos);
278 
279  npointsused++;
280  }
281  } else {
282  vertices->vertex.set1Value(iver++,positions[i].x(),positions[i].y(),positions[i].z());
283  m_d->positionsToWrite.append(positions[i]);
284  npointsused++;
285  }
286  }
287 
288  // Add final point.
289 
290 
291 
292  // Add to SoLine set
293  m_d->line->numVertices.set1Value(0,npointsused);
294  m_d->line->vertexProperty = vertices;
295 
296 }
297 
298 #ifndef BUILDVP1LIGHT
300  VP1Msg::messageVerbose("IParticleHandle_Electron::addLine_Extrapolated().");
301 
302  const Trk::Perigee& peri = m_d->electron->trackParticle()->perigeeParameters(); // FIXME - I'd quite like not to use anything which requires Athena ...
303 
304  Trk::CurvilinearParameters startParameters(peri.position(),peri.momentum(),peri.charge());
306  // ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
309 
310  // we want to extrapolate outwards only for muon tracks
311  if (getNMuonPrecisionLayers()==0 && getNMuonPhiLayers()==0 )
313 
314  // call the extrapolation engine
315  const Trk::IExtrapolationEngine * engine = collHandle()->common()->extrapolator();
316  if (!engine) {
317  VP1Msg::messageVerbose("No extrapolator engine available. Aborting.");
318  return;
319  }
320 
321  std::vector<Amg::Vector3D> positions;
322  std::vector<Amg::Vector3D> momenta;
323 
324  // Add start positions
325  positions.push_back(Amg::Vector3D(peri.position().x(),peri.position().y(),peri.position().z())); // TODO: move to position()?
326  momenta. push_back(Amg::Vector3D(peri.momentum().x(),peri.momentum().y(),peri.momentum().z()));
327 
328 
329  Trk::ExtrapolationCode eCode = engine->extrapolate(ecc);
330 
331  // end the parameters if there
332  if (eCode.isSuccess()){
333  // loop over the collected information
334  for (auto& es : ecc.extrapolationSteps){
335 
336  // continue if we have parameters
337  const Trk::TrackParameters* parameters = es.parameters;
338  if (parameters){
339  // take what you need -> position etc
340 
341  // finally delete the parameters
342  Amg::Vector3D pos = parameters->position();
343  Amg::Vector3D mom = parameters->momentum();
344  positions.push_back(pos);
345  momenta.push_back(mom);
346 
347  delete parameters;
348  }
349  }//
350 
353  positions.push_back(pos);
354  momenta.push_back(mom);
355  // and delete the final parameter
356  delete ecc.endParameters;
357  } else {
358  VP1Msg::messageVerbose("IParticleHandle_Electron::addLine_Extrapolated() - extrapolation failed.");
359  }
360  fillLineFromSplineFit(positions, momenta);
361  // std::cout<<"About to add "<<collHandleTrk->material()<<std::endl;
362  m_d->sep->addChild(m_d->collHandle->material());
363  // ^^ FIXME - should rearrange so we don't need to reset material
364 
365 
366  m_d->sep->addChild(m_d->line);
367 }
368 #endif // BUILDVP1LIGHT
369 
370 //____________________________________________________________________
372 {
373  QStringList l;
374  l << "Electron:";
376  return l;
377 }
378 
379 //____________________________________________________________________
380 #if defined BUILDVP1LIGHT
382  {
383  double phi = m_d->electron->trackParticle()->phi0();
384  double theta = m_d->electron->trackParticle()->theta();
385 
386  // decide the sign of the charge
387  double qop = m_d->electron->trackParticle()->qOverP();
388  // if(qop < 0.)
389  // m_chargeDef->setCharge(-1.);
390  // else
391  // m_chargeDef->setCharge(1.);
392  static constexpr double INVALID_P(10e9);
393  static constexpr double INVALID_QOP(10e-9);
394 
395  // check qoverp is physical
396  double p = 0.;
397  if(qop != 0.)
398  p = fabs(1./qop);
399  else
400  {
401  // qop is unphysical. No momentum measurement.
402  p = INVALID_P;
403  qop = INVALID_QOP;
404  }
405 
407 
408  return mom;
409  }
410 #else
412  {
414  return p.momentum();
415  }
416 #endif // BUILDVP1LIGHT
417 
418 //____________________________________________________________________
419 #if defined BUILDVP1LIGHT
421  {
422  double d0 = m_d->electron->trackParticle()->d0();
423  double z0 = m_d->electron->trackParticle()->z0();
424  double phi = m_d->electron->trackParticle()->phi0();
425 
426  // glopos[Amg::x] = - locpos[Trk::d0]*sin(phi);
427  // glopos[Amg::y] = locpos[Trk::d0]*cos(phi);
428  // glopos[Amg::z] = locpos[Trk::z0];
429 
430 
431  const Amg::Vector3D pos = Amg::Vector3D(- d0*sin(phi), d0*cos(phi), z0);
432 
433  return pos;
434  }
435 #else
437  {
439  return p.position(); // TODO: check what this returns
440  }
441 #endif
442 
443 
444 
445 //____________________________________________________________________
447 {
448  return *(m_d->electron);
449 }
450 
451 //____________________________________________________________________
453 {
454  return m_d->electron->charge();
455 }
456 
457 //____________________________________________________________________
459 {
460  uint8_t num = 0;
462  return num;
463  }
464  // else...
465  VP1Msg::message("IParticleHandle_Electron::getSummaryValue - unable to retrieve the requested enum: "+VP1Msg::str(type));
466  return 999999;
467 }
468 
469 //____________________________________________________________________
471 {
473 }
474 
475 //____________________________________________________________________
477 {
479 }
480 //____________________________________________________________________
482 {
484 }
485 //____________________________________________________________________
487 {
489 }
490 //____________________________________________________________________
492 {
494 }
495 //____________________________________________________________________
497 {
499 
500 }//____________________________________________________________________
502 {
504 }
505 
507 {
508  QString l("|P|="+VP1Msg::str(momentum().mag()/SYSTEM_OF_UNITS::GeV)+" [GeV], ");
510  +"], Muon prec. layers/holes ["+QString::number(getNMuonPrecisionLayers())+"/"+QString::number(getNMuonPrecisionHoleLayers())+"]";
511  return l;
512 }
513 
514 void IParticleHandle_Electron::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->electron->trackParticle()->d0());
522  dParameters+=", ";
523  dParameters+=QString::number(m_d->electron->trackParticle()->z0());
524  dParameters+=", ";
525  dParameters+=QString::number(m_d->electron->trackParticle()->phi0());
526  dParameters+=", ";
527  dParameters+=QString::number(m_d->electron->trackParticle()->theta());
528  dParameters+=", ";
529  dParameters+=QString::number(m_d->electron->trackParticle()->qOverP());
530  dParameters+=")";
531  TSOSitem->setText(1, dParameters );
532 
533  for (unsigned int i=0; i<m_d->electron->trackParticle()->numberOfParameters() ; ++i){
534  QTreeWidgetItem* TSOSitem = new QTreeWidgetItem(browserTreeItem());
535  TSOSitem->setText(0, QString("Parameter "+QString::number( i+1 ) ) );
536  QString pos(", Position = (");
538  pos+=", ";
540  pos+=", ";
542  pos+=")";
543 
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 
571 const QList<std::pair<xAOD::ParameterPosition, Amg::Vector3D> >& IParticleHandle_Electron::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->electron->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()) ) ); // TODO: move to position()?
583 #endif // BUILDVP1LIGHT
584 
585  float x,y,z;
586  for (unsigned int i=0; i<m_d->electron->trackParticle()->numberOfParameters() ; ++i){
590 
592  }
593  VP1Msg::messageVerbose("Electron parametersAndPositions() - returning this many positions : "+VP1Msg::str(m_d->parametersAndPositions.size()) );
594  return m_d->parametersAndPositions;
595 }
596 
597 void IParticleHandle_Electron::dumpToJSON( std::ofstream& str) const {
598  str << "\"chi2\":"<<m_d->electron->trackParticle()->chiSquared () <<", ";
599  str << "\"dof\":" <<m_d->electron->trackParticle()->numberDoF () <<", ";
600  str << "\"dparams\": ["
601  << m_d->electron->trackParticle()->d0() <<", "
602  << m_d->electron->trackParticle()->z0() <<", "
603  << m_d->electron->trackParticle()->phi0() <<", "
604  << m_d->electron->trackParticle()->theta() <<", "
605  << m_d->electron->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 }
IParticleHandle_Electron::getNSCTHits
virtual unsigned getNSCTHits() const
Definition: IParticleHandle_Electron.cxx:476
IParticleCollHandle_Electron.h
Trk::ExtrapolationMode::CollectPassive
@ CollectPassive
Definition: ExtrapolationCell.h:57
IParticleHandle_Electron::has3DObjects
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
Definition: IParticleHandle_Electron.cxx:79
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
xAOD::Electron_v1::charge
float charge() const
Obtain the charge of the object.
IParticleHandle_Electron::Imp::parametersAndPositions
QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > parametersAndPositions
Definition: IParticleHandle_Electron.cxx:51
Trk::ExtrapolationCell::extrapolationSteps
std::vector< ExtrapolationStep< T > > extrapolationSteps
parameters on sensitive detector elements
Definition: ExtrapolationCell.h:292
xAOD::CalorimeterExit
@ CalorimeterExit
Parameter defined at the exit of the calorimeter.
Definition: TrackingPrimitives.h:219
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::numberOfPrecisionHoleLayers
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
Definition: TrackingPrimitives.h:289
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
VP1StdCollection::material
SoMaterial * material() const
Definition: VP1StdCollection.cxx:220
IParticleHandle_Electron::electron
const xAOD::Electron & electron() const
Definition: IParticleHandle_Electron.cxx:75
IParticleHandle_Electron::clicked
virtual QStringList clicked() const
Called when user selects the node (stringlist is displayed in messagebox).
Definition: IParticleHandle_Electron.cxx:371
Trk::ExtrapolationCell::addConfigurationMode
void addConfigurationMode(ExtrapolationMode::eMode em)
add a configuration mode
Definition: ExtrapolationCell.h:345
Trk::InvalidParam::INVALID_P
constexpr double INVALID_P(10e9)
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
xAOD::BeamLine
@ BeamLine
Parameter defined at the Vertex/Beamline.
Definition: TrackingPrimitives.h:211
hist_file_dump.d
d
Definition: hist_file_dump.py:137
VP1Msg.h
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
IParticleHandle_Electron::m_d
Imp * m_d
Definition: IParticleHandle_Electron.h:80
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition: TrackParticle_v1.cxx:736
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
xAOD::TrackParticle_v1::parameterPX
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:612
xAOD::numberOfPhiHoleLayers
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
Definition: TrackingPrimitives.h:291
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
xAOD::TrackParticle_v1::chiSquared
float chiSquared() const
Returns the of the overall track fit.
IParticleCollHandle_Electron
Definition: IParticleCollHandle_Electron.h:26
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AODHandleBase::collHandle
const AODCollHandleBase * collHandle() const
Definition: AODHandleBase.h:55
AODHandleBase::fillObjectBrowser
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
Definition: AODHandleBase.cxx:288
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:55
IParticleHandle_Electron::parametersAndPositions
const QList< std::pair< xAOD::ParameterPosition, Amg::Vector3D > > & parametersAndPositions() const
Definition: IParticleHandle_Electron.cxx:571
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
xAOD::CalorimeterEntrance
@ CalorimeterEntrance
Parameter defined at the entrance to the calorimeter.
Definition: TrackingPrimitives.h:217
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
IParticleHandle_Electron::dumpToJSON
virtual void dumpToJSON(std::ofstream &) const
Definition: IParticleHandle_Electron.cxx:597
ElectronCollectionSettingsButton::parameterMaterial
SoMaterial * parameterMaterial(xAOD::ParameterPosition) const
Definition: ElectronCollectionSettingsButton.cxx:334
xAOD::LastMeasurement
@ LastMeasurement
Parameter defined at the position of the last measurement.
Definition: TrackingPrimitives.h:215
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
Trk::InvalidParam::INVALID_QOP
constexpr double INVALID_QOP(10e-9)
IParticleHandle_Electron::getNPixelHits
virtual unsigned getNPixelHits() const
Definition: IParticleHandle_Electron.cxx:470
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
xAOD::TrackParticle_v1::parameterX
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
Definition: TrackParticle_v1.cxx:597
AODCollHandleBase::common
const AODSysCommonData * common() const
Definition: AODCollHandleBase.h:88
IParticleHandle_Electron::momentum
virtual Amg::Vector3D momentum() const
Definition: IParticleHandle_Electron.cxx:411
ParticleJetTools::p3
Amg::Vector3D p3(const xAOD::TruthVertex *p)
Definition: ParticleJetLabelCommon.cxx:55
IParticleHandle_Electron::nodes
virtual SoNode * nodes()
Returns the 3Dobjects.
Definition: IParticleHandle_Electron.cxx:99
xAOD::TrackParticle_v1::parameterY
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
Definition: TrackParticle_v1.cxx:602
IParticleHandle_Electron::getNMuonPhiHoleLayers
virtual unsigned getNMuonPhiHoleLayers() const
Definition: IParticleHandle_Electron.cxx:501
xAOD::TrackParticle_v1::parameterPY
float parameterPY(unsigned int index) const
Returns the parameter y momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:617
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
xAOD::SummaryType
SummaryType
Enumerates the different types of information stored in Summary.
Definition: TrackingPrimitives.h:228
IParticleHandle_Electron::fillObjectBrowser
void fillObjectBrowser(QList< QTreeWidgetItem * > &listOfItems)
Create and fill the object browser QTreeWidgetItem.
Definition: IParticleHandle_Electron.cxx:514
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
IParticleHandle_Electron::addLine_Extrapolated
void addLine_Extrapolated()
Extrapolate the initial track parameters to get the line (a spline fit is done between the extrapolat...
Definition: IParticleHandle_Electron.cxx:299
AODSysCommonData::extrapolator
const Trk::IExtrapolationEngine * extrapolator() const
Definition: AODSysCommonData.h:55
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
ElectronCollectionSettingsButton::colourParametersByType
bool colourParametersByType() const
Definition: ElectronCollectionSettingsButton.cxx:364
IParticleHandle_Electron::shortInfo
QString shortInfo() const
This returns the information shown about the object in the object browser.
Definition: IParticleHandle_Electron.cxx:506
xAOD::FirstMeasurement
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Definition: TrackingPrimitives.h:213
IParticleHandleBase
Definition: IParticleHandleBase.h:42
Trk::ExtrapolationCode::isSuccess
bool isSuccess() const
return success
Definition: ExtrapolationCell.h:153
Trk::ExtrapolationCode
Definition: ExtrapolationCell.h:105
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Trk::ExtrapolationCell::endParameters
T * endParameters
by pointer - are newly created and can be optionally 0
Definition: ExtrapolationCell.h:238
IParticleHandle_Electron::~IParticleHandle_Electron
virtual ~IParticleHandle_Electron()
Definition: IParticleHandle_Electron.cxx:68
IParticleHandle_Electron::Imp::collHandle
IParticleCollHandle_Electron * collHandle
Definition: IParticleHandle_Electron.cxx:47
Trk::ExtrapolationMode::CollectSensitive
@ CollectSensitive
Definition: ExtrapolationCell.h:56
AODHandleBase::browserTreeItem
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
Definition: AODHandleBase.cxx:311
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
xAOD::TrackParticle_v1::parameterPosition
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:647
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
IParticleHandle_Electron::addParameterShapes
void addParameterShapes()
Definition: IParticleHandle_Electron.cxx:128
IParticleHandle_Electron::iParticle
const xAOD::IParticle & iParticle() const
Definition: IParticleHandle_Electron.cxx:446
IParticleHandle_Electron::fillLineFromSplineFit
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...
Definition: IParticleHandle_Electron.cxx:235
AODSysCommonData.h
IParticleHandleBase::baseInfo
virtual QStringList baseInfo() const
Definition: IParticleHandleBase.cxx:85
IParticleHandle_Electron::type
virtual QString type() const
return very short word with type (maybe link with collection type?)
Definition: IParticleHandle_Electron.h:66
ElectronCollectionSettingsButton::showParameters
bool showParameters() const
Returns the number of steps to use when interpolating between paramters (0 is no interpolation....
Definition: ElectronCollectionSettingsButton.cxx:356
merge.output
output
Definition: merge.py:17
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
IParticleHandle_Electron::getNMuonPrecisionLayers
virtual unsigned getNMuonPrecisionLayers() const
Definition: IParticleHandle_Electron.cxx:486
xAOD::TrackParticle_v1::phi0
float phi0() const
Returns the parameter, which has range to .
Definition: TrackParticle_v1.cxx:158
xAOD::TrackParticle_v1::qOverP
float qOverP() const
Returns the parameter.
IParticleHandle_Electron::IParticleHandle_Electron
IParticleHandle_Electron(IParticleCollHandleBase *, const xAOD::Electron *)
Definition: IParticleHandle_Electron.cxx:57
IParticleHandle_Electron::getNMuonPhiLayers
virtual unsigned getNMuonPhiLayers() const
Definition: IParticleHandle_Electron.cxx:496
IParticleHandle_Electron.h
ElectronCollectionSettingsButton.h
python.selection.number
number
Definition: selection.py:20
IParticleHandle_Electron::linear
void linear(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, float t)
Definition: IParticleHandle_Electron.cxx:217
xAOD::TrackParticle_v1::parameterPZ
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:622
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
IParticleCollHandle_Electron::collSettingsButton
const ElectronCollectionSettingsButton & collSettingsButton() const
Definition: IParticleCollHandle_Electron.cxx:166
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
xAOD::TrackParticle_v1::numberOfParameters
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Definition: TrackParticle_v1.cxx:553
IParticleHandle_Electron::Imp::theclass
IParticleHandle_Electron * theclass
Definition: IParticleHandle_Electron.cxx:45
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IParticleHandle_Electron::charge
virtual double charge() const
Returns unknown() in case of trouble.
Definition: IParticleHandle_Electron.cxx:452
xAOD::Electron_v1
Definition: Electron_v1.h:34
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
IParticleHandle_Electron::position
virtual Amg::Vector3D position() const
Definition: IParticleHandle_Electron.cxx:436
Trk::IExtrapolationEngine::extrapolate
virtual ExtrapolationCode extrapolate(ExCellCharged &ecCharged, const Surface *sf=0, const BoundaryCheck &bcheck=true) const =0
charged extrapolation
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
IParticleHandle_Electron::Imp::positionsToWrite
QList< Amg::Vector3D > positionsToWrite
Definition: IParticleHandle_Electron.cxx:52
Trk::ExtrapolationCell
Definition: ExtrapolationCell.h:231
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
IParticleHandle_Electron::getNTRTHits
virtual unsigned getNTRTHits() const
Definition: IParticleHandle_Electron.cxx:481
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::IExtrapolationEngine
Definition: IExtrapolationEngine.h:36
y
#define y
IParticleHandle_Electron::Imp
Definition: IParticleHandle_Electron.cxx:43
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
IParticleHandle_Electron::Imp::electron
const xAOD::Electron * electron
Definition: IParticleHandle_Electron.cxx:46
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:20
DeMoScan.first
bool first
Definition: DeMoScan.py:534
IParticleHandle_Electron::clear3DObjects
virtual void clear3DObjects()
Delete objects.
Definition: IParticleHandle_Electron.cxx:82
ElectronCollectionSettingsButton::numOfStepsForInterpolation
int numOfStepsForInterpolation() const
Returns true if the propagation should use the parameters already on the particle,...
Definition: ElectronCollectionSettingsButton.cxx:327
IParticleHandle_Electron::Imp::line
SoLineSet * line
Definition: IParticleHandle_Electron.cxx:50
IParticleHandle_Electron::addLine_FromElectron
void addLine_FromElectron()
Make the line, but only using information on the track (a spline fit will be done from the parameters...
Definition: IParticleHandle_Electron.cxx:173
calibdata.cd
cd
Definition: calibdata.py:51
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
xAOD::MuonSpectrometerEntrance
@ MuonSpectrometerEntrance
Parameter defined at the entrance to the Muon Spectrometer.
Definition: TrackingPrimitives.h:221
xAOD::TrackParticle_v1::parameterZ
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
Definition: TrackParticle_v1.cxx:607
xAOD::TrackParticle_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ElectronCollectionSettingsButton::useExistingParameters
bool useExistingParameters() const
Definition: ElectronCollectionSettingsButton.cxx:323
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IParticleHandle_Electron::getNMuonPrecisionHoleLayers
virtual unsigned getNMuonPrecisionHoleLayers() const
Definition: IParticleHandle_Electron.cxx:491
IParticleHandle_Electron::summaryValue
virtual unsigned summaryValue(xAOD::SummaryType type) const
Definition: IParticleHandle_Electron.cxx:458
Trk::ExtrapolationMode::StopAtBoundary
@ StopAtBoundary
Definition: ExtrapolationCell.h:55
IExtrapolationEngine.h
IParticleCollHandleBase
Base class for collections holding AOD objects of iParticle type Handles pt etc cuts Local data:
Definition: IParticleCollHandleBase.h:50
xAOD::numberOfPhiLayers
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
Definition: TrackingPrimitives.h:290
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
python.compressB64.c
def c
Definition: compressB64.py:93
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:25
IParticleHandle_Electron::Imp::sep
SoSeparator * sep
Definition: IParticleHandle_Electron.cxx:49
IParticleHandle_Electron::bezier
void bezier(Amg::Vector3D &output, Amg::Vector3D &a, Amg::Vector3D &b, Amg::Vector3D &c, Amg::Vector3D &d, float t)
Definition: IParticleHandle_Electron.cxx:224
IParticleHandle_Electron
Definition: IParticleHandle_Electron.h:27
xAOD::numberOfPrecisionLayers
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
Definition: TrackingPrimitives.h:288