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

#include <VP1RawDataHandle_BCM_RDO.h>

Inheritance diagram for VP1RawDataHandle_BCM_RDO:
Collaboration diagram for VP1RawDataHandle_BCM_RDO:

Classes

class  Imp
 

Public Member Functions

 VP1RawDataHandle_BCM_RDO (VP1RawDataCollBase *, int moduleID, const QList< const BCM_RawData * > &)
 
virtual ~VP1RawDataHandle_BCM_RDO ()
 
QStringList clicked (bool verbose) const
 
int moduleID () const
 
QString moduleName () const
 
QString moduleNick () const
 
QString modulePosDescription () const
 
int numberOfHighAttenuationHits () const
 
int nHits () const
 
VP1RawDataCollBasecoll () const
 
VP1RawDataCommonDatacommon () const
 
void setVisible (bool)
 
bool visible () const
 
void update3DObjects ()
 
virtual Amg::Vector3D center ()
 
virtual VP1RawDataFlags::InDetPartsFlags inInDetParts () const
 
void updateShownOutlines ()
 

Static Public Member Functions

static bool isHighAttenuationChannel (int channelID)
 
static QString unsignedToHex (unsigned)
 

Protected Member Functions

SoNode * buildShape ()
 
SoTransform * buildTransform ()
 

Protected Attributes

int m_moduleID
 
int m_nHighAttenuationHits
 
QList< const BCM_RawData * > m_data
 

Private Attributes

Impm_d
 
VP1RawDataCollBasem_coll
 
bool m_visible
 

Detailed Description

Definition at line 23 of file VP1RawDataHandle_BCM_RDO.h.

Constructor & Destructor Documentation

◆ VP1RawDataHandle_BCM_RDO()

VP1RawDataHandle_BCM_RDO::VP1RawDataHandle_BCM_RDO ( VP1RawDataCollBase coll,
int  moduleID,
const QList< const BCM_RawData * > &  data 
)

Definition at line 167 of file VP1RawDataHandle_BCM_RDO.cxx.

169 {
171  for(const BCM_RawData* hit : data) {
172  if (isHighAttenuationChannel(hit->getChannel()))
174  }
175 }

◆ ~VP1RawDataHandle_BCM_RDO()

VP1RawDataHandle_BCM_RDO::~VP1RawDataHandle_BCM_RDO ( )
virtual

Definition at line 178 of file VP1RawDataHandle_BCM_RDO.cxx.

179 {
180 }

Member Function Documentation

◆ buildShape()

SoNode * VP1RawDataHandle_BCM_RDO::buildShape ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 254 of file VP1RawDataHandle_BCM_RDO.cxx.

255 {
257  SoNode * n = (it==Imp::moduleID2ModuleInfo->end() ? 0 : it->second->get3DObjects());
258  if (!n)
259  return common()->nodeManager()->getShapeNode_Point();//fixme: warn
260 
261  if (numberOfHighAttenuationHits()>0 && static_cast<VP1RawDataColl_BCM_RDO*>(coll())->useSpecialBCMHighAttMaterial()) {
262  SoGroup * gr = new SoGroup;
263  gr->addChild(coll()->common()->controller()->bcmHighAttMaterial());
264  gr->addChild(n);
265  return gr;
266  } else {
267  return n;
268  }
269 }

◆ buildTransform()

SoTransform * VP1RawDataHandle_BCM_RDO::buildTransform ( )
protectedvirtual

Implements VP1RawDataHandleBase.

Definition at line 272 of file VP1RawDataHandle_BCM_RDO.cxx.

273 {
275  SoTransform * t = (it==Imp::moduleID2ModuleInfo->end() ? 0 : it->second->getTransform());
276  if (!t)
277  return common()->nodeManager()->getUnitTransform();//fixme: warn
278  return t;
279 }

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

Implements VP1RawDataHandleBase.

Definition at line 231 of file VP1RawDataHandle_BCM_RDO.cxx.

232 {
233  QStringList l;
234  l << " ===> BCM Hit(s)";
235  l << " -- Module ID: "+QString::number(moduleID());
236  l << " -- Module Name: "+moduleName()+" (\""+moduleNick()+"\")";
237  l << " -- Module Position: "+modulePosDescription();
238  l << " -- Number of hits: "+QString::number(nHits());
239  l << " -- Number of hits with High Attenuation: "+QString::number(numberOfHighAttenuationHits());
240  if (verbose) {
241  for (int i=0;i<m_data.count();++i) {
242  l << " ------> BCM_RawData [hit "+QString::number(i+1)+"/"+QString::number(m_data.count())+"]";
243  l += Imp::describeHit(m_data.at(i), " -- ");
244  }
245  } else {
246  l << " -- (turn on verbose output for more information)";
247  }
248 
249 
250  return l;
251 }

◆ 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(); }

◆ inInDetParts()

virtual VP1RawDataFlags::InDetPartsFlags VP1RawDataHandleBase::inInDetParts ( ) const
inlinevirtualinherited

Reimplemented in VP1RawDataHandle_PixelRDO, VP1RawDataHandle_SCT_RDO, and VP1RawDataHandle_TRT_RDO.

Definition at line 51 of file VP1RawDataHandleBase.h.

51 { return VP1RawDataFlags::None; }//Override if InDet

◆ isHighAttenuationChannel()

static bool VP1RawDataHandle_BCM_RDO::isHighAttenuationChannel ( int  channelID)
inlinestatic

Definition at line 39 of file VP1RawDataHandle_BCM_RDO.h.

39 { return channelID < 8; }

◆ moduleID()

int VP1RawDataHandle_BCM_RDO::moduleID ( ) const
inline

Definition at line 31 of file VP1RawDataHandle_BCM_RDO.h.

31 { return m_moduleID; }

◆ moduleName()

QString VP1RawDataHandle_BCM_RDO::moduleName ( ) const

Definition at line 183 of file VP1RawDataHandle_BCM_RDO.cxx.

184 {
185  switch(moduleID()) {
186  case 0: return "F410";
187  case 1: return "F405";
188  case 2: return "F413";
189  case 3: return "F404";
190  case 4: return "F424";
191  case 5: return "F420";
192  case 6: return "F422";
193  case 7: return "F408";
194  default: return "Unknown";
195  }
196 }

◆ moduleNick()

QString VP1RawDataHandle_BCM_RDO::moduleNick ( ) const

Definition at line 199 of file VP1RawDataHandle_BCM_RDO.cxx.

200 {
201  switch(moduleID()) {
202  case 0: return "Marko";
203  case 1: return "Helmut/Peter";
204  case 2: return "William";
205  case 3: return "Harris";
206  case 4: return "Ewa";
207  case 5: return "Heinz";
208  case 6: return "Irena";
209  case 7: return "Andrej";
210  default: return "Unknown";
211  }
212 }

◆ modulePosDescription()

QString VP1RawDataHandle_BCM_RDO::modulePosDescription ( ) const

Definition at line 215 of file VP1RawDataHandle_BCM_RDO.cxx.

216 {
217  switch(moduleID()) {
218  case 0: return "A, +x";
219  case 1: return "A, +y";
220  case 2: return "A, -x";
221  case 3: return "A, -y";
222  case 4: return "C, +x";
223  case 5: return "C, +y";
224  case 6: return "C, -x";
225  case 7: return "C, -y";
226  default: return "Unknown";
227  }
228 }

◆ nHits()

int VP1RawDataHandle_BCM_RDO::nHits ( ) const
inline

Definition at line 37 of file VP1RawDataHandle_BCM_RDO.h.

37 { return m_data.count(); }

◆ numberOfHighAttenuationHits()

int VP1RawDataHandle_BCM_RDO::numberOfHighAttenuationHits ( ) const
inline

Definition at line 36 of file VP1RawDataHandle_BCM_RDO.h.

36 { return m_nHighAttenuationHits; }

◆ 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

QList<const BCM_RawData*> VP1RawDataHandle_BCM_RDO::m_data
protected

Definition at line 47 of file VP1RawDataHandle_BCM_RDO.h.

◆ m_moduleID

int VP1RawDataHandle_BCM_RDO::m_moduleID
protected

Definition at line 45 of file VP1RawDataHandle_BCM_RDO.h.

◆ m_nHighAttenuationHits

int VP1RawDataHandle_BCM_RDO::m_nHighAttenuationHits
protected

