![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <InDetAlignDBTool.h>
|
| InDetAlignDBTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~InDetAlignDBTool () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual void | createDB () const override |
|
virtual void | dispGroup (const int dettype, const int bec, const int layer, const int ring, const int sector, const float rphidisp, const float rdisp, const float zdisp, const int syst, const int level, const int skip) const override |
|
virtual void | writeFile (const bool ntuple, const std::string &file) const override |
|
virtual void | writeIBLDistFile (const std::string &file) const override |
|
virtual void | writeGlobalFolderFile (const std::string &file) const override |
|
virtual void | readTextFile (const std::string &file) const override |
|
virtual void | readNtuple (const std::string &file) const override |
|
virtual bool | idToDetSet (const Identifier ident, int &det, int &bec, int &layer, int &ring, int §or, int &side) const override |
|
virtual std::string | dirkey (const Identifier &, const int) const override |
|
virtual std::string | dirkey (const int, const int, const int, const int) const override |
|
virtual std::string | dirkey (const int, const int, const int, const int, const int) const override |
|
virtual std::string | DBMkey (const int, const int, const int, const int) const override |
|
virtual bool | setTrans (const Identifier &ident, const int level, const Amg::Transform3D &trans) const override |
|
virtual bool | setTrans (const Identifier &ident, const int level, const Amg::Vector3D &translate, double alpha, double beta, double gamma) const override |
|
virtual bool | tweakTrans (const Identifier &ident, const int level, const Amg::Transform3D &trans) const override |
|
virtual bool | tweakTrans (const Identifier &ident, const int level, const Amg::Vector3D &translate, double alpha, double beta, double gamma) const override |
|
virtual bool | tweakIBLDist (const int, const float) const override |
| This is the tweak function for the IBLDist DB. More...
|
|
virtual bool | tweakGlobalFolder (const Identifier &ident, const int level, const Amg::Transform3D &trans) const |
| This is the tweak function for the GlobalFolder DB. More...
|
|
virtual Identifier | getL1L2fromL3Identifier (const Identifier &ident, const int &level) const override |
| convert L3 module identifier to L1 or L2 More...
|
|
virtual Amg::Transform3D | getTransL123 (const Identifier &ident) const override |
| get cumulative L1, L2, L3 trafo for (L3-) module. More...
|
|
virtual Amg::Transform3D | getTrans (const Identifier &ident, const int level) const override |
| return value of particular transform specified by identifier and level calculates L1 and L2 identifiers automatically by getL1L2fromL3Identifier if L3 identifier passed. More...
|
|
virtual StatusCode | outputObjs () override |
|
virtual void | fillDB (const std::string &tag, const unsigned int run1, const unsigned int event1, const unsigned int run2, const unsigned int event2) const override |
|
virtual void | printDB (const int level) const override |
|
virtual void | sortTrans () const override |
|
void | extractAlphaBetaGamma (const Amg::Transform3D &trans, double &alpha, double &beta, double &gamma) const override |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
const PixelID * | m_pixid |
|
const SCT_ID * | m_sctid |
|
const InDetDD::PixelDetectorManager * | m_pixman |
|
const InDetDD::SCT_DetectorManager * | m_sctman |
|
std::vector< const InDetDD::SiDetectorManager * > | m_managers |
|
std::vector< std::string > | m_alignobjs |
|
std::vector< int > | m_alignchans |
|
CondAttrListCollection * | m_attrListCollection |
|
bool | m_par_newdb |
|
bool | m_par_scttwoside |
|
int | m_par_fake |
|
ToolHandle< IAthenaOutputStreamTool > | m_par_condstream |
|
Gaudi::Property< std::string > | m_par_dbroot { this, "AlignmentRootFolder", "/Indet/Align", "Root folder for alignment" } |
| name of the root folder for constants, which can be set via the <key> syntax. More...
|
|
std::string | m_par_dbkey |
| the base part of the key for loading AlignableTransform objects from the Transient Data Store. More...
|
|
bool | m_par_oldTextFile |
|
bool | m_dynamicDB |
|
bool | m_forceUserDBConfig |
|
Gaudi::Property< std::string > | m_pixmanName {this, "PixelManager", "Pixel", "Pixel manager name" } |
|
Gaudi::Property< std::string > | m_sctmanName {this, "SCT_Manager", "SCT", "SCT manager name" } |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 53 of file InDetAlignDBTool.h.
◆ StoreGateSvc_t
◆ InDetAlignDBTool()
InDetAlignDBTool::InDetAlignDBTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~InDetAlignDBTool()
InDetAlignDBTool::~InDetAlignDBTool |
( |
| ) |
|
|
virtual |
◆ cgetTransPtr()
◆ createDB()
void InDetAlignDBTool::createDB |
( |
| ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 253 of file InDetAlignDBTool.cxx.
259 ATH_MSG_FATAL(
"Cannot create new database when geometry is faked");
270 ATH_MSG_ERROR(
"createDB: AlignableTransformContainer already exists");
274 ATH_MSG_DEBUG(
"Setup database structures in AlignableTransformContainer");
278 ATH_MSG_DEBUG(
"Setup separate AlignableTransform for each layer");
283 else ATH_MSG_DEBUG(
"Treat both sides of SCT module as single entity" );
308 ATH_MSG_ERROR(
"Could not record AlignableTransformContainer");
313 std::vector<std::string> level2;
320 if (element!=
nullptr) {
332 std::vector<std::string>::const_iterator ix =
find(level2.begin(),level2.end(),
key);
333 if (ix==level2.end()) {
334 level2.push_back(
key);
362 globshift.setIdentity();
384 ATH_MSG_DEBUG(
"Dumping size of created AlignableTransform objects");
◆ DBMkey()
std::string InDetAlignDBTool::DBMkey |
( |
const int |
det, |
|
|
const int |
bec, |
|
|
const int |
level, |
|
|
const int |
sector |
|
) |
| const |
|
overridevirtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ dirkey() [1/3]
◆ dirkey() [2/3]
std::string InDetAlignDBTool::dirkey |
( |
const int |
det, |
|
|
const int |
bec, |
|
|
const int |
layer, |
|
|
const int |
level |
|
) |
| const |
|
overridevirtual |
◆ dirkey() [3/3]
std::string InDetAlignDBTool::dirkey |
( |
const int |
det, |
|
|
const int |
bec, |
|
|
const int |
layer, |
|
|
const int |
level, |
|
|
const int |
sector |
|
) |
| const |
|
overridevirtual |
◆ dispGroup()
void InDetAlignDBTool::dispGroup |
( |
const int |
dettype, |
|
|
const int |
bec, |
|
|
const int |
layer, |
|
|
const int |
ring, |
|
|
const int |
sector, |
|
|
const float |
rphidisp, |
|
|
const float |
rdisp, |
|
|
const float |
zdisp, |
|
|
const int |
syst, |
|
|
const int |
level, |
|
|
const int |
skip |
|
) |
| const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 496 of file InDetAlignDBTool.cxx.
504 IRndmGenSvc* randsvc;
505 if (StatusCode::SUCCESS!=service(
"RndmGenSvc",randsvc,
true))
507 Rndm::Numbers
gauss(randsvc,Rndm::Gauss(0.,1.));
513 float rpd=0,rd=0,zd=0;
515 rpd=rphidisp*
gauss();
520 std::vector<Identifier> lvl12id;
523 for (
int idet=1;idet<3;++idet) {
525 if (element!=
nullptr) {
527 int mdet,mbec,mlayer,mring,msector,mside;
530 if ((dettype==-1 || mdet==dettype) && (
bec==-1 || std::abs(2*mbec)==
bec) &&
531 (
layer==-1 || mlayer==
layer) && (ring==-1 || mring==ring) &&
532 (sector== -1 || msector==sector) && mside==0) {
539 if (dettype!=2 || mside!=1) {
540 if (syst==2 || syst==4 || (syst==6 && mring==-6)) {
541 rpd=rphidisp*
gauss();
545 mlayer <<
" " << mring <<
" z " << zd );
554 if (syst<=2 || syst==6) {
557 float dx=modcent.x();
558 float dy=modcent.y();
576 }
else if (
level==2) {
586 std::vector<Identifier>::const_iterator ix=
587 find(lvl12id.begin(),lvl12id.end(),ident2);
588 if (ix==lvl12id.end()) {
589 lvl12id.push_back(ident2);
601 std::vector<Identifier>::const_iterator ix=
602 find(lvl12id.begin(),lvl12id.end(),ident2);
603 if (ix==lvl12id.end()) {
604 lvl12id.push_back(ident2);
615 <<
"," << mlayer <<
"," << mring <<
"," << msector <<
" to xyz" <<
616 xd <<
"," << yd <<
"," << zd );
626 ATH_MSG_DEBUG(
"Added displacement to " << nmod <<
" modules " << dettype <<
","
627 <<
bec <<
"," <<
layer <<
" [" << rphidisp <<
"," << rdisp
628 <<
"," << zdisp <<
"]"
629 <<
" type " << syst );
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extractAlphaBetaGamma()
void InDetAlignDBTool::extractAlphaBetaGamma |
( |
const Amg::Transform3D & |
trans, |
|
|
double & |
alpha, |
|
|
double & |
beta, |
|
|
double & |
gamma |
|
) |
| const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 1427 of file InDetAlignDBTool.cxx.
1430 double siny = trans(0,2);
1438 if ((trans(1,2) == 0) && (trans(2,2) == 0)) {
1442 alpha = atan2(trans(1,1),trans(2,1));
1444 alpha = atan2(-trans(1,2),trans(2,2));
1445 gamma = atan2(-trans(0,1),trans(0,0));
1446 if (alpha == 0) alpha = 0;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fakeGeom()
void InDetAlignDBTool::fakeGeom |
( |
const int |
nbpix, |
|
|
const int |
necpix, |
|
|
const int |
nbsct, |
|
|
const int |
necsct |
|
) |
| |
|
private |
Definition at line 1359 of file InDetAlignDBTool.cxx.
1372 if (nbpix!=0 || necpix!=0) {
1379 for (
int i=0;
i<necpix;++
i) {
1384 for (
int i=0;
i<nbpix;++
i) {
1389 for (
int i=0;
i<necpix;++
i) {
1394 if (nbsct!=0 || necsct!=0) {
1400 for (
int i=0;
i<necsct;++
i) {
1405 for (
int i=0;
i<nbsct;++
i) {
1410 for (
int i=0;
i<necsct;++
i) {
◆ fillDB()
void InDetAlignDBTool::fillDB |
( |
const std::string & |
tag, |
|
|
const unsigned int |
run1, |
|
|
const unsigned int |
event1, |
|
|
const unsigned int |
run2, |
|
|
const unsigned int |
event2 |
|
) |
| const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 1233 of file InDetAlignDBTool.cxx.
1243 if (StatusCode::SUCCESS!=
1244 service(
"IOVRegistrationSvc",regsvc)) {
1260 for (std::vector<std::string>::const_iterator iobj=
m_alignobjs.begin();
1262 if (StatusCode::SUCCESS==regsvc->
registerIOV(
"AlignableTransform",
1264 ATH_MSG_DEBUG(
"Stored AlignableTransform object " << *iobj );
1267 ATH_MSG_ERROR(
"Failed (registerIOV) to store object " << *iobj );
1271 ATH_MSG_DEBUG(
" Written " << nobj <<
" AlignableTransform objects to conditions database" );
◆ finalize()
StatusCode InDetAlignDBTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getL1L2fromL3Identifier()
convert L3 module identifier to L1 or L2
< no translation needed
check whether PIX
< Whole pixel det. at L1
check whether SCT
< barrel + 2 x EC at L1
< take care of the case where level != 1,2,3 or ident neither pix nor sct
Implements IInDetAlignDBTool.
Definition at line 1103 of file InDetAlignDBTool.cxx.
◆ getTrans()
return value of particular transform specified by identifier and level calculates L1 and L2 identifiers automatically by getL1L2fromL3Identifier if L3 identifier passed.
return value of particular transform specified by identifier and level calculates L1 and L2 identifiers automatically by getL1L2fromL3Identifier if L3 identifier passed
L1, L2 are in global, L3 in local frame.
Implements IInDetAlignDBTool.
Definition at line 1158 of file InDetAlignDBTool.cxx.
◆ getTransL123()
get cumulative L1, L2, L3 trafo for (L3-) module.
get cumulative L1, L2, L3 trafo for (L3-) module
Result is in local frame.
Implements IInDetAlignDBTool.
Definition at line 1134 of file InDetAlignDBTool.cxx.
1142 ATH_MSG_ERROR(
"getTransL123(): Module not found in PIX or SCT!" );
1148 ATH_MSG_FATAL(
"Code needs to corrected otherwise you will get nonsensical results-- IndetAlignDBTool:2060");
1151 result = trfL1 * trfL2 * trfL3 ;
◆ getTransPtr()
◆ idToDetSet()
bool InDetAlignDBTool::idToDetSet |
( |
const Identifier |
ident, |
|
|
int & |
det, |
|
|
int & |
bec, |
|
|
int & |
layer, |
|
|
int & |
ring, |
|
|
int & |
sector, |
|
|
int & |
side |
|
) |
| const |
|
overridevirtual |
◆ initialize()
StatusCode InDetAlignDBTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 92 of file InDetAlignDBTool.cxx.
104 return StatusCode::FAILURE;
139 ATH_MSG_FATAL(
"Pixel and SCT Managers have different alignfolder type registered --> Check ");
140 return StatusCode::FAILURE;
148 return StatusCode::FAILURE;
153 return StatusCode::FAILURE;
166 int TransfLevel_low = 0;
170 std::string man_name;
174 if (element!=
nullptr) {
178 std::string
level[3];
179 for (
int i=TransfLevel_low;
i<3;++
i) {
182 std::vector<std::string>::const_iterator ix=
191 ATH_MSG_ERROR(
"Si detector element type " << idet <<
" has no detset conversion" );
198 ATH_MSG_INFO(
"Geometry initialisation sees " << ndet[0] <<
199 " pixel and " << ndet[1] <<
" SCT modules giving " <<
m_alignobjs.size()
200 <<
" alignment keys" );
205 " pixel and " << ndet[1] <<
" SCT modules giving " <<
m_alignobjs.size()
206 <<
" alignment keys" );
213 ATH_MSG_DEBUG(
"Assuming new COOL alignment DB model based on AlignableTransformContainer");
216 ATH_MSG_DEBUG(
"Assuming old (Lisbon) alignment DB model based on separate AlignableTransforms");
223 coral::AttributeListSpecification*
spec =
new coral::AttributeListSpecification();
224 spec->extend(
"stave",
"int");
225 spec->extend(
"eta",
"int");
226 spec->extend(
"mag",
"float");
227 spec->extend(
"base",
"float");
228 spec->extend(
"free",
"float");
230 const int ibl_stave_max = 14;
232 for (
int this_stave=0; this_stave<ibl_stave_max; this_stave++){
236 atrlist[
"stave" ].data<
int>()=this_stave;
237 atrlist[
"eta" ].data<
int>()=0;
238 atrlist[
"mag" ].data<
float>()=0;
239 atrlist[
"base" ].data<
float>()=0;
240 atrlist[
"free" ].data<
float>()=0;
244 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & IInDetAlignDBTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ outputObjs()
StatusCode InDetAlignDBTool::outputObjs |
( |
| ) |
|
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 1171 of file InDetAlignDBTool.cxx.
1178 return StatusCode::FAILURE;
1210 ATH_MSG_DEBUG(
"starting to register typeKey for IBLDist" );
1213 typekeys_IBLDist[0] = pair;
1216 if (StatusCode::SUCCESS!=
m_par_condstream->streamObjects(typekeys_IBLDist)) {
1218 return StatusCode::FAILURE;
1230 return StatusCode::SUCCESS;
◆ printDB()
void InDetAlignDBTool::printDB |
( |
const int |
level | ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 1274 of file InDetAlignDBTool.cxx.
1278 for (std::vector<std::string>::const_iterator iobj=
m_alignobjs.begin();
1285 cit!=
pat->end();++cit) {
1296 "," << ring <<
"," << sector <<
"," <<
side <<
"] Trans:(" <<
1297 shift.x() <<
"," << shift.y() <<
"," << shift.z() <<
") Rot:{"
1298 << alpha <<
"," <<
beta <<
"," <<
gamma <<
"}");
1305 ATH_MSG_DEBUG(
"Object contains " << nobj <<
" transforms" );
1307 ATH_MSG_ERROR(
"AlignableTransform " << *iobj <<
" not found" );
◆ readNtuple()
void InDetAlignDBTool::readNtuple |
( |
const std::string & |
file | ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 957 of file InDetAlignDBTool.cxx.
958 ATH_MSG_DEBUG(
"readNtuple - set alignment constants from ntuple path: " <<
file );
960 if (StatusCode::SUCCESS!=service(
"NTupleSvc",ntsvc,
true))
962 const std::string
path=
file+
"/9002";
981 "Error booking ntuple 9002 contents" );
983 while (
nt->read().isSuccess()) {
995 Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
1003 ATH_MSG_DEBUG(
"Read " << ntrans <<
" transforms from ntuple");
◆ readTextFile()
void InDetAlignDBTool::readTextFile |
( |
const std::string & |
file | ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 834 of file InDetAlignDBTool.cxx.
837 ATH_MSG_DEBUG(
"readTextFile - set alignment constants from text file: " <<
file );
849 std::string channelName;
854 std::getline(
infile, tmpline);
858 if ((tmpline.substr(0,2) ==
"//") || (tmpline.substr(0,1) ==
"#"))
continue;
860 std::istringstream instring(tmpline);
865 if (tmpstr.empty())
continue;
867 if (tmpstr[0] ==
'/') {
869 channelName = tmpstr;
870 ATH_MSG_DEBUG(
"Read in AlignableTransform data, key " << channelName );
874 ATH_MSG_ERROR(
"Cannot find AlignableTransform object for key"
888 std::istringstream datastream(tmpline);
895 if (datastream.fail()) {
906 }
else if (dettype==2) {
912 if (!
ident.is_valid()) {
915 phiModule <<
"," << etaModule <<
"," <<
side <<
"] key " << channelName <<
916 " shift [" <<
dx <<
"," <<
dy <<
"," << dz <<
"]" );
923 Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
935 while ((itr->identify()!=
ident) && (itr!=pat2->
mend())) ++itr;
936 if (itr!=pat2->
mend()) {
945 " shift [" <<
dx <<
"," <<
dy <<
"," << dz <<
"]" );
953 ATH_MSG_DEBUG(
"Read " << nobj <<
" objects from file with " << ntrans <<
" transforms" );
◆ renounce()
◆ renounceArray()
◆ setTrans() [1/2]
◆ setTrans() [2/2]
◆ sortTrans()
void InDetAlignDBTool::sortTrans |
( |
| ) |
const |
|
overridevirtual |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ tweakGlobalFolder()
This is the tweak function for the GlobalFolder DB.
Definition at line 1499 of file InDetAlignDBTool.cxx.
1509 const unsigned int DBident=
det*10000+2*
bec*1000+
layer*100+ring*10+sector;
1516 if (atrlistcol2!=
nullptr){
1522 if(citr->first!=DBident)
continue;
1524 msg(
MSG::DEBUG) <<
"Tweak Old global DB -- channel: " << citr->first
1525 <<
" ,det: " << atrlist2[
"det"].data<
int>()
1526 <<
" ,bec: " << atrlist2[
"bec"].data<int>()
1527 <<
" ,layer: " << atrlist2[
"layer"].data<
int>()
1528 <<
" ,ring: " << atrlist2[
"ring"].data<int>()
1529 <<
" ,sector: " << atrlist2[
"sector"].data<
int>()
1530 <<
" ,Tx: " << atrlist2[
"Tx"].data<float>()
1531 <<
" ,Ty: " << atrlist2[
"Ty"].data<
float>()
1532 <<
" ,Tz: " << atrlist2[
"Tz"].data<float>()
1533 <<
" ,Rx: " << atrlist2[
"Rx"].data<
float>()
1534 <<
" ,Ry: " << atrlist2[
"Ry"].data<float>()
1535 <<
" ,Rz: " << atrlist2[
"Rz"].data<
float>() <<
endmsg;
1539 Amg::Translation3D oldtranslation(atrlist2[
"Tx"].data<float>(),atrlist2[
"Ty"].data<float>(),atrlist2[
"Tz"].data<float>());
1540 Amg::Transform3D oldtrans = oldtranslation * Amg::RotationMatrix3D::Identity();
1553 atrlist2[
"Tx"].data<
float>() = shift.x();
1554 atrlist2[
"Ty"].data<
float>() = shift.y();
1555 atrlist2[
"Tz"].data<
float>() = shift.z();
1556 atrlist2[
"Rx"].data<
float>() = alpha/
CLHEP::mrad ;
1561 msg(
MSG::DEBUG) <<
"Tweak New global DB -- channel: " << citr->first
1562 <<
" ,det: " << atrlist2[
"det"].data<
int>()
1563 <<
" ,bec: " << atrlist2[
"bec"].data<int>()
1564 <<
" ,layer: " << atrlist2[
"layer"].data<
int>()
1565 <<
" ,ring: " << atrlist2[
"ring"].data<int>()
1566 <<
" ,sector: " << atrlist2[
"sector"].data<
int>()
1567 <<
" ,Tx: " << atrlist2[
"Tx"].data<float>()
1568 <<
" ,Ty: " << atrlist2[
"Ty"].data<
float>()
1569 <<
" ,Tz: " << atrlist2[
"Tz"].data<float>()
1570 <<
" ,Rx: " << atrlist2[
"Rx"].data<
float>()
1571 <<
" ,Ry: " << atrlist2[
"Ry"].data<float>()
1572 <<
" ,Rz: " << atrlist2[
"Rz"].data<
float>() <<
endmsg;
1578 ATH_MSG_ERROR(
"tweakGlobalFolder: cast fails for DBident " << DBident );
1583 ATH_MSG_ERROR(
"tweakGlobalFolder: cannot retrieve CondAttrListCollection for key " <<
key );
◆ tweakIBLDist()
bool InDetAlignDBTool::tweakIBLDist |
( |
const int |
stave, |
|
|
const float |
bowx |
|
) |
| const |
|
overridevirtual |
This is the tweak function for the IBLDist DB.
Implements IInDetAlignDBTool.
Definition at line 1452 of file InDetAlignDBTool.cxx.
1458 if (StatusCode::SUCCESS==
detStore()->
retrieve(atrlistcol1,
"/Indet/IBLDist")) {
1461 if (atrlistcol2!=
nullptr){
1467 if(atrlist2[
"stave"].data<int>()!=stave)
continue;
1469 msg(
MSG::DEBUG) <<
"IBLDist DB -- channel before update: " << citr->first
1470 <<
" ,stave: " << atrlist2[
"stave"].data<
int>()
1471 <<
" ,mag: " << atrlist2[
"mag"].data<float>()
1472 <<
" ,base: " << atrlist2[
"base"].data<
float>() <<
endmsg;
1474 atrlist2[
"mag"].data<
float>() += bowx;
1476 msg(
MSG::DEBUG) <<
"IBLDist DB -- channel after update: " << citr->first
1477 <<
" ,stave: " << atrlist2[
"stave"].data<
int>()
1478 <<
" ,mag: " << atrlist2[
"mag"].data<float>()
1479 <<
" ,base: " << atrlist2[
"base"].data<
float>() <<
endmsg;
1485 ATH_MSG_ERROR(
"tweakIBLDist: cast fails for stave " << stave );
1490 ATH_MSG_ERROR(
"tweakIBLDist: cannot retrieve CondAttrListCollection for key /Indet/IBLDist" );
◆ tweakTrans() [1/2]
◆ tweakTrans() [2/2]
◆ updateVHKA()
◆ writeFile()
void InDetAlignDBTool::writeFile |
( |
const bool |
ntuple, |
|
|
const std::string & |
file |
|
) |
| const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 632 of file InDetAlignDBTool.cxx.
634 std::ofstream*
outfile=
nullptr;
636 if (StatusCode::SUCCESS!=service(
"NTupleSvc",ntsvc,
true))
638 const std::string
path=
file+
"/9002";
642 ATH_MSG_DEBUG(
"writeFile: Write AlignableTransforms on ntuple 9002, path: " <<
file );
648 nt=ntsvc->book(
file,ntid,CLID_ColumnWiseTuple,
"AlignDB");
669 "Error booking ntuple 9002 contents" );
676 for (std::vector<std::string>::const_iterator iobj=
m_alignobjs.begin();
681 if (!ntuple) *
outfile << *iobj << std::endl;
683 cit!=
pat->end();++cit) {
719 std::string r3=iobj->substr(iobj->size()-3,3);
721 if (r3==
"SCT" || r3==
"PIX")
nt_level=2;
732 if (StatusCode::SUCCESS!=
nt->write())
ATH_MSG_ERROR(
"Problem filling ntuple 9002" );
735 " " << ring <<
" " <<
side <<
" " <<
dx <<
" " <<
dy <<
" "
749 ATH_MSG_DEBUG(
"Written " << nobj <<
" AlignableTransform objects" <<
" with " << ntrans <<
" transforms to text file" );
◆ writeGlobalFolderFile()
void InDetAlignDBTool::writeGlobalFolderFile |
( |
const std::string & |
file | ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 785 of file InDetAlignDBTool.cxx.
787 std::ofstream*
outfile=
nullptr;
792 std::vector<std::string> folder_list = {
"/Indet/AlignL1/ID",
"/Indet/AlignL2/PIX",
"/Indet/AlignL2/SCT"};
804 *
outfile << atrlist[
"subsystem"].data<
int>()
805 <<
" " << atrlist[
"det"].data<int>()
806 <<
" " << atrlist[
"bec"].data<
int>()
807 <<
" " << atrlist[
"layer"].data<int>()
808 <<
" " << atrlist[
"ring"].data<
int>()
809 <<
" " << atrlist[
"sector"].data<int>()
810 <<
" " << atrlist[
"side"].data<
int>()
811 <<
" " << atrlist[
"Tx"].data<float>()
812 <<
" " << atrlist[
"Ty"].data<
float>()
813 <<
" " << atrlist[
"Tz"].data<float>()
814 <<
" " << atrlist[
"Rx"].data<
float>()
815 <<
" " << atrlist[
"Ry"].data<float>()
816 <<
" " << atrlist[
"Rz"].data<
float>() << std::endl;
821 msg(MSG::INFO) <<
"Cannot find " << *
it <<
" Container - cannot write DB in text file " <<
endmsg;
828 ATH_MSG_DEBUG(
"writeFile: No dynamic Run2 DB structure is present --> skipping writing file " <<
file );
◆ writeIBLDistFile()
void InDetAlignDBTool::writeIBLDistFile |
( |
const std::string & |
file | ) |
const |
|
overridevirtual |
Implements IInDetAlignDBTool.
Definition at line 753 of file InDetAlignDBTool.cxx.
755 std::ofstream*
outfile=
nullptr;
759 *
outfile <<
"/Indet/IBLDist" << std::endl;
762 if (StatusCode::SUCCESS==
detStore()->
retrieve(atrlistcol,
"/Indet/IBLDist")) {
767 *
outfile << citr->first <<
" " << atrlist[
"stave"].data<
int>()
768 <<
" " << atrlist[
"eta"].data<int>()
769 <<
" " << atrlist[
"mag"].data<
float>()
770 <<
" " << atrlist[
"base"].data<float>() << std::endl;
775 msg(MSG::INFO) <<
"Cannot find IBLDist Container - cannot write IBLDist DB in text file " <<
endmsg;
◆ m_alignchans
std::vector<int> InDetAlignDBTool::m_alignchans |
|
private |
◆ m_alignobjs
std::vector<std::string> InDetAlignDBTool::m_alignobjs |
|
private |
◆ m_attrListCollection
◆ m_detStore
◆ m_dynamicDB
bool InDetAlignDBTool::m_dynamicDB |
|
private |
◆ m_evtStore
◆ m_forceUserDBConfig
bool InDetAlignDBTool::m_forceUserDBConfig |
|
private |
◆ m_managers
◆ m_par_condstream
◆ m_par_dbkey
std::string InDetAlignDBTool::m_par_dbkey |
|
private |
◆ m_par_dbroot
Gaudi::Property<std::string> InDetAlignDBTool::m_par_dbroot { this, "AlignmentRootFolder", "/Indet/Align", "Root folder for alignment" } |
|
private |
name of the root folder for constants, which can be set via the <key> syntax.
Default: /Indet/Align.
Definition at line 198 of file InDetAlignDBTool.h.
◆ m_par_fake
int InDetAlignDBTool::m_par_fake |
|
private |
◆ m_par_newdb
bool InDetAlignDBTool::m_par_newdb |
|
private |
◆ m_par_oldTextFile
bool InDetAlignDBTool::m_par_oldTextFile |
|
private |
◆ m_par_scttwoside
bool InDetAlignDBTool::m_par_scttwoside |
|
private |
◆ m_pixid
◆ m_pixman
◆ m_pixmanName
Gaudi::Property<std::string> InDetAlignDBTool::m_pixmanName {this, "PixelManager", "Pixel", "Pixel manager name" } |
|
private |
◆ m_sctid
◆ m_sctman
◆ m_sctmanName
Gaudi::Property<std::string> InDetAlignDBTool::m_sctmanName {this, "SCT_Manager", "SCT", "SCT manager name" } |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
bool is_pixel(Identifier id) const
const_iterator end() const
Const iterator class for DataVector/DataList.
path
python interpreter configuration --------------------------------------—
Scalar phi() const
phi method
std::string find(const std::string &s)
return a remapped string
bool is_sct(Identifier id) const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
A CondMultChanCollection is a template class which can hold a collection of T* objects which are inte...
Scalar theta() const
theta method
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
This class is a collection of AttributeLists where each one is associated with a channel number....
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
virtual StatusCode registerIOV(const std::string &typeName) const =0
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collectiom
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collection via Iterators
(Non-const) Iterator class for DataVector/DataList.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
This is an interface to a service used to register conditions objects in the Interval of Validity (IO...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void add(ChanNum chanNum)
Adding in channel numbers.
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
int layer_disk(const Identifier &id) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Eigen::Matrix< double, 3, 1 > Vector3D
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
int eta_module(const Identifier &id) const
Eigen::Translation< double, 3 > Translation3D
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AlignFolderType m_alignfoldertype
int side(const Identifier &id) const
Eigen::AngleAxisd AngleAxis3D
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
int phi_module(const Identifier &id) const
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier