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

#include <VP1RawDataHandle_PixelRDO.h>

Inheritance diagram for VP1RawDataHandle_PixelRDO:
Collaboration diagram for VP1RawDataHandle_PixelRDO:

Public Member Functions

 VP1RawDataHandle_PixelRDO (VP1RawDataCollBase *, const PixelRDORawData *)
 
virtual ~VP1RawDataHandle_PixelRDO ()
 
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 PixelRDORawDatam_data
 

Private Attributes

Impm_d
 
VP1RawDataCollBasem_coll
 
bool m_visible
 

Detailed Description

Definition at line 25 of file VP1RawDataHandle_PixelRDO.h.

Constructor & Destructor Documentation

◆ VP1RawDataHandle_PixelRDO()

VP1RawDataHandle_PixelRDO::VP1RawDataHandle_PixelRDO ( VP1RawDataCollBase coll,
const PixelRDORawData data 
)

Definition at line 29 of file VP1RawDataHandle_PixelRDO.cxx.

31 {
32 }

◆ ~VP1RawDataHandle_PixelRDO()

VP1RawDataHandle_PixelRDO::~VP1RawDataHandle_PixelRDO ( )
virtual

Definition at line 35 of file VP1RawDataHandle_PixelRDO.cxx.

36 {
37 }

Member Function Documentation

◆ buildShape()

SoNode * VP1RawDataHandle_PixelRDO::buildShape ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 68 of file VP1RawDataHandle_PixelRDO.cxx.

69 {
70  return common()->nodeManager()->getShapeNode_Point();
71 }

◆ buildTransform()

SoTransform * VP1RawDataHandle_PixelRDO::buildTransform ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 74 of file VP1RawDataHandle_PixelRDO.cxx.

75 {
76  //Fixme: Do we need more?
77  const InDetDD::SiDetectorElement * elem = element();
78  if (!elem)
79  return common()->nodeManager()->getUnitTransform();//fixme: warn
80  Amg::Vector2D localpos = elem->rawLocalPositionOfCell(m_data->identify());//Fixme:raw or lorentz corrected?? Make it option?
81 
82 // return VP1LinAlgUtils::toSoTransform(elem->transform() * HepGeom::Translate3D(localpos.x(),localpos.y(),0));
83  Amg::Transform3D transf = elem->transform();
84  transf = transf * Amg::Translation3D(localpos.x(),localpos.y(),0);
85  return VP1LinAlgUtils::toSoTransform( transf );
86 }

◆ 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_PixelRDO::clicked ( bool  verbose) const
virtual

Implements VP1RawDataHandleBase.

Definition at line 40 of file VP1RawDataHandle_PixelRDO.cxx.

41 {
42  static const PixelID * idhelper = VP1DetInfo::pixelIDHelper();
43  QStringList l;
44  l << " ===> PixelRDORawData";
45  l << " Data word: "+unsignedToHex(m_data->getWord());
46  if (verbose) {
47  if (idhelper) {
48  //Fixme: We should have common identify -> QStringList method in VP1DetInfo!!
50  const bool barrel = idhelper->is_barrel(id);
51  l << " Barrel: "+QString(barrel?"Yes":"No");
52  l << " B-Layer: "+QString(idhelper->is_blayer(id)?"Yes":"No");
53  l << " "+QString(barrel?"Layer":"Disk")+": "+QString::number(idhelper->layer_disk(id));
54  l << " Phi module: "+QString::number(idhelper->phi_module(id));
55  l << " Eta module: "+QString::number(idhelper->eta_module(id));
56  l << " Phi index: "+QString::number(idhelper->phi_index(id));
57  l << " Eta index: "+QString::number(idhelper->eta_index(id));
58  }
59  l << " Time over Threshold (0..255): "+QString::number(m_data->getToT());
60  l << " Beam Crossing ID: "+QString::number(m_data->getBCID());
61  l << " Level 1 accept (0..15): "+QString::number(m_data->getLVL1A());
62  l << " ATLAS LVL1 ID (0-255): "+QString::number(m_data->getLVL1ID());
63  }
64  return l;
65 }

◆ 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_PixelRDO::element ( ) const
protected

Definition at line 89 of file VP1RawDataHandle_PixelRDO.cxx.

90 {
92  if (!detmgr)
93  return 0;
94  return detmgr->getDetectorElement(m_data->identify());
95 }

◆ inInDetParts()

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

Reimplemented from VP1RawDataHandleBase.

Definition at line 104 of file VP1RawDataHandle_PixelRDO.cxx.

105 {
106  const InDetDD::SiDetectorElement * elem = element();
107  if (!elem)
108  return VP1RawDataFlags::All;
109  if (elem->center().z()>=0)
111  else
113 
114 }

◆ 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 PixelRDORawData* VP1RawDataHandle_PixelRDO::m_data
protected

Definition at line 37 of file VP1RawDataHandle_PixelRDO.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:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
VP1RawDataHandleBase::unsignedToHex
static QString unsignedToHex(unsigned)
Definition: VP1RawDataHandleBase.cxx:158
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
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
VP1RawDataHandleBase::Imp::ensureInitSepAndTransform
void ensureInitSepAndTransform(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:94
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
PixelRDORawData::getLVL1ID
virtual int getLVL1ID() const =0
InDetDD::SolidStateDetectorElementBase::center
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
VP1DetInfo::pixelDetMgr
static const InDetDD::PixelDetectorManager * pixelDetMgr()
Definition: VP1DetInfo.cxx:145
VP1RawDataCommonData::nodeManager
HitsSoNodeManager * nodeManager() const
Definition: VP1RawDataCommonData.h:42
VP1DetInfo::pixelIDHelper
static const PixelID * pixelIDHelper()
Definition: VP1DetInfo.cxx:164
VP1RawDataHandleBase::Imp::ensureAttach3DObjects
void ensureAttach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:134
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
PixelRDORawData::getLVL1A
virtual int getLVL1A() const =0
x
#define x
VP1RawDataHandleBase::VP1RawDataHandleBase
VP1RawDataHandleBase(VP1RawDataCollBase *)
Definition: VP1RawDataHandleBase.cxx:50
PixelID::is_blayer
bool is_blayer(const Identifier &id) const
Test for b-layer - WARNING: id MUST be pixel id, otherwise answer is not accurate....
Definition: PixelID.h:633
VP1RawDataHandleBase::Imp::hasShape
bool hasShape() const
Definition: VP1RawDataHandleBase.cxx:36
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
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
VP1RawDataHandleBase::Imp::sep
SoSeparator * sep
Definition: VP1RawDataHandleBase.cxx:33
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
PixelRDORawData::getToT
virtual int getToT() const =0
VP1RawDataHandleBase::Imp::rebuild3DObjects
void rebuild3DObjects(VP1RawDataHandleBase *)
Definition: VP1RawDataHandleBase.cxx:107
PixelRDORawData::getBCID
virtual int getBCID() const =0
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
VP1RawDataHandle_PixelRDO::m_data
const PixelRDORawData * m_data
Definition: VP1RawDataHandle_PixelRDO.h:37
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
python.selection.number
number
Definition: selection.py:20
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::SolidStateDetectorElementBase::rawLocalPositionOfCell
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Definition: SolidStateDetectorElementBase.cxx:230
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
HitsSoNodeManager::getShapeNode_Point
SoNode * getShapeNode_Point()
Definition: HitsSoNodeManager.cxx:412
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
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
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
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
PixelID
Definition: PixelID.h:67
VP1RawDataHandleBase::Imp::clearShape
void clearShape()
Definition: VP1RawDataHandleBase.cxx:41
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
VP1RawDataHandle_PixelRDO::element
const InDetDD::SiDetectorElement * element() const
Definition: VP1RawDataHandle_PixelRDO.cxx:89
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
VP1RawDataCollBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataCollBase.h:39
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
Identifier
Definition: IdentifierFieldParser.cxx:14