ATLAS Offline Software
SurveyConstraint.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef SURVEYCONSTRAINTTOOLS_SURVEYCONSTRAINT_H
6 #define SURVEYCONSTRAINTTOOLS_SURVEYCONSTRAINT_H
7 
12 #include <vector>
13 #include <map>
14 
15 class AtlasDetectorID;
16 class IInDetAlignDBTool;
17 class PixelID;
18 class SCT_ID;
19 
20 class SurveyConstraint : public extends <AthAlgTool, ISurveyConstraint>{
21  public:
22  SurveyConstraint(const std::string& type,const std::string& name,const IInterface* parent);
23 
24  virtual ~SurveyConstraint() = default;
25 
26  virtual StatusCode initialize() override;
27  virtual StatusCode finalize() override;
28 
29  virtual StatusCode computeConstraint(const Identifier& ModuleID,
30  Amg::VectorX& dparams,
31  double& deltachisq,
32  Amg::VectorX& dchisqdparams,
33  Amg::MatrixX& d2chisqdpdp) override;
34  virtual void setup_SurveyConstraintModules() override;
35 
36  virtual void MMap(std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >& ModuleMap) override;
37 
38  virtual int getWeightPixEC(//const Identifier& ModuleID,
39  Amg::MatrixX& weight) override;
40  virtual int getWeightPixB(//const Identifier& ModuleID,
41  Amg::MatrixX& weight) override;
42  virtual int getWeightSCTEC(//const Identifier& ModuleID,
43  Amg::MatrixX& weight) override;
44  virtual int getWeightSCTB(//const Identifier& ModuleID,
45  Amg::MatrixX& weight) override;
46  virtual void getSurveyCoordsPixEC(//const Identifier& ModuleID,
47  std::vector< Amg::Vector3D > & coords) override;
48  virtual void getSurveyCoordsPixB(//const Identifier& ModuleID,
49  std::vector< Amg::Vector3D > & coords) override;
50  virtual void getSurveyCoordsSCTEC(//const Identifier& ModuleID,
51  std::vector< Amg::Vector3D > & coords) override;
52  virtual void getSurveyCoordsSCTB(//const Identifier& ModuleID,
53  std::vector< Amg::Vector3D > & coords) override;
54  virtual void GlobalToLocal(SurveyConstraintModule* mut,std::vector<SurveyConstraintPoint>& points) override;
55  virtual int SectorNumber(int phi_module) override;
56  virtual double PhiModuleToSector(int phi_module) override;
57  virtual void TransformSector(Identifier Pixel_ModuleID,
60  Amg::Transform3D CurrentTransRandSect) override;
61 
62  private :
64  const PixelID* m_pixid;
65  const SCT_ID* m_sctid;
66 
67 
70 
71  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
72  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
73 
74  // dictionary of module constrain objects, indexed by moduleID
75  std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> > m_ModuleMap;
76 
77  // algorithm parameters, possible to declare at runtime
78  double m_SurveyWeightX;
79  // (e.g. bow), set to 1 for now
80  double m_SurveyWeightY;
81  double m_SurveyWeightZ;
85  double m_TransX;
86  double m_TransY;
87  double m_TransZ;
88  double m_RotX;
89  double m_RotX2;
90  double m_RotY;
91  double m_RotZ;
92  double m_TransXRand;
93  double m_TransYRand;
94  double m_TransZRand;
95  double m_RotXRand;
96  double m_RotYRand;
97  double m_RotZRand;
101  double m_RotXRandPixB;
102  double m_RotYRandPixB;
103  double m_RotZRandPixB;
113  double m_RotXRandSCTB;
114  double m_RotYRandSCTB;
115  double m_RotZRandSCTB;
116  bool m_gaus;
120  double m_RotXRandSect;
121  double m_RotYRandSect;
122  double m_RotZRandSect;
125  bool m_gausSect;
126  bool m_FullDisk;
127  double m_scaleZ;
128  double m_proximity;
129  std::string m_aligndbtoolinst;
130  std::string m_surveydbtoolinst;
131  std::string m_surveywfile;
132  std::string m_surveyrfile;
133  bool m_ntuple;
134 
135 };
136 
137 #endif // SURVEYCONSTRAINTTOOLS_SURVEYCONSTRAINT_H
SurveyConstraint::getSurveyCoordsPixB
virtual void getSurveyCoordsPixB(std::vector< Amg::Vector3D > &coords) override
Definition: SurveyConstraint.cxx:961
SurveyConstraint::m_TransXRandSCTB
double m_TransXRandSCTB
Weight & rand Translation in X of current SCTB modules.
Definition: SurveyConstraint.h:110
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
SurveyConstraint::m_ModuleMap
std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > m_ModuleMap
Map of Wafer objects.
Definition: SurveyConstraint.h:75
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
SurveyConstraint::m_RotYRandSCTEC
double m_RotYRandSCTEC
Weight & rand Rotation in Y of current SCTEC modules.
Definition: SurveyConstraint.h:108
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
SurveyConstraint::m_RotXRand
double m_RotXRand
Weight & rand Rotation in X of current PixEC modules.
Definition: SurveyConstraint.h:95
SurveyConstraint::m_SurveyWeightPhiX
double m_SurveyWeightPhiX
""
Definition: SurveyConstraint.h:82
SurveyConstraint::m_RotXRandSect
double m_RotXRandSect
rand Rotation in X of current PixEC sectors
Definition: SurveyConstraint.h:120
SurveyConstraint::getWeightPixB
virtual int getWeightPixB(Amg::MatrixX &weight) override
Definition: SurveyConstraint.cxx:894
SurveyConstraint::m_scaleZ
double m_scaleZ
scale Z coordinate to match sensitivity
Definition: SurveyConstraint.h:127
SurveyConstraint::m_ntuple
bool m_ntuple
Definition: SurveyConstraint.h:133
SurveyConstraint::getSurveyCoordsSCTB
virtual void getSurveyCoordsSCTB(std::vector< Amg::Vector3D > &coords) override
Definition: SurveyConstraint.cxx:987
SurveyConstraint::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: SurveyConstraint.h:63
SurveyConstraint::m_FullDisk
bool m_FullDisk
use Full Disk
Definition: SurveyConstraint.h:126
SurveyConstraint::getSurveyCoordsPixEC
virtual void getSurveyCoordsPixEC(std::vector< Amg::Vector3D > &coords) override
Definition: SurveyConstraint.cxx:948
SurveyConstraint::getWeightPixEC
virtual int getWeightPixEC(Amg::MatrixX &weight) override
Definition: SurveyConstraint.cxx:876
SurveyConstraint::m_TransYRandSCTB
double m_TransYRandSCTB
Weight & rand Translation in Y of current SCTB modules.
Definition: SurveyConstraint.h:111
SurveyConstraint::m_RotZRandSCTB
double m_RotZRandSCTB
Weight & rand Rotation in Z of current SCTB modules
Definition: SurveyConstraint.h:115
SurveyConstraint::m_pixid
const PixelID * m_pixid
Definition: SurveyConstraint.h:64
SurveyConstraint::m_TransYRand
double m_TransYRand
Weight & rand Translation in Y of current PixEC modules.
Definition: SurveyConstraint.h:93
SurveyConstraint::SurveyConstraint
SurveyConstraint(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SurveyConstraint.cxx:42
SurveyConstraint::m_survey_IDAlignDBTool
IInDetAlignDBTool * m_survey_IDAlignDBTool
Definition: SurveyConstraint.h:69
SurveyConstraint::m_gausSect
bool m_gausSect
use random (Gaus) rotations and translations for sectors
Definition: SurveyConstraint.h:125
SurveyConstraint::m_TransYRandPixB
double m_TransYRandPixB
Weight & rand Translation in Y of current PixB modules.
Definition: SurveyConstraint.h:99
SurveyConstraint::m_SurveyWeightX
double m_SurveyWeightX
Multiplicative weight, representing systematic unc.
Definition: SurveyConstraint.h:78
SurveyConstraint::m_RotZRand
double m_RotZRand
Weight & rand Rotation in Z of current PixEC modules
Definition: SurveyConstraint.h:97
SurveyConstraint::m_SurveyWeightY
double m_SurveyWeightY
""
Definition: SurveyConstraint.h:80
SurveyConstraint::m_TransX
double m_TransX
Translation in X of the first current PixEC module.
Definition: SurveyConstraint.h:85
SurveyConstraint::m_aligndbtoolinst
std::string m_aligndbtoolinst
Definition: SurveyConstraint.h:129
SurveyConstraint::m_gaus
bool m_gaus
use random (Gaus) rotations and translations
Definition: SurveyConstraint.h:116
SurveyConstraint::m_surveywfile
std::string m_surveywfile
Definition: SurveyConstraint.h:131
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
SurveyConstraint::m_sctid
const SCT_ID * m_sctid
Definition: SurveyConstraint.h:65
SurveyConstraint::PhiModuleToSector
virtual double PhiModuleToSector(int phi_module) override
Definition: SurveyConstraint.cxx:1050
SurveyConstraint::m_TransY
double m_TransY
Translation in Y of the first current PixEC module.
Definition: SurveyConstraint.h:86
SurveyConstraint::m_SurveyWeightZ
double m_SurveyWeightZ
""
Definition: SurveyConstraint.h:81
SurveyConstraint::~SurveyConstraint
virtual ~SurveyConstraint()=default
SurveyConstraint::m_RotXRandPixB
double m_RotXRandPixB
Weight & rand Rotation in X of current PixB modules.
Definition: SurveyConstraint.h:101
SurveyConstraint::m_surveydbtoolinst
std::string m_surveydbtoolinst
Definition: SurveyConstraint.h:130
SurveyConstraint::m_TransZRandSect
double m_TransZRandSect
rand Translation in Z of current PixEC sectors
Definition: SurveyConstraint.h:119
SurveyConstraint::m_RotYRand
double m_RotYRand
Weight & rand Rotation in Y of current PixEC modules.
Definition: SurveyConstraint.h:96
SurveyConstraint::GlobalToLocal
virtual void GlobalToLocal(SurveyConstraintModule *mut, std::vector< SurveyConstraintPoint > &points) override
Definition: SurveyConstraint.cxx:1000
SurveyConstraint::m_RotZRandSCTEC
double m_RotZRandSCTEC
Weight & rand Rotation in Z of current SCTEC modules
Definition: SurveyConstraint.h:109
SurveyConstraint::m_TransXRandSect
double m_TransXRandSect
rand Translation in X of current PixEC sectors
Definition: SurveyConstraint.h:117
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthAlgTool.h
SurveyConstraint::m_surveyrfile
std::string m_surveyrfile
Definition: SurveyConstraint.h:132
SurveyConstraint::m_TransXRand
double m_TransXRand
Weight & rand Translation in X of current PixEC modules.
Definition: SurveyConstraint.h:92
SurveyConstraint::initialize
virtual StatusCode initialize() override
Definition: SurveyConstraint.cxx:165
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IInDetAlignDBTool
Definition: IInDetAlignDBTool.h:23
SurveyConstraint::m_RotYRandPixB
double m_RotYRandPixB
Weight & rand Rotation in Y of current PixB modules.
Definition: SurveyConstraint.h:102
SurveyConstraint::m_TransZ
double m_TransZ
Translation in Z of the first current PixEC module.
Definition: SurveyConstraint.h:87
SurveyConstraint::m_SurveyWeightPhiY
double m_SurveyWeightPhiY
""
Definition: SurveyConstraint.h:83
SurveyConstraint::getWeightSCTEC
virtual int getWeightSCTEC(Amg::MatrixX &weight) override
Definition: SurveyConstraint.cxx:912
SurveyConstraint::getSurveyCoordsSCTEC
virtual void getSurveyCoordsSCTEC(std::vector< Amg::Vector3D > &coords) override
Definition: SurveyConstraint.cxx:974
SurveyConstraint::m_proximity
double m_proximity
Proximity of Survey points used for alignment of SOW.
Definition: SurveyConstraint.h:128
SurveyConstraint::m_TransXRandPixB
double m_TransXRandPixB
Weight & rand Translation in X of current PixB modules.
Definition: SurveyConstraint.h:98
SurveyConstraint
Definition: SurveyConstraint.h:20
SurveyConstraint::m_TransZRandSCTEC
double m_TransZRandSCTEC
Weight & rand Translation in Z of current SCTEC modules.
Definition: SurveyConstraint.h:106
SurveyConstraint::m_current_IDAlignDBTool
IInDetAlignDBTool * m_current_IDAlignDBTool
Definition: SurveyConstraint.h:68
ReadCondHandleKey.h
SurveyConstraint::MMap
virtual void MMap(std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > &ModuleMap) override
Definition: SurveyConstraint.cxx:248
SurveyConstraint::getWeightSCTB
virtual int getWeightSCTB(Amg::MatrixX &weight) override
Definition: SurveyConstraint.cxx:930
ISurveyConstraint.h
SurveyConstraint::m_RotZRandSect
double m_RotZRandSect
rand Rotation in Z of current PixEC sectors
Definition: SurveyConstraint.h:122
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SurveyConstraint::m_RotYRandSect
double m_RotYRandSect
rand Rotation in Y of current PixEC sectors
Definition: SurveyConstraint.h:121
SiDetectorElementCollection.h
SurveyConstraint::m_misaligncase
int m_misaligncase
misaligncase
Definition: SurveyConstraint.h:124
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SurveyConstraint::m_RotZRandPixB
double m_RotZRandPixB
Weight & rand Rotation in Z of current PixB modules
Definition: SurveyConstraint.h:103
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SurveyConstraint::m_TransZRandPixB
double m_TransZRandPixB
Weight & rand Translation in Z of current PixB modules.
Definition: SurveyConstraint.h:100
SurveyConstraint::m_RotYRandSCTB
double m_RotYRandSCTB
Weight & rand Rotation in Y of current SCTB modules.
Definition: SurveyConstraint.h:114
SurveyConstraint::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: SurveyConstraint.h:71
SCT_ID
Definition: SCT_ID.h:68
SurveyConstraint::m_TransZRandSCTB
double m_TransZRandSCTB
Weight & rand Translation in Z of current SCTB modules.
Definition: SurveyConstraint.h:112
SurveyConstraint::m_TransZRand
double m_TransZRand
Weight & rand Translation in Z of current PixEC modules.
Definition: SurveyConstraint.h:94
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SurveyConstraint::m_TransXRandSCTEC
double m_TransXRandSCTEC
Weight & rand Translation in X of current SCTEC modules.
Definition: SurveyConstraint.h:104
SurveyConstraint::m_RotX
double m_RotX
Rotation in X of the first current PixEC module.
Definition: SurveyConstraint.h:88
SurveyConstraint::m_TransYRandSect
double m_TransYRandSect
rand Translation in Y of current PixEC sectors
Definition: SurveyConstraint.h:118
SurveyConstraint::SectorNumber
virtual int SectorNumber(int phi_module) override
Definition: SurveyConstraint.cxx:1037
SurveyConstraint::setup_SurveyConstraintModules
virtual void setup_SurveyConstraintModules() override
Definition: SurveyConstraint.cxx:402
SurveyConstraint::finalize
virtual StatusCode finalize() override
Definition: SurveyConstraint.cxx:233
SurveyConstraint::m_RotXRandSCTEC
double m_RotXRandSCTEC
Weight & rand Rotation in X of current SCTEC modules.
Definition: SurveyConstraint.h:107
SurveyConstraint::TransformSector
virtual void TransformSector(Identifier Pixel_ModuleID, SurveyConstraintModule *mut, Amg::Vector3D &current, Amg::Transform3D CurrentTransRandSect) override
Definition: SurveyConstraint.cxx:1014
SurveyConstraint::m_RotX2
double m_RotX2
Rotation in X (after Y & Z) of the first current PixEC module.
Definition: SurveyConstraint.h:89
SurveyConstraint::m_RotZ
double m_RotZ
Rotation in Z of the first current PixEC module.
Definition: SurveyConstraint.h:91
SurveyConstraint::m_TransYRandSCTEC
double m_TransYRandSCTEC
Weight & rand Translation in Y of current SCTEC modules.
Definition: SurveyConstraint.h:105
SurveyConstraint::m_TransLayerRand
double m_TransLayerRand
rand Translation in X,Y,Z of all Pixel/SCT EC/B layers
Definition: SurveyConstraint.h:123
PixelID
Definition: PixelID.h:67
SurveyConstraintModule
Definition: SurveyConstraintModule.h:24
SurveyConstraint::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SurveyConstraint.h:72
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
SurveyConstraint::m_SurveyWeightPhiZ
double m_SurveyWeightPhiZ
""
Definition: SurveyConstraint.h:84
SurveyConstraint::m_RotY
double m_RotY
Rotation in Y of the first current PixEC module.
Definition: SurveyConstraint.h:90
SurveyConstraint::computeConstraint
virtual StatusCode computeConstraint(const Identifier &ModuleID, Amg::VectorX &dparams, double &deltachisq, Amg::VectorX &dchisqdparams, Amg::MatrixX &d2chisqdpdp) override
Definition: SurveyConstraint.cxx:253
SurveyConstraint::m_RotXRandSCTB
double m_RotXRandSCTB
Weight & rand Rotation in X of current SCTB modules.
Definition: SurveyConstraint.h:113
Identifier
Definition: IdentifierFieldParser.cxx:14