|
ATLAS Offline Software
|
#include <SiTrkAlignDBTool.h>
|
| SiTrkAlignDBTool (const std::string &type, const std::string &name, const IInterface *parent) |
| constructor More...
|
|
virtual | ~SiTrkAlignDBTool () |
| destructor More...
|
|
virtual StatusCode | initialize () |
| initialize method More...
|
|
virtual StatusCode | finalize () |
| finalize method More...
|
|
void | writeAlignPar () |
| Writes alignment parameters. More...
|
|
void | setNtuple (TFile *file) |
| sets ntuple to be used to write output More...
|
|
virtual void | setLogStream (std::ostream *os) |
| sets the output stream for the logfile More...
|
|
virtual StatusCode | preSolve () |
| sets up initial alignment constants before solving More...
|
|
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 |
|
|
void | updateDB () |
| updates alignment constants in the DB More...
|
|
bool | checkPixelLevel () |
|
bool | checkSCTLevel () |
|
bool | checkSiLevel () |
|
void | updateSiL0asL1 (Identifier idL0, const Amg::Transform3D &transform) |
|
void | updateAsL3 (const Trk::AlignModule *module, const Amg::Transform3D &transform, double) |
|
void | printTransform (const Amg::Transform3D &tr) const |
|
void | updateAsL2 (const Trk::AlignModule *module, const Amg::Transform3D &transform, const int) |
|
void | updateAsL16 (const Trk::AlignModule *module, double) |
|
virtual Identifier | GetL1L2fromL3Identifier (const Identifier &ident, const int &level) const |
| convert L3 module identifier to L1 or L2 More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 44 of file SiTrkAlignDBTool.h.
◆ StoreGateSvc_t
◆ SiTrkAlignDBTool()
InDet::SiTrkAlignDBTool::SiTrkAlignDBTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SiTrkAlignDBTool()
InDet::SiTrkAlignDBTool::~SiTrkAlignDBTool |
( |
| ) |
|
|
virtual |
◆ checkPixelLevel()
bool InDet::SiTrkAlignDBTool::checkPixelLevel |
( |
| ) |
|
|
private |
Definition at line 233 of file SiTrkAlignDBTool.cxx.
266 case 11:
case 12:
case 15:
case 16:
case 2:
case 22:
case 26:
case 27:
case 3:
277 case 11:
case 16:
case 2:
case 3:
case 12:
◆ checkSCTLevel()
bool InDet::SiTrkAlignDBTool::checkSCTLevel |
( |
| ) |
|
|
private |
Definition at line 291 of file SiTrkAlignDBTool.cxx.
304 case 1:
case 2:
case 27:
case 3:
315 case 1:
case 2:
case 25:
case 3:
◆ checkSiLevel()
bool InDet::SiTrkAlignDBTool::checkSiLevel |
( |
| ) |
|
|
private |
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ finalize()
StatusCode InDet::SiTrkAlignDBTool::finalize |
( |
| ) |
|
|
virtual |
◆ 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
Definition at line 866 of file SiTrkAlignDBTool.cxx.
877 if (abs(barrel_ec)==4)
return m_pixHelper->
wafer_id( barrel_ec, layer_disk, phi_sector, 0 ) ;
◆ initialize()
StatusCode InDet::SiTrkAlignDBTool::initialize |
( |
| ) |
|
|
virtual |
initialize method
Implements Trk::ITrkAlignDBTool.
Definition at line 102 of file SiTrkAlignDBTool.cxx.
108 return StatusCode::SUCCESS;
197 ATH_MSG_FATAL(
" No geometry manager available or alignment level not given. " );
212 ATH_MSG_INFO(
" Storing IBLDist as level 16 constants in separate DB");
215 ATH_MSG_FATAL(
" No geometry manager available or alignment level not given.");
221 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 & ITrkAlignDBTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 58 of file ITrkAlignDBTool.h.
59 {
return IID_TRKALIGNINTERFACES_ITrkAlignDBTool; }
◆ 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.
◆ preSolve()
virtual StatusCode Trk::ITrkAlignDBTool::preSolve |
( |
| ) |
|
|
inlinevirtualinherited |
sets up initial alignment constants before solving
Definition at line 52 of file ITrkAlignDBTool.h.
52 {
return StatusCode::SUCCESS; }
◆ printTransform()
◆ renounce()
◆ renounceArray()
◆ setLogStream()
virtual void Trk::ITrkAlignDBTool::setLogStream |
( |
std::ostream * |
os | ) |
|
|
inlinevirtualinherited |
◆ setNtuple()
void InDet::SiTrkAlignDBTool::setNtuple |
( |
TFile * |
file | ) |
|
|
inlinevirtual |
◆ 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.
◆ updateAsL16()
Definition at line 807 of file SiTrkAlignDBTool.cxx.
809 ATH_MSG_INFO(
"Updating constants for module "<<
module->name()<<
" as level 16 IBLDist constants (new)");
812 const std::vector<const Trk::TrkDetElementBase *> * elements =
module->detElementCollection(
det);
819 ATH_MSG_DEBUG(
"looping over "<<elements->size()<<
" elements");
820 std::vector<int> stave_phis;
821 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
822 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
823 for ( ; ielem != ielem_end; ++ielem) {
826 ATH_MSG_WARNING(
"Should be Silicon detector element but is not. Skipping.");
836 std::vector<int>::const_iterator ix =
find(stave_phis.begin(),stave_phis.end(),this_stave_phi);
837 if (ix==stave_phis.end()) {
838 stave_phis.push_back(this_stave_phi);
842 ATH_MSG_ERROR(
"Error tweaking IBLDist DB for stave "<<this_stave_phi);
◆ updateAsL2()
Definition at line 736 of file SiTrkAlignDBTool.cxx.
738 ATH_MSG_INFO(
"Updating constants for module "<<
module->name()<<
" as level 2 constants (new)");
744 const std::vector<const Trk::TrkDetElementBase *> * elements =
module->detElementCollection(
det);
751 ATH_MSG_DEBUG(
"looping over "<<elements->size()<<
" elements");
752 std::vector<std::string> level_mods;
754 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
755 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
756 for ( ; ielem != ielem_end; ++ielem) {
759 ATH_MSG_WARNING(
"Should be Silicon detector element but is not. Skipping.");
770 std::vector<std::string>::const_iterator ix =
find(level_mods.begin(),level_mods.end(),
key);
771 if (ix==level_mods.end()) {
772 level_mods.push_back(
key);
774 ATH_MSG_DEBUG(
"-----------------------------------------------------");
◆ updateAsL3()
if (apBowX!=0){
double z = sielem->center()[2];
const double y0y0 = 366.5*366.5;
ATH_MSG_DEBUG("Z position : "<< z); double bowx = apBowX * ( z*z - y0y0 ) / y0y0; This is in the module frame, as bowing corrections are directly L3 Amg::Translation3D translation_bow(bowx , 0, 0 ); dbtransform *= translation_bow; }
Definition at line 639 of file SiTrkAlignDBTool.cxx.
641 ATH_MSG_INFO(
"Updating constants for module "<<
module->name()<<
" as level 3 constants");
650 for (
unsigned int idet=0; idet<2; idet++) {
656 const std::vector<const Trk::TrkDetElementBase *> * elements =
module->detElementCollection(
det);
663 ATH_MSG_DEBUG(
"looping over "<<elements->size()<<
" elements");
665 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem = elements->begin();
666 std::vector<const Trk::TrkDetElementBase*>::const_iterator ielem_end = elements->end();
667 for ( ; ielem != ielem_end; ++ielem) {
670 ATH_MSG_WARNING(
"Should be Silicon detector element but is not. Skipping.");
682 ATH_MSG_DEBUG(
"-----------------------------------------------------");
731 ATH_MSG_DEBUG(
"-----------------------------------------------------");
◆ updateDB()
void InDet::SiTrkAlignDBTool::updateDB |
( |
| ) |
|
|
private |
updates alignment constants in the DB
Definition at line 380 of file SiTrkAlignDBTool.cxx.
386 ATH_MSG_INFO(
"-------------------------------------------------");
413 std::vector<Trk::AlignModule *>::const_iterator imod =
m_alignModuleTool->getAlignModuleCollection()->begin();
414 std::vector<Trk::AlignModule *>::const_iterator imod_end =
m_alignModuleTool->getAlignModuleCollection()->end();
415 for( ; imod != imod_end; ++imod ) {
419 ATH_MSG_DEBUG(
"-------------------------------------------------------");
427 ATH_MSG_DEBUG(
"Module with ID: "<<modID<<
" is not a Silicon module. Skipping.");
433 if(alignPars->
size() == 0) {
545 dbtransform = dbFrameToAlignFrame.inverse() *
transform * dbFrameToAlignFrame;
573 ATH_MSG_DEBUG(
"Module \'"<<
module->name()<<
"\': Call to tweak failed. Constants probably don't exist yet. Use set instead.");
581 ATH_MSG_INFO(
"-------------------------------------------------");
◆ updateSiL0asL1()
Definition at line 586 of file SiTrkAlignDBTool.cxx.
592 ATH_MSG_ERROR(
"wrong identifier for L0 Silicon in updateSiL0asL1()");
600 ATH_MSG_INFO(
"Splitting Silicon into L1 modules and updating in the DB");
610 ATH_MSG_INFO(
"Call to tweak failed. Constants probably don't exist yet. Use set instead.");
616 ATH_MSG_INFO(
"Splitting SCT into L1 modules and updating in the DB");
619 std::vector<Identifier>
ids;
625 for(
unsigned int i=0;
i<
ids.size(); ++
i) {
628 ATH_MSG_INFO(
"Module "<<
i<<
". - id "<<
ids[
i]<<
": Call to tweak OK. Constants updated.");
631 ATH_MSG_INFO(
"Module "<<
i<<
". - id "<<
ids[
i]<<
": Call to tweak failed. Constants probably don't exist yet. Use set instead.");
◆ updateVHKA()
◆ writeAlignPar()
void InDet::SiTrkAlignDBTool::writeAlignPar |
( |
| ) |
|
|
virtual |
◆ m_alignModuleTool
◆ m_detStore
◆ m_doPixel
bool InDet::SiTrkAlignDBTool::m_doPixel |
|
private |
◆ m_doSCT
bool InDet::SiTrkAlignDBTool::m_doSCT |
|
private |
◆ m_doSi
bool InDet::SiTrkAlignDBTool::m_doSi |
|
private |
◆ m_evtStore
◆ m_IDAlignDBTool
◆ m_idHelper
◆ m_logStream
std::ostream* Trk::ITrkAlignDBTool::m_logStream = nullptr |
|
protectedinherited |
◆ m_ntuple
TFile* InDet::SiTrkAlignDBTool::m_ntuple |
|
private |
◆ m_oldAlignFile
std::string InDet::SiTrkAlignDBTool::m_oldAlignFile |
|
private |
filename for the textfile with initial alignment constants
Definition at line 101 of file SiTrkAlignDBTool.h.
◆ m_oldGlobalFolderFile
std::string InDet::SiTrkAlignDBTool::m_oldGlobalFolderFile |
|
private |
filename for the textfile with initial GlobalFolder constants
Definition at line 102 of file SiTrkAlignDBTool.h.
◆ m_oldIBLDistFile
std::string InDet::SiTrkAlignDBTool::m_oldIBLDistFile |
|
private |
◆ m_outGlobalFolderFile
std::string InDet::SiTrkAlignDBTool::m_outGlobalFolderFile |
|
private |
filename for the textfile with final GlobalFolder constants
Definition at line 97 of file SiTrkAlignDBTool.h.
◆ m_outIBLDistFile
std::string InDet::SiTrkAlignDBTool::m_outIBLDistFile |
|
private |
filename for the textfile with final IBLDist params
Definition at line 96 of file SiTrkAlignDBTool.h.
◆ m_outputAlignFile
std::string InDet::SiTrkAlignDBTool::m_outputAlignFile |
|
private |
filename for the textfile with final alignment constants
Definition at line 95 of file SiTrkAlignDBTool.h.
◆ m_pixelaAlignDBM
bool InDet::SiTrkAlignDBTool::m_pixelaAlignDBM |
|
private |
◆ m_pixelAlignLevel
int InDet::SiTrkAlignDBTool::m_pixelAlignLevel |
|
private |
◆ m_pixelAlignLevelBarrel
int InDet::SiTrkAlignDBTool::m_pixelAlignLevelBarrel |
|
private |
◆ m_pixelAlignLevelEndcaps
int InDet::SiTrkAlignDBTool::m_pixelAlignLevelEndcaps |
|
private |
◆ m_pixelGeoManager
◆ m_pixHelper
◆ m_sctAlignLevel
int InDet::SiTrkAlignDBTool::m_sctAlignLevel |
|
private |
◆ m_sctAlignLevelBarrel
int InDet::SiTrkAlignDBTool::m_sctAlignLevelBarrel |
|
private |
◆ m_sctAlignLevelEndcaps
int InDet::SiTrkAlignDBTool::m_sctAlignLevelEndcaps |
|
private |
◆ m_sctGeoManager
◆ m_sctHelper
◆ m_siAlignLevel
int InDet::SiTrkAlignDBTool::m_siAlignLevel |
|
private |
◆ m_siGeoManager
◆ m_SQLiteTag
std::string InDet::SiTrkAlignDBTool::m_SQLiteTag |
|
private |
◆ m_updateConstants
bool InDet::SiTrkAlignDBTool::m_updateConstants |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeAsL16
bool InDet::SiTrkAlignDBTool::m_writeAsL16 |
|
private |
◆ m_writeAsL2
bool InDet::SiTrkAlignDBTool::m_writeAsL2 |
|
private |
◆ m_writeAsL3
bool InDet::SiTrkAlignDBTool::m_writeAsL3 |
|
private |
◆ m_writeOldConstants
bool InDet::SiTrkAlignDBTool::m_writeOldConstants |
|
private |
flag whether to write out the initial constants into text file
Definition at line 99 of file SiTrkAlignDBTool.h.
◆ m_writeSQLFile
bool InDet::SiTrkAlignDBTool::m_writeSQLFile |
|
private |
flag wether to write out .db file or not (file is not needed in parallel jobs)
Definition at line 93 of file SiTrkAlignDBTool.h.
◆ m_writeTextFile
bool InDet::SiTrkAlignDBTool::m_writeTextFile |
|
private |
flag whether to write out the final constants into text file
Definition at line 98 of file SiTrkAlignDBTool.h.
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
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
double par() const
returns final parameter and error
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...
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
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
int layer_disk(const Identifier &id) const
int layer_disk(const Identifier &id) const
Eigen::Matrix< double, 3, 1 > Vector3D
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)
Eigen::Translation< double, 3 > Translation3D
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int side(const Identifier &id) const
Eigen::AngleAxisd AngleAxis3D
const T * at(size_type n) const
Access an element, as an rvalue.
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
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>
virtual Identifier identify() const override final
identifier of this detector element (inline)
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...