ATLAS Offline Software
VP1RawDataHandle_PixelRDO.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class VP1RawDataHandle_PixelRDO //
8 // //
9 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
10 // Initial version: April 2008 (rewritten January 2009) //
11 // //
13 
17 #include "VP1Utils/VP1DetInfo.h"
19 
24 
26 
27 
28 //____________________________________________________________________
31 {
32 }
33 
34 //____________________________________________________________________
36 {
37 }
38 
39 //____________________________________________________________________
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 }
66 
67 //____________________________________________________________________
69 {
70  return common()->nodeManager()->getShapeNode_Point();
71 }
72 
73 //____________________________________________________________________
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 }
87 
88 //____________________________________________________________________
90 {
92  if (!detmgr)
93  return 0;
94  return detmgr->getDetectorElement(m_data->identify());
95 }
96 
97 // //____________________________________________________________________
98 // SoMaterial * VP1RawDataHandle_PixelRDO::determineMaterial() const
99 // {
100 // return common()->pixelMaterial();
101 // }
102 
103 //____________________________________________________________________
104 VP1RawDataFlags::InDetPartsFlags VP1RawDataHandle_PixelRDO::inInDetParts() const
105 {
106  const InDetDD::SiDetectorElement * elem = element();
107  if (!elem)
108  return VP1RawDataFlags::All;
109  if (elem->center().z()>=0)
111  else
113 
114 }
HitsSoNodeManager.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
VP1RawDataHandle_PixelRDO::VP1RawDataHandle_PixelRDO
VP1RawDataHandle_PixelRDO(VP1RawDataCollBase *, const PixelRDORawData *)
Definition: VP1RawDataHandle_PixelRDO.cxx:29
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
VP1RawDataFlags::EndCapPositive
@ EndCapPositive
Definition: VP1RawDataFlags.h:27
VP1RawDataHandleBase
Definition: VP1RawDataHandleBase.h:34
VP1RawDataHandle_PixelRDO.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
PixelRDORawData::getLVL1ID
virtual int getLVL1ID() const =0
m_data
std::vector< T > m_data
Definition: TrackTruthMatchingBaseAlg.cxx:660
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
VP1RawDataCollBase
Definition: VP1RawDataCollBase.h:29
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
PixelRDORawData::getLVL1A
virtual int getLVL1A() const =0
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
VP1LinAlgUtils.h
VP1DetInfo.h
GeoPrimitives.h
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
PixelDetectorManager.h
PixelRDORawData.h
VP1RawDataHandle_PixelRDO::~VP1RawDataHandle_PixelRDO
virtual ~VP1RawDataHandle_PixelRDO()
Definition: VP1RawDataHandle_PixelRDO.cxx:35
VP1RawDataHandle_PixelRDO::buildShape
SoNode * buildShape()
Definition: VP1RawDataHandle_PixelRDO.cxx:68
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
PixelRDORawData::getToT
virtual int getToT() const =0
PixelRDORawData::getBCID
virtual int getBCID() const =0
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
VP1RawDataCommonData.h
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:194
python.selection.number
number
Definition: selection.py:20
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
SiDetectorElement.h
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
VP1RawDataFlags::BarrelNegative
@ BarrelNegative
Definition: VP1RawDataFlags.h:26
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
VP1RawDataFlags::All
@ All
Definition: VP1RawDataFlags.h:31
VP1RawDataFlags::BarrelPositive
@ BarrelPositive
Definition: VP1RawDataFlags.h:25
PixelRDORawData
Definition: PixelRDORawData.h:23
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
VP1RawDataHandle_PixelRDO::inInDetParts
VP1RawDataFlags::InDetPartsFlags inInDetParts() const
Definition: VP1RawDataHandle_PixelRDO.cxx:104
VP1RawDataFlags::EndCapNegative
@ EndCapNegative
Definition: VP1RawDataFlags.h:28
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
PixelID
Definition: PixelID.h:67
VP1RawDataHandle_PixelRDO::buildTransform
SoTransform * buildTransform()
Definition: VP1RawDataHandle_PixelRDO.cxx:74
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
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
VP1RawDataHandle_PixelRDO::clicked
QStringList clicked(bool verbose) const
Definition: VP1RawDataHandle_PixelRDO.cxx:40