ATLAS Offline Software
SurveyConstraint.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 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 IRndmGenSvc;
16 class AtlasDetectorID;
17 class IToolSvc;
18 class IInDetAlignDBTool;
19 class PixelID;
20 class SCT_ID;
21 
22 class SurveyConstraint : virtual public ISurveyConstraint, public AthAlgTool{
23  public:
24  SurveyConstraint(const std::string& type,const std::string& name,const IInterface* parent);
25 
26  virtual ~SurveyConstraint();
27 
28  virtual StatusCode initialize();
29  virtual StatusCode finalize();
30 
31  virtual StatusCode computeConstraint(const Identifier& ModuleID,
32  Amg::VectorX& dparams,
33  double& deltachisq,
34  Amg::VectorX& dchisqdparams,
35  Amg::MatrixX& d2chisqdpdp);
36  virtual void setup_SurveyConstraintModules();
37 
38  virtual void MMap(std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >& ModuleMap);
39 
40  virtual int getWeightPixEC(//const Identifier& ModuleID,
42  virtual int getWeightPixB(//const Identifier& ModuleID,
44  virtual int getWeightSCTEC(//const Identifier& ModuleID,
46  virtual int getWeightSCTB(//const Identifier& ModuleID,
48  virtual void getSurveyCoordsPixEC(//const Identifier& ModuleID,
49  std::vector< Amg::Vector3D > & coords);
50  virtual void getSurveyCoordsPixB(//const Identifier& ModuleID,
51  std::vector< Amg::Vector3D > & coords);
52  virtual void getSurveyCoordsSCTEC(//const Identifier& ModuleID,
53  std::vector< Amg::Vector3D > & coords);
54  virtual void getSurveyCoordsSCTB(//const Identifier& ModuleID,
55  std::vector< Amg::Vector3D > & coords);
56  virtual void GlobalToLocal(SurveyConstraintModule* mut,std::vector<SurveyConstraintPoint>& points);
57  virtual int SectorNumber(int phi_module);
58  virtual double PhiModuleToSector(int phi_module);
59  virtual void TransformSector(Identifier Pixel_ModuleID,
62  Amg::Transform3D CurrentTransRandSect);
63 
64  private :
66  const PixelID* m_pixid;
67  const SCT_ID* m_sctid;
68 
69 
70  IToolSvc* m_toolsvc;
73  IRndmGenSvc* m_randsvc;
74 
75  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
76  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
77 
78  // dictionary of module constrain objects, indexed by moduleID
79  std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> > m_ModuleMap;
80 
81  // algorithm parameters, possible to declare at runtime
82  double m_SurveyWeightX;
83  // (e.g. bow), set to 1 for now
84  double m_SurveyWeightY;
85  double m_SurveyWeightZ;
89  double m_TransX;
90  double m_TransY;
91  double m_TransZ;
92  double m_RotX;
93  double m_RotX2;
94  double m_RotY;
95  double m_RotZ;
96  double m_TransXRand;
97  double m_TransYRand;
98  double m_TransZRand;
99  double m_RotXRand;
100  double m_RotYRand;
101  double m_RotZRand;
105  double m_RotXRandPixB;
106  double m_RotYRandPixB;
107  double m_RotZRandPixB;
117  double m_RotXRandSCTB;
118  double m_RotYRandSCTB;
119  double m_RotZRandSCTB;
120  bool m_gaus;
124  double m_RotXRandSect;
125  double m_RotYRandSect;
126  double m_RotZRandSect;
129  bool m_gausSect;
130  bool m_FullDisk;
131  double m_scaleZ;
132  double m_proximity;
133  std::string m_aligndbtoolinst;
134  std::string m_surveydbtoolinst;
135  std::string m_surveywfile;
136  std::string m_surveyrfile;
137  bool m_ntuple;
138 
139 };
140 
141 #endif // SURVEYCONSTRAINTTOOLS_SURVEYCONSTRAINT_H
SurveyConstraint::m_TransXRandSCTB
double m_TransXRandSCTB
Weight & rand Translation in X of current SCTB modules.
Definition: SurveyConstraint.h:114
SurveyConstraint::SectorNumber
virtual int SectorNumber(int phi_module)
Definition: SurveyConstraint.cxx:1077
SurveyConstraint::getSurveyCoordsSCTB
virtual void getSurveyCoordsSCTB(std::vector< Amg::Vector3D > &coords)
Definition: SurveyConstraint.cxx:1027
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
SurveyConstraint::finalize
virtual StatusCode finalize()
Definition: SurveyConstraint.cxx:264
SurveyConstraint::m_ModuleMap
std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > m_ModuleMap
Map of Wafer objects.
Definition: SurveyConstraint.h:79
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
SurveyConstraint::m_RotYRandSCTEC
double m_RotYRandSCTEC
Weight & rand Rotation in Y of current SCTEC modules.
Definition: SurveyConstraint.h:112
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
SurveyConstraint::m_RotXRand
double m_RotXRand
Weight & rand Rotation in X of current PixEC modules.
Definition: SurveyConstraint.h:99
SurveyConstraint::m_SurveyWeightPhiX
double m_SurveyWeightPhiX
""
Definition: SurveyConstraint.h:86
SurveyConstraint::m_RotXRandSect
double m_RotXRandSect
rand Rotation in X of current PixEC sectors
Definition: SurveyConstraint.h:124
SurveyConstraint::m_scaleZ
double m_scaleZ
scale Z coordinate to match sensitivity
Definition: SurveyConstraint.h:131
SurveyConstraint::m_ntuple
bool m_ntuple
Definition: SurveyConstraint.h:137
SurveyConstraint::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: SurveyConstraint.h:65
SurveyConstraint::m_FullDisk
bool m_FullDisk
use Full Disk
Definition: SurveyConstraint.h:130
SurveyConstraint::getWeightSCTEC
virtual int getWeightSCTEC(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:952
SurveyConstraint::m_TransYRandSCTB
double m_TransYRandSCTB
Weight & rand Translation in Y of current SCTB modules.
Definition: SurveyConstraint.h:115
SurveyConstraint::m_RotZRandSCTB
double m_RotZRandSCTB
Weight & rand Rotation in Z of current SCTB modules
Definition: SurveyConstraint.h:119
SurveyConstraint::~SurveyConstraint
virtual ~SurveyConstraint()
Definition: SurveyConstraint.cxx:166
SurveyConstraint::m_pixid
const PixelID * m_pixid
Definition: SurveyConstraint.h:66
SurveyConstraint::getWeightSCTB
virtual int getWeightSCTB(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:970
SurveyConstraint::m_TransYRand
double m_TransYRand
Weight & rand Translation in Y of current PixEC modules.
Definition: SurveyConstraint.h:97
SurveyConstraint::SurveyConstraint
SurveyConstraint(const std::string &type, const std::string &name, const IInterface *parent)
Definition: SurveyConstraint.cxx:42
SurveyConstraint::getWeightPixEC
virtual int getWeightPixEC(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:916
SurveyConstraint::m_survey_IDAlignDBTool
IInDetAlignDBTool * m_survey_IDAlignDBTool
Definition: SurveyConstraint.h:72
SurveyConstraint::m_gausSect
bool m_gausSect
use random (Gaus) rotations and translations for sectors
Definition: SurveyConstraint.h:129
SurveyConstraint::m_TransYRandPixB
double m_TransYRandPixB
Weight & rand Translation in Y of current PixB modules.
Definition: SurveyConstraint.h:103
SurveyConstraint::m_SurveyWeightX
double m_SurveyWeightX
Multiplicative weight, representing systematic unc.
Definition: SurveyConstraint.h:82
SurveyConstraint::m_RotZRand
double m_RotZRand
Weight & rand Rotation in Z of current PixEC modules
Definition: SurveyConstraint.h:101
SurveyConstraint::m_SurveyWeightY
double m_SurveyWeightY
""
Definition: SurveyConstraint.h:84
SurveyConstraint::m_TransX
double m_TransX
Translation in X of the first current PixEC module.
Definition: SurveyConstraint.h:89
SurveyConstraint::getSurveyCoordsPixB
virtual void getSurveyCoordsPixB(std::vector< Amg::Vector3D > &coords)
Definition: SurveyConstraint.cxx:1001
SurveyConstraint::m_aligndbtoolinst
std::string m_aligndbtoolinst
Definition: SurveyConstraint.h:133
SurveyConstraint::m_gaus
bool m_gaus
use random (Gaus) rotations and translations
Definition: SurveyConstraint.h:120
ISurveyConstraint
Definition: ISurveyConstraint.h:24
SurveyConstraint::m_surveywfile
std::string m_surveywfile
Definition: SurveyConstraint.h:135
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
SurveyConstraint::m_sctid
const SCT_ID * m_sctid
Definition: SurveyConstraint.h:67
SurveyConstraint::m_TransY
double m_TransY
Translation in Y of the first current PixEC module.
Definition: SurveyConstraint.h:90
SurveyConstraint::m_SurveyWeightZ
double m_SurveyWeightZ
""
Definition: SurveyConstraint.h:85
SurveyConstraint::m_RotXRandPixB
double m_RotXRandPixB
Weight & rand Rotation in X of current PixB modules.
Definition: SurveyConstraint.h:105
SurveyConstraint::m_surveydbtoolinst
std::string m_surveydbtoolinst
Definition: SurveyConstraint.h:134
SurveyConstraint::m_TransZRandSect
double m_TransZRandSect
rand Translation in Z of current PixEC sectors
Definition: SurveyConstraint.h:123
SurveyConstraint::PhiModuleToSector
virtual double PhiModuleToSector(int phi_module)
Definition: SurveyConstraint.cxx:1090
SurveyConstraint::getSurveyCoordsSCTEC
virtual void getSurveyCoordsSCTEC(std::vector< Amg::Vector3D > &coords)
Definition: SurveyConstraint.cxx:1014
SurveyConstraint::m_RotYRand
double m_RotYRand
Weight & rand Rotation in Y of current PixEC modules.
Definition: SurveyConstraint.h:100
SurveyConstraint::m_RotZRandSCTEC
double m_RotZRandSCTEC
Weight & rand Rotation in Z of current SCTEC modules
Definition: SurveyConstraint.h:113
SurveyConstraint::m_TransXRandSect
double m_TransXRandSect
rand Translation in X of current PixEC sectors
Definition: SurveyConstraint.h:121
SurveyConstraint::GlobalToLocal
virtual void GlobalToLocal(SurveyConstraintModule *mut, std::vector< SurveyConstraintPoint > &points)
Definition: SurveyConstraint.cxx:1040
SurveyConstraint::getWeightPixB
virtual int getWeightPixB(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:934
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:136
SurveyConstraint::m_TransXRand
double m_TransXRand
Weight & rand Translation in X of current PixEC modules.
Definition: SurveyConstraint.h:96
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:106
SurveyConstraint::m_TransZ
double m_TransZ
Translation in Z of the first current PixEC module.
Definition: SurveyConstraint.h:91
SurveyConstraint::m_SurveyWeightPhiY
double m_SurveyWeightPhiY
""
Definition: SurveyConstraint.h:87
SurveyConstraint::m_proximity
double m_proximity
Proximity of Survey points used for alignment of SOW.
Definition: SurveyConstraint.h:132
SurveyConstraint::m_TransXRandPixB
double m_TransXRandPixB
Weight & rand Translation in X of current PixB modules.
Definition: SurveyConstraint.h:102
SurveyConstraint
Definition: SurveyConstraint.h:22
SurveyConstraint::TransformSector
virtual void TransformSector(Identifier Pixel_ModuleID, SurveyConstraintModule *mut, Amg::Vector3D &current, Amg::Transform3D CurrentTransRandSect)
Definition: SurveyConstraint.cxx:1054
SurveyConstraint::m_TransZRandSCTEC
double m_TransZRandSCTEC
Weight & rand Translation in Z of current SCTEC modules.
Definition: SurveyConstraint.h:110
SurveyConstraint::m_current_IDAlignDBTool
IInDetAlignDBTool * m_current_IDAlignDBTool
Definition: SurveyConstraint.h:71
ReadCondHandleKey.h
ISurveyConstraint.h
SurveyConstraint::getSurveyCoordsPixEC
virtual void getSurveyCoordsPixEC(std::vector< Amg::Vector3D > &coords)
Definition: SurveyConstraint.cxx:988
SurveyConstraint::m_RotZRandSect
double m_RotZRandSect
rand Rotation in Z of current PixEC sectors
Definition: SurveyConstraint.h:126
SurveyConstraint::MMap
virtual void MMap(std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > &ModuleMap)
Definition: SurveyConstraint.cxx:279
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SurveyConstraint::m_randsvc
IRndmGenSvc * m_randsvc
Definition: SurveyConstraint.h:73
SurveyConstraint::setup_SurveyConstraintModules
virtual void setup_SurveyConstraintModules()
Definition: SurveyConstraint.cxx:434
SurveyConstraint::m_RotYRandSect
double m_RotYRandSect
rand Rotation in Y of current PixEC sectors
Definition: SurveyConstraint.h:125
SiDetectorElementCollection.h
SurveyConstraint::m_misaligncase
int m_misaligncase
misaligncase
Definition: SurveyConstraint.h:128
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SurveyConstraint::m_toolsvc
IToolSvc * m_toolsvc
Pointer to tool service.
Definition: SurveyConstraint.h:70
SurveyConstraint::m_RotZRandPixB
double m_RotZRandPixB
Weight & rand Rotation in Z of current PixB modules
Definition: SurveyConstraint.h:107
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SurveyConstraint::m_TransZRandPixB
double m_TransZRandPixB
Weight & rand Translation in Z of current PixB modules.
Definition: SurveyConstraint.h:104
SurveyConstraint::initialize
virtual StatusCode initialize()
Definition: SurveyConstraint.cxx:173
SurveyConstraint::m_RotYRandSCTB
double m_RotYRandSCTB
Weight & rand Rotation in Y of current SCTB modules.
Definition: SurveyConstraint.h:118
SurveyConstraint::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: SurveyConstraint.h:75
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:116
SurveyConstraint::m_TransZRand
double m_TransZRand
Weight & rand Translation in Z of current PixEC modules.
Definition: SurveyConstraint.h:98
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:108
SurveyConstraint::m_RotX
double m_RotX
Rotation in X of the first current PixEC module.
Definition: SurveyConstraint.h:92
SurveyConstraint::m_TransYRandSect
double m_TransYRandSect
rand Translation in Y of current PixEC sectors
Definition: SurveyConstraint.h:122
SurveyConstraint::computeConstraint
virtual StatusCode computeConstraint(const Identifier &ModuleID, Amg::VectorX &dparams, double &deltachisq, Amg::VectorX &dchisqdparams, Amg::MatrixX &d2chisqdpdp)
Pure virtual.
Definition: SurveyConstraint.cxx:284
SurveyConstraint::m_RotXRandSCTEC
double m_RotXRandSCTEC
Weight & rand Rotation in X of current SCTEC modules.
Definition: SurveyConstraint.h:111
SurveyConstraint::m_RotX2
double m_RotX2
Rotation in X (after Y & Z) of the first current PixEC module.
Definition: SurveyConstraint.h:93
SurveyConstraint::m_RotZ
double m_RotZ
Rotation in Z of the first current PixEC module.
Definition: SurveyConstraint.h:95
AthAlgTool
Definition: AthAlgTool.h:26
SurveyConstraint::m_TransYRandSCTEC
double m_TransYRandSCTEC
Weight & rand Translation in Y of current SCTEC modules.
Definition: SurveyConstraint.h:109
SurveyConstraint::m_TransLayerRand
double m_TransLayerRand
rand Translation in X,Y,Z of all Pixel/SCT EC/B layers
Definition: SurveyConstraint.h:127
PixelID
Definition: PixelID.h:67
SurveyConstraintModule
Definition: SurveyConstraintModule.h:24
SurveyConstraint::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SurveyConstraint.h:76
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:88
SurveyConstraint::m_RotY
double m_RotY
Rotation in Y of the first current PixEC module.
Definition: SurveyConstraint.h:94
SurveyConstraint::m_RotXRandSCTB
double m_RotXRandSCTB
Weight & rand Rotation in X of current SCTB modules.
Definition: SurveyConstraint.h:117