Definition at line 46 of file VP1RawDataHandle_BCM_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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1RawDataHandle_BCM_RDO::moduleName
QString moduleName() const
Definition: VP1RawDataHandle_BCM_RDO.cxx:183
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
VP1RawDataHandleBase::m_coll
VP1RawDataCollBase * m_coll
Definition: VP1RawDataHandleBase.h:70
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1RawDataHandle_BCM_RDO::Imp::describeHit
static QStringList describeHit(const BCM_RawData *data, const QString &prefix="")
Definition: VP1RawDataHandle_BCM_RDO.cxx:44
VP1RawDataHandleBase::Imp::ensureInitSepAndTransform
void ensureInitSepAndTransform(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:94
VP1RawDataHandle_BCM_RDO::Imp::moduleID2ModuleInfo
static std::map< int, ModuleInfo * > * moduleID2ModuleInfo
Definition: VP1RawDataHandle_BCM_RDO.cxx:116
VP1RawDataCommonData::nodeManager
HitsSoNodeManager * nodeManager() const
Definition: VP1RawDataCommonData.h:42
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1RawDataHandleBase::Imp::ensureAttach3DObjects
void ensureAttach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:134
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
gr
#define gr
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1RawDataHandle_BCM_RDO::isHighAttenuationChannel
static bool isHighAttenuationChannel(int channelID)
Definition: VP1RawDataHandle_BCM_RDO.h:39
x
#define x
VP1RawDataHandleBase::VP1RawDataHandleBase
VP1RawDataHandleBase(VP1RawDataCollBase *)
Definition: VP1RawDataHandleBase.cxx:50
VP1RawDataHandleBase::Imp::hasShape
bool hasShape() const
Definition: VP1RawDataHandleBase.cxx:36
VP1RawDataFlags::None
@ None
Definition: VP1RawDataFlags.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1RawDataHandle_BCM_RDO::m_nHighAttenuationHits
int m_nHighAttenuationHits
Definition: VP1RawDataHandle_BCM_RDO.h:46
beamspotman.n
n
Definition: beamspotman.py:731
BCM_RawData
Definition: BCM_RawData.h:36
VP1RawDataCommonData::updateVolumeOutlines
void updateVolumeOutlines(SoGroup *)
Definition: VP1RawDataCommonData.cxx:91
VP1RawDataHandle_BCM_RDO::numberOfHighAttenuationHits
int numberOfHighAttenuationHits() const
Definition: VP1RawDataHandle_BCM_RDO.h:36
VP1RawDataHandleBase::Imp::sep
SoSeparator * sep
Definition: VP1RawDataHandleBase.cxx:33
VP1RawDataHandle_BCM_RDO::m_moduleID
int m_moduleID
Definition: VP1RawDataHandle_BCM_RDO.h:45
VP1RawDataHandleBase::Imp::rebuild3DObjects
void rebuild3DObjects(VP1RawDataHandleBase *)
Definition: VP1RawDataHandleBase.cxx:107
python.selection.number
number
Definition: selection.py:20
VP1RawDataHandle_BCM_RDO::nHits
int nHits() const
Definition: VP1RawDataHandle_BCM_RDO.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
VP1RawDataHandle_BCM_RDO::moduleID
int moduleID() const
Definition: VP1RawDataHandle_BCM_RDO.h:31
VP1RawDataColl_BCM_RDO
Definition: VP1RawDataColl_BCM_RDO.h:23
y
#define y
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
VP1RawDataHandleBase::coll
VP1RawDataCollBase * coll() const
Definition: VP1RawDataHandleBase.h:40
VP1RawDataHandleBase::Imp::ensureDetach3DObjects
void ensureDetach3DObjects(VP1RawDataHandleBase *theclass)
Definition: VP1RawDataHandleBase.cxx:146
VP1RawDataHandle_BCM_RDO::moduleNick
QString moduleNick() const
Definition: VP1RawDataHandle_BCM_RDO.cxx:199
VP1RawDataHandle_BCM_RDO::Imp::ensureInitModuleInfo
static void ensureInitModuleInfo()
Definition: VP1RawDataHandle_BCM_RDO.cxx:123
VP1RawDataHandleBase::m_visible
bool m_visible
Definition: VP1RawDataHandleBase.h:71
VP1RawDataHandle_BCM_RDO::modulePosDescription
QString modulePosDescription() const
Definition: VP1RawDataHandle_BCM_RDO.cxx:215
VP1RawDataHandleBase::Imp::clearShape
void clearShape()
Definition: VP1RawDataHandleBase.cxx:41
VP1RawDataHandleBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataHandleBase.h:41
HitsSoNodeManager::getUnitTransform
SoTransform * getUnitTransform()
Definition: HitsSoNodeManager.cxx:456
VP1RawDataCollBase::common
VP1RawDataCommonData * common() const
Definition: VP1RawDataCollBase.h:39
VP1RawDataHandle_BCM_RDO::m_data
QList< const BCM_RawData * > m_data
Definition: VP1RawDataHandle_BCM_RDO.h:47