ATLAS Offline Software
Loading...
Searching...
No Matches
TrackCollHandle_TruthTracks Class Reference

#include <TrackCollHandle_TruthTracks.h>

Inheritance diagram for TrackCollHandle_TruthTracks:
Collaboration diagram for TrackCollHandle_TruthTracks:

Classes

class  Imp

Public Types

enum  COLOURBY {
  COLOUR_PERCOLLECTION , COLOUR_RANDOM , COLOUR_BYPID , COLOUR_MOMENTUM ,
  COLOUR_CHARGE , COLOUR_DISTANCE , COLOUR_VERTEX
}

Public Slots

void rerandomiseRandomTrackColours ()
void trackSelectionChanged ()
void setShownTSOSParts (TrackCommonFlags::TSOSPartsFlags)
void setLabels (TrackSystemController::TrackLabelModes)
void setLabelTrkOffset (float)
void setLabelPosOffsets (const QList< int > &)
void setCustomColouredTSOSParts (TrackCommonFlags::TSOSPartsFlags)
void setUseShortTRTMeasurements (bool)
void setUseShortMDTMeasurements (bool)
void setDrawMeasGlobalPositions (bool)
void setMeasurementsShorttubesScale (double)
void setNStdDevForParamErrors (const double &)
void setNumberOfPointsOnCircles (int)
void setMaterialEffectsOnTrackScale (double)
void setParTubeErrorsDrawCylinders (bool)
void setRequiredNHits (const QList< unsigned > &)
void setRequiredDetectorElement (const QString &id)
void setOnlyVertexAssocTracks (bool)
void extrapolateToThisVolumeChanged (void)
void clipVolumeChanged (double)
void setVisible (bool)
void possibleChangeMatTranspOrBrightness ()

Signals

void visibilityChanged (bool)

Public Member Functions

 TrackCollHandle_TruthTracks (TrackSysCommonData *, const QString &name)
virtual ~TrackCollHandle_TruthTracks ()
virtual void setupSettingsFromControllerSpecific (TrackSystemController *)
virtual void init (VP1MaterialButtonBase *matBut=0)
void setupSettingsFromController (TrackSystemController *)
const QString & name () const
TrackSysCommonDatacommon () const
VP1ExtraSepLayerHelpersephelper () const
virtual bool canUsePropagator ()
double trackTubeRadius () const
virtual bool mightHaveSubSystemHitInfo () const
virtual QByteArray persistifiableState () const
 Provide specific implementation.
virtual void setState (const QByteArray &)
 Provide specific implementation.
void recheckCutStatusOfAllVisibleHandles ()
void recheckCutStatusOfAllNotVisibleHandles ()
void recheckCutStatusOfAllHandles ()
void update3DObjectsOfAllHandles (bool onlythosetouchingmuonchambers=false, bool invalidatePropagatedPoints=false, float maxR=0.0)
void updateMaterialOfAllHandles ()
void updateInDetProjectionsOfAllHandles ()
void updateMuonProjectionsOfAllHandles ()
int nShownHandles ()
void incrementNShownHandles ()
void decrementNShownHandles ()
virtual bool mayHaveAssociatedObjects () const
Trk::IExtrapolatorpropagator () const
TrackSystemController::PropagationOptionFlags propagationOptions ()
bool ignoreMEOTinProp () const
bool extendTracks () const
TrackCommonFlags::TrackPartsFlags parts () const
COLOURBY colourBy () const
virtual bool allowColourByMomentum () const
virtual bool allowColourByCharge () const
virtual bool allowColourByDistanceFromSelectedTrack () const
virtual bool allowColourByVertex () const
virtual void collMaterialTransparencyAndBrightnessChanged ()
bool useDefaultCuts () const
 Return true if this collection uses the default (i.e.
bool cutOnlyVertexAssocTracks () const
 Return true if this collection should only should tracks associated to a vertex.
VP1Interval cutAllowedPt () const
VP1Interval cutAllowedEta () const
QList< VP1IntervalcutAllowedPhi () const
QList< unsigned > cutRequiredNHits () const
void vertexCutsAllowed (bool)
bool cutTruthFromIROnly () const
bool cutExcludeBarcodeZero () const
bool cutTruthExcludeNeutrals () const
bool visible () const
bool isLoaded () const
bool problemsLoading () const
QString text () const
SoSwitch * collSwitch () const
 Add this somewhere in your scenegraph (do not add any children here!)
SoSeparator * collSep () const
 All 3D objects from this coll.
SoMaterial * material () const
double collMaterialTransparency () const
double collMaterialBrightness () const
virtual void largeChangesBegin ()
virtual void largeChangesEnd ()
qint32 collTypeID () const
QByteArray persistifiableID () const
QString section () const
QString sectionToolTip () const
virtual QList< QWidget * > widgetsForGuiRow () const
void setSystemBasePointer (IVP1System *sys)
void message (const QString &) const
void message (const QStringList &, const QString &addtoend="") const
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &) const
void messageDebug (const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &) const
void messageVerbose (const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
IVP1SystemsystemBase () const
const QString & helperClassName () const

Static Public Member Functions

static QStringList availableCollections (IVP1System *)
static QString toString (const COLOURBY &)
static VP1CollStates getStates (const QList< VP1Collection * > &)
static void applyStates (const QList< VP1Collection * > &, const VP1CollStates &)
static void updateStates (VP1CollStates &state, const VP1CollStates &newInfo)
template<class T>
static QList< VP1Collection * > toBaseCollList (const QList< T * > &)
static bool verbose ()
static void warnUndeletedInstances ()
static QString str (const QString &s)
static QString str (const char *c)
static QString str (const bool b)
static QString str (const QColor &)
static QString str (const SbColor &)
static QString str (const VP1Interval &)
static QString str (const SbVec2d &)
static QString str (const SbVec2f &)
static QString str (const SbVec2s &)
static QString str (const SbVec3d &)
static QString str (const SbVec3f &)
static QString str (const SbVec3s &)
static QString str (const SbVec4d &)
static QString str (const SbVec4f &)
static QString str (short int n)
static QString str (unsigned short int n)
static QString str (long n)
static QString str (ulong n)
static QString str (int n)
static QString str (uint n)
static QString str (qlonglong n)
static QString str (qulonglong n)
static QString str (const double &d)
static QString str (const float &f)
static QString str (const void *)
template<class T>
static QString str (const T *t)
template<class T>
static QString str (const QFlags< T > &f)
template<class T>
static QString str (const HepGeom::BasicVector3D< T > &t)
static QString str (const Amg::Vector3D &t)
template<class T>
static QString str (const QList< T > &t)

Protected Member Functions

virtual COLOURBY defaultColourBy () const
virtual bool allowColourByPID () const
virtual bool load ()
virtual bool cut (TrackHandleBase *)
virtual QColor defaultColor () const
void hintNumberOfTracksInEvent (unsigned)
void addTrackHandle (TrackHandleBase *)
void trackHandleIterationBegin ()
TrackHandleBasegetNextTrackHandle ()
template<class T>
void cleanupPtrContainer (T &) const
void recheckCutStatus (TrackHandleBase *)
qint32 provideCollTypeID () const
virtual QString provideSection () const
virtual QString provideSectionToolTip () const
virtual QString provideText () const
virtual void assignDefaultMaterial (SoMaterial *) const
QList< QWidget * > provideExtraWidgetsForGuiRow () const
QByteArray extraWidgetsState () const
void setExtraWidgetsState (const QByteArray &)
QList< QWidget * > provideWidgetsForGuiRow () const
virtual QString checkBoxToolTip () const
virtual QString matButtonToolTip () const
virtual QByteArray providePersistifiableID () const
void setHelperClassName (const QString &n)

Private Slots

void setCutFromIROnly (bool)
void setCutExcludeBarcodeZero (bool)
void setCutExcludeNeutrals (bool)
void setShowAscObjs (bool)
void colourByComboBoxItemChanged ()
void collVisibilityChanged (bool)
void setPropagator (Trk::IExtrapolator *)
void setPropagationOptions (TrackSystemController::PropagationOptionFlags)
void setPropMaxRadius (float)
void setParts (TrackCommonFlags::TrackPartsFlags)
void setParts (int)
void setTrackTubeRadius (const double &)
void setColourBy (COLOURBY)
void setUseDefaultCuts (bool)
void setCutAllowedPt (const VP1Interval &)
void setCutAllowedEta (const VP1Interval &)
void setCutAllowedPhi (const QList< VP1Interval > &)
void setActualPathShown (bool)

Private Member Functions

void fixPDGCode (SimHitHandleBase *) const
void actualSetShownTSOSPartsOnHandles ()
void actualSetCustomColouredTSOSPartsOnHandles ()
void fillObjectBrowser ()
void updateObjectBrowserVisibilityCounts ()

Private Attributes

Impm_d
int m_nshownhandles
TrackType::Type m_type
TrackSysCommonDatam_commonData
VP1ExtraSepLayerHelperm_sephelper
Trk::IExtrapolatorm_propagator
TrackSystemController::PropagationOptionFlags m_propagationOptions
float m_propMaxRadius
TrackCommonFlags::TrackPartsFlags m_parts
TrackSystemController::TrackLabelModes m_labels
float m_labelsTrkOffset
QList< int > m_labelsPosOffsets
double m_trackTubeRadius
COLOURBY m_colourby
VP1Interval m_cut_allowedPtSq
VP1Interval m_cut_allowedEta
QList< VP1Intervalm_cut_allowedPhi
QList< unsigned > m_cut_requiredNHits
QString m_requiredDetectorElement
bool m_cut_pt_allowall
bool m_cut_eta_allowall
bool m_cut_phi_allowall
bool m_cut_etaptphi_allwillfail
QString m_helpername
IVP1Systemm_system

Static Private Attributes

static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")

Detailed Description

Definition at line 25 of file TrackCollHandle_TruthTracks.h.

Member Enumeration Documentation

◆ COLOURBY

Enumerator
COLOUR_PERCOLLECTION 
COLOUR_RANDOM 
COLOUR_BYPID 
COLOUR_MOMENTUM 
COLOUR_CHARGE 
COLOUR_DISTANCE 
COLOUR_VERTEX 

Definition at line 138 of file TrackCollHandleBase.h.

Constructor & Destructor Documentation

◆ TrackCollHandle_TruthTracks()

TrackCollHandle_TruthTracks::TrackCollHandle_TruthTracks ( TrackSysCommonData * cd,
const QString & name )

Definition at line 159 of file TrackCollHandle_TruthTracks.cxx.

162{
163 setHelperClassName("TrackCollHandle_TruthTracks");
164 m_d->theclass = this;
165 m_d->updateGUICounter = 0;
166 m_d->cut_fromIROnly = true;
167 m_d->cut_excludeBarcodeZero = true;
168 m_d->cut_excludeNeutrals = true;
169 m_d->displayAscObjs = false;
170}
const QString & name() const
TrackCollHandleBase(TrackSysCommonData *, const QString &name, TrackType::Type)
void setHelperClassName(const QString &n)

◆ ~TrackCollHandle_TruthTracks()

TrackCollHandle_TruthTracks::~TrackCollHandle_TruthTracks ( )
virtual

Definition at line 173 of file TrackCollHandle_TruthTracks.cxx.

174{
175 delete m_d;
176}

Member Function Documentation

◆ actualSetCustomColouredTSOSPartsOnHandles()

void TrackCollHandleBase::actualSetCustomColouredTSOSPartsOnHandles ( )
privateinherited

Definition at line 888 of file TrackCollHandleBase.cxx.

889{
892 TrackHandleBase* handle;
893 while ((handle=getNextTrackHandle()))
894 handle->setCustomColouredTSOSParts(m_d->customColouredTSOSParts);
896}
TrackHandleBase * getNextTrackHandle()
void setCustomColouredTSOSParts(TrackCommonFlags::TSOSPartsFlags f)
virtual void largeChangesEnd()
virtual void largeChangesBegin()

◆ actualSetShownTSOSPartsOnHandles()

void TrackCollHandleBase::actualSetShownTSOSPartsOnHandles ( )
privateinherited

Definition at line 899 of file TrackCollHandleBase.cxx.

900{
903 TrackHandleBase* handle;
904 while ((handle=getNextTrackHandle()))
905 handle->setShownTSOSParts(m_d->shownTSOSParts);
907
908 fillObjectBrowser(); // FIXME! Probably not the right place to call this
909}
void setShownTSOSParts(TrackCommonFlags::TSOSPartsFlags f)

◆ addTrackHandle()

void TrackCollHandleBase::addTrackHandle ( TrackHandleBase * handle)
protectedinherited

Definition at line 515 of file TrackCollHandleBase.cxx.

516{
517 m_d->trackhandles.push_back(handle);
518}

◆ allowColourByCharge()

virtual bool TrackCollHandleBase::allowColourByCharge ( ) const
inlinevirtualinherited

Reimplemented in TrackCollHandle_TrkSegment.

Definition at line 146 of file TrackCollHandleBase.h.

146{ return true; }

◆ allowColourByDistanceFromSelectedTrack()

virtual bool TrackCollHandleBase::allowColourByDistanceFromSelectedTrack ( ) const
inlinevirtualinherited

Definition at line 147 of file TrackCollHandleBase.h.

147{return VP1QtUtils::environmentVariableIsOn("VP1_TRKSYS_COLOURBYDIST"); }
static bool environmentVariableIsOn(const QString &name)

◆ allowColourByMomentum()

virtual bool TrackCollHandleBase::allowColourByMomentum ( ) const
inlinevirtualinherited

Reimplemented in TrackCollHandle_TrkSegment.

Definition at line 145 of file TrackCollHandleBase.h.

145{ return true; }

◆ allowColourByPID()

virtual bool TrackCollHandle_TruthTracks::allowColourByPID ( ) const
inlineprotectedvirtual

Reimplemented from TrackCollHandleBase.

Definition at line 41 of file TrackCollHandle_TruthTracks.h.

41{ return true; }

◆ allowColourByVertex()

virtual bool TrackCollHandleBase::allowColourByVertex ( ) const
inlinevirtualinherited

Reimplemented in TrackCollHandle_TrkTrack.

Definition at line 148 of file TrackCollHandleBase.h.

148{ return false; }

◆ applyStates()

void VP1Collection::applyStates ( const QList< VP1Collection * > & cols,
const VP1CollStates & states )
staticinherited

Definition at line 108 of file VP1Collection.cxx.

109{
110 VP1Msg::messageDebug("VP1Collection::applyStates() - start...");
111 for (VP1Collection* col : cols)
112 if (states.contains(col->persistifiableID()))
113 col->setState(states.value(col->persistifiableID()));
114 VP1Msg::messageDebug("VP1Collection::applyStates() - end.");
115}
VP1Collection(IVP1System *sys=0, const QString &helperClassName="VP1Collection")
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39

◆ assignDefaultMaterial()

void TrackCollHandleBase::assignDefaultMaterial ( SoMaterial * m) const
protectedvirtualinherited

Implements VP1StdCollection.

Definition at line 1154 of file TrackCollHandleBase.cxx.

1155{
1156 VP1QtInventorUtils::setMatColor( m, defaultColor(), 0.18/*brightness*/ );
1157}
virtual QColor defaultColor() const =0
static void setMatColor(SoMaterial *, const double &r, const double &g, const double &b, const double &brightness=0.0, const double &transp=0.0)

◆ availableCollections()

QStringList TrackCollHandle_TruthTracks::availableCollections ( IVP1System * sys)
static

Definition at line 113 of file TrackCollHandle_TruthTracks.cxx.

114{
115 QStringList l;
116 VP1SGContentsHelper sgcont(sys);
117
118 QStringList mcevent_keys = sgcont.getKeys<McEventCollection>();
119 QStringList trackrecord_keys = sgcont.getKeys<TrackRecordCollection>();
120
121 QStringList keys_siliconhits, keys_trthits, keys_mdthits,
122 keys_rpchits, keys_tgchits, keys_cschits;
123
125 keys_siliconhits = sgcont.getKeys<SiHitCollection>();//"PixelHits" and "SCT_Hits"
127 keys_trthits = sgcont.getKeys<TRTUncompressedHitCollection>();//"TRTUncompressedHits"
128 if (false&&/*fixme!!*/VP1JobConfigInfo::hasMuonGeometry()) {
129 keys_mdthits = sgcont.getKeys<MDTSimHitCollection>();
130 keys_rpchits = sgcont.getKeys<RPCSimHitCollection>();
131 keys_tgchits = sgcont.getKeys<TGCSimHitCollection>();
132 keys_cschits = sgcont.getKeys<CSCSimHitCollection>();
133 }
134
135 bool extrainfo = ! ( keys_siliconhits.empty() && keys_trthits.empty()
136 && keys_mdthits.empty() && keys_rpchits.empty()
137 && keys_tgchits.empty() && keys_cschits.empty()
138 && trackrecord_keys.empty() );
139
140 if (extrainfo&&mcevent_keys.empty()) {
142 return l;
143 }
144
145 for (const QString& mcevent_key : mcevent_keys) {
146 l << mcevent_key;
147 if (extrainfo)
148 l << mcevent_key + Imp::nameHepMCAugmentedEnd;
149 }
150
151 //Fixme: REMOVE THIS (only for testing!!):
152 if (extrainfo)
154
155 return l;
156}
AtlasHitsVector< CSCSimHit > CSCSimHitCollection
AtlasHitsVector< MDTSimHit > MDTSimHitCollection
AtlasHitsVector< RPCSimHit > RPCSimHitCollection
AtlasHitsVector< SiHit > SiHitCollection
AtlasHitsVector< TGCSimHit > TGCSimHitCollection
AtlasHitsVector< TRTUncompressedHit > TRTUncompressedHitCollection
AtlasHitsVector< TrackRecord > TrackRecordCollection
static bool hasTRTGeometry()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasMuonGeometry()
l
Printing final latex table to .tex output file.

◆ canUsePropagator()

virtual bool TrackCollHandleBase::canUsePropagator ( )
inlinevirtualinherited

Definition at line 83 of file TrackCollHandleBase.h.

83{ return true; }

◆ checkBoxToolTip()

virtual QString VP1StdCollection::checkBoxToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented in VP1MissingEtCaloHandle, VP1MissingEtHandle, and VP1MissingEtTruthHandle.

Definition at line 76 of file VP1StdCollection.h.

76{ return "Collection "+text(); }
QString text() const

◆ cleanupPtrContainer()

template<class T>
void TrackCollHandleBase::cleanupPtrContainer ( T & t) const
protectedinherited

Definition at line 254 of file TrackCollHandleBase.h.

255{
256 typename T::iterator it(t.begin()), itE(t.end());
257 for (;it!=itE;++it)
258 delete *it;
259 t.clear();
260}

◆ clipVolumeChanged

void TrackCollHandleBase::clipVolumeChanged ( double radius)
slotinherited

Definition at line 552 of file TrackCollHandleBase.cxx.

552 {
553 messageVerbose("clipVolumeChanged ==> Changed");
554 update3DObjectsOfAllHandles(false, false, radius);
555}
void update3DObjectsOfAllHandles(bool onlythosetouchingmuonchambers=false, bool invalidatePropagatedPoints=false, float maxR=0.0)
void messageVerbose(const QString &) const

◆ collMaterialBrightness()

double VP1StdCollection::collMaterialBrightness ( ) const
inherited

Definition at line 342 of file VP1StdCollection.cxx.

343{
344 return m_d->lastMatBrightness;
345}

◆ collMaterialTransparency()

double VP1StdCollection::collMaterialTransparency ( ) const
inherited

Definition at line 336 of file VP1StdCollection.cxx.

337{
338 return m_d->lastMatTransparency;
339}

◆ collMaterialTransparencyAndBrightnessChanged()

void TrackCollHandleBase::collMaterialTransparencyAndBrightnessChanged ( )
virtualinherited

Reimplemented from VP1StdCollection.

Definition at line 1220 of file TrackCollHandleBase.cxx.

1221{
1222 messageVerbose("Collection colour changed");
1223
1224 if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByRandom()) {
1227 TrackHandleBase* handle;
1228 while ((handle=getNextTrackHandle()))
1231 } else {
1233 }
1234}
static QString comboBoxEntry_ColourByRandom()
void updateRandomColourTransparencyAndBrightness()

