ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
VP1TrackSystem::Imp Class Reference
Collaboration diagram for VP1TrackSystem::Imp:

Public Member Functions

InDetProjFlags::DetTypeFlags currentUsedIDProjections () const
 
unsigned calcTotalMomentumOfSelectedHandles (Amg::Vector3D &totmom, Amg::Vector3D &totpos, double &mass) const
 
template<class T >
QList< TrackCollHandleBase * > createSpecificCollections ()
 
QList< TrackCollHandleBase * > createCollections ()
 

Public Attributes

VP1TrackSystemtheclass = nullptr
 
TrackSysCommonDatacommon = nullptr
 
SoCooperativeSelectionsel_tracks = nullptr
 
AscObjSelectionManagerascObjSelManager = nullptr
 
TrackCommonFlags::SELECTIONMODE selMode
 
InDetProjFlags::DetTypeFlags lastEmittedUsedIDProjections
 
SoSeparator * totmomsep = nullptr
 
SoLineSet * totmomline = nullptr
 
Amg::Vector3D totmomgev
 
double totmass = 0.0
 
QList< const Trk::PrepRawData * > selectedPRDs
 
std::vector< std::map< GeoPVConstLink, float > > chamberT0s
 
std::map< const Trk::Track *, SoMaterial * > vertexMaterialForTrackBases
 

Detailed Description

Definition at line 83 of file VP1TrackSystem.cxx.

Member Function Documentation

◆ calcTotalMomentumOfSelectedHandles()

unsigned VP1TrackSystem::Imp::calcTotalMomentumOfSelectedHandles ( Amg::Vector3D totmom,
Amg::Vector3D totpos,
double &  mass 
) const

Definition at line 641 of file VP1TrackSystem.cxx.

642 {
643  totmom = Amg::Vector3D(0,0,0);
644  totpos = Amg::Vector3D(0,0,0);
645  mass = 0;
646  if (!sel_tracks)
647  return 0;
648  unsigned nused(0);
649  double totenergy(0);
650  for (int i = 0; i < sel_tracks->getList()->getLength(); ++i) {
651  SoFullPath *fPath = static_cast<SoFullPath *>((*(sel_tracks->getList()))[i]);
652  TrackHandleBase * handle = common->trackHandle(fPath?fPath->getTail():nullptr);
653  if (!handle)
654  continue;
655  Amg::Vector3D mom = handle->momentum();
656  if (mom.mag2()==0.0)
657  continue;
658  //Fixme: Get actual position of perigee!!
659  std::optional<Amg::Vector3D> pos = handle->startPoint();
660  if (!pos)
661  continue;
662  ++nused;
663  totmom += mom;
664  totpos += *pos;
665  mass = handle->hasMass() ? handle->mass() : 0;
666  totenergy += sqrt(mom.mag2() + mass*mass);
667  }
668  if (nused>1) {
669  double msq = totenergy*totenergy - totmom.mag2();
670  mass = (msq<0?-1.0:1.0)*sqrt(fabs(msq));
671  totpos /= nused;
672  }
673  return nused;
674 }

◆ createCollections()

QList<TrackCollHandleBase*> VP1TrackSystem::Imp::createCollections ( )
inline

Definition at line 115 of file VP1TrackSystem.cxx.

115  {
116  QList<TrackCollHandleBase*> l;
117  l << createSpecificCollections<TrackCollHandle_TrkTrack>();
118  l << createSpecificCollections<TrackCollHandle_TrkSegment>();
119  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_FatrasTruthTracks");
120  // l << createSpecificCollections<TrackCollHandle_FatrasTruthTracks>();
121  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TruthTracks");
122  l << createSpecificCollections<TrackCollHandle_TruthTracks>();
123  l << createSpecificCollections<TrackCollHandle_SimulationTracks>();
124  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TrackParticle");
125  l << createSpecificCollections<TrackCollHandle_TrackParticle>();
126  l << createSpecificCollections<TrackCollHandle_xAODTrackParticle>();
127  theclass->message("Creating coll handle for ACTS TrackContainers");
128  l << createSpecificCollections<TrackCollHandle_TrackContainer>();
129  return l;
130  }

◆ createSpecificCollections()

template<class T >
QList<TrackCollHandleBase*> VP1TrackSystem::Imp::createSpecificCollections ( )
inline

Definition at line 105 of file VP1TrackSystem.cxx.

