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

#include <VP1RawDataHandle_TRT_RDO.h>

Inheritance diagram for VP1RawDataHandle_TRT_RDO:
Collaboration diagram for VP1RawDataHandle_TRT_RDO:

Public Member Functions

 VP1RawDataHandle_TRT_RDO (VP1RawDataCollBase *, const TRT_LoLumRawData *)
 
virtual ~VP1RawDataHandle_TRT_RDO ()
 
QStringList clicked (bool verbose) const
 
VP1RawDataFlags::InDetPartsFlags inInDetParts () const
 
bool highThreshold () const
 
double timeOverThreshold () 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::TRT_BaseElementelement () const
 
int strawID () const
 

Protected Attributes

const TRT_LoLumRawDatam_data
 

Private Attributes

Impm_d
 
VP1RawDataCollBasem_coll
 
bool m_visible
 

Detailed Description

Definition at line 25 of file VP1RawDataHandle_TRT_RDO.h.

Constructor & Destructor Documentation

◆ VP1RawDataHandle_TRT_RDO()

VP1RawDataHandle_TRT_RDO::VP1RawDataHandle_TRT_RDO ( VP1RawDataCollBase coll,
const TRT_LoLumRawData data 
)

Definition at line 34 of file VP1RawDataHandle_TRT_RDO.cxx.

36 {
37 }

◆ ~VP1RawDataHandle_TRT_RDO()

VP1RawDataHandle_TRT_RDO::~VP1RawDataHandle_TRT_RDO ( )
virtual

Definition at line 40 of file VP1RawDataHandle_TRT_RDO.cxx.

41 {
42 }

Member Function Documentation

◆ buildShape()

SoNode * VP1RawDataHandle_TRT_RDO::buildShape ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 76 of file VP1RawDataHandle_TRT_RDO.cxx.

77 {
78  const InDetDD::TRT_BaseElement * elem = element();
79  double strawlength = elem ? elem->strawLength() : 200.0;
80 
81  SoNode * node = common()->nodeManager()->getShapeNode_DriftTube(0.5*strawlength,0.0/*0 radius for line*/);
82  if (highThreshold() && static_cast<VP1RawDataColl_TRT_RDO*>(coll())->useSpecialHTMat()) {
83  SoGroup * gr = new SoGroup;
84  gr->addChild(coll()->common()->controller()->trtHTMaterial());
85  gr->addChild(node);
86  return gr;
87  } else {
88  return node;
89  }
90 }

◆ buildTransform()

SoTransform * VP1RawDataHandle_TRT_RDO::buildTransform ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 93 of file VP1RawDataHandle_TRT_RDO.cxx.

94 {
95  const InDetDD::TRT_BaseElement * elem = element();
96  const int istraw = strawID();
97  if (istraw<0||!elem)
98  return new SoTransform;//fixme
100 }

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

Implements VP1RawDataHandleBase.

Definition at line 45 of file VP1RawDataHandle_TRT_RDO.cxx.