◆ collSep()

SoSeparator * VP1StdCollection::collSep ( ) const
inherited

All 3D objects from this coll.

belongs under here.

Definition at line 212 of file VP1StdCollection.cxx.

213{
214 if (!m_d->collsep)
215 message("ERROR: collSep() called before init()");
216 return m_d->collsep;
217}
void message(const QString &) const

◆ collSwitch()

SoSwitch * VP1StdCollection::collSwitch ( ) const
inherited

Add this somewhere in your scenegraph (do not add any children here!)

Definition at line 204 of file VP1StdCollection.cxx.

205{
206 if (!m_d->theswitch)
207 message("ERROR: collSwitch() called before init()");
208 return m_d->theswitch;
209}

◆ collTypeID()

qint32 VP1StdCollection::collTypeID ( ) const
inherited

Definition at line 315 of file VP1StdCollection.cxx.

316{
317 if (!m_d->idProvided) {
318 m_d->idProvided = true;
319 m_d->id = provideCollTypeID();
320 }
321 return m_d->id;
322}
virtual qint32 provideCollTypeID() const

◆ collVisibilityChanged

void TrackCollHandleBase::collVisibilityChanged ( bool vis)
privateslotinherited

Definition at line 1055 of file TrackCollHandleBase.cxx.

1056{
1057 if (!m_sephelper)
1058 m_sephelper = new VP1ExtraSepLayerHelper(collSep());
1059
1060 if (VP1Msg::verbose())
1061 messageVerbose("TrackCollHandleBase::collVisibilityChanged => "+str(vis));
1062 if (vis){
1063 recheckCutStatusOfAllNotVisibleHandles();//Fixme -> ofallhandles? All must be not visible anyway...
1065 if (m_d->objBrowseTree) m_d->objBrowseTree->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); // selectable, enabled
1066 }else{
1068// QTreeWidget* trkObjBrowser = common()->controller()->trackObjBrowser();
1069// if (m_d->objBrowseTree && trkObjBrowser) {
1070// trkObjBrowser->takeTopLevelItem(trkObjBrowser->indexOfTopLevelItem(m_d->objBrowseTree));
1071// delete m_d->objBrowseTree; m_d->objBrowseTree=0;
1072// }
1073 // FIXME - need to loop through handles setting pointers to deleted QTreeWidgetItems
1074 if (m_d->objBrowseTree) m_d->objBrowseTree->setFlags(Qt::ItemFlags()); // not selectable, not enabled
1075 }
1078}
VP1ExtraSepLayerHelper * m_sephelper
static bool verbose()
Definition VP1Msg.h:31
SoSeparator * collSep() const
All 3D objects from this coll.
static QString str(const QString &s)
Definition VP1String.h:49

◆ colourBy()

COLOURBY TrackCollHandleBase::colourBy ( ) const
inlineinherited

Definition at line 141 of file TrackCollHandleBase.h.

141{ return m_colourby; }

◆ colourByComboBoxItemChanged

void TrackCollHandleBase::colourByComboBoxItemChanged ( )
privateslotinherited

Definition at line 1200 of file TrackCollHandleBase.cxx.

1201{
1202 messageVerbose("Collection detail level combo box changed index");
1203 if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByPID())
1205 else if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByRandom())
1207 else if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByMomentum())
1209 else if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByCharge())
1211 else if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByDistanceFromSelectedTrack())
1213 else if (m_d->comboBox_colourby->currentText()==Imp::comboBoxEntry_ColourByVertex())
1215 else
1217}
static QString comboBoxEntry_ColourByDistanceFromSelectedTrack()
static QString comboBoxEntry_ColourByVertex()
static QString comboBoxEntry_ColourByMomentum()
static QString comboBoxEntry_ColourByCharge()
static QString comboBoxEntry_ColourByPID()

◆ common()

TrackSysCommonData * TrackCollHandleBase::common ( ) const
inlineinherited

Definition at line 79 of file TrackCollHandleBase.h.

79{ return m_commonData; }
TrackSysCommonData * m_commonData

◆ cut()

bool TrackCollHandle_TruthTracks::cut ( TrackHandleBase * handle)
protectedvirtual

Reimplemented from TrackCollHandleBase.

Definition at line 484 of file TrackCollHandle_TruthTracks.cxx.

485{
486 if (!TrackCollHandleBase::cut(handle))
487 return false;
488
489 if (m_d->cut_excludeNeutrals && handle->hasCharge() && handle->charge()==0.0)
490 return false;
491
492 TrackHandle_TruthTrack * truthhandle = static_cast<TrackHandle_TruthTrack *>(handle);
493 if (m_d->cut_excludeBarcodeZero && truthhandle->hasBarCodeZero())
494 return false;
495
496 if (m_d->cut_fromIROnly && ! truthhandle->hasVertexAtIR(2.8*CLHEP::cm*2.8*CLHEP::cm,50*CLHEP::cm))
497 return false;
498
499 return true;
500}
virtual bool cut(TrackHandleBase *)
double charge() const
bool hasCharge() const
bool hasVertexAtIR(const double &rmaxsq, const double &zmax) const

◆ cutAllowedEta()

VP1Interval TrackCollHandleBase::cutAllowedEta ( ) const
inherited

◆ cutAllowedPhi()

QList< VP1Interval > TrackCollHandleBase::cutAllowedPhi ( ) const
inherited

◆ cutAllowedPt()

VP1Interval TrackCollHandleBase::cutAllowedPt ( ) const
inherited

◆ cutExcludeBarcodeZero()

bool TrackCollHandleBase::cutExcludeBarcodeZero ( ) const
inherited

◆ cutOnlyVertexAssocTracks()

bool TrackCollHandleBase::cutOnlyVertexAssocTracks ( ) const
inherited

Return true if this collection should only should tracks associated to a vertex.

Definition at line 1245 of file TrackCollHandleBase.cxx.

1246{
1247 if (!m_d->matButton) {
1248 message("ERROR: cutOnlyVertexAssocTracks(..) called before init()");
1249 return false;
1250 }
1251 if (m_d->matButton->useDefaultCuts()) return common()->controller()->cutOnlyVertexAssocTracks();
1252 return m_d->matButton->cutOnlyVertexAssocTracks();
1253}
TrackSysCommonData * common() const
TrackSystemController * controller() const

◆ cutRequiredNHits()

QList< unsigned > TrackCollHandleBase::cutRequiredNHits ( ) const
inherited

◆ cutTruthExcludeNeutrals()

bool TrackCollHandleBase::cutTruthExcludeNeutrals ( ) const
inherited

◆ cutTruthFromIROnly()

bool TrackCollHandleBase::cutTruthFromIROnly ( ) const
inherited

◆ decrementNShownHandles()

void TrackCollHandleBase::decrementNShownHandles ( )
inlineinherited