105  {
106  QList<TrackCollHandleBase*> l;
107  for (const QString& name : T::availableCollections(theclass)) {
108  std::cout<<name.toStdString()<<std::endl;
109  T * col = new T(common,name);
110  col->init();
111  l << col;
112  }
113  return l;
114  }

◆ currentUsedIDProjections()

InDetProjFlags::DetTypeFlags VP1TrackSystem::Imp::currentUsedIDProjections ( ) const

Definition at line 750 of file VP1TrackSystem.cxx.

751 {
752  if (common->controller()->collWidget()->visibleStdCollections().isEmpty())
753  return InDetProjFlags::NoDet;
754  if (common->controller()->shownTrackParts() & TrackCommonFlags::InDetProjections)
756  return InDetProjFlags::NoDet;
757 }

Member Data Documentation

◆ ascObjSelManager

AscObjSelectionManager* VP1TrackSystem::Imp::ascObjSelManager = nullptr

Definition at line 88 of file VP1TrackSystem.cxx.

◆ chamberT0s

std::vector<std::map<GeoPVConstLink, float> > VP1TrackSystem::Imp::chamberT0s

Definition at line 131 of file VP1TrackSystem.cxx.

◆ common

TrackSysCommonData* VP1TrackSystem::Imp::common = nullptr

Definition at line 86 of file VP1TrackSystem.cxx.

◆ lastEmittedUsedIDProjections

InDetProjFlags::DetTypeFlags VP1TrackSystem::Imp::lastEmittedUsedIDProjections

Definition at line 91 of file VP1TrackSystem.cxx.

◆ sel_tracks

SoCooperativeSelection* VP1TrackSystem::Imp::sel_tracks = nullptr

Definition at line 87 of file VP1TrackSystem.cxx.

◆ selectedPRDs

QList<const Trk::PrepRawData*> VP1TrackSystem::Imp::selectedPRDs

Definition at line 99 of file VP1TrackSystem.cxx.

◆ selMode

TrackCommonFlags::SELECTIONMODE VP1TrackSystem::Imp::selMode

Definition at line 89 of file VP1TrackSystem.cxx.

◆ theclass

VP1TrackSystem* VP1TrackSystem::Imp::theclass = nullptr

Definition at line 85 of file VP1TrackSystem.cxx.

◆ totmass

double VP1TrackSystem::Imp::totmass = 0.0

Definition at line 97 of file VP1TrackSystem.cxx.

◆ totmomgev

Amg::Vector3D VP1TrackSystem::Imp::totmomgev

Definition at line 96 of file VP1TrackSystem.cxx.

◆ totmomline

SoLineSet* VP1TrackSystem::Imp::totmomline = nullptr

Definition at line 95 of file VP1TrackSystem.cxx.

◆ totmomsep

SoSeparator* VP1TrackSystem::Imp::totmomsep = nullptr

Definition at line 94 of file VP1TrackSystem.cxx.

◆ vertexMaterialForTrackBases

std::map<const Trk::Track*, SoMaterial*> VP1TrackSystem::Imp::vertexMaterialForTrackBases

Definition at line 132 of file VP1TrackSystem.cxx.


The documentation for this class was generated from the following file:
TrackCommonFlags::InDetProjections
@ InDetProjections
Definition: TrackCommonFlags.h:27
TrackHandleBase::hasMass
bool hasMass() const
Definition: TrackHandleBase.h:100
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrackHandleBase::momentum
virtual Amg::Vector3D momentum() const
Definition: TrackHandleBase.h:83
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
VP1TrackSystem::Imp::sel_tracks
SoCooperativeSelection * sel_tracks
Definition: VP1TrackSystem.cxx:87
TrackHandleBase::startPoint
virtual std::optional< Amg::Vector3D > startPoint() const
returns 0 if can't find start point.
Definition: TrackHandleBase.cxx:1587
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetProjFlags::TRT_all
@ TRT_all
Definition: InDetProjFlags.h:43
query_example.col
col
Definition: query_example.py:7
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetProjFlags::NoDet
@ NoDet
Definition: InDetProjFlags.h:28
VP1TrackSystem::Imp::theclass
VP1TrackSystem * theclass
Definition: VP1TrackSystem.cxx:85
TrackHandleBase::mass
virtual double mass() const
Definition: TrackHandleBase.cxx:1518
TrackHandleBase
Definition: TrackHandleBase.h:56
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
common
Definition: common.py:1