ATLAS Offline Software
Loading...
Searching...
No Matches
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//____________________________________________________________________
33
34//____________________________________________________________________
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!!
49 Identifier id(m_data->identify());
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//____________________________________________________________________
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//____________________________________________________________________
104VP1RawDataFlags::InDetPartsFlags VP1RawDataHandle_PixelRDO::inInDetParts() const
105{
106 const InDetDD::SiDetectorElement * elem = element();
107 if (!elem)
109 if (elem->center().z()>=0)
111 else
113
114}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
This is an Identifier helper class for the Pixel subdetector.
SoTransform * getUnitTransform()
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Class to hold geometrical description of a silicon detector element.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
int eta_index(const Identifier &id) const
Definition PixelID.h:640
int layer_disk(const Identifier &id) const
Definition PixelID.h:602
int eta_module(const Identifier &id) const
Definition PixelID.h:627
int phi_index(const Identifier &id) const
Definition PixelID.h:634
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:609
int phi_module(const Identifier &id) const
Definition PixelID.h:620
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:581
static const InDetDD::PixelDetectorManager * pixelDetMgr()
static const PixelID * pixelIDHelper()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
HitsSoNodeManager * nodeManager() const
VP1RawDataCommonData * common() const
VP1RawDataHandleBase(VP1RawDataCollBase *)
static QString unsignedToHex(unsigned)
VP1RawDataCollBase * coll() const
VP1RawDataHandle_PixelRDO(VP1RawDataCollBase *, const PixelRDORawData *)
VP1RawDataFlags::InDetPartsFlags inInDetParts() const
QStringList clicked(bool verbose) const
const InDetDD::SiDetectorElement * element() const
bool verbose
Definition hcg.cxx:73
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Translation< double, 3 > Translation3D