Definition at line 126 of file TrackCollHandleBase.h.

◆ defaultColor()

virtual QColor TrackCollHandle_TruthTracks::defaultColor ( ) const
inlineprotectedvirtual

Implements TrackCollHandleBase.

Definition at line 44 of file TrackCollHandle_TruthTracks.h.

44{ return QColor::fromRgbF(0.42f, 0.96f, 0.16f); }

◆ defaultColourBy()

virtual COLOURBY TrackCollHandle_TruthTracks::defaultColourBy ( ) const
inlineprotectedvirtual

Reimplemented from TrackCollHandleBase.

Definition at line 40 of file TrackCollHandle_TruthTracks.h.

40{ return COLOUR_BYPID; }

◆ extendTracks()

bool TrackCollHandleBase::extendTracks ( ) const
inlineinherited

Definition at line 135 of file TrackCollHandleBase.h.

TrackSystemController::PropagationOptionFlags m_propagationOptions

◆ extrapolateToThisVolumeChanged

void TrackCollHandleBase::extrapolateToThisVolumeChanged ( void )
slotinherited

Definition at line 547 of file TrackCollHandleBase.cxx.

547 {
548 messageVerbose("extrapolateToThisVolume ==> Changed");
549 update3DObjectsOfAllHandles(false,true);
550}

◆ extraWidgetsState()

QByteArray TrackCollHandleBase::extraWidgetsState ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 1180 of file TrackCollHandleBase.cxx.

1181{
1182 VP1Serialise serialise(0/*version*/,systemBase());
1183 serialise.save(m_d->comboBox_colourby);
1184 serialise.disableUnsavedChecks();
1185 return serialise.result();
1186}
IVP1System * systemBase() const
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors

◆ fillObjectBrowser()

void TrackCollHandleBase::fillObjectBrowser ( )
privateinherited

Definition at line 1092 of file TrackCollHandleBase.cxx.

1093{
1094 QElapsedTimer t;
1095 t.start();
1096
1097 QTreeWidget* trkObjBrowser = common()->controller()->trackObjBrowser();
1098 if (!trkObjBrowser) {
1099 messageVerbose("TrackCollHandleBase::fillObjectBrowser: no common()->controller()->trackObjBrowser(). Aborting");
1100 return;
1101 }
1102 if (!nShownHandles()) {
1103 //messageVerbose("TrackCollHandleBase::fillObjectBrowser: no shown handles, so leaving.");
1104 return; // don't bother with hidden collection
1105 }
1106 messageVerbose("TrackCollHandleBase::fillObjectBrowser called for "+name());
1107
1108 trkObjBrowser->setUpdatesEnabled(false);
1109
1110 bool firstTime=false;
1111 if (!m_d->objBrowseTree) {
1112 m_d->objBrowseTree = new QTreeWidgetItem(0);
1113 firstTime=true;
1114 messageVerbose("TrackCollHandleBase::fillObjectBrowser: First time so creating QTreeWidgetItem.");
1115 } else {
1116 int index = trkObjBrowser->indexOfTopLevelItem(m_d->objBrowseTree);
1117 if (index==-1 ) {
1118 messageVerbose("Missing from WidgetTree! Will continue but something must be wrong");
1119 }
1120 }
1121
1122 messageVerbose("TrackCollHandleBase::fillObjectBrowser about to start looping over tracks at "+QString::number(t.elapsed())+" ms");
1123
1124 QList<QTreeWidgetItem *> list;
1126 TrackHandleBase* trkHandle=nullptr;
1127 unsigned int i=0;
1128 unsigned int numVisible=0;
1129 while ((trkHandle=getNextTrackHandle()))
1130 {
1131 if (firstTime){
1132 trkHandle->fillObjectBrowser(list);
1133 } else {
1134 trkHandle->updateObjectBrowser();
1135 }
1136
1137 if (trkHandle->visible() ) numVisible++;
1138 i++;
1139 }
1140
1141 QString text(QString(": (")+QString::number(numVisible)+QString("/")+QString::number(i)+QString(") visible"));
1142
1143 m_d->objBrowseTree->setText(0, name());
1144 m_d->objBrowseTree->setText(1, text);
1145 m_d->objBrowseTree->addChildren(list);
1146 trkObjBrowser->addTopLevelItem(m_d->objBrowseTree);
1147 trkObjBrowser->setUpdatesEnabled(true);
1148
1149 messageVerbose("TrackCollHandleBase::fillObjectBrowser completed in "+QString::number(t.elapsed())+" ms");
1150
1151}
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Called in child classes.
virtual void updateObjectBrowser()
bool visible() const
QTreeWidget * trackObjBrowser() const
Returns a pointer to the Track Object Browser (if it exists)
str index
Definition DeMoScan.py:362
list(name, path='/')
Definition histSizes.py:38

◆ fixPDGCode()

void TrackCollHandle_TruthTracks::fixPDGCode ( SimHitHandleBase * handle) const
private

Definition at line 298 of file TrackCollHandle_TruthTracks.cxx.

299{
300 int pdgfromsimhit =handle->actualPDGCodeFromSimHit();
301 bool isNonUniqueSecondary = handle->simBarCode().isNonUniqueSecondary();
302 SimBarCode::ExtBarCode extBarCode = handle->simBarCode().extBarCode();
303
304 if (pdgfromsimhit!=SimBarCode::unknownPDG) {
305 handle->setPDG(handle->actualPDGCodeFromSimHit());
306 std::map<SimBarCode::ExtBarCode,int>::const_iterator it = m_d->extBarCode2pdg.find(extBarCode);
307 if ( !isNonUniqueSecondary && it==m_d->extBarCode2pdg.end())
308 m_d->extBarCode2pdg[extBarCode] = pdgfromsimhit;
309 return;
310 }
311 if (isNonUniqueSecondary)
312 return;
313 std::map<SimBarCode::ExtBarCode,int>::const_iterator it = m_d->extBarCode2pdg.find(extBarCode);
314 if (it!=m_d->extBarCode2pdg.end()) {
315 handle->setPDG(it->second);
316 }
317}
std::pair< int, HepMcParticleLink::index_type > ExtBarCode
Definition SimBarCode.h:42
ExtBarCode extBarCode() const
Definition SimBarCode.h:43
static const int unknownPDG
Definition SimBarCode.h:25
bool isNonUniqueSecondary() const
virtual int actualPDGCodeFromSimHit() const
SimBarCode simBarCode() const

◆ getNextTrackHandle()

TrackHandleBase * TrackCollHandleBase::getNextTrackHandle ( )
protectedinherited

Definition at line 724 of file TrackCollHandleBase.cxx.

724 {
725 if (m_d->itTrackHandles==m_d->itTrackHandlesEnd)
726 return nullptr;
727 else
728 return *(m_d->itTrackHandles++);
729}

◆ getStates()

VP1CollStates VP1Collection::getStates ( const QList< VP1Collection * > & cols)
staticinherited

Definition at line 92 of file VP1Collection.cxx.

93{
94 VP1Msg::messageDebug("VP1Collection::getStates() - start...");
95
97 for (VP1Collection* col : cols) {
98 VP1Msg::messageDebug("inserting collection: " + col->section() );
99 states.insert(col->persistifiableID(),col->persistifiableState());
100 }
101
102 VP1Msg::messageDebug("VP1Collection::getStates() - end.");
103
104 return states;
105}
QMap< QByteArray, QByteArray > VP1CollStates

◆ helperClassName()

const QString & VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51{ return m_helpername; }

◆ hintNumberOfTracksInEvent()

void TrackCollHandleBase::hintNumberOfTracksInEvent ( unsigned n)
protectedinherited

Definition at line 509 of file TrackCollHandleBase.cxx.

510{
511 m_d->trackhandles.reserve(n);
512}

◆ ignoreMEOTinProp()

bool TrackCollHandleBase::ignoreMEOTinProp ( ) const
inlineinherited

◆ incrementNShownHandles()

void TrackCollHandleBase::incrementNShownHandles ( )
inlineinherited

Definition at line 125 of file TrackCollHandleBase.h.

125{ ++m_nshownhandles; }

◆ init()

void TrackCollHandleBase::init ( VP1MaterialButtonBase * matBut = 0)
virtualinherited

Reimplemented from VP1StdCollection.

Definition at line 144 of file TrackCollHandleBase.cxx.

145{
146 m_d->matButton = new TrackCollectionSettingsButton;
147 m_d->matButton->setText(text());
148 VP1StdCollection::init(m_d->matButton);//this call is required. Passing in TrackCollectionSettingsButton means we have the more complex button.
149
150 setupSettingsFromController(common()->controller());
151
152 //Setup colour by:
153 m_d->comboBox_colourby->setToolTip("Determine how tracks from this collection are coloured.\n The 'Dist. Sel.' option means the tracks will be coloured by distance from the last selected track. ");
154 QStringList l;
157 if (allowColourByPID())
165 if (allowColourByVertex()) {
166 // messageVerbose("Allow colour by vertex!");
168 }
169 m_d->comboBox_colourby->addItems(l);
170 m_d->comboBox_colourby->setCurrentIndex(0);//corresponds to per collection.
171 connect(m_d->comboBox_colourby,SIGNAL(currentIndexChanged(int)),
172 this,SLOT(colourByComboBoxItemChanged()));
173
174 connect(this,SIGNAL(visibilityChanged(bool)),this,SLOT(collVisibilityChanged(bool)));
176
177 // add stuff to control per collection settings.
178 collSwitch()->addChild(m_d->matButton->trackLightModel());
179 collSwitch()->addChild(m_d->matButton->trackDrawStyle());
180}
static QString comboBoxEntry_ColourByCollection()
virtual bool allowColourByDistanceFromSelectedTrack() const
void setupSettingsFromController(TrackSystemController *)
virtual bool allowColourByMomentum() const
virtual COLOURBY defaultColourBy() const
virtual bool allowColourByVertex() const
virtual bool allowColourByCharge() const
virtual bool allowColourByPID() const
virtual void init(VP1MaterialButtonBase *button=0)
SoSwitch * collSwitch() const
Add this somewhere in your scenegraph (do not add any children here!)
void visibilityChanged(bool)

◆ isLoaded()

bool VP1StdCollection::isLoaded ( ) const
inherited

Definition at line 148 of file VP1StdCollection.cxx.

149{
150 return m_d->loaded;
151}

◆ largeChangesBegin()

void VP1StdCollection::largeChangesBegin ( )
virtualinherited

Reimplemented in VP1CaloClusterCollection.

Definition at line 228 of file VP1StdCollection.cxx.

229{
230 if (!m_d->collsep)
231 message("ERROR: largeChangesBegin() called before init()");
232 m_d->collsep->enableNotify(false);
233 ++(m_d->largechangescount_sep);
234 m_d->theswitch->enableNotify(false);
235 ++(m_d->largechangescount_switch);
236}

◆ largeChangesEnd()

void VP1StdCollection::largeChangesEnd ( )
virtualinherited

Reimplemented in VP1CaloClusterCollection.

Definition at line 239 of file VP1StdCollection.cxx.

240{
241 if (!m_d->collsep)
242 message("ERROR: largeChangesEnd() called before init()");
243 if (m_d->largechangescount_sep>0) {
244 if (--(m_d->largechangescount_sep)==0) {
245 m_d->collsep->enableNotify(true);
246 m_d->collsep->touch();
247 }
248 }
249 if (m_d->largechangescount_switch>0) {
250 if (--(m_d->largechangescount_switch)==0) {
251 m_d->theswitch->enableNotify(true);
252 m_d->theswitch->touch();
253 }
254 }
255}

◆ load()

bool TrackCollHandle_TruthTracks::load ( )
protectedvirtual

Implements VP1StdCollection.

Definition at line 376 of file TrackCollHandle_TruthTracks.cxx.

377{
378 //Decode name to figure out if we need to load simhits/track records and which HepMC key to use.
379 bool augmentedonly = name()==Imp::nameAugmentedOnly;
380 bool augmented = augmentedonly || name().endsWith(Imp::nameHepMCAugmentedEnd);
381 QString hepmckey;
382 if (!augmentedonly) {
383 hepmckey = name();
384 if (augmented)
385 hepmckey.chop(Imp::nameHepMCAugmentedEnd.count());
386 }
387
388 //get genparticles (should be done BEFORE we load sim. hits., so the barCode2pdg map gets filled):
389 std::map<SimBarCode,HepMC::ConstGenParticlePtr> genParticles;
390 if (!hepmckey.isEmpty())
391 if (!m_d->loadGenParticles(genParticles,hepmckey))
392 return false;
393
394 //get sim hits and track records:
395 std::map<SimBarCode,SimHitList> hitLists;
396 if (augmented) {
397 if (!m_d->loadHitLists(hitLists))
398 return false;
399 messageVerbose("TrackCollHandle_TruthTracks "+name()
400 +": Found "+str(hitLists.size())+" truth particles from simhits");
401 }
402
403 //Finally we need to combine the info we thus found, and construct
404 //actual track handles:
405
406 //We do this by looping through the simhit list, and checking for
407 //genparticles with the same SimBarCode. Those gen particles we use
408 //in this way, we take out of the map (put to null), to indicate we
409 //already used them. In the final step we add genparticle-only
410 //handles for the remaining genparticle (unless they have production
411 //and decay vertices ultra-close to each other):
412
413 std::map<SimBarCode,HepMC::ConstGenParticlePtr>::iterator itGenPart, itGenPartEnd(genParticles.end());
414 std::map<SimBarCode,SimHitList>::iterator itHitList, itHitListEnd(hitLists.end()), itHitListTemp;
415
416 //First we attempt to sort secondaries with barcode=0 into new lists
417 //of hits that are likely to have come from the same particle.
418
419 int newBarCode(-1);
420 std::map<SimBarCode,SimHitList> secondaryHitLists;
421 messageVerbose("Sorting non-unique secondaries into lists of hits likely to originate from the same track.");
422 QElapsedTimer timer;timer.start();
423 for (itHitList = hitLists.begin();itHitList!=itHitListEnd;) {
424 if (itHitList->first.isNonUniqueSecondary()) {
425 m_d->createSecondaryHitLists(itHitList->first,itHitList->second,secondaryHitLists,newBarCode);
426 itHitListTemp = itHitList;
427 ++itHitList;
428 hitLists.erase(itHitListTemp);
429 } else {
430 ++itHitList;
431 }
432 }
433 messageVerbose("Finished sorting non-unique secondaries into lists. Time spent: "+str(timer.elapsed()*0.001)+" seconds");
434 std::map<SimBarCode,SimHitList>::iterator itSecondaryList,itSecondaryListEnd(secondaryHitLists.end());
435 for (itSecondaryList = secondaryHitLists.begin();itSecondaryList!=itSecondaryListEnd;++itSecondaryList)
436 hitLists[itSecondaryList->first] = itSecondaryList->second;//Fixme: Check that it does not already exist!
437
438 for (itHitList = hitLists.begin();itHitList!=itHitListEnd;++itHitList) {
439 if (itHitList->second.empty()) {
440 message("load WARNING: Ignoring empty hit list.");
441 continue;
442 }
443 itGenPart = genParticles.find(itHitList->first);
445 if (itGenPart!=itGenPartEnd) {
446 p = itGenPart->second;
447 itGenPart->second = 0;
448 }
449
450 m_d->possiblyUpdateGUI();
451
452 if (m_d->fixMomentumInfoInSimHits(p,itHitList->second))//Provide guesses for momentum in simhits that needs them (and deletes the rest).
453 addTrackHandle( new TrackHandle_TruthTrack( this, itHitList->first, itHitList->second, p ) );
454 }
455
456 const double minSpacialSeparation = 1.0e-3*CLHEP::mm;
457 const double minSepSq = minSpacialSeparation*minSpacialSeparation;
458 for (itGenPart=genParticles.begin();itGenPart!=itGenPartEnd;++itGenPart) {
459 HepMC::ConstGenParticlePtr p = itGenPart->second;
460 if (!p)
461 continue;
462 if (abs(p->pdg_id())>=Imp::maxPdgCode)//Internal particle... (fixme: find proper limit!!)
463 continue;
464 if (!p->production_vertex())
465 continue;
466 if (p->end_vertex()) {
467 double dx(p->end_vertex()->position().x()-p->production_vertex()->position().x());
468 double dy(p->end_vertex()->position().y()-p->production_vertex()->position().y());
469 double dz(p->end_vertex()->position().z()-p->production_vertex()->position().z());
470 if ( dx*dx+dy*dy+dz*dz < minSepSq )
471 continue;
472 }
473 m_d->possiblyUpdateGUI();
474 addTrackHandle( new TrackHandle_TruthTrack( this, itGenPart->first, SimHitList(), p ) );
475 }
476
477 //Maybe we need to show measurements, etc.:
478 m_d->updateVisibleAssociatedObjects();
479
480 return true;
481}
std::vector< std::pair< double, SimHitHandleBase * > > SimHitList
void addTrackHandle(TrackHandleBase *)
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
timer(name, disabled=False)

◆ matButtonToolTip()

virtual QString VP1StdCollection::matButtonToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented in AODCollHandleBase.

Definition at line 77 of file VP1StdCollection.h.

77{ return "Edit the material of "+text(); }

◆ material()

SoMaterial * VP1StdCollection::material ( ) const
inherited

Definition at line 220 of file VP1StdCollection.cxx.

221{
222 if (!m_d->material)
223 message("ERROR: material() called before init()");
224 return m_d->material;
225}

◆ mayHaveAssociatedObjects()

virtual bool TrackCollHandleBase::mayHaveAssociatedObjects ( ) const
inlinevirtualinherited

Definition at line 128 of file TrackCollHandleBase.h.

128{ return false; }

◆ message() [1/3]

void VP1HelperClassBase::message ( const QString & str) const
inherited

Definition at line 49 of file VP1HelperClassBase.cxx.

50{
51 if (m_helpername.isEmpty()) {
52 if (m_system)
53 m_system->message(str);
54 else
55 std::cout<<VP1Msg::prefix_msg()<<" [nameless helper class]: "<<str.toStdString()<<std::endl;
56 } else {
57 if (m_system)
58 m_system->message("["+m_helpername+"] " + str);
59 else
60 std::cout<<VP1Msg::prefix_msg()<<" ["<<m_helpername.toStdString()<<"]: "<<str.toStdString()<<std::endl;
61 }
62}
static const char * prefix_msg()
Definition VP1Msg.h:56

◆ message() [2/3]

void VP1HelperClassBase::message ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 131 of file VP1HelperClassBase.cxx.

132{
133 if (addtostart.isEmpty()) {
134 message(l,addtoend);
135 return;
136 }
137 if (addtoend.isEmpty()) {
138 for (const QString& s : l)
139 message(addtostart+s);
140 } else {
141 for (const QString& s : l)
142 message(addtostart+s+addtoend);
143 }
144}

◆ message() [3/3]

void VP1HelperClassBase::message ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 91 of file VP1HelperClassBase.cxx.

92{
93 if (addtoend.isEmpty()) {
94 for (const QString& s : l)
95 message(s);
96 } else {
97 for (const QString& s : l)
98 message(s+addtoend);
99 }
100}

◆ messageDebug() [1/3]

void VP1HelperClassBase::messageDebug ( const QString & str) const
inherited

Definition at line 65 of file VP1HelperClassBase.cxx.

66{
67 if (!VP1Msg::debug())
68 return;
69 std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
70 if (m_helpername.isEmpty()) {
71 std::cout<<VP1Msg::prefix_debug()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
72 } else {
73 std::cout<<VP1Msg::prefix_debug()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
74 }
75}
static bool debug()
Definition VP1Msg.h:32
static const char * prefix_debug()
Definition VP1Msg.h:57

◆ messageDebug() [2/3]

void VP1HelperClassBase::messageDebug ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 147 of file VP1HelperClassBase.cxx.

148{
149 if (!VP1Msg::debug())
150 return;
151 if (addtostart.isEmpty()) {
152 messageDebug(l,addtoend);
153 return;
154 }
155 if (addtoend.isEmpty()) {
156 for (const QString& s : l)
157 messageDebug(addtostart+s);
158 } else {
159 for (const QString& s : l)
160 messageDebug(addtostart+s+addtoend);
161 }
162}
void messageDebug(const QString &) const

◆ messageDebug() [3/3]

void VP1HelperClassBase::messageDebug ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 103 of file VP1HelperClassBase.cxx.

104{
105 if (!VP1Msg::debug())
106 return;
107 if (addtoend.isEmpty()) {
108 for (const QString& s : l)
109 messageDebug(s);
110 } else {
111 for (const QString& s : l)
112 messageDebug(s+addtoend);
113 }
114}

◆ messageVerbose() [1/3]

void VP1HelperClassBase::messageVerbose ( const QString & str) const
inherited

Definition at line 78 of file VP1HelperClassBase.cxx.

79{
80 if (!VP1Msg::verbose())
81 return;
82 std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
83 if (m_helpername.isEmpty()) {
84 std::cout<<VP1Msg::prefix_verbose()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
85 } else {
86 std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
87 }
88}
static const char * prefix_verbose()
Definition VP1Msg.h:59

◆ messageVerbose() [2/3]

void VP1HelperClassBase::messageVerbose ( const QString & addtostart,
const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 165 of file VP1HelperClassBase.cxx.

166{
167 if (!VP1Msg::verbose())
168 return;
169 if (addtostart.isEmpty()) {
170 messageVerbose(l,addtoend);
171 return;
172 }
173 if (addtoend.isEmpty()) {
174 for (const QString& s : l)
175 messageVerbose(addtostart+s);
176 } else {
177 for (const QString& s : l)
178 messageVerbose(addtostart+s+addtoend);
179 }
180}

◆ messageVerbose() [3/3]

void VP1HelperClassBase::messageVerbose ( const QStringList & l,
const QString & addtoend = "" ) const
inherited

Definition at line 117 of file VP1HelperClassBase.cxx.

118{
119 if (!VP1Msg::verbose())
120 return;
121 if (addtoend.isEmpty()) {
122 for (const QString& s : l)
124 } else {
125 for (const QString& s : l)
126 messageVerbose(s+addtoend);
127 }
128}

◆ mightHaveSubSystemHitInfo()

virtual bool TrackCollHandleBase::mightHaveSubSystemHitInfo ( ) const
inlinevirtualinherited

◆ name()

const QString & TrackCollHandleBase::name ( ) const
inherited

Definition at line 310 of file TrackCollHandleBase.cxx.

311{
312 return m_d->name;
313}

◆ nShownHandles()

int TrackCollHandleBase::nShownHandles ( )
inlineinherited

Definition at line 123 of file TrackCollHandleBase.h.

123{ return m_nshownhandles; }

◆ parts()

TrackCommonFlags::TrackPartsFlags TrackCollHandleBase::parts ( ) const
inlineinherited

Definition at line 136 of file TrackCollHandleBase.h.

136{ return m_parts; }
TrackCommonFlags::TrackPartsFlags m_parts

◆ persistifiableID()

QByteArray VP1Collection::persistifiableID ( ) const
inherited

Definition at line 49 of file VP1Collection.cxx.

50{
51 VP1Msg::messageDebug("VP1Collection::persistifiableID()");
52
53 if (!m_d->persistIDProvided) {
54 m_d->persistIDProvided = true;
55 m_d->persistID = providePersistifiableID().toHex();//toHex() necessary for some unknown reason!
56 //Without it keys in maps are apparently considered similar! (Qt bug??)
57 }
58 return m_d->persistID;
59}
virtual QByteArray providePersistifiableID() const =0

◆ persistifiableState()

QByteArray TrackCollHandleBase::persistifiableState ( ) const
virtualinherited

Provide specific implementation.

Reimplemented from VP1StdCollection.

Definition at line 1283 of file TrackCollHandleBase.cxx.

1284{
1285 if (!m_d->matButton) {
1286 message("ERROR: persistifiableState() called before init()");
1287 return {};
1288 }
1289 VP1Serialise serialise(1/*version*/);
1290 serialise.disableUnsavedChecks();
1291 serialise.save(visible());
1292 Q_ASSERT(m_d->matButton&&"Did you forget to call init() on this VP1StdCollection?");
1293 serialise.save(m_d->matButton->saveState());
1294 serialise.save(extraWidgetsState());//version 1+
1295 return serialise.result();
1296}
QByteArray extraWidgetsState() const

◆ possibleChangeMatTranspOrBrightness

void VP1StdCollection::possibleChangeMatTranspOrBrightness ( )
slotinherited

Definition at line 348 of file VP1StdCollection.cxx.

349{
350 double t = m_d->matButton->lastAppliedTransparency();
351 double b = m_d->matButton->lastAppliedBrightness();
352 if ( m_d->lastMatTransparency == t && m_d->lastMatBrightness == b )
353 return;
354 m_d->lastMatTransparency = t;
355 m_d->lastMatBrightness = b;
357}
virtual void collMaterialTransparencyAndBrightnessChanged()

◆ problemsLoading()

bool VP1StdCollection::problemsLoading ( ) const
inherited

Definition at line 154 of file VP1StdCollection.cxx.

155{
156 return m_d->problemsloading;
157}

◆ propagationOptions()

TrackSystemController::PropagationOptionFlags TrackCollHandleBase::propagationOptions ( )
inlineinherited

Definition at line 132 of file TrackCollHandleBase.h.

132{ return m_propagationOptions; }

◆ propagator()

Trk::IExtrapolator * TrackCollHandleBase::propagator ( ) const
inlineinherited

Definition at line 131 of file TrackCollHandleBase.h.

131{ return m_propagator; }
Trk::IExtrapolator * m_propagator

◆ provideCollTypeID()

qint32 TrackCollHandleBase::provideCollTypeID ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 1049 of file TrackCollHandleBase.cxx.

1050{
1052}
static qint32 typeToInt(const Type &)
Definition TrackTypes.cxx:8

◆ provideExtraWidgetsForGuiRow()

QList< QWidget * > TrackCollHandleBase::provideExtraWidgetsForGuiRow ( ) const
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 1173 of file TrackCollHandleBase.cxx.

1174{
1175 return QList<QWidget*>() << m_d->comboBox_colourby;
1176
1177}

◆ providePersistifiableID()

QByteArray VP1StdCollection::providePersistifiableID ( ) const
protectedvirtualinherited

Implements VP1Collection.

Reimplemented in VP1MissingEtHandle.

Definition at line 325 of file VP1StdCollection.cxx.

326{
327 VP1Serialise serialise(-10/*version*/);//we use negative versions here (0 and -10 already used),
328 //to allow derived classes to use positive numbers.
329 serialise.disableUnsavedChecks();
330 serialise.save(collTypeID());
331 serialise.save(text());
332 return serialise.result();
333}
qint32 collTypeID() const

◆ provideSection()

virtual QString TrackCollHandleBase::provideSection ( ) const
inlineprotectedvirtualinherited

Implements VP1Collection.

Definition at line 171 of file TrackCollHandleBase.h.

171{ return TrackType::typeToSectionHeader(m_type); };//FIXME
static QString typeToSectionHeader(const Type &)

◆ provideSectionToolTip()

virtual QString TrackCollHandleBase::provideSectionToolTip ( ) const
inlineprotectedvirtualinherited

Reimplemented from VP1Collection.

Definition at line 172 of file TrackCollHandleBase.h.

static QString typeToSectionHeaderToolTip(const Type &)

◆ provideText()

virtual QString TrackCollHandleBase::provideText ( ) const
inlineprotectedvirtualinherited

Implements VP1StdCollection.

Definition at line 173 of file TrackCollHandleBase.h.

173{ return name(); };//FIXME

◆ provideWidgetsForGuiRow()

QList< QWidget * > VP1StdCollection::provideWidgetsForGuiRow ( ) const
protectedvirtualinherited

Implements VP1Collection.

Definition at line 258 of file VP1StdCollection.cxx.

259{
260 m_d->extraWidgets = provideExtraWidgetsForGuiRow();
261
262 QList<QWidget*> l;
263 l << m_d->checkBox;
264 l << m_d->matButton;
265 l << m_d->extraWidgets;
266 return l;
267}
virtual QList< QWidget * > provideExtraWidgetsForGuiRow() const

◆ recheckCutStatus()

void TrackCollHandleBase::recheckCutStatus ( TrackHandleBase * handle)
protectedinherited

Definition at line 380 of file TrackCollHandleBase.cxx.

381{
382 handle->setVisible( visible() && cut(handle));
383}
void setVisible(bool)
use by the collection handle.

◆ recheckCutStatusOfAllHandles()

void TrackCollHandleBase::recheckCutStatusOfAllHandles ( )
inherited

Definition at line 425 of file TrackCollHandleBase.cxx.

426{
427 if (!isLoaded())
428 return;
430 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
431 for (;it!=itE;++it)
432 recheckCutStatus(*it);
435
436 message("recheckCutStatusOfAllHandles: "+str(nShownHandles())+"/"+str(m_d->trackhandles.size())+" pass cuts");
437}
void recheckCutStatus(TrackHandleBase *)

◆ recheckCutStatusOfAllNotVisibleHandles()

void TrackCollHandleBase::recheckCutStatusOfAllNotVisibleHandles ( )
inherited

Definition at line 407 of file TrackCollHandleBase.cxx.

408{
409 if (!isLoaded())
410 return;
411
413 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
414 for (;it!=itE;++it) {
415 if (!(*it)->visible())
416 recheckCutStatus(*it);
417 }
420
421 message("recheckCutStatusOfAllNotVisibleHandles: "+str(nShownHandles())+"/"+str(m_d->trackhandles.size())+" pass cuts");
422}

◆ recheckCutStatusOfAllVisibleHandles()

void TrackCollHandleBase::recheckCutStatusOfAllVisibleHandles ( )
inherited

Definition at line 386 of file TrackCollHandleBase.cxx.

387{
388 if (!isLoaded())
389 return;
390
391 //This method is called when a cut is tightened - thus we better start by deselectAll to avoid weird highlighting issues.
392 common()->system()->deselectAll();
393
395 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
396 for (;it!=itE;++it) {
397 if ((*it)->visible())
398 recheckCutStatus(*it);
399 }
402
403 message("recheckCutStatusOfAllVisibleHandles: "+str(nShownHandles())+"/"+str(m_d->trackhandles.size())+" pass cuts");
404}
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
VP1TrackSystem * system() const

◆ rerandomiseRandomTrackColours

void TrackCollHandleBase::rerandomiseRandomTrackColours ( )
slotinherited

Definition at line 689 of file TrackCollHandleBase.cxx.

690{
691 if (!isLoaded())
692 return;
693 messageVerbose("rerandomiseRandomTrackColours start");
695 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
696 for (;it!=itE;++it)
697 (*it)->rerandomiseRandomMaterial();
699 messageVerbose("rerandomiseRandomTrackColours end");
700}

◆ section()

QString VP1Collection::section ( ) const
inherited

Definition at line 72 of file VP1Collection.cxx.

73{
74 if (!m_d->sectionProvided) {
75 m_d->sectionProvided = true;
76 m_d->section = provideSection();
77 }
78 return m_d->section;
79}
virtual QString provideSection() const =0

◆ sectionToolTip()

QString VP1Collection::sectionToolTip ( ) const
inherited

Definition at line 82 of file VP1Collection.cxx.

83{
84 if (!m_d->sectionToolTipProvided) {
85 m_d->sectionToolTipProvided = true;
86 m_d->sectionToolTip = provideSectionToolTip();
87 }
88 return m_d->sectionToolTip;
89}
virtual QString provideSectionToolTip() const

◆ sephelper()

VP1ExtraSepLayerHelper * TrackCollHandleBase::sephelper ( ) const
inlineinherited

Definition at line 81 of file TrackCollHandleBase.h.

81{ return m_sephelper; }//For attaching/detaching. FIXME: TO BASE!!

◆ setActualPathShown

void TrackCollHandleBase::setActualPathShown ( bool hide)
privateslotinherited

Definition at line 579 of file TrackCollHandleBase.cxx.

580{
581 messageVerbose("setActualPathShown(bool) called with hide="+str(hide));
582
583 TrackCommonFlags::TrackPartsFlags parts = m_parts;
584 if (hide) parts &= ~TrackCommonFlags::ActualPath;
587}
void setParts(TrackCommonFlags::TrackPartsFlags)
TrackCommonFlags::TrackPartsFlags parts() const

◆ setColourBy

void TrackCollHandleBase::setColourBy ( TrackCollHandleBase::COLOURBY cb)
privateslotinherited

Definition at line 634 of file TrackCollHandleBase.cxx.

635{
636 messageVerbose("setColourBy called");
637 if (m_colourby==cb)
638 return;
639 messageVerbose("setColourBy ==> Changed");
640 m_colourby=cb;
641
642 //Update gui combobox:
643 QString targetText;
644 switch(cb) {
645 case COLOUR_BYPID:
646 targetText = Imp::comboBoxEntry_ColourByPID();
647 break;
648 case COLOUR_RANDOM:
650 break;
651 case COLOUR_MOMENTUM:
653 break;
654 case COLOUR_CHARGE:
656 break;
657 case COLOUR_DISTANCE:
659 break;
660 case COLOUR_VERTEX:
662 break;
663 default:
666 break;
667 }
668 if (targetText!=m_d->comboBox_colourby->currentText()) {
669 int i = m_d->comboBox_colourby->findText(targetText);
670 if (i>=0&&i<m_d->comboBox_colourby->count()) {
671 bool save = m_d->comboBox_colourby->blockSignals(true);
672 m_d->comboBox_colourby->setCurrentIndex(i);
673 m_d->comboBox_colourby->blockSignals(save);
674 } else {
675 message("ERROR: Problems finding correct text in combo box");
676 }
677 }
678
679 //Actual material updates:
681 m_commonData->system()->deselectAll();//Todo: Reselect the selected track handles
682 //afterwards (collhandles should know selected handles)
685
686}

◆ setCustomColouredTSOSParts

void TrackCollHandleBase::setCustomColouredTSOSParts ( TrackCommonFlags::TSOSPartsFlags f)
slotinherited

Definition at line 923 of file TrackCollHandleBase.cxx.

924{
925 if (m_d->customColouredTSOSParts==f)
926 return;
927 m_d->customColouredTSOSParts=f;
928 if (visible()) messageVerbose("custom coloured TSOS parts changed to "+str(f));
930}

◆ setCutAllowedEta

void TrackCollHandleBase::setCutAllowedEta ( const VP1Interval & allowedEta)
privateslotinherited

Definition at line 784 of file TrackCollHandleBase.cxx.

785{
786 messageVerbose("signal received in setCutAllowedEta ("+allowedEta.toString()+")");
787 if (!allowedEta.isSane())
788 return;
789
790 if (m_cut_allowedEta==allowedEta)
791 return;
792 m_cut_eta_allowall = allowedEta.isAllR();
793 m_cut_etaptphi_allwillfail = allowedEta.isEmpty() || m_cut_allowedPtSq.isEmpty() || m_cut_allowedPhi.isEmpty();
794
795 if (!m_cut_allowedEta.contains(allowedEta)&&!allowedEta.contains(m_cut_allowedEta)) {
796 m_cut_allowedEta = allowedEta;
798 return;
799 }
800 bool relaxcut = allowedEta.contains(m_cut_allowedEta);
801 m_cut_allowedEta = allowedEta;
802 if (relaxcut)
804 else
806}
QList< VP1Interval > m_cut_allowedPhi
bool isEmpty() const
QString toString() const
bool isSane() const
bool isAllR() const
bool contains(const double &x) const

◆ setCutAllowedPhi

void TrackCollHandleBase::setCutAllowedPhi ( const QList< VP1Interval > & allowedPhi)
privateslotinherited

Definition at line 809 of file TrackCollHandleBase.cxx.

810{
811 messageVerbose("signal received in setCutAllowedPhi.");
812
813 if (m_cut_allowedPhi==allowedPhi)
814 return;
815 m_cut_allowedPhi = allowedPhi;
816
817 m_cut_phi_allowall = m_cut_allowedPhi.count()==1 && m_cut_allowedPhi.at(0).isAllR();
819
820 if (m_cut_phi_allowall) {
822 return;
823 }
826 return;
827 }
829}

◆ setCutAllowedPt

void TrackCollHandleBase::setCutAllowedPt ( const VP1Interval & allowedpt)
privateslotinherited

Definition at line 745 of file TrackCollHandleBase.cxx.

746{
747 if (!allowedpt.isSane())
748 return;
749
750 //why do we need to do this? Why does it matter if it's negative?
751 //double minptsq = allowedpt.lower() <= 0.0 ? -std::numeric_limits<double>::infinity() : allowedpt.lower()*allowedpt.lower();
752 //VP1Interval allowedptsq(minptsq,allowedpt.upper()*allowedpt.upper());
753
754 //Modified code from EJWM
755 double signMin = allowedpt.lower()<0.0 ? -1.0 : 1.0;
756 double signMax = allowedpt.upper()<0.0 ? -1.0 : 1.0;
757 double minptsq = allowedpt.lower() == -std::numeric_limits<double>::infinity() ? -std::numeric_limits<double>::infinity() : signMin*(allowedpt.lower()*allowedpt.lower());
758 double maxptsq = allowedpt.upper() == std::numeric_limits<double>::infinity() ? std::numeric_limits<double>::infinity() : signMax*(allowedpt.upper()*allowedpt.upper());
759
760 VP1Interval allowedptsq(minptsq,maxptsq);
761 // std::cout<<"allowedptsq:isAllR"<<allowedptsq.isAllR()<<std::endl;
762 // std::cout<<"allowedptsq.isEmpty()"<<allowedptsq.isEmpty()<<std::endl;
763
764
765 if (m_cut_allowedPtSq==allowedptsq)
766 return;
767 m_cut_pt_allowall = allowedptsq.isAllR();
768 m_cut_etaptphi_allwillfail = allowedptsq.isEmpty() || m_cut_allowedEta.isEmpty() || m_cut_allowedPhi.isEmpty();
769
770 if (!m_cut_allowedPtSq.contains(allowedptsq)&&!allowedptsq.contains(m_cut_allowedPtSq)) {
771 m_cut_allowedPtSq = allowedptsq;
772 recheckCutStatusOfAllHandles();
773 return;
774 }
775 bool relaxcut = allowedptsq.contains(m_cut_allowedPtSq);
776 m_cut_allowedPtSq = allowedptsq;
777 if (relaxcut)
779 else
781}
if(febId1==febId2)
double lower() const
double upper() const

◆ setCutExcludeBarcodeZero

void TrackCollHandle_TruthTracks::setCutExcludeBarcodeZero ( bool b)
privateslot

Definition at line 515 of file TrackCollHandle_TruthTracks.cxx.

516{
517 if (m_d->cut_excludeBarcodeZero==b)
518 return;
519 m_d->cut_excludeBarcodeZero=b;
520 if (b)
522 else
524}

◆ setCutExcludeNeutrals

void TrackCollHandle_TruthTracks::setCutExcludeNeutrals ( bool b)
privateslot

Definition at line 527 of file TrackCollHandle_TruthTracks.cxx.

528{
529 if (m_d->cut_excludeNeutrals==b)
530 return;
531 m_d->cut_excludeNeutrals=b;
532 if (b)
534 else
536}

◆ setCutFromIROnly

void TrackCollHandle_TruthTracks::setCutFromIROnly ( bool b)
privateslot

Definition at line 503 of file TrackCollHandle_TruthTracks.cxx.

504{
505 if (m_d->cut_fromIROnly == b)
506 return;
507 m_d->cut_fromIROnly = b;
508 if (b)
510 else
512}

◆ setDrawMeasGlobalPositions

void TrackCollHandleBase::setDrawMeasGlobalPositions ( bool b)
slotinherited

Definition at line 962 of file TrackCollHandleBase.cxx.

963{
964 // if (visible()) messageVerbose("TrackCollHandleBase::setDrawMeasGlobalPositions => "+str(b));
965
966 if (m_d->tsos_drawMeasGlobalPositions==b)
967 return;
968 m_d->tsos_drawMeasGlobalPositions=b;
969
972 TrackHandleBase* handle;
973 while ((handle=getNextTrackHandle()))
976}
void updateShapes_TSOSWithMeasurements()

◆ setExtraWidgetsState()

