|
ATLAS Offline Software
|
#include <CreateMisalignAlg.h>
|
| CreateMisalignAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Athena-Algorithm Constructor. More...
|
|
| ~CreateMisalignAlg () |
| Default Destructor. More...
|
|
StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
StatusCode | execute () |
| standard Athena-Algorithm method More...
|
|
StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 AtlasDetectorID * | m_idHelper |
|
const PixelID * | m_pixelIdHelper |
|
const SCT_ID * | m_sctIdHelper |
|
const TRT_ID * | m_trtIdHelper |
|
ToolHandle< IInDetAlignDBTool > | m_IDAlignDBTool |
|
ServiceHandle< ITRT_AlignDbSvc > | m_trtaligndbservice |
|
std::string | m_asciiFileNameBase |
| filename basis for ASCII files with alignment constants More...
|
|
std::string | m_SQLiteTag |
| tag name for the ConditionsDB More...
|
|
bool | m_firstEvent |
| Flag for Setup of AlignModuleList (1st event) More...
|
|
bool | m_createFreshDB |
| Flag to call the createDB method of DBTool (to be switched off when adding misalignments to a given geometry) More...
|
|
int | m_MisalignmentMode |
| Flag which Misalignment mode is to be generated. More...
|
|
long int | m_nEvents |
|
Gaudi::Property< double > | m_Misalign_x {this,"MisalignmentX",0.0,"Fixed X shift (mode 1 and 2)"} |
|
Gaudi::Property< double > | m_Misalign_y {this,"MisalignmentY",0.0,"Fixed Y shif (model 1 and 2)"} |
|
Gaudi::Property< double > | m_Misalign_z {this,"MisalignmentZ",0.0,"Fixed Z shift (mode 1 and 2)"} |
|
Gaudi::Property< double > | m_Misalign_alpha {this,"MisalignmentAlpha",0.0,"Fixed Alpha shift (model 1 and 2)"} |
|
Gaudi::Property< double > | m_Misalign_beta {this,"MisalignmentBeta",0.0,"Fixed Beta shift (mode 1 and 2)"} |
|
Gaudi::Property< double > | m_Misalign_gamma {this,"MisalignmentGamma",0.0,"Fixed Gamma shift (model 1 and 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_x {this,"RandomMisalignmentWidthX",0.1,"Gaussian width of X random misalignments (mode 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_y {this,"RandomMisalignmentWidthY",0.1,"Gaussian width of Y random misalignments (mode 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_z {this,"RandomMisalignmentWidthZ",0.1,"Gaussian width of Z random misalignments (mode 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_alpha {this,"RandomMisalignmentWidthAplha",0.1,"Gaussian width of Alpha random misalignments (mode 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_beta {this,"RandomMisalignmentWidthBeta",0.1,"Gaussian width of Beta random misalignments (mode 2)"} |
|
Gaudi::Property< double > | m_RndmMisalignWidth_gamma {this,"RandomMisalignmentWidthGamma",0.1,"Gaussian width of Gamma random misalignments (mode 2)"} |
|
double | m_Misalign_maxShift |
| Maximum shift for global modes. More...
|
|
double | m_Misalign_maxShift_Inner |
| Maximum shift of the Pixel B-layer in curl (d0 bias!) More...
|
|
double | m_ScalePixelIBL |
|
double | m_ScalePixelDBM |
|
double | m_IBLBowingTshift |
| The relative temp shift of set point that intriduces bowing (sign is important) More...
|
|
double | m_ScalePixelBarrel |
|
double | m_ScalePixelEndcap |
|
double | m_ScaleSCTBarrel |
|
double | m_ScaleSCTEndcap |
|
double | m_ScaleTRTBarrel |
|
double | m_ScaleTRTEndcap |
|
std::map< Identifier, HepGeom::Point3D< double > > | m_ModuleList |
| map of all SiIdentifiers to be misaligned and their centerpoints in global coordinates More...
|
|
TTree * | m_VisualizationLookupTree |
|
int | m_AthenaHashedID |
|
int | m_HumanReadableID |
|
NTuple::Item< double > | m_AlignResults_x |
| Alignment parameter sensitive coordinate. More...
|
|
NTuple::Item< double > | m_AlignResults_y |
| AP not-so-sensitive coordinate. More...
|
|
NTuple::Item< double > | m_AlignResults_z |
| AP normal to module plane. More...
|
|
NTuple::Item< double > | m_AlignResults_alpha |
| AP rotation around x-axis. More...
|
|
NTuple::Item< double > | m_AlignResults_beta |
| AP rotation aorund y-axis. More...
|
|
NTuple::Item< double > | m_AlignResults_gamma |
| AP rotation around z-axis. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_ID |
| ID information for this module. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_PixelSCT |
| ID information for this module. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_BarrelEC |
| ID information for this module. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_LayerDisc |
| ID information for this module. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_Phi |
| ID information for this module. More...
|
|
NTuple::Item< long > | m_AlignResults_Identifier_Eta |
| ID information for this module. More...
|
|
NTuple::Item< double > | m_Initial_center_x |
| Initial global center of module. More...
|
|
NTuple::Item< double > | m_Initial_center_y |
| Initial global center of module. More...
|
|
NTuple::Item< double > | m_Initial_center_z |
| Initial global center of module. More...
|
|
NTuple::Item< double > | m_Global_center_x |
| Misaligned global center of module. More...
|
|
NTuple::Item< double > | m_Global_center_y |
| Misaligned global center of module. More...
|
|
NTuple::Item< double > | m_Global_center_z |
| Misaligned global center of module. More...
|
|
bool | m_doPix |
|
bool | m_doStrip |
|
bool | m_doTRT |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"} |
|
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > | m_trtDetEleCollKey {this, "TRTDetEleCollKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer for TRT"} |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 46 of file CreateMisalignAlg.h.
◆ StoreGateSvc_t
◆ CreateMisalignAlg()
InDetAlignment::CreateMisalignAlg::CreateMisalignAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CreateMisalignAlg()
InDetAlignment::CreateMisalignAlg::~CreateMisalignAlg |
( |
| ) |
|
◆ BuildAlignTransform()
const HepGeom::Transform3D InDetAlignment::CreateMisalignAlg::BuildAlignTransform |
( |
const CLHEP::HepVector & |
AlignParams | ) |
|
|
private |
builds a HepGeom::Transform3D from the 6 Alignment Parameters
Definition at line 1020 of file CreateMisalignAlg.cxx.
1022 HepGeom::Vector3D<double> AlignShift(AlignParams[0],AlignParams[1],AlignParams[2]);
1023 CLHEP::HepRotation AlignRot;
1025 AlignRot = CLHEP::HepRotationX(AlignParams[3]) * CLHEP::HepRotationY(AlignParams[4]) * CLHEP::HepRotationZ(AlignParams[5]);
1028 return AlignTransform;
◆ 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]
◆ execute()
StatusCode InDetAlignment::CreateMisalignAlg::execute |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 218 of file CreateMisalignAlg.cxx.
246 return StatusCode::FAILURE;
252 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode InDetAlignment::CreateMisalignAlg::finalize |
( |
| ) |
|
◆ GenerateMisaligment()
StatusCode InDetAlignment::CreateMisalignAlg::GenerateMisaligment |
( |
| ) |
|
|
private |
the main function which calculates and applies a transformation to each detector element
Definition at line 437 of file CreateMisalignAlg.cxx.
440 SmartIF<IRndmGenSvc> randsvc{Gaudi::svcLocator()->service(
"RndmGenSvc")};
486 pixelElements = *pixelDetEleHandle;
487 if (not pixelDetEleHandle.isValid() or pixelElements==
nullptr) {
489 return StatusCode::FAILURE;
495 sctElements = *sctDetEleHandle;
496 if (not sctDetEleHandle.isValid() or sctElements==
nullptr) {
498 return StatusCode::FAILURE;
511 else ATH_MSG_WARNING(
"Trying to access a Pixel module when running with no Pixel!");
516 else ATH_MSG_WARNING(
"Trying to access an SCT/Strop module when running with no SCT/Strip!");
522 ATH_MSG_WARNING(
"Something fishy, identifier is neither Pixel, nor SCT or TRT!" );
537 ATH_MSG_WARNING(
"Apparently in a silicon detector, but SiModule is a null pointer");
540 const HepGeom::Point3D<double> center = iter->second;
543 double r = center.rho();
544 double phi = center.phi();
545 double z = center.z();
552 double ScaleFactor = 1.;
587 ATH_MSG_WARNING(
"Something fishy, identifier is neither Pixel, nor SCT or TRT!" );
598 msg() <<
"localToGlobal transformation:" <<
endmsg;
601 msg() << localToGlobal.xx() <<
" " << localToGlobal.xy() <<
" " << localToGlobal.xz() <<
endmsg;
602 msg() << localToGlobal.yx() <<
" " << localToGlobal.yy() <<
" " << localToGlobal.yz() <<
endmsg;
603 msg() << localToGlobal.zx() <<
" " << localToGlobal.zy() <<
" " << localToGlobal.zz() <<
endmsg;
616 CLHEP::HepRotation rot;
619 if (ScaleFactor == 0.0) {
637 double randMisX = RandMisX();
638 double randMisY = RandMisY();
639 double randMisZ = RandMisZ();
641 HepGeom::Vector3D<double> shift(randMisX, randMisY, randMisZ);
642 double randMisaplha = RandMisalpha();
643 double randMisbeta = RandMisbeta();
644 double randMisgamma = RandMisgamma();
646 CLHEP::HepRotation rot;
647 rot = CLHEP::HepRotationX(randMisaplha) * CLHEP::HepRotationY(randMisbeta) * CLHEP::HepRotationZ(randMisgamma);
650 if (ScaleFactor == 0.0) {
668 ATH_MSG_DEBUG(
"will not move this module for IBL temp distortion " );
672 parameterizedTrafo = HepGeom::Translate3D(
deltaX,0,0);
684 ATH_MSG_DEBUG(
"will not move TRT endcap for radial distortion " );
687 deltaR =
r/maxRadius * maxDeltaR;
694 ATH_MSG_DEBUG(
"will not move TRT endcap for elliptical distortion " );
704 ATH_MSG_DEBUG(
"will not move TRT endcap for funnel distortion " );
707 deltaR = 2. *
z/maxLength * maxDeltaR;
710 ATH_MSG_DEBUG(
"Wrong misalignment mode entered, doing nothing." );
723 deltaPhi =
r/maxRadius * maxAngle + minRadius/
r * maxAngleInner;
730 ATH_MSG_DEBUG(
"will not move TRT endcap for clamshell distortion " );
745 parameterizedTrafo = HepGeom::RotateZ3D(
deltaPhi);
753 deltaZ =
r/maxRadius * maxDeltaZ;
759 ATH_MSG_DEBUG(
"will not move TRT endcap for skew distortion " );
767 deltaZ = 2. *
z/maxLength * maxDeltaZ;
774 parameterizedTrafo = HepGeom::Translate3D(0,0,
deltaZ);
787 ATH_MSG_DEBUG(
"additional rotation for TRT barrel module!" );
788 HepGeom::Transform3D realLocalToGlobalTRT = HepGeom::Translate3D(center.x(),center.y(),center.z());
791 alignmentTrafo = parameterizedTrafo * realLocalToGlobalTRT * parameterizedTrafo * realLocalToGlobalTRT.inverse();
794 HepGeom::Transform3D realLocalToGlobalTRT = HepGeom::Translate3D(center.x(),center.y(),center.z());
795 double deltaAlpha = (-2.) *
r * maxAngle/maxLength;
798 CLHEP::HepRotation twistForTRTRotation(HepGeom::Vector3D<double>(center.x(),center.y(),center.z()), deltaAlpha );
802 alignmentTrafo = realLocalToGlobalTRT * twistForTRT * realLocalToGlobalTRT.inverse();
805 HepGeom::Transform3D realLocalToGlobalTRT = HepGeom::Translate3D(center.x(),center.y(),center.z());
806 double deltaAlpha = (-2.) * maxDeltaR/maxLength;
810 HepGeom::Vector3D<double> normalVector(center.x(),center.y(),center.z());
811 HepGeom::Vector3D<double> beamVector(0.,0.,1.);
812 HepGeom::Vector3D<double> rotationAxis = normalVector.cross(beamVector);
813 CLHEP::HepRotation twistForTRTRotation(rotationAxis, deltaAlpha );
816 alignmentTrafo = realLocalToGlobalTRT * twistForTRT * realLocalToGlobalTRT.inverse();
822 alignmentTrafo = parameterizedTrafo;
826 alignmentTrafo = localToGlobal.inverse() * parameterizedTrafo * localToGlobal;
833 msg() <<
"Align Transformation x phi = (" << alignmentTrafo.getRotation().phiX() /
CLHEP::deg <<
")" <<
endmsg;
834 msg() <<
"Align Transformation x Theta = (" << alignmentTrafo.getRotation().thetaX() /
CLHEP::deg <<
")" <<
endmsg;
835 msg() <<
"Align Transformation y phi = (" << alignmentTrafo.getRotation().phiY() /
CLHEP::deg <<
")" <<
endmsg;
836 msg() <<
"Align Transformation y Theta = (" << alignmentTrafo.getRotation().thetaY() /
CLHEP::deg <<
")" <<
endmsg;
837 msg() <<
"Align Transformation z phi = (" << alignmentTrafo.getRotation().phiZ() /
CLHEP::deg <<
")" <<
endmsg;
838 msg() <<
"Align Transformation z Theta = (" << alignmentTrafo.getRotation().thetaZ() /
CLHEP::deg <<
")" <<
endmsg;
842 if ( std::abs(alignmentTrafo.getTranslation().x()) < 1
e-10) {
843 HepGeom::Vector3D<double>
844 zeroSuppressedTranslation(0,alignmentTrafo.getTranslation().y(),alignmentTrafo.
845 getTranslation().
z());
849 if ( std::abs(alignmentTrafo.getTranslation().y()) < 1
e-10) {
850 HepGeom::Vector3D<double>
851 zeroSuppressedTranslation(alignmentTrafo.getTranslation().x(),0,alignmentTrafo.
852 getTranslation().
z());
856 if ( std::abs(alignmentTrafo.getTranslation().z()) < 1
e-10) {
857 HepGeom::Vector3D<double>
858 zeroSuppressedTranslation(alignmentTrafo.getTranslation().x(),alignmentTrafo.getTranslation().y(),0);
862 if ( std::abs(alignmentTrafo.getRotation().getDelta()) < 1
e-10) {
863 CLHEP::HepRotation zeroSuppressedRotation(alignmentTrafo.getRotation());
864 zeroSuppressedRotation.setDelta(0.);
891 ATH_MSG_WARNING(
"Something fishy, identifier is neither Pixel, nor SCT or TRT!" );
916 HepGeom::Point3D<double> alignedPosGlobal = LocalaGlobal * alignedPosLocal;
924 double radialShift_x = SCT_Center[0];
925 double radialShift_y = SCT_Center[1];
928 HepGeom::Point3D<double> SCT_endcap_alignedPosGlobal = LocalaaGlobal * alignedPosLocal;
973 ATH_MSG_WARNING(
"Something fishy, identifier is neither Pixel, nor SCT or TRT!" );
977 if (StatusCode::SUCCESS!=
ntupleSvc()->writeRecord(
"NTUPLES/CREATEMISALIGN/InitialAlignment")) {
993 ATH_MSG_INFO(
"Writing IoV information to mysql file" );
1000 ATH_MSG_ERROR(
"Write of AlignableTransforms (TRT) failed" );
1002 ATH_MSG_INFO(
"AlignableTransforms for TRT were written" );
1007 ATH_MSG_INFO(
"Writing IoV information for TRT to mysql file" );
1008 if ( StatusCode::SUCCESS
1015 return StatusCode::SUCCESS;
◆ getBowingMagParam()
double InDetAlignment::CreateMisalignAlg::getBowingMagParam |
( |
double |
temp_shift | ) |
|
|
private |
◆ getBowingTx()
double InDetAlignment::CreateMisalignAlg::getBowingTx |
( |
double |
p1, |
|
|
double |
z |
|
) |
| |
|
private |
◆ initialize()
StatusCode InDetAlignment::CreateMisalignAlg::initialize |
( |
| ) |
|
standard Athena-Algorithm method
Definition at line 130 of file CreateMisalignAlg.cxx.
159 SmartIF<ITHistSvc> hist_svc{Gaudi::svcLocator()->service(
"THistSvc")};
168 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/CREATEMISALIGN");
170 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/CREATEMISALIGN/InitialAlignment");
172 nt =
ntupleSvc()->book(
"/NTUPLES/CREATEMISALIGN/InitialAlignment", CLID_ColumnWiseTuple,
"InitialAlignment");
194 msg(MSG::ERROR) <<
"Failed to book InitialAlignment ntuple." <<
endmsg;
211 ATH_MSG_INFO(
"Dry run, no misalignment will be generated." );
214 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.
◆ 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.
◆ reduceTRTID() [1/2]
◆ reduceTRTID() [2/2]
◆ renounce()
◆ renounceArray()
◆ setupPixel_AlignModule()
void InDetAlignment::CreateMisalignAlg::setupPixel_AlignModule |
( |
int & |
nPixel | ) |
|
|
private |
Definition at line 316 of file CreateMisalignAlg.cxx.
321 if (not pixelDetEleHandle.isValid() or elements==
nullptr) {
327 const Identifier Pixel_ModuleID = element->identify();
357 msg() << commonAlignmentOutput(InitialAlignment);
◆ setupSCT_AlignModule()
void InDetAlignment::CreateMisalignAlg::setupSCT_AlignModule |
( |
int & |
nSCT | ) |
|
|
private |
Definition at line 266 of file CreateMisalignAlg.cxx.
271 if (not sctDetEleHandle.isValid() or elements==
nullptr) {
308 msg() << commonAlignmentOutput(InitialAlignment);
◆ setupTRT_AlignModule()
void InDetAlignment::CreateMisalignAlg::setupTRT_AlignModule |
( |
int & |
nTRT | ) |
|
|
private |
Definition at line 368 of file CreateMisalignAlg.cxx.
372 std::map< Identifier, std::vector<double> > trtModulesWithCOG;
377 if (not trtDetEleHandle.isValid() or elements==
nullptr) {
385 const Identifier TRTID_orig = element->identify();
387 bool insertSuccess{};
388 std::tie(
std::ignore, insertSuccess) = trtModulesWithCOG.insert({TRTID,std::vector<double>(4,0.)});
389 if (not insertSuccess){
390 ATH_MSG_VERBOSE(
"No insert was performed, identifier was already in the trtModulesWithCOG map");
393 unsigned int nStraws = element->nStraws();
394 for (
unsigned int l = 0;
l<nStraws;
l++) {
396 trtModulesWithCOG[TRTID].at(0) += strawcenter.x();
397 trtModulesWithCOG[TRTID].at(1) += strawcenter.y();
398 trtModulesWithCOG[TRTID].at(2) += strawcenter.z();
399 trtModulesWithCOG[TRTID].at(3) += 1.;
403 ATH_MSG_DEBUG(
"this strawlayer has " << nStraws <<
" straws." );
404 ATH_MSG_DEBUG(
"strawcount of this module: " << trtModulesWithCOG[TRTID].at(3) );
409 std::map< Identifier, std::vector<double> >::const_iterator iter2;
410 for (iter2 = trtModulesWithCOG.begin(); iter2!=trtModulesWithCOG.end(); ++iter2) {
412 double nStraws = iter2->second.at(3);
415 m_ModuleList[TRTID] = HepGeom::Point3D<double>(iter2->second.at(0)/nStraws, iter2->second.at(1)/nStraws,iter2->second.at(2)/nStraws);
424 msg() << commonAlignmentOutput(InitialAlignment);
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_AlignResults_alpha
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_alpha |
|
private |
◆ m_AlignResults_beta
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_beta |
|
private |
◆ m_AlignResults_gamma
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_gamma |
|
private |
◆ m_AlignResults_Identifier_BarrelEC
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_BarrelEC |
|
private |
◆ m_AlignResults_Identifier_Eta
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_Eta |
|
private |
◆ m_AlignResults_Identifier_ID
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_ID |
|
private |
◆ m_AlignResults_Identifier_LayerDisc
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_LayerDisc |
|
private |
◆ m_AlignResults_Identifier_Phi
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_Phi |
|
private |
◆ m_AlignResults_Identifier_PixelSCT
NTuple::Item<long> InDetAlignment::CreateMisalignAlg::m_AlignResults_Identifier_PixelSCT |
|
private |
◆ m_AlignResults_x
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_x |
|
private |
◆ m_AlignResults_y
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_y |
|
private |
◆ m_AlignResults_z
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_AlignResults_z |
|
private |
◆ m_asciiFileNameBase
std::string InDetAlignment::CreateMisalignAlg::m_asciiFileNameBase |
|
private |
filename basis for ASCII files with alignment constants
Definition at line 74 of file CreateMisalignAlg.h.
◆ m_AthenaHashedID
int InDetAlignment::CreateMisalignAlg::m_AthenaHashedID |
|
private |
◆ m_createFreshDB
bool InDetAlignment::CreateMisalignAlg::m_createFreshDB |
|
private |
Flag to call the createDB method of DBTool (to be switched off when adding misalignments to a given geometry)
Definition at line 78 of file CreateMisalignAlg.h.
◆ m_detStore
◆ m_doPix
bool InDetAlignment::CreateMisalignAlg::m_doPix |
|
private |
◆ m_doStrip
bool InDetAlignment::CreateMisalignAlg::m_doStrip |
|
private |
◆ m_doTRT
bool InDetAlignment::CreateMisalignAlg::m_doTRT |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_firstEvent
bool InDetAlignment::CreateMisalignAlg::m_firstEvent |
|
private |
◆ m_Global_center_x
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Global_center_x |
|
private |
◆ m_Global_center_y
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Global_center_y |
|
private |
◆ m_Global_center_z
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Global_center_z |
|
private |
◆ m_HumanReadableID
int InDetAlignment::CreateMisalignAlg::m_HumanReadableID |
|
private |
◆ m_IBLBowingTshift
double InDetAlignment::CreateMisalignAlg::m_IBLBowingTshift |
|
private |
The relative temp shift of set point that intriduces bowing (sign is important)
Definition at line 98 of file CreateMisalignAlg.h.
◆ m_IDAlignDBTool
◆ m_idHelper
◆ m_Initial_center_x
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Initial_center_x |
|
private |
◆ m_Initial_center_y
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Initial_center_y |
|
private |
◆ m_Initial_center_z
NTuple::Item<double> InDetAlignment::CreateMisalignAlg::m_Initial_center_z |
|
private |
◆ m_Misalign_alpha
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_alpha {this,"MisalignmentAlpha",0.0,"Fixed Alpha shift (model 1 and 2)"} |
|
private |
◆ m_Misalign_beta
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_beta {this,"MisalignmentBeta",0.0,"Fixed Beta shift (mode 1 and 2)"} |
|
private |
◆ m_Misalign_gamma
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_gamma {this,"MisalignmentGamma",0.0,"Fixed Gamma shift (model 1 and 2)"} |
|
private |
◆ m_Misalign_maxShift
double InDetAlignment::CreateMisalignAlg::m_Misalign_maxShift |
|
private |
◆ m_Misalign_maxShift_Inner
double InDetAlignment::CreateMisalignAlg::m_Misalign_maxShift_Inner |
|
private |
◆ m_Misalign_x
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_x {this,"MisalignmentX",0.0,"Fixed X shift (mode 1 and 2)"} |
|
private |
◆ m_Misalign_y
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_y {this,"MisalignmentY",0.0,"Fixed Y shif (model 1 and 2)"} |
|
private |
◆ m_Misalign_z
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_Misalign_z {this,"MisalignmentZ",0.0,"Fixed Z shift (mode 1 and 2)"} |
|
private |
◆ m_MisalignmentMode
int InDetAlignment::CreateMisalignAlg::m_MisalignmentMode |
|
private |
◆ m_ModuleList
std::map<Identifier, HepGeom::Point3D<double> > InDetAlignment::CreateMisalignAlg::m_ModuleList |
|
private |
map of all SiIdentifiers to be misaligned and their centerpoints in global coordinates
Definition at line 107 of file CreateMisalignAlg.h.
◆ m_nEvents
long int InDetAlignment::CreateMisalignAlg::m_nEvents |
|
private |
◆ m_pixelDetEleCollKey
◆ m_pixelIdHelper
const PixelID* InDetAlignment::CreateMisalignAlg::m_pixelIdHelper |
|
private |
◆ m_RndmMisalignWidth_alpha
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_alpha {this,"RandomMisalignmentWidthAplha",0.1,"Gaussian width of Alpha random misalignments (mode 2)"} |
|
private |
◆ m_RndmMisalignWidth_beta
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_beta {this,"RandomMisalignmentWidthBeta",0.1,"Gaussian width of Beta random misalignments (mode 2)"} |
|
private |
◆ m_RndmMisalignWidth_gamma
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_gamma {this,"RandomMisalignmentWidthGamma",0.1,"Gaussian width of Gamma random misalignments (mode 2)"} |
|
private |
◆ m_RndmMisalignWidth_x
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_x {this,"RandomMisalignmentWidthX",0.1,"Gaussian width of X random misalignments (mode 2)"} |
|
private |
◆ m_RndmMisalignWidth_y
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_y {this,"RandomMisalignmentWidthY",0.1,"Gaussian width of Y random misalignments (mode 2)"} |
|
private |
◆ m_RndmMisalignWidth_z
Gaudi::Property<double> InDetAlignment::CreateMisalignAlg::m_RndmMisalignWidth_z {this,"RandomMisalignmentWidthZ",0.1,"Gaussian width of Z random misalignments (mode 2)"} |
|
private |
◆ m_ScalePixelBarrel
double InDetAlignment::CreateMisalignAlg::m_ScalePixelBarrel |
|
private |
◆ m_ScalePixelDBM
double InDetAlignment::CreateMisalignAlg::m_ScalePixelDBM |
|
private |
◆ m_ScalePixelEndcap
double InDetAlignment::CreateMisalignAlg::m_ScalePixelEndcap |
|
private |
◆ m_ScalePixelIBL
double InDetAlignment::CreateMisalignAlg::m_ScalePixelIBL |
|
private |
◆ m_ScaleSCTBarrel
double InDetAlignment::CreateMisalignAlg::m_ScaleSCTBarrel |
|
private |
◆ m_ScaleSCTEndcap
double InDetAlignment::CreateMisalignAlg::m_ScaleSCTEndcap |
|
private |
◆ m_ScaleTRTBarrel
double InDetAlignment::CreateMisalignAlg::m_ScaleTRTBarrel |
|
private |
◆ m_ScaleTRTEndcap
double InDetAlignment::CreateMisalignAlg::m_ScaleTRTEndcap |
|
private |
◆ m_SCTDetEleCollKey
◆ m_sctIdHelper
const SCT_ID* InDetAlignment::CreateMisalignAlg::m_sctIdHelper |
|
private |
◆ m_SQLiteTag
std::string InDetAlignment::CreateMisalignAlg::m_SQLiteTag |
|
private |
◆ m_trtaligndbservice
◆ m_trtDetEleCollKey
◆ m_trtIdHelper
const TRT_ID* InDetAlignment::CreateMisalignAlg::m_trtIdHelper |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_VisualizationLookupTree
TTree* InDetAlignment::CreateMisalignAlg::m_VisualizationLookupTree |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Property< double > m_RndmMisalignWidth_y
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
Gaudi::Property< double > m_Misalign_z
NTuple::Item< double > m_AlignResults_alpha
AP rotation around x-axis.
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
double m_ScalePixelEndcap
static constexpr uint32_t MAXRUN
Scalar phi() const
phi method
NTuple::Item< long > m_AlignResults_Identifier_ID
ID information for this module.
NTuple::Item< double > m_Global_center_x
Misaligned global center of module.
NTuple::Item< double > m_Initial_center_z
Initial global center of module.
Gaudi::Property< double > m_Misalign_gamma
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)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Gaudi::Property< double > m_Misalign_beta
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
NTuple::Item< double > m_AlignResults_gamma
AP rotation around z-axis.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
std::string m_SQLiteTag
tag name for the ConditionsDB
bool is_trt(Identifier id) const
int phi_module(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
NTuple::Item< long > m_AlignResults_Identifier_LayerDisc
ID information for this module.
bool empty() const
Test if the key is blank.
bool is_valid() const
Check if id is in a valid state.
value_type get_compact() const
Get the compact id.
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
bool is_blayer(const Identifier &id) const
Test for b-layer - WARNING: id MUST be pixel id, otherwise answer is not accurate....
NTuple::Item< long > m_AlignResults_Identifier_Eta
ID information for this module.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::map< Identifier, HepGeom::Point3D< double > > m_ModuleList
map of all SiIdentifiers to be misaligned and their centerpoints in global coordinates
virtual void setOwner(IDataHandleHolder *o)=0
static constexpr uint32_t MINRUN
NTuple::Item< long > m_AlignResults_Identifier_BarrelEC
ID information for this module.
NTuple::Item< double > m_AlignResults_beta
AP rotation aorund y-axis.
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...
Gaudi::Property< double > m_RndmMisalignWidth_beta
bool m_createFreshDB
Flag to call the createDB method of DBTool (to be switched off when adding misalignments to a given g...
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleCollKey
Gaudi::Property< double > m_RndmMisalignWidth_gamma
virtual StatusCode sysInitialize() override
Override sysInitialize.
double getBowingTx(double p1, double z)
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
std::string m_asciiFileNameBase
filename basis for ASCII files with alignment constants
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TTree * m_VisualizationLookupTree
const TRT_ID * m_trtIdHelper
::StatusCode StatusCode
StatusCode definition for legacy code.
NTuple::Item< long > m_AlignResults_Identifier_Phi
ID information for this module.
ServiceHandle< ITRT_AlignDbSvc > m_trtaligndbservice
Eigen::Affine3d Transform3D
const SCT_ID * m_sctIdHelper
void setupPixel_AlignModule(int &)
NTuple::Item< double > m_AlignResults_x
Alignment parameter sensitive coordinate.
Gaudi::Property< double > m_Misalign_x
Gaudi::Property< double > m_RndmMisalignWidth_z
const AtlasDetectorID * m_idHelper
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
const PixelID * m_pixelIdHelper
virtual void renounce()=0
double m_IBLBowingTshift
The relative temp shift of set point that intriduces bowing (sign is important)
static constexpr uint32_t MAXEVENT
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double m_ScalePixelBarrel
int layer_disk(const Identifier &id) const
void setupTRT_AlignModule(int &)
int eta_module(const Identifier &id) const
virtual Amg::Vector3D sensorCenter() const override
Return the centre of a sensor in the local reference frame.
NTuple::Item< double > m_Initial_center_x
Initial global center of module.
bool m_firstEvent
Flag for Setup of AlignModuleList (1st event)
int layer_disk(const Identifier &id) const
NTuple::Item< double > m_AlignResults_y
AP not-so-sensitive coordinate.
StatusCode initialize(bool used=true)
ToolHandle< IInDetAlignDBTool > m_IDAlignDBTool
double getBowingMagParam(double temp_shift)
Eigen::Matrix< double, 3, 1 > Vector3D
int phi_module(const Identifier &id) const
static constexpr uint32_t MINEVENT
NTuple::Item< double > m_AlignResults_z
AP normal to module plane.
const Identifier reduceTRTID(Identifier id)
bool is_dbm(const Identifier &id) const
Test for dbm - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for gene...
NTuple::Item< double > m_Global_center_y
Misaligned global center of module.
double m_Misalign_maxShift
Maximum shift for global modes.
NTuple::Item< double > m_Initial_center_y
Initial global center of module.
DataObjIDColl m_extendedExtraObjects
bool is_barrel(const Identifier &id) const
Test for barrel.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Gaudi::Property< double > m_RndmMisalignWidth_alpha
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)
Gaudi::Property< double > m_Misalign_alpha
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
Gaudi::Property< double > m_Misalign_y
NTuple::Item< long > m_AlignResults_Identifier_PixelSCT
ID information for this module.
int eta_module(const Identifier &id) const
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.
int side(const Identifier &id) const
NTuple::Item< double > m_Global_center_z
Misaligned global center of module.
AthAlgorithm()
Default constructor:
void setupSCT_AlignModule(int &)
Class to hold collection of TRT detector elements.
double m_Misalign_maxShift_Inner
Maximum shift of the Pixel B-layer in curl (d0 bias!)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
int phi_module(const Identifier &id) const
StatusCode GenerateMisaligment()
the main function which calculates and applies a transformation to each detector element
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Gaudi::Property< double > m_RndmMisalignWidth_x
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
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...
int m_MisalignmentMode
Flag which Misalignment mode is to be generated.