46 {
47  static const TRT_ID * idhelper = VP1DetInfo::trtIDHelper();
48  QStringList l;
49  l << " ===> TRT_LoLumRawData";
50  l << " Data word: "+unsignedToHex(m_data->getWord());
51  if (verbose) {
52  if (idhelper) {
53  //Fixme: We should have common identify -> QStringList method in VP1DetInfo!!
55  int barrel_ec = idhelper->barrel_ec(id);
56  bool barrel(barrel_ec==1||barrel_ec==-1);
57  l << QString(barrel?"Barrel":"End Cap")+" "+QString(barrel_ec>0?"A":"C");
58  l << " Phi module: "+QString::number(idhelper->phi_module(id));
59  l << " "+QString(barrel?"Layer":"Wheel")+": "+QString::number(idhelper->layer_or_wheel(id));
60  l << " Straw Layer: "+QString::number(idhelper->straw_layer(id));
61  l << " Straw: "+QString::number(idhelper->straw(id));
62  }
63  l << " High Level: "+QString(m_data->highLevel()?"Yes":"No");
64  l << " Time over Threshold (Gaudi::Units::ns): "+QString::number(m_data->timeOverThreshold());
65  // //Fixme:
66  // virtual bool highLevel(int /* BX */) const;
67  // virtual int driftTimeBin() const; // Position of first leading edge
68  // virtual int trailingEdge() const; // Position of last trailing edge
69  // virtual bool firstBinHigh() const; // True if first time bin is high
70  // virtual bool lastBinHigh() const; // True if last time bin is high
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::TRT_BaseElement * VP1RawDataHandle_TRT_RDO::element ( ) const
protected

Definition at line 113 of file VP1RawDataHandle_TRT_RDO.cxx.

114 {
116  if (!detmgr)
117  return 0;
118  return detmgr->getElement(m_data->identify());
119 }

◆ highThreshold()

bool VP1RawDataHandle_TRT_RDO::highThreshold ( ) const

Definition at line 142 of file VP1RawDataHandle_TRT_RDO.cxx.

143 {
144  return m_data->highLevel();
145 }

◆ inInDetParts()

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

Reimplemented from VP1RawDataHandleBase.

Definition at line 122 of file VP1RawDataHandle_TRT_RDO.cxx.

123 {
124  const TRT_ID * idhelper = VP1DetInfo::trtIDHelper();
125  if (!idhelper)
126  return VP1RawDataFlags::All;
127  switch (idhelper->barrel_ec(m_data->identify())) {
128  case -2:
130  case 2:
132  case -1:
134  case 1:
136  default:
137  return VP1RawDataFlags::All;
138  }
139 }

◆ 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 }

◆ strawID()

int VP1RawDataHandle_TRT_RDO::strawID ( ) const
protected

Definition at line 103 of file VP1RawDataHandle_TRT_RDO.cxx.

104 {
105  const TRT_ID * idhelper = VP1DetInfo::trtIDHelper();
106  if (!idhelper)
107  return -1;
108  const int s = idhelper->straw(m_data->identify());
109  return (s <= 28 && s >= 0) ? s : -1;
110 }

◆ timeOverThreshold()

double VP1RawDataHandle_TRT_RDO::timeOverThreshold ( ) const

Definition at line 148 of file VP1RawDataHandle_TRT_RDO.cxx.

149 {
150  return m_data->timeOverThreshold()*Gaudi::Units::nanosecond;//According to the comments, returned value is in Gaudi::Units::ns.
151 }

◆ 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 TRT_LoLumRawData* VP1RawDataHandle_TRT_RDO::m_data
protected

Definition at line 40 of file VP1RawDataHandle_TRT_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:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
InDetDD::TRT_BaseElement::strawLength
virtual const double & strawLength() const =0
Active straw length.
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
VP1RawDataHandleBase::Imp::ensureInitSepAndTransform
void ensureInitSepAndTransform(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:94
VP1RawDataHandle_TRT_RDO::highThreshold
bool highThreshold() const
Definition: VP1RawDataHandle_TRT_RDO.cxx:142
python.SystemOfUnits.nanosecond
int nanosecond
Definition: SystemOfUnits.py:119
VP1RawDataHandle_TRT_RDO::m_data
const TRT_LoLumRawData * m_data
Definition: VP1RawDataHandle_TRT_RDO.h:40
TRT_LoLumRawData::highLevel
virtual bool highLevel() const override final
Definition: TRT_LoLumRawData.h:128
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
gr
#define gr
VP1RawDataColl_TRT_RDO
Definition: VP1RawDataColl_TRT_RDO.h:23
x
#define x
VP1RawDataHandleBase::VP1RawDataHandleBase
VP1RawDataHandleBase(VP1RawDataCollBase *)
Definition: VP1RawDataHandleBase.cxx:50
VP1RawDataHandle_TRT_RDO::strawID
int strawID() const
Definition: VP1RawDataHandle_TRT_RDO.cxx:103
VP1RawDataHandleBase::Imp::hasShape
bool hasShape() const
Definition: VP1RawDataHandleBase.cxx:36
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:902
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1RawDataCommonData::updateVolumeOutlines
void updateVolumeOutlines(SoGroup *)
Definition: VP1RawDataCommonData.cxx:91
VP1RawDataHandleBase::Imp::sep
SoSeparator * sep
Definition: VP1RawDataHandleBase.cxx:33
InDetDD::TRT_BaseElement::getAbsoluteTransform
const HepGeom::Transform3D getAbsoluteTransform(int straw) const
This is an alias to strawTransform(int straw)
Definition: TRT_BaseElement.cxx:42
VP1RawDataHandle_TRT_RDO::element
const InDetDD::TRT_BaseElement * element() const
Definition: VP1RawDataHandle_TRT_RDO.cxx:113
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:893
PyPoolBrowser.node
node
Definition: PyPoolBrowser.py:131
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
VP1RawDataHandleBase::Imp::rebuild3DObjects
void rebuild3DObjects(VP1RawDataHandleBase *)
Definition: VP1RawDataHandleBase.cxx:107
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
python.selection.number
number
Definition: selection.py:20
TRT_LoLumRawData::timeOverThreshold
virtual double timeOverThreshold() const override final
Definition: TRT_LoLumRawData.h:47
InDetDD::TRT_DetectorManager::getElement
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
Definition: TRT_DetectorManager.cxx:148
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
TRT_ID
Definition: TRT_ID.h:84
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
VP1DetInfo::trtIDHelper
static const TRT_ID * trtIDHelper()
Definition: VP1DetInfo.cxx:166
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
VP1DetInfo::trtDetMgr
static const InDetDD::TRT_DetectorManager * trtDetMgr()
Definition: VP1DetInfo.cxx:147
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
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
HitsSoNodeManager::getShapeNode_DriftTube
SoNode * getShapeNode_DriftTube(double halfLength, double radius)
Definition: HitsSoNodeManager.cxx:138
VP1RawDataHandleBase::m_visible
bool m_visible
Definition: VP1RawDataHandleBase.h:71
VP1RawDataHandleBase::Imp::clearShape
void clearShape()
Definition: VP1RawDataHandleBase.cxx:41
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
VP1RawDataHandleBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataHandleBase.h:41
node
Definition: memory_hooks-stdcmalloc.h:74
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57
VP1RawDataCollBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataCollBase.h:39
Identifier
Definition: IdentifierFieldParser.cxx:14