void TrackCollHandleBase::setExtraWidgetsState ( const QByteArray & ba)
protectedvirtualinherited

Reimplemented from VP1StdCollection.

Definition at line 1189 of file TrackCollHandleBase.cxx.

1190{
1191 VP1Deserialise state(ba, systemBase());
1192 if (state.version()!=0)
1193 return;//just ignore silently... i guess we ought to warn?
1194 state.restore(m_d->comboBox_colourby);
1195 state.disableUnrestoredChecks();
1197}

◆ setHelperClassName()

void VP1HelperClassBase::setHelperClassName ( const QString & n)
inlineprotectedinherited

Definition at line 59 of file VP1HelperClassBase.h.

◆ setLabelPosOffsets

void TrackCollHandleBase::setLabelPosOffsets ( const QList< int > & offsets)
slotinherited

Definition at line 612 of file TrackCollHandleBase.cxx.

613{
614 messageVerbose("setLabelPosOffsets called");
615 if (m_labelsPosOffsets==offsets)
616 return;
617 messageVerbose("setLabelPosOffsets ==> Changed");
618 m_labelsPosOffsets = offsets;
620}

◆ setLabels

void TrackCollHandleBase::setLabels ( TrackSystemController::TrackLabelModes labels)
slotinherited

Definition at line 590 of file TrackCollHandleBase.cxx.

591{
592 messageVerbose("setLabels called");
593 if (m_labels==labels)
594 return;
595 messageVerbose("setLabels ==> Changed");
598}
TrackSystemController::TrackLabelModes m_labels

◆ setLabelTrkOffset

void TrackCollHandleBase::setLabelTrkOffset ( float offset)
slotinherited

Definition at line 601 of file TrackCollHandleBase.cxx.

602{
603 messageVerbose("setLabelTrkOffset called");
604 if (m_labelsTrkOffset==offset)
605 return;
606 messageVerbose("setLabelTrkOffset ==> Changed to "+QString::number(offset));
609}

◆ setMaterialEffectsOnTrackScale

void TrackCollHandleBase::setMaterialEffectsOnTrackScale ( double n)
slotinherited

Definition at line 1021 of file TrackCollHandleBase.cxx.

1022{
1023 if (m_d->tsos_materialEffectsOnTrackScale==n)
1024 return;
1025 m_d->tsos_materialEffectsOnTrackScale=n;
1028 TrackHandleBase* handle;
1029 while ((handle=getNextTrackHandle()))
1032}
void updateShapes_TSOSWithMaterialEffects()

◆ setMeasurementsShorttubesScale

void TrackCollHandleBase::setMeasurementsShorttubesScale ( double n)
slotinherited

Definition at line 979 of file TrackCollHandleBase.cxx.

980{
981 if (m_d->tsos_measurementsShorttubesScale==n)
982 return;
983 m_d->tsos_useShortMDTMeasurements=n;
986 TrackHandleBase* handle;
987 while ((handle=getNextTrackHandle()))
990}

◆ setNStdDevForParamErrors

void TrackCollHandleBase::setNStdDevForParamErrors ( const double & nstddev)
slotinherited

Definition at line 993 of file TrackCollHandleBase.cxx.

994{
995 if (m_d->tsos_nStdDevForParamErrors==nstddev)
996 return;
997 m_d->tsos_nStdDevForParamErrors=nstddev;
1000 TrackHandleBase* handle;
1001 while ((handle=getNextTrackHandle()))
1004}
void updateShapes_TSOSWithErrors()

◆ setNumberOfPointsOnCircles

void TrackCollHandleBase::setNumberOfPointsOnCircles ( int n)
slotinherited

Definition at line 1007 of file TrackCollHandleBase.cxx.

1008{
1009 if (m_d->tsos_numberOfPointsOnCircles==n)
1010 return;
1011 m_d->tsos_numberOfPointsOnCircles=n;
1014 TrackHandleBase* handle;
1015 while ((handle=getNextTrackHandle()))
1018}

◆ setOnlyVertexAssocTracks

void TrackCollHandleBase::setOnlyVertexAssocTracks ( bool b)
slotinherited

Definition at line 878 of file TrackCollHandleBase.cxx.

878 {
879 messageVerbose("setOnlyVertexAssocTracks changed to "+str(b));
880
881 if (b)
883 else
885}

◆ setParts [1/2]

void TrackCollHandleBase::setParts ( int angle)
privateslotinherited

Definition at line 570 of file TrackCollHandleBase.cxx.

571{
572 messageVerbose("setParts(int) called with angle="+str(angle));
573 //bit of a hack this- didn't want to make entire new machinery just to track angle.
574 // FIXME
575 update3DObjectsOfAllHandles(false,true);
576}
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)

◆ setParts [2/2]

void TrackCollHandleBase::setParts ( TrackCommonFlags::TrackPartsFlags parts)
privateslotinherited

Definition at line 558 of file TrackCollHandleBase.cxx.

559{
560 messageVerbose("setParts called");
561 if (m_parts==parts)
562 return;
563 messageVerbose("setParts ==> Changed");
564 bool onlymuonprojflagchanged = ( (parts^m_parts) == TrackCommonFlags::MuonProjections );
565 m_parts = parts;
566 update3DObjectsOfAllHandles(onlymuonprojflagchanged);
567}

◆ setParTubeErrorsDrawCylinders

void TrackCollHandleBase::setParTubeErrorsDrawCylinders ( bool b)
slotinherited

Definition at line 1035 of file TrackCollHandleBase.cxx.

1036{
1037 if (m_d->tsos_parTubeErrorsDrawCylinders==b)
1038 return;
1039 m_d->tsos_parTubeErrorsDrawCylinders=b;
1042 TrackHandleBase* handle;
1043 while ((handle=getNextTrackHandle()))
1046}

◆ setPropagationOptions

void TrackCollHandleBase::setPropagationOptions ( TrackSystemController::PropagationOptionFlags options)
privateslotinherited

Definition at line 535 of file TrackCollHandleBase.cxx.

535 {
536 messageVerbose("setPropagationOptions ==> Changed");
538 update3DObjectsOfAllHandles(false,true);
539}

◆ setPropagator

void TrackCollHandleBase::setPropagator ( Trk::IExtrapolator * p)
privateslotinherited

Definition at line 521 of file TrackCollHandleBase.cxx.

522{
524 messageVerbose("setPropagator ("+str(p)+") "+ (ignoreMEOT?str("ignoring MEOT"):str("using MEOT")) );
525 if (m_propagator==p)
526 return;
527 messageVerbose("setPropagator ==> Changed");
529 bool mustUpdatePropagatedPoints = (p && m_d->lastUsedPropagator!=p);
530 update3DObjectsOfAllHandles(false,mustUpdatePropagatedPoints);
531 if (p)
532 m_d->lastUsedPropagator = p;
533}
bool ignoreMeasurementEffectsOnTrackInProp()
If true (default) don't use TSOS with MEOT to draw track points.

◆ setPropMaxRadius

void TrackCollHandleBase::setPropMaxRadius ( float radius)
privateslotinherited

Definition at line 541 of file TrackCollHandleBase.cxx.

541 {
542 messageVerbose("setPropMaxRadius ==> Changed to "+str(radius));
544 update3DObjectsOfAllHandles(false,true);
545}

◆ setRequiredDetectorElement

void TrackCollHandleBase::setRequiredDetectorElement ( const QString & id)
slotinherited

◆ setRequiredNHits

void TrackCollHandleBase::setRequiredNHits ( const QList< unsigned > & l)
slotinherited

Definition at line 832 of file TrackCollHandleBase.cxx.

833{
835 return;//never deal with this...
836 if (m_cut_requiredNHits==l)
837 return;
838
839 //A bit complex to figure out if the cut change is pure relaxation or tightening:
840 bool relaxed(false),tightened(false);
841 if (m_cut_requiredNHits.isEmpty()) {
842 relaxed = false;
843 tightened = true;
844 } else {
845 if (l.isEmpty()) {
846 relaxed = true;
847 tightened = false;
848 } else {
849 assert(l.count()==m_cut_requiredNHits.count());
850 relaxed = false;
851 tightened = false;
852 for (int i=0;i<l.count();++i) {
853 if (m_cut_requiredNHits[i]>l[i])
854 relaxed=true;
855 else if (m_cut_requiredNHits[i]<l[i])
856 tightened = true;
857 }
858 }
859 }
860 assert(relaxed||tightened);
862 if (relaxed&&tightened) {
864 } else {
865 if (relaxed)
867 else
869 }
870}
virtual bool mightHaveSubSystemHitInfo() const
QList< unsigned > m_cut_requiredNHits

◆ setShowAscObjs

void TrackCollHandle_TruthTracks::setShowAscObjs ( bool b)
privateslot

Definition at line 195 of file TrackCollHandle_TruthTracks.cxx.

196{
197 if (m_d->displayAscObjs==b)
198 return;
199 m_d->displayAscObjs=b;
200 messageVerbose("Associated objects shown flag changed to " + str(b));
201 m_d->updateVisibleAssociatedObjects();
202}

◆ setShownTSOSParts

void TrackCollHandleBase::setShownTSOSParts ( TrackCommonFlags::TSOSPartsFlags f)
slotinherited

Definition at line 912 of file TrackCollHandleBase.cxx.

913{
914 if (m_d->shownTSOSParts==f)
915 return;
916 m_d->shownTSOSParts=f;
917 if (visible()) messageVerbose("shown TSOS parts changed to "+str(f));
919}

◆ setState()

void TrackCollHandleBase::setState ( const QByteArray & state)
virtualinherited

Provide specific implementation.

Reimplemented from VP1StdCollection.

Definition at line 1259 of file TrackCollHandleBase.cxx.

1260{
1261 if (!m_d->matButton) {
1262 message("ERROR: setState(..) called before init()");
1263 return;
1264 }
1265 VP1Deserialise des(state);
1266 des.disableUnrestoredChecks();
1267 if (des.version()!=0&&des.version()!=1) {
1268 messageDebug("Warning: Ignoring state with wrong version");
1269 return;
1270 }
1271 bool vis = des.restoreBool();
1272
1273 QByteArray matState = des.restoreByteArray();
1274 m_d->matButton->restoreFromState(matState);
1275 QByteArray extraWidgetState = des.version()>=1 ? des.restoreByteArray() : QByteArray();
1276 setVisible(vis);
1277
1278 if (extraWidgetState!=QByteArray())
1279 setExtraWidgetsState(extraWidgetState);
1280}
void setExtraWidgetsState(const QByteArray &)

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System * sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

198{
199 m_system = sys;
200 if (VP1Msg::verbose()){
201 vp1helperclassbase_instanceMap[this] = (m_system?m_system->name():QString(""));
202 }
203}
static std::map< VP1HelperClassBase *, QString > vp1helperclassbase_instanceMap

◆ setTrackTubeRadius

void TrackCollHandleBase::setTrackTubeRadius ( const double & r)
privateslotinherited

Definition at line 623 of file TrackCollHandleBase.cxx.

624{
625 messageVerbose("setTrackTubeRadius called");
626 if (m_trackTubeRadius==r)
627 return;
629 messageVerbose("setTrackTubeRadius ==> Changed");
631}
int r
Definition globals.cxx:22

◆ setupSettingsFromController()

void TrackCollHandleBase::setupSettingsFromController ( TrackSystemController * controller)
inherited

Definition at line 198 of file TrackCollHandleBase.cxx.

199{
200 messageVerbose("setupSettingsFromController start");
201
202 assert(controller);
204
205 connect(TrackSystemController::customTourEditor(),SIGNAL(clipVolumeRadiusChanged(double)),this,SLOT(clipVolumeChanged(double)));
206
207 connect(controller,SIGNAL(propagatorChanged(Trk::IExtrapolator *)),this,SLOT(setPropagator(Trk::IExtrapolator *)));
208 setPropagator(controller->propagator());
209
210 connect(controller,SIGNAL(propagationOptionsChanged(TrackSystemController::PropagationOptionFlags)),this,SLOT(setPropagationOptions(TrackSystemController::PropagationOptionFlags)));
212
213 connect(controller,SIGNAL(propMaxRadiusChanged(float)),this,SLOT(setPropMaxRadius(float)));
214 setPropMaxRadius(controller->propMaxRadius());
215
216 // Doing this in a slightly different way to avoid making lots of new stuff in controller.
217 connect(controller,SIGNAL(extrapolateToThisVolumeChanged(void)),this,SLOT(extrapolateToThisVolumeChanged(void)));
218
219 connect(controller,SIGNAL(shownTrackPartsChanged(TrackCommonFlags::TrackPartsFlags)),this,SLOT(setParts(TrackCommonFlags::TrackPartsFlags)));
220 connect(m_d->matButton,SIGNAL(hideActualTrackPathChanged(bool)),this,SLOT(setActualPathShown(bool)));
221 setParts(controller->shownTrackParts());
222
223 connect(controller,SIGNAL(vertexProjectionAngleChanged(int)),this,SLOT(setParts(int)));
224 setParts(controller->vertexProjectionAngle());
225
226 // connect(controller,SIGNAL(trackTubeRadiusChanged(const double&)),this,SLOT(setTrackTubeRadius(const double&)));
227 connect(m_d->matButton,SIGNAL(trackTubeRadiusChanged(const double&)),this,SLOT(setTrackTubeRadius(const double&)));
228 setTrackTubeRadius(m_d->matButton->trackTubeRadius());
229
230 connect(controller,SIGNAL(rerandomise()),this,SLOT(rerandomiseRandomTrackColours()));
231
232 connect(common()->system(),SIGNAL(newTrackSelected( const TrackHandleBase&)),this,SLOT(trackSelectionChanged()));
233
234 //cuts
235 connect(m_d->matButton,SIGNAL(useDefaultCutsChanged(bool)),this,SLOT(setUseDefaultCuts(bool)));
236 setUseDefaultCuts(m_d->matButton->useDefaultCuts());
237
238 connect(controller,SIGNAL(cutAllowedPtChanged(const VP1Interval&)),this,SLOT(setCutAllowedPt(const VP1Interval&)));
239 connect(m_d->matButton,SIGNAL(cutAllowedPtChanged(const VP1Interval&)),this,SLOT(setCutAllowedPt(const VP1Interval&)));
240 setCutAllowedPt(useDefaultCuts()?controller->cutAllowedPt():m_d->matButton->cutAllowedPt());
241
242 connect(controller,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),this,SLOT(setCutAllowedEta(const VP1Interval&)));
243 connect(m_d->matButton,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),this,SLOT(setCutAllowedEta(const VP1Interval&)));
244 setCutAllowedEta(useDefaultCuts()?controller->cutAllowedEta():m_d->matButton->cutAllowedEta());
245
246 connect(controller,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(setCutAllowedPhi(const QList<VP1Interval>&)));
247 connect(m_d->matButton,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(setCutAllowedPhi(const QList<VP1Interval>&)));
248 setCutAllowedPhi(useDefaultCuts()?controller->cutAllowedPhi():m_d->matButton->cutAllowedPhi());
249
250 connect(controller,SIGNAL(cutRequiredNHitsChanged(const QList<unsigned>&)),this,SLOT(setRequiredNHits(const QList<unsigned>&)));
251 connect(m_d->matButton,SIGNAL(cutRequiredNHitsChanged(const QList<unsigned>&)),this,SLOT(setRequiredNHits(const QList<unsigned>&)));
252 setRequiredNHits(useDefaultCuts()?controller->cutRequiredNHits():m_d->matButton->cutRequiredNHits());
253
254 connect(controller,SIGNAL(cutRequiredDetectorElementChanged(const QString&)),this,SLOT(setRequiredDetectorElement(const QString&)));
255 connect(m_d->matButton,SIGNAL(cutRequiredDetectorElementChanged(const QString&)),this,SLOT(setRequiredDetectorElement(const QString&)));
256
257 connect(controller,SIGNAL(cutOnlyVertexAssocTracksChanged(bool)),this,SLOT(setOnlyVertexAssocTracks(bool)));
258 connect(m_d->matButton,SIGNAL(cutOnlyVertexAssocTracksChanged(bool)),this,SLOT(setOnlyVertexAssocTracks(bool)));
259 setOnlyVertexAssocTracks(useDefaultCuts()?controller->cutOnlyVertexAssocTracks():m_d->matButton->cutOnlyVertexAssocTracks());
260
261 connect(controller,SIGNAL(customColouredTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags)),
262 this,SLOT(setCustomColouredTSOSParts(TrackCommonFlags::TSOSPartsFlags)));
264
265 connect(controller,SIGNAL(useShortTRTMeasurementsChanged(bool)),this,SLOT(setUseShortTRTMeasurements(bool)));
267
268 connect(controller,SIGNAL(useShortMDTMeasurementsChanged(bool)),this,SLOT(setUseShortMDTMeasurements(bool)));
270
271 connect(controller,SIGNAL(drawMeasGlobalPositionsChanged(bool)),this,SLOT(setDrawMeasGlobalPositions(bool)));
273
274 connect(controller,SIGNAL(measurementsShorttubesScaleChanged(double)),this,SLOT(setMeasurementsShorttubesScale(double)));
276
277 connect(controller,SIGNAL(nStdDevForParamErrorsChanged(const double&)),this,SLOT(setNStdDevForParamErrors(const double&)));
279
280 connect(controller,SIGNAL(numberOfPointsOnCirclesChanged(int)),this,SLOT(setNumberOfPointsOnCircles(int)));
282
283 connect(controller,SIGNAL(materialEffectsOnTrackScaleChanged(double)),this,SLOT(setMaterialEffectsOnTrackScale(double)));
285
286 connect(controller,SIGNAL(parTubeErrorsDrawCylindersChanged(bool)),this,SLOT(setParTubeErrorsDrawCylinders(bool)));
288
289 connect(controller,SIGNAL(shownTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags)),
290 this,SLOT(setShownTSOSParts(TrackCommonFlags::TSOSPartsFlags)));
291 setShownTSOSParts(controller->shownTSOSParts());
292
293 connect(controller,SIGNAL(customColouredTSOSPartsChanged(TrackCommonFlags::TSOSPartsFlags)),
294 this,SLOT(setCustomColouredTSOSParts(TrackCommonFlags::TSOSPartsFlags)));
296
297 connect(controller,SIGNAL(trackLabelsChanged(TrackSystemController::TrackLabelModes)),this,SLOT(setLabels(TrackSystemController::TrackLabelModes)));
298 connect(controller,SIGNAL(trackLabelTrkOffsetChanged(float)),this,SLOT(setLabelTrkOffset(float)));
299 connect(controller,SIGNAL(trackLabelPosOffsetChanged(QList<int>)),this,SLOT(setLabelPosOffsets(QList<int>)));
300 setLabels(controller->trackLabels());
301
303
305 messageVerbose("setupSettingsFromController end");
306
307}
void setNStdDevForParamErrors(const double &)
void setPropagator(Trk::IExtrapolator *)
void setCutAllowedPt(const VP1Interval &)
void extrapolateToThisVolumeChanged(void)
void setLabelPosOffsets(const QList< int > &)
void setShownTSOSParts(TrackCommonFlags::TSOSPartsFlags)
void setPropagationOptions(TrackSystemController::PropagationOptionFlags)
bool useDefaultCuts() const
Return true if this collection uses the default (i.e.
void setMeasurementsShorttubesScale(double)
void setCustomColouredTSOSParts(TrackCommonFlags::TSOSPartsFlags)
void setLabels(TrackSystemController::TrackLabelModes)
void setCutAllowedPhi(const QList< VP1Interval > &)
virtual void setupSettingsFromControllerSpecific(TrackSystemController *)
void setTrackTubeRadius(const double &)
void setMaterialEffectsOnTrackScale(double)
void setRequiredNHits(const QList< unsigned > &)
void setCutAllowedEta(const VP1Interval &)
void setRequiredDetectorElement(const QString &id)
VP1Interval cutAllowedEta() const
QList< unsigned > cutRequiredNHits() const
Trk::IExtrapolator * propagator() const
TrackCommonFlags::TSOSPartsFlags customColouredTSOSParts() const
PropagationOptionFlags propagationOptions() const
TrackCommonFlags::TrackPartsFlags shownTrackParts() const
QList< VP1Interval > cutAllowedPhi() const
TrackCommonFlags::TSOSPartsFlags shownTSOSParts() const
static VP1CustomTourEditor * customTourEditor()

◆ setupSettingsFromControllerSpecific()

void TrackCollHandle_TruthTracks::setupSettingsFromControllerSpecific ( TrackSystemController * controller)
virtual

Reimplemented from TrackCollHandleBase.

Definition at line 179 of file TrackCollHandle_TruthTracks.cxx.

180{
181 connect(controller,SIGNAL(cutTruthFromIROnlyChanged(bool)),this,SLOT(setCutFromIROnly(bool)));
183
184 connect(controller,SIGNAL(cutExcludeBarcodeZeroChanged(bool)),this,SLOT(setCutExcludeBarcodeZero(bool)));
186
187 connect(controller,SIGNAL(cutTruthExcludeNeutralsChanged(bool)),this,SLOT(setCutExcludeNeutrals(bool)));
189
190 connect(controller,SIGNAL(showTruthAscObjsChanged(bool)),this,SLOT(setShowAscObjs(bool)));
191 setShowAscObjs(controller->showTruthAscObjs());
192}

◆ setUseDefaultCuts

void TrackCollHandleBase::setUseDefaultCuts ( bool useDefaults)
privateslotinherited

Definition at line 732 of file TrackCollHandleBase.cxx.

732 {
733 if ( (m_d->last_useDefaultCuts) == useDefaults) return;
734 messageVerbose("setUseDefaultCuts changed to "+str(useDefaults)+"- rechecking all handles");
735 // recheckCutStatusOfAllHandles();
736
737 setCutAllowedPt(useDefaultCuts()? common()->controller()->cutAllowedPt():m_d->matButton->cutAllowedPt());
738 setCutAllowedEta(useDefaultCuts()?common()->controller()->cutAllowedEta():m_d->matButton->cutAllowedEta());
739 setCutAllowedPhi(useDefaultCuts()?common()->controller()->cutAllowedPhi():m_d->matButton->cutAllowedPhi());
740 setRequiredNHits(useDefaultCuts()?common()->controller()->cutRequiredNHits():m_d->matButton->cutRequiredNHits());
741 setOnlyVertexAssocTracks(useDefaultCuts()?common()->controller()->cutOnlyVertexAssocTracks():m_d->matButton->cutOnlyVertexAssocTracks());
742}
bool cutOnlyVertexAssocTracks() const
Return true if this collection should only should tracks associated to a vertex.
VP1Interval cutAllowedEta() const
VP1Interval cutAllowedPt() const
QList< unsigned > cutRequiredNHits() const
QList< VP1Interval > cutAllowedPhi() const

◆ setUseShortMDTMeasurements

void TrackCollHandleBase::setUseShortMDTMeasurements ( bool b)
slotinherited

Definition at line 948 of file TrackCollHandleBase.cxx.

949{
950 if (m_d->tsos_useShortMDTMeasurements==b)
951 return;
952 m_d->tsos_useShortMDTMeasurements=b;
955 TrackHandleBase* handle;
956 while ((handle=getNextTrackHandle()))
959}

◆ setUseShortTRTMeasurements

void TrackCollHandleBase::setUseShortTRTMeasurements ( bool b)
slotinherited

Definition at line 933 of file TrackCollHandleBase.cxx.

934{
935 if (m_d->tsos_useShortTRTMeasurements==b)
936 return;
937 m_d->tsos_useShortTRTMeasurements=b;
940 TrackHandleBase* handle;
941 while ((handle=getNextTrackHandle()))
944}

◆ setVisible

void VP1StdCollection::setVisible ( bool b)
slotinherited

Definition at line 160 of file VP1StdCollection.cxx.

161{
162 if (m_d->visible==b||problemsLoading())
163 return;
164 m_d->visible=b;
165 messageVerbose("Visible state ("+text()+") => "+str(m_d->visible));
166
167 //Possibly load:
168 if (m_d->visible&&!m_d->loaded) {
169 m_d->loaded = true;
170 m_d->theswitch->whichChild = SO_SWITCH_NONE;
171 bool ok = load();
172 if (!ok) {
173 m_d->problemsloading = true;
174 m_d->visible = false;
175 m_d->checkBox->blockSignals(true);
176 m_d->checkBox->setChecked(false);
177 m_d->checkBox->setToolTip("Problems encountered during attempt to load this collection");
178 for (QWidget*w : widgetsForGuiRow())
179 w->setEnabled(false);
180 message("Problems loading "+text());
181 return;
182 }
183 m_d->theswitch->addChild(m_d->material);
184 m_d->theswitch->addChild(m_d->collsep);
185 }
186
187 Q_ASSERT(!problemsLoading());
188
189 //Update checkbox and switch:
190 if (m_d->checkBox->isChecked()!=m_d->visible) {
191 bool save = m_d->checkBox->blockSignals(true);
192 m_d->checkBox->setChecked(m_d->visible);
193 if (!save)
194 m_d->checkBox->blockSignals(false);
195 }
196 if ((m_d->theswitch->whichChild.getValue()==SO_SWITCH_ALL) != m_d->visible)
197 m_d->theswitch->whichChild = ( m_d->visible ? SO_SWITCH_ALL : SO_SWITCH_NONE );
198
199 visibilityChanged(m_d->visible);
200}
virtual QList< QWidget * > widgetsForGuiRow() const
virtual bool load()=0
bool problemsLoading() const

◆ str() [1/30]

QString VP1String::str ( const Amg::Vector3D & t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53{ return b?"True":"False"; }

◆ str() [3/30]

QString VP1String::str ( const char * c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

QString VP1String::str ( const double & d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81{ return QString::number(d); }

◆ str() [5/30]

QString VP1String::str ( const float & f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82{ return QString::number(f); }

◆ str() [6/30]

template<class T>
QString VP1String::str ( const HepGeom::BasicVector3D< T > & t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95{ return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor & c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31{
32 return c.isValid() ? c.name() : "Invalid";
33}

◆ str() [8/30]

template<class T>
QString VP1String::str ( const QFlags< T > & f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91{ return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T>
QString VP1String::str ( const QList< T > & t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102{ return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

QString VP1String::str ( const QString & s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49{ return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor & c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37{
39}
static QColor sbcol2qcol(const SbColor &)

◆ str() [12/30]

QString VP1String::str ( const SbVec2d & v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61{ double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }
#define y
#define x

◆ str() [13/30]

QString VP1String::str ( const SbVec2f & v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62{ float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s & v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63{ short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d & v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64{ double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }
#define z

◆ str() [16/30]

QString VP1String::str ( const SbVec3f & v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65{ float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s & v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66{ short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d & v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67{ double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f & v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68{ float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T>
QString VP1String::str ( const T * t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87{ return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void * p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49{
50 if (p) {
51 std::ostringstream s;
52 s << p;
53 // Explicitly naming QString here avoids a cppcheck warning.
54 return QString (s.str().c_str());
55 } else {
56 return "NULL";
57 }
58}

◆ str() [22/30]

QString VP1String::str ( const VP1Interval & i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43{
44 return i.toString();
45}

◆ str() [23/30]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77{ return QString::number(n); }

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75{ return QString::number(n); }

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79{ return QString::number(n); }

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80{ return QString::number(n); }

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73{ return QString::number(n); }

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78{ return QString::number(n); }

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76{ return QString::number(n); }

◆ str() [30/30]

QString VP1String::str ( unsigned short int n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74{ return QString::number(n); }

◆ systemBase()

IVP1System * VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50{ return m_system; }

◆ text()

QString VP1StdCollection::text ( ) const
inherited

Definition at line 132 of file VP1StdCollection.cxx.

133{
134 if (!m_d->textProvided) {
135 m_d->textProvided = true;
136 m_d->text = provideText();
137 }
138 return m_d->text;
139}
virtual QString provideText() const =0

◆ toBaseCollList()

template<class T>
QList< VP1Collection * > VP1Collection::toBaseCollList ( const QList< T * > & in)
staticinherited

Definition at line 80 of file VP1Collection.h.

81{
82 QList<VP1Collection*> l;
83 for (T * t : in)
84 l << static_cast<T*>(t);
85 return l;
86}

◆ toString()

QString TrackCollHandleBase::toString ( const COLOURBY & cb)
staticinherited

Definition at line 1160 of file TrackCollHandleBase.cxx.

1161{
1162 switch (cb) {
1163 case COLOUR_PERCOLLECTION: return "COLOUR_PERCOLLECTION";
1164 case COLOUR_RANDOM: return "COLOUR_RANDOM";
1165 case COLOUR_MOMENTUM: return "COLOUR_MOMENTUM";
1166 case COLOUR_CHARGE: return "COLOUR_CHARGE";
1167 case COLOUR_BYPID: return "COLOUR_BYPID";
1168 case COLOUR_DISTANCE: return "COLOUR_DISTANCE";
1169 default: return "Unknown (ERROR)";
1170 }
1171}

◆ trackHandleIterationBegin()

void TrackCollHandleBase::trackHandleIterationBegin ( )
protectedinherited

Definition at line 717 of file TrackCollHandleBase.cxx.

718{
719 m_d->itTrackHandles = m_d->trackhandles.begin();
720 m_d->itTrackHandlesEnd = m_d->trackhandles.end();
721}

◆ trackSelectionChanged

void TrackCollHandleBase::trackSelectionChanged ( )
slotinherited

Definition at line 703 of file TrackCollHandleBase.cxx.

704{
705 if (!isLoaded() || colourBy()!= COLOUR_DISTANCE)
706 return;
707 messageVerbose("trackSelectionChanged start");
709 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
710 for (;it!=itE;++it)
711 (*it)->updateMaterial();
713 messageVerbose("trackSelectionChanged end");
714}
COLOURBY colourBy() const

◆ trackTubeRadius()

double TrackCollHandleBase::trackTubeRadius ( ) const
inlineinherited

Definition at line 85 of file TrackCollHandleBase.h.

85{ return m_trackTubeRadius; }

◆ update3DObjectsOfAllHandles()

void TrackCollHandleBase::update3DObjectsOfAllHandles ( bool onlythosetouchingmuonchambers = false,
bool invalidatePropagatedPoints = false,
float maxR = 0.0 )
inherited

Definition at line 440 of file TrackCollHandleBase.cxx.

441{
442 if (!isLoaded())
443 return;
444 if (VP1Msg::verbose())
445 messageVerbose("update3DObjectsOfAllHandles start (onlythosetouchingmuonchambers = "
446 +str(onlythosetouchingmuonchambers)+", invalidatePropagatedPoints = "
447 +str(invalidatePropagatedPoints)+")");
449 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
450 if (onlythosetouchingmuonchambers) {
451 for (;it!=itE;++it)
452 if (!(*it)->touchedMuonChambers().empty())
453 (*it)->update3DObjects(invalidatePropagatedPoints, maxR);
454 } else {
455 for (;it!=itE;++it)
456 (*it)->update3DObjects(invalidatePropagatedPoints, maxR);
457 }
459 messageVerbose("update3DObjectsOfAllHandles end");
460}

◆ updateInDetProjectionsOfAllHandles()

void TrackCollHandleBase::updateInDetProjectionsOfAllHandles ( )
inherited

Definition at line 465 of file TrackCollHandleBase.cxx.

466{
467 if (!isLoaded())
468 return;
469 messageVerbose("updateInDetProjectionsOfAllHandles start");
471 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
472 for (;it!=itE;++it)
473 (*it)->updateInDetProjections();
475 messageVerbose("updateInDetProjectionsOfAllHandles end");
476
477}

◆ updateMaterialOfAllHandles()

void TrackCollHandleBase::updateMaterialOfAllHandles ( )
inherited

Definition at line 495 of file TrackCollHandleBase.cxx.

496{
497 if (!isLoaded())
498 return;
499 messageVerbose("updateMaterialOfAllHandles start");
501 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
502 for (;it!=itE;++it)
503 (*it)->updateMaterial();
505 messageVerbose("updateMaterialOfAllHandles end");
506}

◆ updateMuonProjectionsOfAllHandles()

void TrackCollHandleBase::updateMuonProjectionsOfAllHandles ( )
inherited

Definition at line 480 of file TrackCollHandleBase.cxx.

481{
482 if (!isLoaded())
483 return;
484 messageVerbose("updateMuonProjectionsOfAllHandles start");
486 std::vector<TrackHandleBase*>::iterator it(m_d->trackhandles.begin()),itE(m_d->trackhandles.end());
487 for (;it!=itE;++it)
488 (*it)->updateMuonProjections();
490 messageVerbose("updateMuonProjectionsOfAllHandles end");
491
492}

◆ updateObjectBrowserVisibilityCounts()

void TrackCollHandleBase::updateObjectBrowserVisibilityCounts ( )
privateinherited

Definition at line 1080 of file TrackCollHandleBase.cxx.

1080 {
1081 messageVerbose("TrackCollHandleBase::updateObjectBrowserVisibilityCounts called for "+name());
1082 QTreeWidget* trkObjBrowser = common()->controller()->trackObjBrowser();
1083 if (!trkObjBrowser || !m_d->objBrowseTree) {
1084 messageVerbose("TrackCollHandleBase::updateObjectBrowserVisibilityCounts: no common()->controller()->trackObjBrowser() and/or m_d->objBrowseTree. Aborting");
1085 messageVerbose("trkObjBrowser: "+str(trkObjBrowser)+"\t m_d->objBrowseTree: "+str(m_d->objBrowseTree));
1086 return;
1087 }
1088 QString text(QString(": (")+QString::number(nShownHandles())+QString("/")+QString::number(m_d->trackhandles.size())+QString(") visible"));
1089 m_d->objBrowseTree->setText(1, text);
1090}

◆ updateStates()

void VP1Collection::updateStates ( VP1CollStates & state,
const VP1CollStates & newInfo )
staticinherited

Definition at line 118 of file VP1Collection.cxx.

119{
120 VP1Msg::messageDebug("VP1Collection::updateStates() - start...");
121 QMapIterator<QByteArray,QByteArray> it(newInfo);
122 while (it.hasNext()) {
123 it.next();
124 state.insert(it.key(),it.value());
125 }
126 VP1Msg::messageDebug("VP1Collection::updateStates() - end.");
127}

◆ useDefaultCuts()

bool TrackCollHandleBase::useDefaultCuts ( ) const
inherited

Return true if this collection uses the default (i.e.

controller) cuts

Definition at line 1236 of file TrackCollHandleBase.cxx.

1237{
1238 if (!m_d->matButton) {
1239 message("ERROR: useDefaultCuts(..) called before init()");
1240 return true;
1241 }
1242 return m_d->matButton->useDefaultCuts();
1243}

◆ verbose()

bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

32{ return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1
static const bool s_vp1verbose

◆ vertexCutsAllowed()

void TrackCollHandleBase::vertexCutsAllowed ( bool )
inherited

◆ visibilityChanged

void VP1StdCollection::visibilityChanged ( bool )
signalinherited

◆ visible()

bool VP1StdCollection::visible ( ) const
inherited

Definition at line 142 of file VP1StdCollection.cxx.

143{
144 return m_d->visible;
145}

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184{
186 return;
187 std::cout << "WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<" undeleted helper class instances:"<<std::endl;
188
189 std::map<VP1HelperClassBase*,QString>::iterator it,itE(vp1helperclassbase_instanceMap.end());
190 for (it = vp1helperclassbase_instanceMap.begin();it!=itE;++it) {
191 std::cout << " ==> "<<it->first<<": "<<it->first->m_helpername.toStdString()
192 << (it->second.isEmpty()?QString(""):" (in system "+it->second+")").toStdString()<<std::endl;
193 }
194}

◆ widgetsForGuiRow()

QList< QWidget * > VP1Collection::widgetsForGuiRow ( ) const
virtualinherited

Definition at line 62 of file VP1Collection.cxx.

63{
64 if (!m_d->widgetsForGuiRowProvided) {
65 m_d->widgetsForGuiRowProvided = true;
66 m_d->widgetsForGuiRow = provideWidgetsForGuiRow();
67 }
68 return m_d->widgetsForGuiRow;
69}
virtual QList< QWidget * > provideWidgetsForGuiRow() const =0

Member Data Documentation

◆ m_colourby

COLOURBY TrackCollHandleBase::m_colourby
privateinherited

Definition at line 220 of file TrackCollHandleBase.h.

◆ m_commonData

TrackSysCommonData* TrackCollHandleBase::m_commonData
privateinherited

Definition at line 209 of file TrackCollHandleBase.h.

◆ m_cut_allowedEta

VP1Interval TrackCollHandleBase::m_cut_allowedEta
privateinherited

Definition at line 223 of file TrackCollHandleBase.h.

◆ m_cut_allowedPhi

QList<VP1Interval> TrackCollHandleBase::m_cut_allowedPhi
privateinherited

Definition at line 224 of file TrackCollHandleBase.h.

◆ m_cut_allowedPtSq

VP1Interval TrackCollHandleBase::m_cut_allowedPtSq
privateinherited

Definition at line 222 of file TrackCollHandleBase.h.

◆ m_cut_eta_allowall

bool TrackCollHandleBase::m_cut_eta_allowall
privateinherited

Definition at line 228 of file TrackCollHandleBase.h.

◆ m_cut_etaptphi_allwillfail

bool TrackCollHandleBase::m_cut_etaptphi_allwillfail
privateinherited

Definition at line 230 of file TrackCollHandleBase.h.

◆ m_cut_phi_allowall

bool TrackCollHandleBase::m_cut_phi_allowall
privateinherited

Definition at line 229 of file TrackCollHandleBase.h.

◆ m_cut_pt_allowall

bool TrackCollHandleBase::m_cut_pt_allowall
privateinherited

Definition at line 227 of file TrackCollHandleBase.h.

◆ m_cut_requiredNHits

QList<unsigned> TrackCollHandleBase::m_cut_requiredNHits
privateinherited

Definition at line 225 of file TrackCollHandleBase.h.

◆ m_d

Imp* TrackCollHandle_TruthTracks::m_d
private

Definition at line 55 of file TrackCollHandle_TruthTracks.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_labels

TrackSystemController::TrackLabelModes TrackCollHandleBase::m_labels
privateinherited

Definition at line 216 of file TrackCollHandleBase.h.

◆ m_labelsPosOffsets

QList<int> TrackCollHandleBase::m_labelsPosOffsets
privateinherited

Definition at line 218 of file TrackCollHandleBase.h.

◆ m_labelsTrkOffset

float TrackCollHandleBase::m_labelsTrkOffset
privateinherited

Definition at line 217 of file TrackCollHandleBase.h.

◆ m_nshownhandles

int TrackCollHandleBase::m_nshownhandles
privateinherited

Definition at line 207 of file TrackCollHandleBase.h.

◆ m_parts

TrackCommonFlags::TrackPartsFlags TrackCollHandleBase::m_parts
privateinherited

Definition at line 215 of file TrackCollHandleBase.h.

◆ m_propagationOptions

TrackSystemController::PropagationOptionFlags TrackCollHandleBase::m_propagationOptions
privateinherited

Definition at line 213 of file TrackCollHandleBase.h.

◆ m_propagator

Trk::IExtrapolator* TrackCollHandleBase::m_propagator
privateinherited

Definition at line 212 of file TrackCollHandleBase.h.

◆ m_propMaxRadius

float TrackCollHandleBase::m_propMaxRadius
privateinherited

Definition at line 214 of file TrackCollHandleBase.h.

◆ m_requiredDetectorElement

QString TrackCollHandleBase::m_requiredDetectorElement
privateinherited

Definition at line 226 of file TrackCollHandleBase.h.

◆ m_sephelper

VP1ExtraSepLayerHelper* TrackCollHandleBase::m_sephelper
privateinherited

Definition at line 211 of file TrackCollHandleBase.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ m_trackTubeRadius

double TrackCollHandleBase::m_trackTubeRadius
privateinherited

Definition at line 219 of file TrackCollHandleBase.h.

◆ m_type

TrackType::Type TrackCollHandleBase::m_type
privateinherited

Definition at line 208 of file TrackCollHandleBase.h.

◆ s_vp1verbose

const bool VP1HelperClassBase::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 69 of file VP1HelperClassBase.h.


The documentation for this class was generated from the following files: