ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
VP1RawDataHandle_SCT_RDO Class Reference

#include <VP1RawDataHandle_SCT_RDO.h>

Inheritance diagram for VP1RawDataHandle_SCT_RDO:
Collaboration diagram for VP1RawDataHandle_SCT_RDO:

Public Member Functions

 VP1RawDataHandle_SCT_RDO (VP1RawDataCollBase *, const SCT_RDORawData *)
 
virtual ~VP1RawDataHandle_SCT_RDO ()
 
QStringList clicked (bool verbose) const
 
VP1RawDataFlags::InDetPartsFlags inInDetParts () const
 
VP1RawDataCollBasecoll () const
 
VP1RawDataCommonDatacommon () const
 
void setVisible (bool)
 
bool visible () const
 
void update3DObjects ()
 
virtual Amg::Vector3D center ()
 
void updateShownOutlines ()
 

Static Public Member Functions

static QString unsignedToHex (unsigned)
 

Protected Member Functions

SoNode * buildShape ()
 
SoTransform * buildTransform ()
 
const InDetDD::SiDetectorElementelement () const
 

Protected Attributes

const SCT_RDORawDatam_data
 

Private Attributes

Impm_d
 
VP1RawDataCollBasem_coll
 
bool m_visible
 

Detailed Description

Definition at line 25 of file VP1RawDataHandle_SCT_RDO.h.

Constructor & Destructor Documentation

◆ VP1RawDataHandle_SCT_RDO()

VP1RawDataHandle_SCT_RDO::VP1RawDataHandle_SCT_RDO ( VP1RawDataCollBase coll,
const SCT_RDORawData data 
)

Definition at line 36 of file VP1RawDataHandle_SCT_RDO.cxx.

38 {
39 }

◆ ~VP1RawDataHandle_SCT_RDO()

VP1RawDataHandle_SCT_RDO::~VP1RawDataHandle_SCT_RDO ( )
virtual

Definition at line 42 of file VP1RawDataHandle_SCT_RDO.cxx.

43 {
44 }

Member Function Documentation

◆ buildShape()

SoNode * VP1RawDataHandle_SCT_RDO::buildShape ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 76 of file VP1RawDataHandle_SCT_RDO.cxx.

77 {
78  static const SCT_ID * idhelper = VP1DetInfo::sctIDHelper();
79  const InDetDD::SiDetectorElement * elem = element();
80  const int ngroup = m_data->getGroupSize();
81  if (!elem||ngroup<1)
82  return common()->nodeManager()->getShapeNode_Point();//fixme: warn
83 
84  const InDetDD::SCT_ModuleSideDesign& design = dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(elem->design());
85 
86  SoLineSet * line = new SoLineSet;
87  SoVertexProperty * vertices = new SoVertexProperty;
88  line->vertexProperty = vertices;
89 
90  Amg::Transform3D invTransform(elem->transform().inverse());
91  const int ifirststrip(idhelper ? idhelper->strip(m_data->identify()) : 0);
92  int iver(0);
93  std::pair<InDetDD::SiLocalPosition,InDetDD::SiLocalPosition> localEnds;
94  for (int i=0;i<ngroup;++i) {
95  std::pair< Amg::Vector3D, Amg::Vector3D > globalEnds = elem->endsOfStrip(design.positionFromStrip(ifirststrip+i));
96  Amg::Vector3D localA(invTransform*globalEnds.first);
97  Amg::Vector3D localB(invTransform*globalEnds.second);
98  localEnds = design.endsOfStrip(design.positionFromStrip(ifirststrip+i));
99  vertices->vertex.set1Value(iver++,localA.x(),localA.y(),0);
100  vertices->vertex.set1Value(iver++,localB.x(),localB.y(),0);
101  line->numVertices.set1Value(i,2);
102  }
103  return line;
104 }

◆ buildTransform()

SoTransform * VP1RawDataHandle_SCT_RDO::buildTransform ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 107 of file VP1RawDataHandle_SCT_RDO.cxx.

108 {
109  const InDetDD::SiDetectorElement * elem = element();
110  if (!elem)
111  return common()->nodeManager()->getUnitTransform();//fixme: warn
113 }

◆ center()

Amg::Vector3D VP1RawDataHandleBase::center ( )
virtualinherited

Definition at line 166 of file VP1RawDataHandleBase.cxx.

167 {
169  assert(m_d->sep
170  && m_d->sep->getNumChildren()>0
171  && m_d->sep->getChild(0)->getTypeId().isDerivedFrom(SoTransform::getClassTypeId()));
172 
173  float x,y,z;
174  static_cast<SoTransform*>(m_d->sep->getChild(0))->translation.getValue().getValue(x,y,z);
175  //NB: We assume that the center part of the transform is zero
176  return Amg::Vector3D(x,y,z);
177 }

◆ clicked()

QStringList VP1RawDataHandle_SCT_RDO::clicked ( bool  verbose) const
virtual

Implements VP1RawDataHandleBase.

Definition at line 47 of file VP1RawDataHandle_SCT_RDO.cxx.

48 {
49  static const SCT_ID * idhelper = VP1DetInfo::sctIDHelper();
50  QStringList l;
51  l << " ===> SCT_RDORawData";
52  l << " Data word: "+unsignedToHex(m_data->getWord());
53  if (verbose) {
54  if (idhelper) {
56  bool barrel(false);
57  if (idhelper->barrel_ec(id)==-2) l << " Part: End Cap C";
58  else if (idhelper->barrel_ec(id)==2) l << " Part: End Cap A";
59  else { l << " Part: Barrel"; barrel = true; }
60  l << " "+QString(barrel?"Layer":"Disk")+": "+QString::number(idhelper->layer_disk(id));
61  l << " Phi module: "+QString::number(idhelper->phi_module(id));
62  l << " Eta module: "+QString::number(idhelper->eta_module(id));
63  l << " Side: "+QString(idhelper->side(id)==0 ? "Inner":"Outer");
64  l << " Group Size: "+QString::number(m_data->getGroupSize());
65  if (m_data->getGroupSize()>1)
66  l << " Strips: "+QString::number(idhelper->strip(id))+".."+QString::number(idhelper->strip(id)+m_data->getGroupSize()-1);
67  else
68  l << " Strip: "+QString::number(idhelper->strip(id));
69  }
70  //Fixme: Try dynamic cast to SCT3_RawData, and print more information if it succeeds.
71  }
72  return l;
73 }

◆ coll()

VP1RawDataCollBase* VP1RawDataHandleBase::coll ( ) const
inlineinherited

Definition at line 40 of file VP1RawDataHandleBase.h.

40 { return m_coll; }

◆ common()

VP1RawDataCommonData* VP1RawDataHandleBase::common ( ) const
inlineinherited

Definition at line 41 of file VP1RawDataHandleBase.h.

41 { return m_coll->common(); }

◆ element()

const InDetDD::SiDetectorElement * VP1RawDataHandle_SCT_RDO::element ( ) const
protected

Definition at line 116 of file VP1RawDataHandle_SCT_RDO.cxx.

117 {
119  if (!detmgr)
120  return 0;
121  return detmgr->getDetectorElement(m_data->identify());
122 }

◆ inInDetParts()

VP1RawDataFlags::InDetPartsFlags VP1RawDataHandle_SCT_RDO::inInDetParts ( ) const
virtual

Reimplemented from VP1RawDataHandleBase.

Definition at line 131 of file VP1RawDataHandle_SCT_RDO.cxx.

132 {
133  const InDetDD::SiDetectorElement * elem = element();
134  if (!elem)
135  return VP1RawDataFlags::All;
136  if (elem->center().z()>=0)
138  else
140 
141 }

◆ setVisible()

void VP1RawDataHandleBase::setVisible ( bool  vis)
inherited

Definition at line 68 of file VP1RawDataHandleBase.cxx.

69 {
70  if (vis==m_visible)
71  return;
72  m_visible=vis;
73  if (vis) {
74  if (!m_d->hasShape())
75  m_d->rebuild3DObjects(this);
77  } else {
79  }
80 }

◆ unsignedToHex()

QString VP1RawDataHandleBase::unsignedToHex ( unsigned  i)
staticinherited

Definition at line 158 of file VP1RawDataHandleBase.cxx.

159 {
160  std::ostringstream s;
161  s << "0x" << std::hex << i;
162  return QString(s.str().c_str()).toUpper();
163 }

◆ update3DObjects()

void VP1RawDataHandleBase::update3DObjects ( )
inherited

Definition at line 83 of file VP1RawDataHandleBase.cxx.

84 {
85  if (m_visible) {
86  m_d->rebuild3DObjects(this);
87  } else {
88  //Simply clear the present 3D objects. They will only be recreated if/when the handle becomes visible again.
89  m_d->clearShape();
90  }
91 }

◆ updateShownOutlines()

void VP1RawDataHandleBase::updateShownOutlines ( )
inherited

Definition at line 180 of file VP1RawDataHandleBase.cxx.

181 {
182  if (!m_d->sep)
183  return;
185 }

◆ visible()

bool VP1RawDataHandleBase::visible ( ) const
inlineinherited

Definition at line 44 of file VP1RawDataHandleBase.h.

44 { return m_visible; }

Member Data Documentation

◆ m_coll

VP1RawDataCollBase* VP1RawDataHandleBase::m_coll
privateinherited

Definition at line 70 of file VP1RawDataHandleBase.h.

◆ m_d

Imp* VP1RawDataHandleBase::m_d
privateinherited

Definition at line 68 of file VP1RawDataHandleBase.h.

◆ m_data

const SCT_RDORawData* VP1RawDataHandle_SCT_RDO::m_data
protected

Definition at line 37 of file VP1RawDataHandle_SCT_RDO.h.

◆ m_visible

bool VP1RawDataHandleBase::m_visible
privateinherited

Definition at line 71 of file VP1RawDataHandleBase.h.


The documentation for this class was generated from the following files:
SCT_RDORawData::getGroupSize
virtual int getGroupSize() const =0
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
checkFileSG.line
line
Definition: checkFileSG.py:75
VP1RawDataHandleBase::unsignedToHex
static QString unsignedToHex(unsigned)
Definition: VP1RawDataHandleBase.cxx:158
VP1RawDataHandleBase::m_coll
VP1RawDataCollBase * m_coll
Definition: VP1RawDataHandleBase.h:70
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1RawDataFlags::EndCapPositive
@ EndCapPositive
Definition: VP1RawDataFlags.h:27
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
VP1RawDataHandleBase::Imp::ensureInitSepAndTransform
void ensureInitSepAndTransform(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:94
InDetDD::SCT_ModuleSideDesign
Definition: SCT_ModuleSideDesign.h:40
InDetDD::SolidStateDetectorElementBase::center
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
VP1RawDataCommonData::nodeManager
HitsSoNodeManager * nodeManager() const
Definition: VP1RawDataCommonData.h:42
VP1RawDataHandleBase::Imp::ensureAttach3DObjects
void ensureAttach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:134
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
x
#define x
InDetDD::SCT_DetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:64
VP1RawDataHandleBase::VP1RawDataHandleBase
VP1RawDataHandleBase(VP1RawDataCollBase *)
Definition: VP1RawDataHandleBase.cxx:50
VP1RawDataHandleBase::Imp::hasShape
bool hasShape() const
Definition: VP1RawDataHandleBase.cxx:36
VP1RawDataHandle_SCT_RDO::m_data
const SCT_RDORawData * m_data
Definition: VP1RawDataHandle_SCT_RDO.h:37
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1RawDataCommonData::updateVolumeOutlines
void updateVolumeOutlines(SoGroup *)
Definition: VP1RawDataCommonData.cxx:91
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::SCT_ModuleSideDesign::positionFromStrip
virtual SiLocalPosition positionFromStrip(const int stripNumber) const
gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId ...
Definition: SCT_ModuleSideDesign.cxx:95
VP1RawDataHandleBase::Imp::sep
SoSeparator * sep
Definition: VP1RawDataHandleBase.cxx:33
VP1RawDataHandleBase::Imp::rebuild3DObjects
void rebuild3DObjects(VP1RawDataHandleBase *)
Definition: VP1RawDataHandleBase.cxx:107
InDetDD::SiDetectorElement::endsOfStrip
std::pair< Amg::Vector3D, Amg::Vector3D > endsOfStrip(const Amg::Vector2D &position) const
Special method for SCT to retrieve the two ends of a "strip" Returned coordinates are in global frame...
Definition: SiDetectorElement.cxx:339
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
python.selection.number
number
Definition: selection.py:20
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
VP1DetInfo::sctIDHelper
static const SCT_ID * sctIDHelper()
Definition: VP1DetInfo.cxx:165
InDetRawData::getWord
unsigned int getWord() const
Definition: InDetRawData.h:47
y
#define y
VP1RawDataFlags::BarrelNegative
@ BarrelNegative
Definition: VP1RawDataFlags.h:26
VP1RawDataHandleBase::m_d
Imp * m_d
Definition: VP1RawDataHandleBase.h:67
SCT_ID
Definition: SCT_ID.h:68
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
HitsSoNodeManager::getShapeNode_Point
SoNode * getShapeNode_Point()
Definition: HitsSoNodeManager.cxx:412
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
DetectorZone::barrel
@ barrel
VP1RawDataHandleBase::coll
VP1RawDataCollBase * coll() const
Definition: VP1RawDataHandleBase.h:40
VP1RawDataFlags::All
@ All
Definition: VP1RawDataFlags.h:31
VP1RawDataFlags::BarrelPositive
@ BarrelPositive
Definition: VP1RawDataFlags.h:25
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
VP1RawDataHandleBase::Imp::ensureDetach3DObjects
void ensureDetach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:146
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
VP1RawDataFlags::EndCapNegative
@ EndCapNegative
Definition: VP1RawDataFlags.h:28
VP1RawDataHandleBase::m_visible
bool m_visible
Definition: VP1RawDataHandleBase.h:71
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
VP1RawDataHandleBase::Imp::clearShape
void clearShape()
Definition: VP1RawDataHandleBase.cxx:41
InDetDD::SCT_ModuleSideDesign::endsOfStrip
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const override=0
give the ends of strips
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
VP1RawDataHandleBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataHandleBase.h:41
InDetDD::SolidStateDetectorElementBase::transform
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
HitsSoNodeManager::getUnitTransform
SoTransform * getUnitTransform()
Definition: HitsSoNodeManager.cxx:456
VP1RawDataHandle_SCT_RDO::element
const InDetDD::SiDetectorElement * element() const
Definition: VP1RawDataHandle_SCT_RDO.cxx:116
VP1RawDataCollBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataCollBase.h:39
VP1DetInfo::sctDetMgr
static const InDetDD::SCT_DetectorManager * sctDetMgr()
Definition: VP1DetInfo.cxx:146
Identifier
Definition: IdentifierFieldParser.cxx:14