ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SurveyConstraint Class Reference

#include <SurveyConstraint.h>

Inheritance diagram for SurveyConstraint:
Collaboration diagram for SurveyConstraint:

Public Member Functions

 SurveyConstraint (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SurveyConstraint ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode computeConstraint (const Identifier &ModuleID, Amg::VectorX &dparams, double &deltachisq, Amg::VectorX &dchisqdparams, Amg::MatrixX &d2chisqdpdp)
 Pure virtual. More...
 
virtual void setup_SurveyConstraintModules ()
 
virtual void MMap (std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > &ModuleMap)
 
virtual int getWeightPixEC (Amg::MatrixX &weight)
 
virtual int getWeightPixB (Amg::MatrixX &weight)
 
virtual int getWeightSCTEC (Amg::MatrixX &weight)
 
virtual int getWeightSCTB (Amg::MatrixX &weight)
 
virtual void getSurveyCoordsPixEC (std::vector< Amg::Vector3D > &coords)
 
virtual void getSurveyCoordsPixB (std::vector< Amg::Vector3D > &coords)
 
virtual void getSurveyCoordsSCTEC (std::vector< Amg::Vector3D > &coords)
 
virtual void getSurveyCoordsSCTB (std::vector< Amg::Vector3D > &coords)
 
virtual void GlobalToLocal (SurveyConstraintModule *mut, std::vector< SurveyConstraintPoint > &points)
 
virtual int SectorNumber (int phi_module)
 
virtual double PhiModuleToSector (int phi_module)
 
virtual void TransformSector (Identifier Pixel_ModuleID, SurveyConstraintModule *mut, Amg::Vector3D &current, Amg::Transform3D CurrentTransRandSect)
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Declared here, and defined below. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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...
 

Private Attributes

const AtlasDetectorIDm_idHelper
 
const PixelIDm_pixid
 
const SCT_IDm_sctid
 
IToolSvc * m_toolsvc
 Pointer to tool service. More...
 
IInDetAlignDBToolm_current_IDAlignDBTool
 
IInDetAlignDBToolm_survey_IDAlignDBTool
 
IRndmGenSvc * m_randsvc
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
 
std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > m_ModuleMap
 Map of Wafer objects. More...
 
double m_SurveyWeightX
 Multiplicative weight, representing systematic unc. More...
 
double m_SurveyWeightY
 "" More...
 
double m_SurveyWeightZ
 "" More...
 
double m_SurveyWeightPhiX
 "" More...
 
double m_SurveyWeightPhiY
 "" More...
 
double m_SurveyWeightPhiZ
 "" More...
 
double m_TransX
 Translation in X of the first current PixEC module. More...
 
double m_TransY
 Translation in Y of the first current PixEC module. More...
 
double m_TransZ
 Translation in Z of the first current PixEC module. More...
 
double m_RotX
 Rotation in X of the first current PixEC module. More...
 
double m_RotX2
 Rotation in X (after Y & Z) of the first current PixEC module. More...
 
double m_RotY
 Rotation in Y of the first current PixEC module. More...
 
double m_RotZ
 Rotation in Z of the first current PixEC module. More...
 
double m_TransXRand
 Weight & rand Translation in X of current PixEC modules. More...
 
double m_TransYRand
 Weight & rand Translation in Y of current PixEC modules. More...
 
double m_TransZRand
 Weight & rand Translation in Z of current PixEC modules. More...
 
double m_RotXRand
 Weight & rand Rotation in X of current PixEC modules. More...
 
double m_RotYRand
 Weight & rand Rotation in Y of current PixEC modules. More...
 
double m_RotZRand
 Weight & rand Rotation in Z of current PixEC modules
More...
 
double m_TransXRandPixB
 Weight & rand Translation in X of current PixB modules. More...
 
double m_TransYRandPixB
 Weight & rand Translation in Y of current PixB modules. More...
 
double m_TransZRandPixB
 Weight & rand Translation in Z of current PixB modules. More...
 
double m_RotXRandPixB
 Weight & rand Rotation in X of current PixB modules. More...
 
double m_RotYRandPixB
 Weight & rand Rotation in Y of current PixB modules. More...
 
double m_RotZRandPixB
 Weight & rand Rotation in Z of current PixB modules
More...
 
double m_TransXRandSCTEC
 Weight & rand Translation in X of current SCTEC modules. More...
 
double m_TransYRandSCTEC
 Weight & rand Translation in Y of current SCTEC modules. More...
 
double m_TransZRandSCTEC
 Weight & rand Translation in Z of current SCTEC modules. More...
 
double m_RotXRandSCTEC
 Weight & rand Rotation in X of current SCTEC modules. More...
 
double m_RotYRandSCTEC
 Weight & rand Rotation in Y of current SCTEC modules. More...
 
double m_RotZRandSCTEC
 Weight & rand Rotation in Z of current SCTEC modules
More...
 
double m_TransXRandSCTB
 Weight & rand Translation in X of current SCTB modules. More...
 
double m_TransYRandSCTB
 Weight & rand Translation in Y of current SCTB modules. More...
 
double m_TransZRandSCTB
 Weight & rand Translation in Z of current SCTB modules. More...
 
double m_RotXRandSCTB
 Weight & rand Rotation in X of current SCTB modules. More...
 
double m_RotYRandSCTB
 Weight & rand Rotation in Y of current SCTB modules. More...
 
double m_RotZRandSCTB
 Weight & rand Rotation in Z of current SCTB modules
More...
 
bool m_gaus
 use random (Gaus) rotations and translations
More...
 
double m_TransXRandSect
 rand Translation in X of current PixEC sectors More...
 
double m_TransYRandSect
 rand Translation in Y of current PixEC sectors More...
 
double m_TransZRandSect
 rand Translation in Z of current PixEC sectors More...
 
double m_RotXRandSect
 rand Rotation in X of current PixEC sectors More...
 
double m_RotYRandSect
 rand Rotation in Y of current PixEC sectors More...
 
double m_RotZRandSect
 rand Rotation in Z of current PixEC sectors
More...
 
double m_TransLayerRand
 rand Translation in X,Y,Z of all Pixel/SCT EC/B layers
More...
 
int m_misaligncase
 misaligncase More...
 
bool m_gausSect
 use random (Gaus) rotations and translations for sectors
More...
 
bool m_FullDisk
 use Full Disk More...
 
double m_scaleZ
 scale Z coordinate to match sensitivity More...
 
double m_proximity
 Proximity of Survey points used for alignment of SOW. More...
 
std::string m_aligndbtoolinst
 
std::string m_surveydbtoolinst
 
std::string m_surveywfile
 
std::string m_surveyrfile
 
bool m_ntuple
 
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
 

Detailed Description

Definition at line 22 of file SurveyConstraint.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SurveyConstraint()

SurveyConstraint::SurveyConstraint ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 42 of file SurveyConstraint.cxx.

45  m_idHelper{},
46  m_pixid(nullptr),
47  m_sctid(nullptr),
48  m_toolsvc(nullptr),
49  m_current_IDAlignDBTool(nullptr),
50  m_survey_IDAlignDBTool(nullptr),
51  m_randsvc(nullptr),
52  m_SurveyWeightX(1.0),
53  m_SurveyWeightY(1.0),
54  m_SurveyWeightZ(1.0),
55  m_SurveyWeightPhiX(1.0),
56  m_SurveyWeightPhiY(1.0),
57  m_SurveyWeightPhiZ(1.0),
58  m_TransX(0.0),
59  m_TransY(0.0),
60  m_TransZ(0.0),
61  m_RotX(0.0),
62  m_RotX2(0.0),
63  m_RotY(0.0),
64  m_RotZ(0.0),
65  m_TransXRand(0.0046),
66  m_TransYRand(0.0047),
67  m_TransZRand(0.0127),
68  m_RotXRand(0.0003),
69  m_RotYRand(0.0007),
70  m_RotZRand(0.00012),
71  m_TransXRandPixB(0.01),
72  m_TransYRandPixB(0.01),
73  m_TransZRandPixB(0.1),
74  m_RotXRandPixB(0.001),
75  m_RotYRandPixB(0.001),
76  m_RotZRandPixB(0.00024),
77  m_TransXRandSCTEC(0.03),
78  m_TransYRandSCTEC(0.03),
79  m_TransZRandSCTEC(0.03),
80  m_RotXRandSCTEC(0.001),
81  m_RotYRandSCTEC(0.001),
82  m_RotZRandSCTEC(0.0003),
83  m_TransXRandSCTB(0.1),
84  m_TransYRandSCTB(0.1),
85  m_TransZRandSCTB(0.1),
86  m_RotXRandSCTB(0.001),
87  m_RotYRandSCTB(0.001),
88  m_RotZRandSCTB(0.001),
89  m_gaus(false),
90  m_TransXRandSect(0.0),
91  m_TransYRandSect(0.0),
92  m_TransZRandSect(0.0),
93  m_RotXRandSect(0.0),
94  m_RotYRandSect(0.0),
95  m_RotZRandSect(0.0),
96  m_TransLayerRand(-1),
97  m_misaligncase(-1),
98  m_gausSect(false),
99  m_FullDisk(false),
100  m_scaleZ(1.0),
101  m_proximity(999999.),
102  m_aligndbtoolinst("InDetCurrentDBTool"),
103  m_surveydbtoolinst("InDetSurveyDBTool"),
104  m_surveywfile(""),
105  m_surveyrfile(""),
106  m_ntuple(false)
107  {
108  declareInterface<ISurveyConstraint>(this);
109  declareProperty("SurveyWeightX" , m_SurveyWeightX);
110  declareProperty("SurveyWeightY" , m_SurveyWeightY);
111  declareProperty("SurveyWeightZ" , m_SurveyWeightZ);
112  declareProperty("SurveyWeightPhiX" , m_SurveyWeightPhiX);
113  declareProperty("SurveyWeightPhiY" , m_SurveyWeightPhiY);
114  declareProperty("SurveyWeightPhiZ" , m_SurveyWeightPhiZ);
115  declareProperty("TransX" , m_TransX);
116  declareProperty("TransY" , m_TransY);
117  declareProperty("TransZ" , m_TransZ);
118  declareProperty("RotX" , m_RotX);
119  declareProperty("RotX2" , m_RotX2);
120  declareProperty("RotY" , m_RotY);
121  declareProperty("RotZ" , m_RotZ);
122  declareProperty("TransXRand" , m_TransXRand);
123  declareProperty("TransYRand" , m_TransYRand);
124  declareProperty("TransZRand" , m_TransZRand);
125  declareProperty("RotXRand" , m_RotXRand);
126  declareProperty("RotYRand" , m_RotYRand);
127  declareProperty("RotZRand" , m_RotZRand);
128  declareProperty("TransXRandPixB" , m_TransXRandPixB);
129  declareProperty("TransYRandPixB" , m_TransYRandPixB);
130  declareProperty("TransZRandPixB" , m_TransZRandPixB);
131  declareProperty("RotXRandPixB" , m_RotXRandPixB);
132  declareProperty("RotYRandPixB" , m_RotYRandPixB);
133  declareProperty("RotZRandPixB" , m_RotZRandPixB);
134  declareProperty("TransXRandSCTEC" , m_TransXRandSCTEC);
135  declareProperty("TransYRandSCTEC" , m_TransYRandSCTEC);
136  declareProperty("TransZRandSCTEC" , m_TransZRandSCTEC);
137  declareProperty("RotXRandSCTEC" , m_RotXRandSCTEC);
138  declareProperty("RotYRandSCTEC" , m_RotYRandSCTEC);
139  declareProperty("RotZRandSCTEC" , m_RotZRandSCTEC);
140  declareProperty("TransXRandSCTB" , m_TransXRandSCTB);
141  declareProperty("TransYRandSCTB" , m_TransYRandSCTB);
142  declareProperty("TransZRandSCTB" , m_TransZRandSCTB);
143  declareProperty("RotXRandSCTB" , m_RotXRandSCTB);
144  declareProperty("RotYRandSCTB" , m_RotYRandSCTB);
145  declareProperty("RotZRandSCTB" , m_RotZRandSCTB);
146  declareProperty("Gaus" , m_gaus);
147  declareProperty("TransXRandSect" , m_TransXRandSect);
148  declareProperty("TransYRandSect" , m_TransYRandSect);
149  declareProperty("TransZRandSect" , m_TransZRandSect);
150  declareProperty("RotXRandSect" , m_RotXRandSect);
151  declareProperty("RotYRandSect" , m_RotYRandSect);
152  declareProperty("RotZRandSect" , m_RotZRandSect);
153  declareProperty("TransLayerRand" , m_TransLayerRand);
154  declareProperty("Misaligncase" , m_misaligncase);
155  declareProperty("GausSect" , m_gausSect);
156  declareProperty("FullDisk" , m_FullDisk);
157  declareProperty("ScaleZ" , m_scaleZ);
158  declareProperty("Proximity" , m_proximity);
159  declareProperty("CurrentDBToolInst" , m_aligndbtoolinst);
160  declareProperty("SurveyDBToolInst" , m_surveydbtoolinst);
161  declareProperty("SurveyWfile" , m_surveywfile);
162  declareProperty("SurveyRFile" , m_surveyrfile);
163  declareProperty("Ntuple" , m_ntuple);
164 }

◆ ~SurveyConstraint()

SurveyConstraint::~SurveyConstraint ( )
virtual

Definition at line 166 of file SurveyConstraint.cxx.

167 {
168  // delete m_idHelper;
169 }

Member Function Documentation

◆ computeConstraint()

StatusCode SurveyConstraint::computeConstraint ( const Identifier ,
Amg::VectorX ,
double &  ,
Amg::VectorX ,
Amg::MatrixX  
)
virtual

Pure virtual.

Implements ISurveyConstraint.

Definition at line 284 of file SurveyConstraint.cxx.

288  {
289  AmgVector(6) weightfactor;
290  weightfactor[0] = m_SurveyWeightX;
291  weightfactor[1] = m_SurveyWeightY;
292  weightfactor[2] = m_SurveyWeightZ;
293  weightfactor[3] = m_SurveyWeightPhiX;
294  weightfactor[4] = m_SurveyWeightPhiY;
295  weightfactor[5] = m_SurveyWeightPhiZ;
296 
297 
298  //get the SurveyConstraintModule from the ModuleMap, it knows about the global
299  //Module-SurveyConstraintPoints, and the global Stave-SurveyConstraintPoints
300  SurveyConstraintModule* mut = m_ModuleMap[ModuleID];
301 
302  // which subdetector?
303  bool isPixEC = false, isPixB = false, isSCTEC = false, isSCTB = false;
304  if(mut->isPixel()){
305  if(abs(m_pixid->barrel_ec(ModuleID)) == 2) isPixEC = true;
306  else if(m_pixid->barrel_ec(ModuleID) == 0) isPixB = true;
307  } else {
308  if(abs(m_sctid->barrel_ec(ModuleID)) == 2) isSCTEC = true;
309  else if(m_sctid->barrel_ec(ModuleID) == 0) isSCTB = true;
310  }
311 
312  //Define the transform which minimizes the distance between the set of
313  //point pairs: this effectively defines the transform between the survey
314  //and current alignment of the SOW.
316  Amg::Vector3D stavetrans;
317  Amg::Vector3D staveangles;
318  std::vector< SurveyConstraintPoint > Stavepoints;
319  mut->getPoints(Stavepoints,SurveyConstraintModule::Stave);
320  if (msgLvl(MSG::DEBUG)) msg() << "SurveyConstraint().computeConstraint: Stavepoints.size() " << Stavepoints.size() << endmsg;
321  // transform GlobalToLocal
322  GlobalToLocal(mut,Stavepoints);
323 
324  // scale z coordinate
325  for (unsigned int iPoint(0); iPoint < Stavepoints.size(); ++iPoint ) {
326  Amg::Vector3D survey = Stavepoints[iPoint].survey();
327  if (msgLvl(MSG::DEBUG)) msg() << "Survey Stavepoints before: " << survey.x() << "," << survey.y() << "," << survey.z() << endmsg;
328  SurveyConstraintPoint& Stavepoint = Stavepoints[iPoint];
329  Stavepoint.scaleZ(m_scaleZ);
330  survey = Stavepoints[iPoint].survey();
331  if (msgLvl(MSG::DEBUG)) msg() << " and after: " << survey.x() << "," << survey.y() << "," << survey.z() << endmsg;
332  }
333 
334  if (msgLvl(MSG::DEBUG)) msg() << "SurveyConstraint().computeConstraint: Now fitting the 2 Staves" << endmsg;
335  double stavemin = minimizer.findMinimum(Stavepoints,staveangles,stavetrans);
336 
337 
338 
339 
340  stavetrans[2] = (stavetrans.z()/m_scaleZ);
341  if (msgLvl(MSG::DEBUG)) msg() << "Stavepoints translation and rotations: (" <<
342  stavetrans.x() << "," << stavetrans.y() << "," << stavetrans.z() << "," <<
343  staveangles.x()/m_scaleZ << "," << staveangles.y()/m_scaleZ << "," << staveangles.z() << ")" <<
344  endmsg;
345 
346 
347  if(stavemin < 0.0){
348  msg(MSG::FATAL) << "insufficient Points for Stave Fitting" << endmsg;
349  return StatusCode::FAILURE;
350  }
351 
352  //(***) create the transform from survey to current with these parameters
353  Amg::Translation3D amgstavetrans(stavetrans);
354  Amg::Transform3D staveTransform = amgstavetrans * Amg::RotationMatrix3D::Identity();
355  staveTransform *= Amg::AngleAxis3D(staveangles[2], Amg::Vector3D(0.,0.,1.));
356  staveTransform *= Amg::AngleAxis3D(staveangles[1]/m_scaleZ, Amg::Vector3D(0.,1.,0.));
357  staveTransform *= Amg::AngleAxis3D(staveangles[0]/m_scaleZ, Amg::Vector3D(1.,0.,0.));
358 
359 
360  //now, get the points on the MUT, and move to the MUTs frame
361  //we must get the points from the wafer itself
362  std::vector< SurveyConstraintPoint > Modulepoints;
363  mut->getPoints(Modulepoints,SurveyConstraintModule::Module);
364 
365  // transform GlobalToLocal
366  GlobalToLocal(mut,Modulepoints);
367 
368 
369  //transform ONLY the survey points(survey,-) according to the transform from survey to current from the SOW (***)
370  for(unsigned ipoint=0;ipoint<Modulepoints.size();ipoint++){
371  Amg::Vector3D& survey = Modulepoints[ipoint].survey();
372  survey = staveTransform * survey;
373  }
374 
375  //now compute the final parameters: build the 3D residuals between the two sets of MUT points
376  Amg::Vector3D modtrans;
377  Amg::Vector3D modangles;
378  if (msgLvl(MSG::DEBUG)) msg() << "SurveyConstraint().computeConstraint: Now fitting the 2 Modules" << endmsg;
379  double modmin = minimizer.findMinimum(Modulepoints,modangles,modtrans);
380  if(modmin < 0.0){
381  msg(MSG::FATAL) << "insufficient Points for Module Fitting" << endmsg;
382  return StatusCode::FAILURE;
383  }
384 
385  // fill the dparams vector
386  for(unsigned ipar=0;ipar<3;ipar++)
387  dparams[ipar] = modtrans[ipar];
388  dparams[3] = modangles[0];
389  dparams[4] = modangles[1];
390  dparams[5] = modangles[2];
391 
392  // for this get the errors (weight) on the points (actually independent of MUTid)
394  bool ierr=-1;
395  if(isPixEC) ierr = getWeightPixEC(//ModuleID,
396  weight);
397  else if(isPixB) ierr = getWeightPixB(//ModuleID,
398  weight);
399  else if(isSCTEC) ierr = getWeightSCTEC(//ModuleID,
400  weight);
401  else if(isSCTB) ierr = getWeightSCTB(//ModuleID,
402  weight);
403  if(ierr != 0){
404  msg(MSG::FATAL) << "matrixInvertFail" << endmsg;
405  if(isPixEC) msg(MSG::FATAL) << "for PixEC" << endmsg;
406  else if(isPixB) msg(MSG::FATAL) << "for PixB" << endmsg;
407  else if(isSCTEC) msg(MSG::FATAL) << "for SCTEC" << endmsg;
408  else if(isSCTB) msg(MSG::FATAL) << "for SCTB" << endmsg;
409  return StatusCode::FAILURE;
410  }
411 
412  // and asign additional weightfactor to simulate systematic uncertainties (bowing etc.)
413  // Don't need this: Put systematics already in weight matrix!!!
414 // for(unsigned icol=1;icol<=6;icol++)
415 // for(unsigned irow=1;irow<=icol;irow++)
416 // weight.fast(icol,irow) *= weightfactor(icol)*weightfactor(irow);
417 
418  // now get the chi2, add to the vector and the matrix.
419  Amg::MatrixX temp = dparams.transpose() * weight * dparams;
420  msg(MSG::ERROR) << "Chech that the size of the matrix is a 1,1: " << temp.rows() << ", " << temp.cols() << endmsg;
421  deltachisq = temp(0,0);
422 
423 
424  // the derivatives are trivial, since we're already in the wafers local
425  // coordinate system. The factor of 2 comes from the dfn of chisquared, the
426  // sign from the convention that we measure dparams as current-survey
427  DOCA_Vector = 2.0*weight*dparams; // dchisqdparams
428  DOCA_Matrix = 2.0*weight; // d2chisqdpdp
429 
430  return StatusCode::SUCCESS;
431 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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 SurveyConstraint::finalize ( )
virtual

Definition at line 264 of file SurveyConstraint.cxx.

264  {
265 
266  // Part 1: Get the messaging service, print where you are
267  msg(MSG::INFO) << "finalize()" << endmsg;
268 
269  std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >::iterator it;
270  for (it = m_ModuleMap.begin(); it != m_ModuleMap.end(); ++it) {
271  delete it->second;
272  }
273  m_ModuleMap.clear();
274 
275  return StatusCode::SUCCESS;
276 }

◆ getSurveyCoordsPixB()

void SurveyConstraint::getSurveyCoordsPixB ( std::vector< Amg::Vector3D > &  coords)
virtual

Implements ISurveyConstraint.

Definition at line 1001 of file SurveyConstraint.cxx.

1002  {
1003  coords.clear();
1004  const double SurveyTargetX = 17.8/2.0;
1005  const double SurveyTargetY = 59.8/2.0;
1006  // 4 points
1007  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
1008  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
1009  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
1010  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
1011 }

◆ getSurveyCoordsPixEC()

void SurveyConstraint::getSurveyCoordsPixEC ( std::vector< Amg::Vector3D > &  coords)
virtual

Implements ISurveyConstraint.

Definition at line 988 of file SurveyConstraint.cxx.

989  {
990  coords.clear();
991  const double SurveyTargetX = 17.8/2.0;
992  const double SurveyTargetY = 59.8/2.0;
993  // 4 points
994  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
995  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
996  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
997  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
998 }

◆ getSurveyCoordsSCTB()

void SurveyConstraint::getSurveyCoordsSCTB ( std::vector< Amg::Vector3D > &  coords)
virtual

Implements ISurveyConstraint.

Definition at line 1027 of file SurveyConstraint.cxx.

1028  {
1029  coords.clear();
1030  const double SurveyTargetX = 63.6/2.0;
1031  const double SurveyTargetY = 128.2/2.0;
1032  // 4 points
1033  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
1034  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
1035  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
1036  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
1037 }

◆ getSurveyCoordsSCTEC()

void SurveyConstraint::getSurveyCoordsSCTEC ( std::vector< Amg::Vector3D > &  coords)
virtual

Implements ISurveyConstraint.

Definition at line 1014 of file SurveyConstraint.cxx.

1015  {
1016  coords.clear();
1017  const double SurveyTargetX = 63.6/2.0;
1018  const double SurveyTargetY = 128.2/2.0;
1019  // 4 points
1020  coords.emplace_back(-SurveyTargetX,-SurveyTargetY,0.0);
1021  coords.emplace_back(-SurveyTargetX, SurveyTargetY,0.0);
1022  coords.emplace_back( SurveyTargetX,-SurveyTargetY,0.0);
1023  coords.emplace_back( SurveyTargetX, SurveyTargetY,0.0);
1024 }

◆ getWeightPixB()

int SurveyConstraint::getWeightPixB ( Amg::MatrixX weight)
virtual

Implements ISurveyConstraint.

Definition at line 934 of file SurveyConstraint.cxx.

935  {
936 
937  AmgSymMatrix(6) covar;
938  // in local coords, set errors to be diagonal, with values to be provided by Vadim
939  covar(0,0) = m_TransXRandPixB*m_TransXRandPixB;
940  covar(1,1) = m_TransYRandPixB*m_TransYRandPixB;
941  covar(2,2) = m_TransZRandPixB*m_TransZRandPixB;
942  covar(3,3) = m_RotXRandPixB*m_RotXRandPixB;
943  covar(4,4) = m_RotYRandPixB*m_RotYRandPixB;
944  covar(5,5) = m_RotZRandPixB*m_RotZRandPixB;
945  // invert
946  weight = covar.inverse();
947  return 0;
948 }

◆ getWeightPixEC()

int SurveyConstraint::getWeightPixEC ( Amg::MatrixX weight)
virtual

Implements ISurveyConstraint.

Definition at line 916 of file SurveyConstraint.cxx.

917  {
918 
919  AmgSymMatrix(6) covar;
920  // in local coords, set errors to be diagonal, with values provided by Gil and Ron
921  covar(0,0) = m_TransXRand*m_TransXRand;
922  covar(1,1) = m_TransYRand*m_TransYRand;
923  covar(2,2) = m_TransZRand*m_TransZRand;
924  covar(3,3) = m_RotXRand*m_RotXRand;
925  covar(4,4) = m_RotYRand*m_RotYRand;
926  covar(5,5) = m_RotZRand*m_RotZRand;
927  // invert
928  weight = covar.inverse();
929  return 0;
930 }

◆ getWeightSCTB()

int SurveyConstraint::getWeightSCTB ( Amg::MatrixX weight)
virtual

Implements ISurveyConstraint.

Definition at line 970 of file SurveyConstraint.cxx.

971  {
972 
973  AmgSymMatrix(6) covar;
974 
975  // in local coords, set errors to be diagonal, with values to be provided by Stephen Gibson
976  covar(0,0) = m_TransXRandSCTB*m_TransXRandSCTB;
977  covar(1,1) = m_TransYRandSCTB*m_TransYRandSCTB;
978  covar(2,2) = m_TransZRandSCTB*m_TransZRandSCTB;
979  covar(3,3) = m_RotXRandSCTB*m_RotXRandSCTB;
980  covar(4,4) = m_RotYRandSCTB*m_RotYRandSCTB;
981  covar(5,5) = m_RotZRandSCTB*m_RotZRandSCTB;
982  // invert
983  weight = covar.inverse();
984  return 0;
985 }

◆ getWeightSCTEC()

int SurveyConstraint::getWeightSCTEC ( Amg::MatrixX weight)
virtual

Implements ISurveyConstraint.

Definition at line 952 of file SurveyConstraint.cxx.

953  {
954 
955  AmgSymMatrix(6) covar;
956  // in local coords, set errors to be diagonal, with values to be provided by Steve Snow
960  covar(3,3) = m_RotXRandSCTEC*m_RotXRandSCTEC;
961  covar(4,4) = m_RotYRandSCTEC*m_RotYRandSCTEC;
962  covar(5,5) = m_RotZRandSCTEC*m_RotZRandSCTEC;
963  // invert
964  weight = covar.inverse();
965  return 0;
966 }

◆ GlobalToLocal()

void SurveyConstraint::GlobalToLocal ( SurveyConstraintModule mut,
std::vector< SurveyConstraintPoint > &  points 
)
virtual

Implements ISurveyConstraint.

Definition at line 1040 of file SurveyConstraint.cxx.

1041  {
1042  // get global to wut's local transformation
1043  Amg::Transform3D globaltolocal = mut->get_globaltolocal();
1044  // Transform the points into the wut's coordinate system
1045  for(unsigned ipoint=0;ipoint<points.size();ipoint++){
1046  Amg::Vector3D& survey = points[ipoint].survey();
1047  Amg::Vector3D& current = points[ipoint].current();
1048  survey =globaltolocal *survey;
1049  current=globaltolocal * current;
1050  }
1051 }

◆ initialize()

StatusCode SurveyConstraint::initialize ( )
virtual

Definition at line 173 of file SurveyConstraint.cxx.

173  {
174 
175  // Part 1: Get the messaging service, print where you are
176  msg(MSG::INFO) << "SurveyConstraint initialize()" << endmsg;
177 
178  // Get The ToolSvc
179  StatusCode sc = service("ToolSvc",m_toolsvc);
180  if (sc.isFailure()) {
181  msg(MSG::FATAL) << "Could not find ToolSvc. Exiting." << endmsg;
182  return sc;
183  }
184  msg(MSG::INFO) << "got ToolSvc" << endmsg;
185 
186  // Get current InDetAlignDataBaseTool from ToolService
187  sc = m_toolsvc->retrieveTool("InDetAlignDBTool",m_aligndbtoolinst,m_current_IDAlignDBTool);
188  if (sc.isFailure()) {
189  msg(MSG::FATAL) <<"Could not find InDetAlignDBTool. Exiting."<<endmsg;
190  return sc;
191  }
192  msg(MSG::INFO) << "got current_IDAlignDBTool" << endmsg;
193  msg(MSG::INFO) << "current_IDAlignDBTool name = " << m_current_IDAlignDBTool->name() << endmsg;
194 
195  // Get survey InDetAlignDataBaseTool from ToolService
196  sc = m_toolsvc->retrieveTool("InDetAlignDBTool",m_surveydbtoolinst,m_survey_IDAlignDBTool);
197  if (sc.isFailure()) {
198  msg(MSG::FATAL) <<"Could not find InDetAlignDBTool. Exiting."<<endmsg;
199  return sc;
200  }
201  msg(MSG::INFO) << "got survey_IDAlignDBTool" << endmsg;
202 
203  //ID Helper
204  sc = detStore()->retrieve(m_idHelper, "AtlasID" );
205  if (sc.isFailure()) {
206  msg(MSG::WARNING) << "Could not get AtlasDetectorID !" << endmsg;
207  return StatusCode::SUCCESS;
208  }else{
209  if (msgLvl(MSG::DEBUG)) msg() << "Found AtlasDetectorID" << endmsg;
210  }
211 
212  // get ID helpers from detector store (relying on GeoModel to put them)
213  if ((StatusCode::SUCCESS!=detStore()->retrieve(m_pixid)) ||
214  (StatusCode::SUCCESS!=detStore()->retrieve(m_sctid))) {
215  msg(MSG::FATAL) << "Problem retrieving ID helpers" << endmsg;
216  return StatusCode::FAILURE;
217  }
218  msg(MSG::INFO) << "got ID helpers from detector store (relying on GeoModel to put them)" << endmsg;
219 
220  // ReadCondHandleKeys
223 
224  // random number service
225  if (StatusCode::SUCCESS!=service("RndmGenSvc",m_randsvc,true))
226  msg(MSG::ERROR) << "Cannot find RndmGenSvc" << endmsg;
227 
228  // Protection against singular weight matrix
229  if (m_surveywfile==""){
230  if(m_TransXRand<1.E-7) m_TransXRand=1.E-7;
231  if(m_TransYRand<1.E-7) m_TransYRand=1.E-7;
232  if(m_TransZRand<1.E-7) m_TransZRand=1.E-7;
233  if(m_RotXRand<1.E-7) m_RotXRand=1.E-7;
234  if(m_RotYRand<1.E-7) m_RotYRand=1.E-7;
235  if(m_RotZRand<1.E-7) m_RotZRand=1.E-7;
236  if(m_TransXRandPixB<1.E-7) m_TransXRandPixB=1.E-7;
237  if(m_TransYRandPixB<1.E-7) m_TransYRandPixB=1.E-7;
238  if(m_TransZRandPixB<1.E-7) m_TransZRandPixB=1.E-7;
239  if(m_RotXRandPixB<1.E-7) m_RotXRandPixB=1.E-7;
240  if(m_RotYRandPixB<1.E-7) m_RotYRandPixB=1.E-7;
241  if(m_RotZRandPixB<1.E-7) m_RotZRandPixB=1.E-7;
242  //
243  if(m_TransXRandSCTEC<1.E-7) m_TransXRandSCTEC=1.E-7;
244  if(m_TransYRandSCTEC<1.E-7) m_TransYRandSCTEC=1.E-7;
245  if(m_TransZRandSCTEC<1.E-7) m_TransZRandSCTEC=1.E-7;
246  if(m_RotXRandSCTEC<1.E-7) m_RotXRandSCTEC=1.E-7;
247  if(m_RotYRandSCTEC<1.E-7) m_RotYRandSCTEC=1.E-7;
248  if(m_RotZRandSCTEC<1.E-7) m_RotZRandSCTEC=1.E-7;
249  if(m_TransXRandSCTB<1.E-7) m_TransXRandSCTB=1.E-7;
250  if(m_TransYRandSCTB<1.E-7) m_TransYRandSCTB=1.E-7;
251  if(m_TransZRandSCTB<1.E-7) m_TransZRandSCTB=1.E-7;
252  if(m_RotXRandSCTB<1.E-7) m_RotXRandSCTB=1.E-7;
253  if(m_RotYRandSCTB<1.E-7) m_RotYRandSCTB=1.E-7;
254  if(m_RotZRandSCTB<1.E-7) m_RotZRandSCTB=1.E-7;
255  }
256  msg(MSG::INFO) << "now entering SurveyConstraint::setup_SurveyConstraintModules()" << endmsg;
258  //if (m_surveywfile!="")
259  return StatusCode::SUCCESS;
260  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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 & ISurveyConstraint::interfaceID ( )
inlinestaticinherited

Declared here, and defined below.

Definition at line 65 of file ISurveyConstraint.h.

66 {
67  return IID_ISurveyConstraint;
68 }

◆ MMap()

void SurveyConstraint::MMap ( std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > &  ModuleMap)
virtual

Implements ISurveyConstraint.

Definition at line 279 of file SurveyConstraint.cxx.

279  {
280  ModuleMap = m_ModuleMap;
281  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ PhiModuleToSector()

double SurveyConstraint::PhiModuleToSector ( int  phi_module)
virtual

Implements ISurveyConstraint.

Definition at line 1090 of file SurveyConstraint.cxx.

1090  {
1091  int phiMod6 = phi_module%6;
1092  if(phiMod6 == 0) return ( 7.5 - phiModEnd) * 1.0_degree;
1093  else if(phiMod6 == 1) return (15 - phiModEnd) * 1.0_degree;
1094  else if(phiMod6 == 2) return (22.5 - phiModEnd) * 1.0_degree;
1095  else if(phiMod6 == 3) return (30 - phiModEnd) * 1.0_degree;
1096  else if(phiMod6 == 4) return (37.5 - phiModEnd) * 1.0_degree;
1097  else if(phiMod6 == 5) return (45 - phiModEnd) * 1.0_degree;
1098  else return -1;
1099 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ SectorNumber()

int SurveyConstraint::SectorNumber ( int  phi_module)
virtual

Implements ISurveyConstraint.

Definition at line 1077 of file SurveyConstraint.cxx.

1077  {
1078  if(phi_module >= 0 && phi_module <= 5) return 0;
1079  if(phi_module >= 6 && phi_module <= 11) return 1;
1080  if(phi_module >= 12 && phi_module <= 17) return 2;
1081  if(phi_module >= 18 && phi_module <= 23) return 3;
1082  if(phi_module >= 24 && phi_module <= 29) return 4;
1083  if(phi_module >= 30 && phi_module <= 35) return 5;
1084  if(phi_module >= 36 && phi_module <= 41) return 6;
1085  if(phi_module >= 42 && phi_module <= 47) return 7;
1086  return -1;
1087 }

◆ setup_SurveyConstraintModules()

void SurveyConstraint::setup_SurveyConstraintModules ( )
virtual

Implements ISurveyConstraint.

Definition at line 434 of file SurveyConstraint.cxx.

435 {
436  Rndm::Numbers gauss(m_randsvc,Rndm::Gauss(0.,1.));
437 
438  // read in or write an alignment file for the survey alignment,
439  // either a text file (SurveyText.txt) or an ntuple (reading in and writing out
440  // an ntuple does not work at the moment). For this create a DB
441  // an set DBRoot to "/Indet/SiSurvey"
443  if (m_surveyrfile!=""){
446  }
447 
448  // create some displacements at level 1/2/3, using only one parameter m_TransLayerRand
449  if(m_TransLayerRand > 0){
450  // displace all layers randomly
451  if(m_misaligncase == 0)
453  // displace pixel EC layer 0 in x
454  else if(m_misaligncase == 1)
455  m_survey_IDAlignDBTool->dispGroup(1, 2, 0, -1, -1, m_TransLayerRand, 0, 0, 1, 2, 0);
456  // displace pixel EC layer 2 in x
457  else if(m_misaligncase == 2)
458  m_survey_IDAlignDBTool->dispGroup(1, 2, 2, -1, -1, m_TransLayerRand, 0, 0, 1, 2, 0);
459  }
460 
461  int nSCT(0), nPixel(0);
462  std::vector< Amg::Vector3D > localSurveyCoords;
463  Amg::Transform3D SurveyTransRand, SurveyTransRandSect;
464  SurveyTransRand.setIdentity();
465  SurveyTransRandSect.setIdentity();
466 
467  unsigned int nSCTMod = 0,nSCTModInMap = 0,nSCTModEC = 0,nSCTModPointsEC = 0;
468  // Get SiDetectorElementCollection from ConditionStore for SCT
470  const InDetDD::SiDetectorElementCollection* sctElements(*sctDetEleHandle);
471  if (not sctDetEleHandle.isValid() or sctElements==nullptr) {
472  ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available.");
473  return;
474  }
475  for (const InDetDD::SiDetectorElement* element: *sctElements) {
476  const Identifier SCT_ModuleID = element->identify();
477  if(m_sctid->side(SCT_ModuleID) != 0) continue;
478  ++nSCTMod;
479 
480  if (m_ModuleMap.find(SCT_ModuleID) == m_ModuleMap.end()) {
481  ++nSCTModInMap;
482  SurveyConstraintModule* newSCT_Module = new SurveyConstraintModule(SCT_ModuleID,false);
483  Amg::Transform3D globaltolocal = element->transform().inverse();
484  newSCT_Module->set_globaltolocal(globaltolocal);
485  m_ModuleMap[SCT_ModuleID] = newSCT_Module;
486  ++nSCT;
487  if (msgLvl(MSG::DEBUG)) msg() << "new SCT Module " << nSCT << endmsg;
488 
489 
490 
491  // Get the nominal local coordinates (which are the same for all wafers, and for survey and current)
492  // add SCT EC SurveyCoords to SurveyConstraintModule
493  if(abs(m_sctid->barrel_ec(SCT_ModuleID)) == 2) getSurveyCoordsSCTEC(//SCT_ModuleID,
494  localSurveyCoords);
495  // add SCT Barrel SurveyCoords to SurveyConstraintModule
496  else if(m_sctid->barrel_ec(SCT_ModuleID) == 0) getSurveyCoordsSCTB(//SCT_ModuleID,
497  localSurveyCoords);
498  // get the survey, current transformations from nominal
499  Amg::Transform3D SurveyTrans = m_survey_IDAlignDBTool->getTrans(SCT_ModuleID,3);
500  Amg::Transform3D CurrentTrans = m_current_IDAlignDBTool->getTrans(SCT_ModuleID,3);
501 
502  if(m_gaus){
503  if(abs(m_sctid->barrel_ec(SCT_ModuleID)) == 2){
504  double m1 = m_TransXRandSCTEC*gauss();
505  double m2 = m_TransYRandSCTEC*gauss();
506  double m3 = m_TransZRandSCTEC*gauss();
507  double m4 = m_RotXRandSCTEC*gauss();
508  double m5 = m_RotYRandSCTEC*gauss();
509  double m6 = m_RotZRandSCTEC*gauss();
510  SurveyTransRand = Amg::Translation3D(m1,m2,m3) * Amg::RotationMatrix3D::Identity()
511  * Amg::AngleAxis3D(m6, Amg::Vector3D(0.,0.,1.))
512  * Amg::AngleAxis3D(m5, Amg::Vector3D(0.,1.,0.))
513  * Amg::AngleAxis3D(m4, Amg::Vector3D(1.,0.,0.));
514  if (m_surveywfile!=""){
515  Amg::VectorX Misalign_Vector(6);
516  Misalign_Vector[0]=m1;Misalign_Vector[1]=m2;Misalign_Vector[2]=m3;Misalign_Vector[3]=m4;Misalign_Vector[4]=m5;Misalign_Vector[5]=m6;
517  newSCT_Module->set_DOCA_Vector(Misalign_Vector);
518  }
519  }
520  else if(m_sctid->barrel_ec(SCT_ModuleID) == 0) {
521  double m1 = m_TransXRandSCTB*gauss();
522  double m2 = m_TransYRandSCTB*gauss();
523  double m3 = m_TransZRandSCTB*gauss();
524  double m4 = m_RotXRandSCTB*gauss();
525  double m5 = m_RotYRandSCTB*gauss();
526  double m6 = m_RotZRandSCTB*gauss();
527  SurveyTransRand = Amg::Translation3D(m1,m2,m3) * Amg::RotationMatrix3D::Identity()
528  * Amg::AngleAxis3D(m6, Amg::Vector3D(0.,0.,1.))
529  * Amg::AngleAxis3D(m5, Amg::Vector3D(0.,1.,0.))
530  * Amg::AngleAxis3D(m4, Amg::Vector3D(1.,0.,0.));
531  if (m_surveywfile!=""){
532  Amg::VectorX Misalign_Vector(6);
533  Misalign_Vector[0]=m1;Misalign_Vector[1]=m2;Misalign_Vector[2]=m3;Misalign_Vector[3]=m4;Misalign_Vector[4]=m5;Misalign_Vector[5]=m6;
534  newSCT_Module->set_DOCA_Vector(Misalign_Vector);
535  }
536  }
537  }
538 
539  // add constraint points to "SurveyConstraintModule newSCT_Module" in global coords
540  for ( unsigned int iCorn(0); iCorn < localSurveyCoords.size(); ++iCorn ) {
541  Amg::Vector3D temp = localSurveyCoords[iCorn];
542  // Transform the local points into the MUT's (survey and current) local coordinate system
543  Amg::Vector3D surveyPoint = (SurveyTrans*SurveyTransRand) * localSurveyCoords[iCorn];
544  if(m_TransLayerRand <= 0) m_survey_IDAlignDBTool->setTrans(SCT_ModuleID,3,SurveyTrans*SurveyTransRand);
545  //m_survey_IDAlignDBTool->tweakTrans(SCT_ModuleID,3,SurveyTransRand);
546  Amg::Vector3D currentPoint = CurrentTrans * temp;
547  // Transform the local (survey and current) constraint points into the global coordinate system
548  Amg::VectorX globalSurveyPoint = element->globalPosition( surveyPoint );
549  Amg::VectorX globalCurrentPoint = element->globalPosition( currentPoint);
550 
551  SurveyConstraintPoint newCPoint( globalSurveyPoint, globalCurrentPoint );
552  newSCT_Module->addModuleConstraintPoint(newCPoint);
553  }
554  }
555  }
556 
557  bool first = true, NewDisk = true, NewSector = true, firstB = true;
558  unsigned int nPixMod = 0,nPixModInMap = 0,nPixModEC = 0,nPixModPointsEC = 0;
559  int previous_disk = -1, previous_sector = -1;
560  // Get SiDetectorElementCollection from ConditionStore for Pixel
562  const InDetDD::SiDetectorElementCollection* pixelElements(*pixelDetEleHandle);
563  if (not pixelDetEleHandle.isValid() or pixelElements==nullptr) {
564  ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
565  return;
566  }
567  for (const InDetDD::SiDetectorElement* element: *pixelElements) {
568  const Identifier Pixel_ModuleID = element->identify();
569  ++nPixMod;
570 
571  if (m_ModuleMap.find(Pixel_ModuleID) == m_ModuleMap.end()) {
572  ++nPixModInMap;
573  SurveyConstraintModule* newPixel_Module = new SurveyConstraintModule(Pixel_ModuleID,true);
574  Amg::Transform3D globaltolocal = element->transform().inverse();
575  newPixel_Module->set_globaltolocal(globaltolocal);
576  m_ModuleMap[Pixel_ModuleID] = newPixel_Module;
577  ++nPixel;
578  if (msgLvl(MSG::DEBUG)) msg() << "new Pixel Module " << nPixel << endmsg;
579 
580  // add Pixel EC SurveyCoords
581  if(abs(m_pixid->barrel_ec(Pixel_ModuleID)) == 2){
582  ++nPixModEC;
583  // Get the nominal local coordinates (which are the same for all wafers, and for survey and current)
584  getSurveyCoordsPixEC(//Pixel_ModuleID,
585  localSurveyCoords);
586  // get the survey, current transformations from nominal
587  Amg::Transform3D SurveyTrans = m_survey_IDAlignDBTool->getTrans(Pixel_ModuleID,3);
588  Amg::Transform3D CurrentTrans = m_current_IDAlignDBTool->getTrans(Pixel_ModuleID,3);
589 
590 
591  // ********************************************
592  // Do some tests for first Pixel EC module
593  if(previous_disk == m_pixid->layer_disk(Pixel_ModuleID) && previous_sector == SectorNumber(m_pixid->phi_module(Pixel_ModuleID)))
594  NewSector=false;
595  else NewSector=true;
596  if(previous_disk == m_pixid->layer_disk(Pixel_ModuleID))
597  NewDisk=false;
598  else NewDisk=true;
599  if (NewSector && (!m_gausSect || NewDisk)){
600  CurrentTrans = CurrentTrans * Amg::Translation3D(m_TransX,m_TransY,m_TransZ)
601  * Amg::AngleAxis3D(m_RotZ, Amg::Vector3D(0.,0.,1.))
602  * Amg::AngleAxis3D(m_RotY, Amg::Vector3D(0.,1.,0.))
604  * Amg::AngleAxis3D(m_RotX2, Amg::Vector3D(1.,0.,0.));
605 
606  }
607 
608  if (m_gaus){
609  double m1 = m_TransXRand*gauss();
610  double m2 = m_TransYRand*gauss();
611  double m3 = m_TransZRand*gauss();
612  double m4 = m_RotXRand*gauss();
613  double m5 = m_RotYRand*gauss();
614  double m6 = m_RotZRand*gauss();
615  SurveyTransRand = Amg::Translation3D(m1,m2,m3) * Amg::RotationMatrix3D::Identity()
616  * Amg::AngleAxis3D(m6, Amg::Vector3D(0.,0.,1.))
617  * Amg::AngleAxis3D(m5, Amg::Vector3D(0.,1.,0.))
618  * Amg::AngleAxis3D(m4, Amg::Vector3D(1.,0.,0.));
619 
620 
621  if (m_surveywfile!=""){
622  Amg::VectorX Misalign_Vector(6);
623  Misalign_Vector[0]=m1;Misalign_Vector[1]=m2;Misalign_Vector[2]=m3;Misalign_Vector[3]=m4;Misalign_Vector[4]=m5;Misalign_Vector[5]=m6;
624  newPixel_Module->set_DOCA_Vector(Misalign_Vector);
625  }
626  }
627  if(m_gausSect && NewSector){
628  double m1 = m_TransXRandSect*gauss();
629  double m2 = m_TransYRandSect*gauss();
630  double m3 = m_TransZRandSect*gauss();
631  double m4 = m_RotXRandSect*gauss();
632  double m5 = m_RotYRandSect*gauss();
633  double m6 = m_RotZRandSect*gauss();
634  SurveyTransRandSect = Amg::Translation3D(m1,m2,m3) * Amg::RotationMatrix3D::Identity()
635  * Amg::AngleAxis3D(m6, Amg::Vector3D(0.,0.,1.))
636  * Amg::AngleAxis3D(m5, Amg::Vector3D(0.,1.,0.))
637  * Amg::AngleAxis3D(m4, Amg::Vector3D(1.,0.,0.));
638 
639  }
640  // ********************************************
641 
642 
643  // add constraint points to "SurveyConstraintModule newPixel_Module" in global coords
644  for ( unsigned int iCorn(0); iCorn < localSurveyCoords.size(); ++iCorn ) {
645  ++nPixModPointsEC;
646  Amg::Vector3D temp = localSurveyCoords[iCorn];
647  // Transform the local points into the MUT's (survey and current) local coordinate system
648  Amg::Vector3D surveyPoint = (SurveyTrans*SurveyTransRand) * localSurveyCoords[iCorn];
649  if(m_TransLayerRand <= 0) m_survey_IDAlignDBTool->setTrans(Pixel_ModuleID,3,SurveyTrans*SurveyTransRand);
650  //m_survey_IDAlignDBTool->tweakTrans(Pixel_ModuleID,3,SurveyTransRand);
651  Amg::Vector3D currentPoint = CurrentTrans *temp;
652  //Amg::Vector3D currentPoint = temp.transform(CurrentTrans);
653  // Transform the local (survey and current) constraint points into the global coordinate system
654  Amg::VectorX globalSurveyPoint = element->globalPosition( surveyPoint);
655  Amg::VectorX globalCurrentPoint = element->globalPosition( currentPoint );
656 
657 
658 
659  // transform globalCurrentPoint according to Sector Transformation SurveyTransRandSect
660  //TransformSector(Pixel_ModuleID,newPixel_Module,globalCurrentPoint,SurveyTransRandSect);
661 
662  SurveyConstraintPoint newCPoint( globalSurveyPoint, globalCurrentPoint );
663  newPixel_Module->addModuleConstraintPoint(newCPoint);
664 
665  // ********************************************
666  // Do some tests for first Pixel EC module
667  if (first){
668  //if(SurveyTrans == CurrentTrans) msg(MSG::INFO) << "SurveyTrans == CurrentTrans" << endmsg;
669  //if(surveyPoint == currentPoint) msg(MSG::INFO) << "surveyPoint == currentPoint" << endmsg;
670  //if(globalSurveyPoint == globalCurrentPoint) msg(MSG::INFO) << "globalSurveyPoint == globalCurrentPoint" << endmsg;
671  msg(MSG::INFO) << "Local Coordinates = (" << localSurveyCoords[iCorn][0] << ","
672  << localSurveyCoords[iCorn][1] << "," << localSurveyCoords[iCorn][2] << ")" << endmsg;
673  msg(MSG::INFO) << "Survey Local Coordinates = (" << surveyPoint[0] << ","
674  << surveyPoint[1] << "," << surveyPoint[2] << ")" << endmsg;
675  msg(MSG::INFO) << "Current Local Coordinates = (" << currentPoint[0] << ","
676  << currentPoint[1] << "," << currentPoint[2] << ")" << endmsg;
677  msg(MSG::INFO) << "Survey Global Coordinates = (" << globalSurveyPoint[0] << ","
678  << globalSurveyPoint[1] << "," << globalSurveyPoint[2] << ")" << endmsg;
679  msg(MSG::INFO) << "Current Global Coordinates = (" << globalCurrentPoint[0] << ","
680  << globalCurrentPoint[1] << "," << globalCurrentPoint[2] << ")" << endmsg;
681  msg(MSG::INFO) << "SurveyConstraint().setup_SurveyConstraintModules: nModulePoints " << m_ModuleMap[Pixel_ModuleID]->nModulePoints() << endmsg;
682  first = false;
683  }
684  // ********************************************
685 
686  }
687  previous_disk = m_pixid->layer_disk(Pixel_ModuleID);
688  previous_sector = SectorNumber(m_pixid->phi_module(Pixel_ModuleID));
689  }
690 
691  // add Pixel Barrel SurveyCoords to SurveyConstraintModule
692  if(m_pixid->barrel_ec(Pixel_ModuleID) == 0){
693  // Get the nominal local coordinates (which are the same for all wafers, and for survey and current)
694  getSurveyCoordsPixB(//Pixel_ModuleID,
695  localSurveyCoords);
696  // get the survey, current transformations from nominal
697  Amg::Transform3D SurveyTrans = m_survey_IDAlignDBTool->getTrans(Pixel_ModuleID,3);
698  Amg::Transform3D CurrentTrans = m_current_IDAlignDBTool->getTrans(Pixel_ModuleID,3);
699 
700  if(m_gaus){
701  double m1 = m_TransXRandPixB*gauss();
702  double m2 = m_TransYRandPixB*gauss();
703  double m3 = m_TransZRandPixB*gauss();
704  double m4 = m_RotXRandPixB*gauss();
705  double m5 = m_RotYRandPixB*gauss();
706  double m6 = m_RotZRandPixB*gauss();
707  SurveyTransRand = Amg::Translation3D(m1,m2,m3) * Amg::RotationMatrix3D::Identity()
708  * Amg::AngleAxis3D(m6, Amg::Vector3D(0.,0.,1.))
709  * Amg::AngleAxis3D(m5, Amg::Vector3D(0.,1.,0.))
710  * Amg::AngleAxis3D(m4, Amg::Vector3D(1.,0.,0.));
711 
712  if (m_surveywfile!=""){
713  Amg::VectorX Misalign_Vector(6);
714  Misalign_Vector[0]=m1;Misalign_Vector[1]=m2;Misalign_Vector[2]=m3;Misalign_Vector[3]=m4;Misalign_Vector[4]=m5;Misalign_Vector[5]=m6;
715  newPixel_Module->set_DOCA_Vector(Misalign_Vector);
716  }
717  }
718 
719  // add constraint points to "SurveyConstraintModule newPixel_Module" in global coords
720  for ( unsigned int iCorn(0); iCorn < localSurveyCoords.size(); ++iCorn ) {
721  Amg::Vector3D temp = localSurveyCoords[iCorn];
722  // Transform the local points into the MUT's (survey and current) local coordinate system
723  Amg::Vector3D surveyPoint = (SurveyTrans*SurveyTransRand) *localSurveyCoords[iCorn] ;
724  if(m_TransLayerRand <= 0) m_survey_IDAlignDBTool->setTrans(Pixel_ModuleID,3,SurveyTrans*SurveyTransRand);
725  //m_survey_IDAlignDBTool->tweakTrans(Pixel_ModuleID,3,SurveyTransRand);
726  Amg::Vector3D currentPoint = CurrentTrans *temp;
727  // Transform the local (survey and current) constraint points into the global coordinate system
728  Amg::VectorX globalSurveyPoint = element->globalPosition( surveyPoint );
729  Amg::VectorX globalCurrentPoint = element->globalPosition( currentPoint );
730 
731  SurveyConstraintPoint newCPoint( globalSurveyPoint, globalCurrentPoint );
732  newPixel_Module->addModuleConstraintPoint(newCPoint);
733  }
734  }
735  }
736  }
737  msg(MSG::INFO) << "nSCTMod " << nSCTMod
738  << ", nSCTModInMap " << nSCTModInMap
739  << ", nSCTModEC " << nSCTModEC
740  << ", nSCTModPointsEC " << nSCTModPointsEC
741  << ", nPixMod " << nPixMod
742  << ", nPixModInMap " << nPixModInMap
743  << ", nPixModEC " << nPixModEC
744  << ", nPixModPointsEC " << nPixModPointsEC
745  << endmsg;
746 
747 
748 
749 
750  // find the set of modules (=stave=modules used to constrain the MUT) associated with this module ID
751  // add the SurveyCoords from this Stave to the MUT (SurveyConstraintModule newPixel_Module),
752  // exclude the points which lie actually on the MUT, to get an unbiased alignment of the two Staves (survey and current)
753  std::vector< SurveyConstraintPoint > Stavepoints;
754  // Pix EC
755  unsigned int nPixModEC2 = 0,nPixModPixModEC = 0,nPixModECPixModEC = 0,nSameLayer = 0,nNotIdentical = 0;
756  for (PixelID::const_id_iterator wafer_it=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
757  const Identifier Pixel_ModuleID = *wafer_it;
758  if(abs(m_pixid->barrel_ec(Pixel_ModuleID)) == 2){
759  ++nPixModEC2;
760  for (PixelID::const_id_iterator wafer_it2=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
761  ++nPixModPixModEC;
762  const Identifier Pixel_ModuleID2 = *wafer_it2;
763  if(m_pixid->barrel_ec(Pixel_ModuleID2) == m_pixid->barrel_ec(Pixel_ModuleID)){
764  ++nPixModECPixModEC;
765  if(m_pixid->layer_disk(Pixel_ModuleID2) == m_pixid->layer_disk(Pixel_ModuleID)){
766  ++nSameLayer;
767  // require Pixel_ModuleID2 and Pixel_ModuleID from same sector OR
768  // m_FullDisk=true which means use all modules from one disk
769  if(m_FullDisk || SectorNumber(m_pixid->phi_module(Pixel_ModuleID2)) == SectorNumber(m_pixid->phi_module(Pixel_ModuleID))){
770  //if(SectorNumber(m_pixid->phi_module(Pixel_ModuleID2)) == SectorNumber(m_pixid->phi_module(Pixel_ModuleID))){
771  if(Pixel_ModuleID != Pixel_ModuleID2){
772  ++nNotIdentical;
773  (m_ModuleMap[Pixel_ModuleID2])->getPoints(Stavepoints,SurveyConstraintModule::Module);
774  (m_ModuleMap[Pixel_ModuleID])->addStaveConstraintPoint(Stavepoints);
775 
776  // ********************************************
777  // Do some tests for first Pixel EC module
778  if (firstB){
779  std::vector< SurveyConstraintPoint > Testpoints;
780  m_ModuleMap[Pixel_ModuleID]->getPoints(Testpoints,SurveyConstraintModule::Stave);
781  msg(MSG::INFO) << "SurveyConstraint().setup_SurveyConstraintModules: Stavepoints.size() (from map) " << Testpoints.size() << endmsg;
782  firstB = false;
783  }
784  // ********************************************
785 
786  }
787  }
788  }
789  }
790  }
791  }
792  }
793  msg(MSG::INFO) << "Loop 2, filling stave-points, nPixModEC2 " << nPixModEC2
794  << ", nPixModPixModEC " << nPixModPixModEC
795  << ", nPixModECPixModEC " << nPixModECPixModEC
796  << ", nSameLayer " << nSameLayer
797  << ", nNotIdentical " << nNotIdentical
798  << endmsg;
799 
800  // Pix B
801  nPixModEC2 = 0;nPixModPixModEC = 0;nPixModECPixModEC = 0;nSameLayer = 0;nNotIdentical = 0;
802  for (PixelID::const_id_iterator wafer_it=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
803  const Identifier Pixel_ModuleID = *wafer_it;
804  if(m_pixid->barrel_ec(Pixel_ModuleID) != 0) continue;
805  ++nPixModEC2;
806  for (PixelID::const_id_iterator wafer_it2=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
807  ++nPixModPixModEC;
808  const Identifier Pixel_ModuleID2 = *wafer_it2;
809  if(m_pixid->barrel_ec(Pixel_ModuleID2) != m_pixid->barrel_ec(Pixel_ModuleID))continue;
810  ++nPixModECPixModEC;
811  if(m_pixid->layer_disk(Pixel_ModuleID2) != m_pixid->layer_disk(Pixel_ModuleID))continue;
812  ++nSameLayer;
813  // require Pixel_ModuleID2 and Pixel_ModuleID from same stave:
814  if(m_pixid->phi_module(Pixel_ModuleID2) != m_pixid->phi_module(Pixel_ModuleID))continue;
815  if(Pixel_ModuleID == Pixel_ModuleID2)continue;
816  ++nNotIdentical;
817  (m_ModuleMap[Pixel_ModuleID2])->getPoints(Stavepoints,SurveyConstraintModule::Module);
818  (m_ModuleMap[Pixel_ModuleID])->addStaveConstraintPoint(Stavepoints);
819  }
820  }
821  msg(MSG::INFO) << "Loop 2, filling stave-points, nPixModB2 " << nPixModEC2
822  << ", nPixModPixModB " << nPixModPixModEC
823  << ", nPixModBPixModB " << nPixModECPixModEC
824  << ", nSameLayer " << nSameLayer
825  << ", nNotIdentical " << nNotIdentical
826  << endmsg;
827 
828  // SCT EC
829  nPixModEC2 = 0;nPixModPixModEC = 0;nPixModECPixModEC = 0;nSameLayer = 0;nNotIdentical = 0;
830  for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
831  const Identifier SCT_ModuleID = *wafer_it;
832  if(m_sctid->side(SCT_ModuleID) != 0) continue;
833  if(abs(m_sctid->barrel_ec(SCT_ModuleID)) != 2) continue;
834  ++nPixModEC2;
835  for (SCT_ID::const_id_iterator wafer_it2=m_sctid->wafer_begin(); wafer_it2!=m_sctid->wafer_end(); ++wafer_it2) {
836  ++nPixModPixModEC;
837  const Identifier SCT_ModuleID2 = *wafer_it2;
838  if(m_sctid->side(SCT_ModuleID2) != 0)continue;
839  if(m_sctid->barrel_ec(SCT_ModuleID2) != m_sctid->barrel_ec(SCT_ModuleID))continue;
840  ++nPixModECPixModEC;
841  if(m_sctid->layer_disk(SCT_ModuleID2) != m_sctid->layer_disk(SCT_ModuleID))continue;
842  ++nSameLayer;
843  //if(m_sctid->eta_module(SCT_ModuleID2) != m_sctid->eta_module(SCT_ModuleID))continue;
844  //if(SectorNumber(m_sctid->phi_module(SCT_ModuleID2)) != SectorNumber(m_sctid->phi_module(SCT_ModuleID)))continue;
845  if(SCT_ModuleID == SCT_ModuleID2)continue;
846  ++nNotIdentical;
847  (m_ModuleMap[SCT_ModuleID2])->getPoints(Stavepoints,SurveyConstraintModule::Module);
848  (m_ModuleMap[SCT_ModuleID])->addStaveConstraintPoint(Stavepoints);
849  }
850 
851  // ********************************************
852  // Do some tests for SCT EC module
853  if (m_sctid->barrel_ec(SCT_ModuleID)==2 &&
854  m_sctid->layer_disk(SCT_ModuleID)==0 &&
855  m_sctid->eta_module(SCT_ModuleID)==0 &&
856  m_sctid->side(SCT_ModuleID) == 0 &&
857  SectorNumber(m_sctid->phi_module(SCT_ModuleID)) == 0
858  ){
859  std::vector< SurveyConstraintPoint > Testpoints;
860  m_ModuleMap[SCT_ModuleID]->getPoints(Testpoints,SurveyConstraintModule::Stave);
861  msg(MSG::INFO) << "SurveyConstraint().setup_SurveyConstraintModules: Stavepoints.size() (from map) " << Testpoints.size() << endmsg;
862  }
863  // ********************************************
864 
865 
866  }
867  msg(MSG::INFO) << "Loop 2, filling stave-points, nSCTModEC2 " << nPixModEC2
868  << ", nSCTModSCTModEC " << nPixModPixModEC
869  << ", nSCTModECSCTModEC " << nPixModECPixModEC
870  << ", nSameLayer " << nSameLayer
871  << ", nNotIdentical " << nNotIdentical
872  << endmsg;
873 
874  // SCT B
875  nPixModEC2 = 0;nPixModPixModEC = 0;nPixModECPixModEC = 0;nSameLayer = 0;nNotIdentical = 0;
876  for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
877  const Identifier SCT_ModuleID = *wafer_it;
878  if(m_sctid->side(SCT_ModuleID) != 0) continue;
879  if(m_sctid->barrel_ec(SCT_ModuleID) != 0) continue;
880  ++nPixModEC2;
881  for (SCT_ID::const_id_iterator wafer_it2=m_sctid->wafer_begin(); wafer_it2!=m_sctid->wafer_end(); ++wafer_it2) {
882  ++nPixModPixModEC;
883  const Identifier SCT_ModuleID2 = *wafer_it2;
884  if(m_sctid->side(SCT_ModuleID2) != 0)continue;
885  if(m_sctid->barrel_ec(SCT_ModuleID2) != m_sctid->barrel_ec(SCT_ModuleID))continue;
886  ++nPixModECPixModEC;
887  if(m_sctid->layer_disk(SCT_ModuleID2) != m_sctid->layer_disk(SCT_ModuleID))continue;
888  ++nSameLayer;
889  // require SCT_ModuleID2 and SCT_ModuleID from same stave:
890  if(m_sctid->phi_module(SCT_ModuleID2) != m_sctid->phi_module(SCT_ModuleID))continue;
891  if(SCT_ModuleID == SCT_ModuleID2)continue;
892  ++nNotIdentical;
893  (m_ModuleMap[SCT_ModuleID2])->getPoints(Stavepoints,SurveyConstraintModule::Module);
894  (m_ModuleMap[SCT_ModuleID])->addStaveConstraintPoint(Stavepoints);
895  }
896  }
897  msg(MSG::INFO) << "Loop 2, filling stave-points, nSCTModB2 " << nPixModEC2
898  << ", nSCTModSCTModB " << nPixModPixModEC
899  << ", nSCTModBSCTModB " << nPixModECPixModEC
900  << ", nSameLayer " << nSameLayer
901  << ", nNotIdentical " << nNotIdentical
902  << endmsg;
903 
904 
905  // write out to Condstream1 and write out ntuple or textfile
906  if (m_surveywfile!=""){
909  if (StatusCode::SUCCESS!=m_survey_IDAlignDBTool->outputObjs())
910  msg(MSG::ERROR) << "Write of AlignableTransforms fails" << endmsg;
911  }
912 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TransformSector()

void SurveyConstraint::TransformSector ( Identifier  Pixel_ModuleID,
SurveyConstraintModule mut,
Amg::Vector3D current,
Amg::Transform3D  CurrentTransRandSect 
)
virtual

Implements ISurveyConstraint.

Definition at line 1054 of file SurveyConstraint.cxx.

1057  {
1058  // get rotation angle phi (in global coordinates) to go from module to sector
1059  // coordinate frame
1060  double phi = PhiModuleToSector(m_pixid->phi_module(Pixel_ModuleID));
1061  // transform current point from module to sector coordinate frame
1063  // get global to module's (which is now sector's) local transformation
1064  Amg::Transform3D globaltolocal = mut->get_globaltolocal();
1065  // Transform the points into the sector's local coordinate system
1066  current = globaltolocal * current;
1067  // do the actual sector transformation
1068  current = SurveyTransRandSect * current ;
1069  // go back to global
1070  Amg::Transform3D localtoglobal = globaltolocal.inverse();
1071  current = localtoglobal * current ;
1072  // transform current point back from sector to module coordinate frame
1073  current = Amg::AngleAxis3D(-phi, Amg::Vector3D(0.,0.,1.)) * current ;
1074 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_aligndbtoolinst

std::string SurveyConstraint::m_aligndbtoolinst
private

Definition at line 133 of file SurveyConstraint.h.

◆ m_current_IDAlignDBTool

IInDetAlignDBTool* SurveyConstraint::m_current_IDAlignDBTool
private

Definition at line 71 of file SurveyConstraint.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_FullDisk

bool SurveyConstraint::m_FullDisk
private

use Full Disk

Definition at line 130 of file SurveyConstraint.h.

◆ m_gaus

bool SurveyConstraint::m_gaus
private

use random (Gaus) rotations and translations

Definition at line 120 of file SurveyConstraint.h.

◆ m_gausSect

bool SurveyConstraint::m_gausSect
private

use random (Gaus) rotations and translations for sectors

Definition at line 129 of file SurveyConstraint.h.

◆ m_idHelper

const AtlasDetectorID* SurveyConstraint::m_idHelper
private

Definition at line 65 of file SurveyConstraint.h.

◆ m_misaligncase

int SurveyConstraint::m_misaligncase
private

misaligncase

Definition at line 128 of file SurveyConstraint.h.

◆ m_ModuleMap

std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> > SurveyConstraint::m_ModuleMap
private

Map of Wafer objects.

Definition at line 79 of file SurveyConstraint.h.

◆ m_ntuple

bool SurveyConstraint::m_ntuple
private

Definition at line 137 of file SurveyConstraint.h.

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SurveyConstraint::m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
private

Definition at line 75 of file SurveyConstraint.h.

◆ m_pixid

const PixelID* SurveyConstraint::m_pixid
private

Definition at line 66 of file SurveyConstraint.h.

◆ m_proximity

double SurveyConstraint::m_proximity
private

Proximity of Survey points used for alignment of SOW.

Definition at line 132 of file SurveyConstraint.h.

◆ m_randsvc

IRndmGenSvc* SurveyConstraint::m_randsvc
private

Definition at line 73 of file SurveyConstraint.h.

◆ m_RotX

double SurveyConstraint::m_RotX
private

Rotation in X of the first current PixEC module.

Definition at line 92 of file SurveyConstraint.h.

◆ m_RotX2

double SurveyConstraint::m_RotX2
private

Rotation in X (after Y & Z) of the first current PixEC module.

Definition at line 93 of file SurveyConstraint.h.

◆ m_RotXRand

double SurveyConstraint::m_RotXRand
private

Weight & rand Rotation in X of current PixEC modules.

Definition at line 99 of file SurveyConstraint.h.

◆ m_RotXRandPixB

double SurveyConstraint::m_RotXRandPixB
private

Weight & rand Rotation in X of current PixB modules.

Definition at line 105 of file SurveyConstraint.h.

◆ m_RotXRandSCTB

double SurveyConstraint::m_RotXRandSCTB
private

Weight & rand Rotation in X of current SCTB modules.

Definition at line 117 of file SurveyConstraint.h.

◆ m_RotXRandSCTEC

double SurveyConstraint::m_RotXRandSCTEC
private

Weight & rand Rotation in X of current SCTEC modules.

Definition at line 111 of file SurveyConstraint.h.

◆ m_RotXRandSect

double SurveyConstraint::m_RotXRandSect
private

rand Rotation in X of current PixEC sectors

Definition at line 124 of file SurveyConstraint.h.

◆ m_RotY

double SurveyConstraint::m_RotY
private

Rotation in Y of the first current PixEC module.

Definition at line 94 of file SurveyConstraint.h.

◆ m_RotYRand

double SurveyConstraint::m_RotYRand
private

Weight & rand Rotation in Y of current PixEC modules.

Definition at line 100 of file SurveyConstraint.h.

◆ m_RotYRandPixB

double SurveyConstraint::m_RotYRandPixB
private

Weight & rand Rotation in Y of current PixB modules.

Definition at line 106 of file SurveyConstraint.h.

◆ m_RotYRandSCTB

double SurveyConstraint::m_RotYRandSCTB
private

Weight & rand Rotation in Y of current SCTB modules.

Definition at line 118 of file SurveyConstraint.h.

◆ m_RotYRandSCTEC

double SurveyConstraint::m_RotYRandSCTEC
private

Weight & rand Rotation in Y of current SCTEC modules.

Definition at line 112 of file SurveyConstraint.h.

◆ m_RotYRandSect

double SurveyConstraint::m_RotYRandSect
private

rand Rotation in Y of current PixEC sectors

Definition at line 125 of file SurveyConstraint.h.

◆ m_RotZ

double SurveyConstraint::m_RotZ
private

Rotation in Z of the first current PixEC module.

Definition at line 95 of file SurveyConstraint.h.

◆ m_RotZRand

double SurveyConstraint::m_RotZRand
private

Weight & rand Rotation in Z of current PixEC modules

Definition at line 101 of file SurveyConstraint.h.

◆ m_RotZRandPixB

double SurveyConstraint::m_RotZRandPixB
private

Weight & rand Rotation in Z of current PixB modules

Definition at line 107 of file SurveyConstraint.h.

◆ m_RotZRandSCTB

double SurveyConstraint::m_RotZRandSCTB
private

Weight & rand Rotation in Z of current SCTB modules

Definition at line 119 of file SurveyConstraint.h.

◆ m_RotZRandSCTEC

double SurveyConstraint::m_RotZRandSCTEC
private

Weight & rand Rotation in Z of current SCTEC modules

Definition at line 113 of file SurveyConstraint.h.

◆ m_RotZRandSect

double SurveyConstraint::m_RotZRandSect
private

rand Rotation in Z of current PixEC sectors

Definition at line 126 of file SurveyConstraint.h.

◆ m_scaleZ

double SurveyConstraint::m_scaleZ
private

scale Z coordinate to match sensitivity

Definition at line 131 of file SurveyConstraint.h.

◆ m_SCTDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SurveyConstraint::m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
private

Definition at line 76 of file SurveyConstraint.h.

◆ m_sctid

const SCT_ID* SurveyConstraint::m_sctid
private

Definition at line 67 of file SurveyConstraint.h.

◆ m_survey_IDAlignDBTool

IInDetAlignDBTool* SurveyConstraint::m_survey_IDAlignDBTool
private

Definition at line 72 of file SurveyConstraint.h.

◆ m_surveydbtoolinst

std::string SurveyConstraint::m_surveydbtoolinst
private

Definition at line 134 of file SurveyConstraint.h.

◆ m_surveyrfile

std::string SurveyConstraint::m_surveyrfile
private

Definition at line 136 of file SurveyConstraint.h.

◆ m_SurveyWeightPhiX

double SurveyConstraint::m_SurveyWeightPhiX
private

""

Definition at line 86 of file SurveyConstraint.h.

◆ m_SurveyWeightPhiY

double SurveyConstraint::m_SurveyWeightPhiY
private

""

Definition at line 87 of file SurveyConstraint.h.

◆ m_SurveyWeightPhiZ

double SurveyConstraint::m_SurveyWeightPhiZ
private

""

Definition at line 88 of file SurveyConstraint.h.

◆ m_SurveyWeightX

double SurveyConstraint::m_SurveyWeightX
private

Multiplicative weight, representing systematic unc.

of survey

Definition at line 82 of file SurveyConstraint.h.

◆ m_SurveyWeightY

double SurveyConstraint::m_SurveyWeightY
private

""

Definition at line 84 of file SurveyConstraint.h.

◆ m_SurveyWeightZ

double SurveyConstraint::m_SurveyWeightZ
private

""

Definition at line 85 of file SurveyConstraint.h.

◆ m_surveywfile

std::string SurveyConstraint::m_surveywfile
private

Definition at line 135 of file SurveyConstraint.h.

◆ m_toolsvc

IToolSvc* SurveyConstraint::m_toolsvc
private

Pointer to tool service.

Definition at line 70 of file SurveyConstraint.h.

◆ m_TransLayerRand

double SurveyConstraint::m_TransLayerRand
private

rand Translation in X,Y,Z of all Pixel/SCT EC/B layers

Definition at line 127 of file SurveyConstraint.h.

◆ m_TransX

double SurveyConstraint::m_TransX
private

Translation in X of the first current PixEC module.

Definition at line 89 of file SurveyConstraint.h.

◆ m_TransXRand

double SurveyConstraint::m_TransXRand
private

Weight & rand Translation in X of current PixEC modules.

Definition at line 96 of file SurveyConstraint.h.

◆ m_TransXRandPixB

double SurveyConstraint::m_TransXRandPixB
private

Weight & rand Translation in X of current PixB modules.

Definition at line 102 of file SurveyConstraint.h.

◆ m_TransXRandSCTB

double SurveyConstraint::m_TransXRandSCTB
private

Weight & rand Translation in X of current SCTB modules.

Definition at line 114 of file SurveyConstraint.h.

◆ m_TransXRandSCTEC

double SurveyConstraint::m_TransXRandSCTEC
private

Weight & rand Translation in X of current SCTEC modules.

Definition at line 108 of file SurveyConstraint.h.

◆ m_TransXRandSect

double SurveyConstraint::m_TransXRandSect
private

rand Translation in X of current PixEC sectors

Definition at line 121 of file SurveyConstraint.h.

◆ m_TransY

double SurveyConstraint::m_TransY
private

Translation in Y of the first current PixEC module.

Definition at line 90 of file SurveyConstraint.h.

◆ m_TransYRand

double SurveyConstraint::m_TransYRand
private

Weight & rand Translation in Y of current PixEC modules.

Definition at line 97 of file SurveyConstraint.h.

◆ m_TransYRandPixB

double SurveyConstraint::m_TransYRandPixB
private

Weight & rand Translation in Y of current PixB modules.

Definition at line 103 of file SurveyConstraint.h.

◆ m_TransYRandSCTB

double SurveyConstraint::m_TransYRandSCTB
private

Weight & rand Translation in Y of current SCTB modules.

Definition at line 115 of file SurveyConstraint.h.

◆ m_TransYRandSCTEC

double SurveyConstraint::m_TransYRandSCTEC
private

Weight & rand Translation in Y of current SCTEC modules.

Definition at line 109 of file SurveyConstraint.h.

◆ m_TransYRandSect

double SurveyConstraint::m_TransYRandSect
private

rand Translation in Y of current PixEC sectors

Definition at line 122 of file SurveyConstraint.h.

◆ m_TransZ

double SurveyConstraint::m_TransZ
private

Translation in Z of the first current PixEC module.

Definition at line 91 of file SurveyConstraint.h.

◆ m_TransZRand

double SurveyConstraint::m_TransZRand
private

Weight & rand Translation in Z of current PixEC modules.

Definition at line 98 of file SurveyConstraint.h.

◆ m_TransZRandPixB

double SurveyConstraint::m_TransZRandPixB
private

Weight & rand Translation in Z of current PixB modules.

Definition at line 104 of file SurveyConstraint.h.

◆ m_TransZRandSCTB

double SurveyConstraint::m_TransZRandSCTB
private

Weight & rand Translation in Z of current SCTB modules.

Definition at line 116 of file SurveyConstraint.h.

◆ m_TransZRandSCTEC

double SurveyConstraint::m_TransZRandSCTEC
private

Weight & rand Translation in Z of current SCTEC modules.

Definition at line 110 of file SurveyConstraint.h.

◆ m_TransZRandSect

double SurveyConstraint::m_TransZRandSect
private

rand Translation in Z of current PixEC sectors

Definition at line 123 of file SurveyConstraint.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
SurveyConstraint::m_TransXRandSCTB
double m_TransXRandSCTB
Weight & rand Translation in X of current SCTB modules.
Definition: SurveyConstraint.h:114
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
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
IInDetAlignDBTool::getTrans
virtual Amg::Transform3D getTrans(const Identifier &, const int) const =0
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SurveyConstraint::m_ModuleMap
std::map< Identifier, SurveyConstraintModule *, std::less< Identifier > > m_ModuleMap
Map of Wafer objects.
Definition: SurveyConstraint.h:79
PixelID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: PixelID.h:72
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
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
SurveyConstraint::m_RotXRand
double m_RotXRand
Weight & rand Rotation in X of current PixEC modules.
Definition: SurveyConstraint.h:99
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SurveyConstraint::m_SurveyWeightPhiX
double m_SurveyWeightPhiX
""
Definition: SurveyConstraint.h:86
PixelID::wafer_end
const_id_iterator wafer_end(void) const
Definition: PixelID.cxx:925
SurveyConstraint::m_RotXRandSect
double m_RotXRandSect
rand Rotation in X of current PixEC sectors
Definition: SurveyConstraint.h:124
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
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
SurveyConstraintModule::get_globaltolocal
Amg::Transform3D get_globaltolocal()
Definition: SurveyConstraintModule.h:87
SurveyConstraint::getWeightSCTEC
virtual int getWeightSCTEC(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:952
SurveyConstraint::m_FullDisk
bool m_FullDisk
use Full Disk
Definition: SurveyConstraint.h:130
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
SimpleConstraintPointMinimizer
Definition: SimpleConstraintPointMinimizer.h:20
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::m_pixid
const PixelID * m_pixid
Definition: SurveyConstraint.h:66
skel.it
it
Definition: skel.GENtoEVGEN.py:423
SurveyConstraint::getWeightSCTB
virtual int getWeightSCTB(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:970
PlotCalibFromCool.modmin
modmin
Definition: PlotCalibFromCool.py:82
PixelID::wafer_begin
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
Definition: PixelID.cxx:921
SCT_ID::wafer_begin
const_id_iterator wafer_begin(void) const
Iterators over full set of ids. Wafer iterator is sorted.
Definition: SCT_ID.cxx:648
SurveyConstraint::m_TransYRand
double m_TransYRand
Weight & rand Translation in Y of current PixEC modules.
Definition: SurveyConstraint.h:97
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
SurveyConstraintPoint::scaleZ
void scaleZ(float scale)
Definition: SurveyConstraintPoint.h:75
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
SurveyConstraint::getWeightPixEC
virtual int getWeightPixEC(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:916
SCT_ID::const_id_iterator
std::vector< Identifier >::const_iterator const_id_iterator
Definition: SCT_ID.h:73
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
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
SurveyConstraint::m_aligndbtoolinst
std::string m_aligndbtoolinst
Definition: SurveyConstraint.h:133
IInDetAlignDBTool::readTextFile
virtual void readTextFile(const std::string &) const =0
SurveyConstraint::m_gaus
bool m_gaus
use random (Gaus) rotations and translations
Definition: SurveyConstraint.h:120
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SurveyConstraintModule::set_globaltolocal
void set_globaltolocal(Amg::Transform3D &globaltolocal)
Definition: SurveyConstraintModule.cxx:123
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
SurveyConstraintModule::addModuleConstraintPoint
void addModuleConstraintPoint(const SurveyConstraintPoint &cPoint)
Definition: SurveyConstraintModule.cxx:118
SurveyConstraint::m_SurveyWeightZ
double m_SurveyWeightZ
""
Definition: SurveyConstraint.h:85
IInDetAlignDBTool::outputObjs
virtual StatusCode outputObjs()=0
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
AthCommonDataStore
Definition: AthCommonDataStore.h:52
python.changerun.m1
m1
Definition: changerun.py:32
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SurveyConstraint::m_RotZRandSCTEC
double m_RotZRandSCTEC
Weight & rand Rotation in Z of current SCTEC modules
Definition: SurveyConstraint.h:113
SurveyConstraint::GlobalToLocal
virtual void GlobalToLocal(SurveyConstraintModule *mut, std::vector< SurveyConstraintPoint > &points)
Definition: SurveyConstraint.cxx:1040
SurveyConstraint::m_TransXRandSect
double m_TransXRandSect
rand Translation in X of current PixEC sectors
Definition: SurveyConstraint.h:121
SurveyConstraint::getWeightPixB
virtual int getWeightPixB(Amg::MatrixX &weight)
Definition: SurveyConstraint.cxx:934
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
IInDetAlignDBTool::readNtuple
virtual void readNtuple(const std::string &) const =0
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
SurveyConstraint::m_RotYRandPixB
double m_RotYRandPixB
Weight & rand Rotation in Y of current PixB modules.
Definition: SurveyConstraint.h:106
SurveyConstraintModule::Module
@ Module
Definition: SurveyConstraintModule.h:27
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
IInDetAlignDBTool::createDB
virtual void createDB() const =0
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
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
SurveyConstraint::m_randsvc
IRndmGenSvc * m_randsvc
Definition: SurveyConstraint.h:73
SurveyConstraint::setup_SurveyConstraintModules
virtual void setup_SurveyConstraintModules()
Definition: SurveyConstraint.cxx:434
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
IInDetAlignDBTool::dispGroup
virtual void dispGroup(const int, const int, const int, const int, const int, const float, const float, const float, const int, const int, const int) const =0
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SurveyConstraint::m_RotYRandSect
double m_RotYRandSect
rand Rotation in Y of current PixEC sectors
Definition: SurveyConstraint.h:125
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
SurveyConstraint::m_TransZRandPixB
double m_TransZRandPixB
Weight & rand Translation in Z of current PixB modules.
Definition: SurveyConstraint.h:104
IInDetAlignDBTool::writeFile
virtual void writeFile(const bool, const std::string &) const =0
SurveyConstraintPoint
Definition: SurveyConstraintPoint.h:25
SurveyConstraint::m_RotYRandSCTB
double m_RotYRandSCTB
Weight & rand Rotation in Y of current SCTB modules.
Definition: SurveyConstraint.h:118
a
TList * a
Definition: liststreamerinfos.cxx:10
h
SurveyConstraint::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: SurveyConstraint.h:75
python.SystemOfUnits.gauss
int gauss
Definition: SystemOfUnits.py:230
SurveyConstraintModule::set_DOCA_Vector
void set_DOCA_Vector(Amg::VectorX &DOCA_Vector)
Definition: SurveyConstraintModule.cxx:126
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
DeMoScan.first
bool first
Definition: DeMoScan.py:534
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
DEBUG
#define DEBUG
Definition: page_access.h:11
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
SurveyConstraint::m_RotXRandSCTEC
double m_RotXRandSCTEC
Weight & rand Rotation in X of current SCTEC modules.
Definition: SurveyConstraint.h:111
SCT_ID::wafer_end
const_id_iterator wafer_end(void) const
Definition: SCT_ID.cxx:652
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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
SurveyConstraint::m_TransYRandSCTEC
double m_TransYRandSCTEC
Weight & rand Translation in Y of current SCTEC modules.
Definition: SurveyConstraint.h:109
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
SurveyConstraint::m_TransLayerRand
double m_TransLayerRand
rand Translation in X,Y,Z of all Pixel/SCT EC/B layers
Definition: SurveyConstraint.h:127
IInDetAlignDBTool::setTrans
virtual bool setTrans(const Identifier &, const int, const Amg::Transform3D &) const =0
SurveyConstraintModule
Definition: SurveyConstraintModule.h:24
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
SurveyConstraint::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SurveyConstraint.h:76
python.SystemOfUnits.m3
int m3
Definition: SystemOfUnits.py:93
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
SurveyConstraintModule::Stave
@ Stave
Definition: SurveyConstraintModule.h:27
fitman.k
k
Definition: fitman.py:528
SurveyConstraint::m_RotXRandSCTB
double m_RotXRandSCTB
Weight & rand Rotation in X of current SCTB modules.
Definition: SurveyConstraint.h:117