ATLAS Offline Software
Loading...
Searching...
No Matches
PRDHandleBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PRDHANDLEBASE_H
6#define PRDHANDLEBASE_H
7
8//Fixme: check and doublecheck how to reduce memory used per prd (also includes maps in collhandle).
9
11
12// GeoModel
14//
15#include "GeoModelKernel/GeoVPhysVol.h"
16
17#include <QFlags>
18#include <QStringList>
19
20
21
22
24class SoMaterial;
25class SoNode;
26class SoTransform;
27class SoSeparator;
28
29namespace Trk {
30 class PrepRawData;
31}
32
33class TracksAndSegments;
34
36public:
37
39 virtual ~PRDHandleBase();
40
41 void setVisible(bool);//use by the collection handle.
42 bool visible() const { return m_visible; }
43 virtual void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed) = 0;
44 virtual int regionIndex() { return 0; }//prds near each other should return same index (used for optimal LOD usage in AUTO detail mode) (only called once/event)
45 virtual bool highLight() const { return false; }//Return true to get hit highlighted (for e.g. a TRT hits with HT).
46 //Outlier highlighting overrides this and is handled in the base classes.
47 virtual bool transformUsesSurfacePositionOnly() const { return false; }//Override and return true if should use just the surface position.
48
49 //Return current shapes (0 if not built at the moment):
50 SoSeparator* sepSimple() const;
51 SoSeparator* sepDetailed() const;
52
53 PRDSysCommonData * common() const { return m_common; }
54
55 virtual Amg::Vector3D center() const;//Default impl. returns positionPRD()
56 Amg::Vector3D positionPRD() const;// The center of the getPRD()
57 Amg::Vector3D positionSecondPRD() const;//The center of the getSecondPRD(). returns (0,0,0) if not available.
58
59 //For PRDCollHandleBase only:
61 virtual SoTransform * createTransform() const;
62 void update3DObjects();//Call whenever some setting changes in a way which requires changes to the shape of the 3D representation of the prd.
63 void updateMaterial();
64
65 virtual QStringList clicked() const;//Called when user selects the node. The returned strings will be displayed in the textbox.
66 //Reimplement the next two for muon prds:
67 virtual bool inMuonChamber() const { return false; }
68 virtual GeoPVConstLink parentMuonChamberPV() const { return GeoPVConstLink(); }
69
71
72 virtual const Trk::PrepRawData * getPRD() const = 0;//Reimplement to allow access to prd pointer in a generic way.
73 virtual const Trk::PrepRawData * getSecondPRD() const { return 0; }//For SCT spacepoints
74
75 virtual bool isSane() const {return true;}
76private:
77
78 // Illegal to copy/assign a PRDHandleBase:
81
82 class Imp;
85// inline void registerTransform(SoTransform*);
86 bool m_visible;//Here for inlining
87
88};
89
90#endif
virtual const Trk::PrepRawData * getSecondPRD() const
virtual const Trk::PrepRawData * getPRD() const =0
virtual ~PRDHandleBase()
PRDSysCommonData * m_common
virtual bool transformUsesSurfacePositionOnly() const
virtual void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)=0
void setVisible(bool)
virtual int regionIndex()
virtual bool isSane() const
Returns false if the PRD is not safe to draw.
SoSeparator * sepDetailed() const
virtual SoTransform * createTransform() const
Amg::Transform3D getTransform_CLHEP() const
bool visible() const
Amg::Vector3D positionPRD() const
virtual QStringList clicked() const
PRDHandleBase(PRDCollHandleBase *)
PRDSysCommonData * common() const
virtual bool inMuonChamber() const
virtual bool highLight() const
PRDHandleBase & operator=(const PRDHandleBase &)
PRDHandleBase(const PRDHandleBase &)
PRDCollHandleBase * collHandle() const
virtual Amg::Vector3D center() const
virtual GeoPVConstLink parentMuonChamberPV() const
Amg::Vector3D positionSecondPRD() const
SoSeparator * sepSimple() const
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.