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 98 of file VP1TrackSystem.cxx.

Member Function Documentation

◆ calcTotalMomentumOfSelectedHandles()

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

Definition at line 657 of file VP1TrackSystem.cxx.

658 {
659  totmom = Amg::Vector3D(0,0,0);
660  totpos = Amg::Vector3D(0,0,0);
661  mass = 0;
662  if (!sel_tracks)
663  return 0;
664  unsigned nused(0);
665  double totenergy(0);
666  for (int i = 0; i < sel_tracks->getList()->getLength(); ++i) {
667  SoFullPath *fPath = static_cast<SoFullPath *>((*(sel_tracks->getList()))[i]);
668  TrackHandleBase * handle = common->trackHandle(fPath?fPath->getTail():nullptr);
669  if (!handle)
670  continue;
671  Amg::Vector3D mom = handle->momentum();
672  if (mom.mag2()==0.0)
673  continue;
674  //Fixme: Get actual position of perigee!!
675  std::optional<Amg::Vector3D> pos = handle->startPoint();
676  if (!pos)
677  continue;
678  ++nused;
679  totmom += mom;
680  totpos += *pos;
681  mass = handle->hasMass() ? handle->mass() : 0;
682  totenergy += sqrt(mom.mag2() + mass*mass);
683  }
684  if (nused>1) {
685  double msq = totenergy*totenergy - totmom.mag2();
686  mass = (msq<0?-1.0:1.0)*sqrt(fabs(msq));
687  totpos /= nused;
688  }
689  return nused;
690 }

◆ createCollections()

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

Definition at line 129 of file VP1TrackSystem.cxx.

129  {
130  QList<TrackCollHandleBase*> l;
131  l << createSpecificCollections<TrackCollHandle_TrkTrack>();
132  l << createSpecificCollections<TrackCollHandle_TrkSegment>();
133  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_FatrasTruthTracks");
134  // l << createSpecificCollections<TrackCollHandle_FatrasTruthTracks>();
135  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TruthTracks");
136  l << createSpecificCollections<TrackCollHandle_TruthTracks>();
137  l << createSpecificCollections<TrackCollHandle_SimulationTracks>();
138  // theclass->messageVerbose("Creating coll handle for TrackCollHandle_TrackParticle");
139  l << createSpecificCollections<TrackCollHandle_TrackParticle>();
140  l << createSpecificCollections<TrackCollHandle_xAODTrackParticle>();
141  // theclass->messageVerbose("Creating coll handle for Muons");
142  // l << createSpecificCollections<TrackCollHandle_Muon>();
143  // l << createSpecificCollections<TrackCollHandle_Egamma>();
144 
145  return l;
146  }

◆ createSpecificCollections()

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

Definition at line 120 of file VP1TrackSystem.cxx.

120  {
121  QList<TrackCollHandleBase*> l;
122  for (QString name : T::availableCollections(theclass)) {
123  T * col = new T(common,name);
124  col->init();
125  l << col;
126  }
127  return l;
128  }

◆ currentUsedIDProjections()

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

Definition at line 766 of file VP1TrackSystem.cxx.

767 {
768  if (common->controller()->collWidget()->visibleStdCollections().isEmpty())
769  return InDetProjFlags::NoDet;
770  if (common->controller()->shownTrackParts() & TrackCommonFlags::InDetProjections)
772  return InDetProjFlags::NoDet;
773 }

Member Data Documentation

◆ ascObjSelManager

AscObjSelectionManager* VP1TrackSystem::Imp::ascObjSelManager = nullptr

Definition at line 103 of file VP1TrackSystem.cxx.

◆ chamberT0s

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

Definition at line 147 of file VP1TrackSystem.cxx.

◆ common

TrackSysCommonData* VP1TrackSystem::Imp::common = nullptr

Definition at line 101 of file VP1TrackSystem.cxx.

◆ lastEmittedUsedIDProjections

InDetProjFlags::DetTypeFlags VP1TrackSystem::Imp::lastEmittedUsedIDProjections

Definition at line 106 of file VP1TrackSystem.cxx.

◆ sel_tracks

SoCooperativeSelection* VP1TrackSystem::Imp::sel_tracks = nullptr

Definition at line 102 of file VP1TrackSystem.cxx.

◆ selectedPRDs

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

Definition at line 114 of file VP1TrackSystem.cxx.

◆ selMode

TrackCommonFlags::SELECTIONMODE VP1TrackSystem::Imp::selMode

Definition at line 104 of file VP1TrackSystem.cxx.

◆ theclass

VP1TrackSystem* VP1TrackSystem::Imp::theclass = nullptr

Definition at line 100 of file VP1TrackSystem.cxx.

◆ totmass

double VP1TrackSystem::Imp::totmass = 0.0

Definition at line 112 of file VP1TrackSystem.cxx.

◆ totmomgev

Amg::Vector3D VP1TrackSystem::Imp::totmomgev

Definition at line 111 of file VP1TrackSystem.cxx.

◆ totmomline

SoLineSet* VP1TrackSystem::Imp::totmomline = nullptr

Definition at line 110 of file VP1TrackSystem.cxx.

◆ totmomsep

SoSeparator* VP1TrackSystem::Imp::totmomsep = nullptr

Definition at line 109 of file VP1TrackSystem.cxx.

◆ vertexMaterialForTrackBases

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

Definition at line 148 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
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
lumiFormat.i
int i
Definition: lumiFormat.py:92
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:102
TrackHandleBase::startPoint
virtual std::optional< Amg::Vector3D > startPoint() const
returns 0 if can't find start point.
Definition: TrackHandleBase.cxx:1570
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:100
TrackHandleBase::mass
virtual double mass() const
Definition: TrackHandleBase.cxx:1501
TrackHandleBase
Definition: TrackHandleBase.h:56
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
common
Definition: common.py:1