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

#include <AlignModule.h>

Inheritance diagram for Trk::AlignModule:
Collaboration diagram for Trk::AlignModule:

Public Types

enum  TransformParameters {
  TransX =0, TransY, TransZ, RotX,
  RotY, RotZ, BowX, BowY,
  BowZ, NTransformPar, MaxNPar =10
}
 enum to keep track of transformation coordinates More...
 
enum  DetectorType {
  unidentified =0, Pixel, SCT, TRT,
  MDT, CSC, RPC, TGC,
  NDetectorTypes
}
 
typedef std::vector< const TrkDetElementBase * > DetElementCollection
 typedefs to contain detector element pointers and transforms More...
 
typedef std::vector< IdentifierIdentifierCollection
 
typedef std::vector< Amg::Transform3DTransformCollection
 

Public Member Functions

 AlignModule (const AlgTool *algtool, const Amg::Transform3D &globalToAlignXform=Amg::Transform3D::Identity(), const std::string &name="")
 constructor creates MsgStream with output level of parent tool and AlignModule for name. More...
 
 AlignModule ()=delete
 
 AlignModule (const AlignModule &rhs)=delete
 forbid copy constructor More...
 
AlignModuleoperator= (const AlignModule &rhs)=delete
 forbid assignment More...
 
virtual ~AlignModule ()
 
void setName (const std::string &name)
 Set and return name of align module (i.e. More...
 
const std::string & name () const
 
IdentifierHash identifyHash () const
 Set and return index of module, used by alignment classes to keep track of order of align module. More...
 
void setIdHash (IdentifierHash id)
 
void setIdentifier (Identifier identifier)
 Set and return identifier of module. More...
 
Identifier identify () const
 
unsigned int identify32 () const
 returns 32-bit compact identifier More...
 
const Amg::Transform3DglobalFrameToAlignFrame () const
 returns global frame to alignment frame More...
 
const Amg::RotationMatrix3DglobalToAlignFrameRotation () const
 returns global to alignment frame transforms More...
 
const Amg::Vector3DglobalToAlignFrameTranslation () const
 
void setGlobalFrameToAlignFrameTransform (const Amg::Transform3D &t)
 set global to alignment frame transforms More...
 
void setAlignParShift (const AlignPar *alignPar) const
 set values for a set of alignment parameters and errors More...
 
const DetElementCollectiondetElementCollection (AlignModule::DetectorType detType) const
 returns collection of detector elements More...
 
const IdentifierCollectionidentifierCollection (AlignModule::DetectorType detType) const
 returns collection of Identifiers More...
 
const std::vector< Amg::Transform3D > * alignModuleToDetElementTransforms (AlignModule::DetectorType detType)
 returns align module to detector element transforms More...
 
const Amg::Transform3DalignModuleToDetElementTransform (AlignModule::DetectorType detType, const TrkDetElementBase *det, const Identifier id=Identifier()) const
 returns AlignModule to DetElement transform for a detector element More...
 
void addDetElement (AlignModule::DetectorType detType, const TrkDetElementBase *det, const Amg::Transform3D &transform, Identifier id=Identifier())
 used to add a detector element to the align module with a align frame to detector element local frame transform More...
 
void setNChamberShifts (int nShifts)
 Used only for numerical derivatives. More...
 
int nChamberShifts () const
 
void setChi2VAlignParamArray (double **chi2VAlignParam)
 Used only for numerical derivatives to get chi2 as a function of alignment parameters. More...
 
double ** chi2VAlignParamArray () const
 
void setChi2VAlignParamXArray (double **chi2VAlignParamX)
 sets the values of chamber shifts in array More...
 
double ** chi2VAlignParamXArray () const
 
void setChi2VAlignParamArrayMeasType (int measType, double **chi2VAlignParam)
 vector of arrays of chamber shifts and chi2, one for each type of TrackState::MeasurementType More...
 
double ** chi2VAlignParamArrayMeasType (int measType) const
 
void addTrack (int ntracks=1)
 Increments and returns number of tracks passing through align module. More...
 
int nTracks () const
 
void setNTracks (int ntracks)
 
void addTrackChi2 (double chi2)
 Increments and returns chi2 of tracks passing through align module. More...
 
double trackChi2 () const
 
void setTrackChi2 (double chi2)
 
void addHit (int nhits=1)
 Increments and returns number of hits in align module. More...
 
int nHits () const
 
void setNHits (int nhits)
 
void addNDoF (int nDoF)
 Increments and returns number of degrees of freedom for tracks passing through align module. More...
 
int nDoF () const
 
void setNDoF (int nDoF)
 
Amg::Vector3D centerOfGravity () const
 
void shiftSurface (TrkDetElementBase *, Identifier) const
 
void restoreSurfaces (TrkDetElementBase *) const
 
Amg::Transform3D calculateAlignModuleToGlobal () const
 Calculates Align to Global transform based on the TrkDetElementBase in the alignmodule. More...
 
void resetAlignModuleToDetElementTransforms ()
 Reset align module to detector element transforms based on the AlignModuleToGlobal transform and the global to DetElementTransform. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Static Public Member Functions

static Amg::Vector3D centerOfGravity (const std::vector< DetElementCollection * > &)
 Calculates center of gravity (average center of associated det-elements) More...
 

Protected Attributes

std::vector< DetElementCollection * > m_detelements
 
std::vector< IdentifierCollection * > m_detIdentifiers
 
std::vector< std::vector< Amg::Transform3D > * > m_alignModuleToDetElementTransforms
 

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

Amg::Transform3D m_globalToAlignFrameTransform
 
Amg::RotationMatrix3D m_globalToAlignFrameRotation
 
Amg::Vector3D m_globalToAlignFrameTranslation
 
int m_nChamberShifts
 
double ** m_chi2VAlignParam
 
double ** m_chi2VAlignParamX
 
double *** m_chi2VAlignParamMeasType
 
std::string m_name
 
IdentifierHash m_idHash
 
Identifier m_identifier
 
int m_ntracks
 
int m_nhits
 
double m_trackchi2
 
int m_nDoF
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Definition at line 45 of file AlignModule.h.

Member Typedef Documentation

◆ DetElementCollection

typedefs to contain detector element pointers and transforms

Definition at line 60 of file AlignModule.h.

◆ IdentifierCollection

Definition at line 61 of file AlignModule.h.

◆ TransformCollection

Definition at line 62 of file AlignModule.h.

Member Enumeration Documentation

◆ DetectorType

Enumerator
unidentified 
Pixel 
SCT 
TRT 
MDT 
CSC 
RPC 
TGC 
NDetectorTypes 

Definition at line 57 of file AlignModule.h.

◆ TransformParameters

enum to keep track of transformation coordinates

Enumerator
TransX 
TransY 
TransZ 
RotX 
RotY 
RotZ 
BowX 
BowY 
BowZ 
NTransformPar 
MaxNPar 

Definition at line 54 of file AlignModule.h.

54  { TransX=0, TransY, TransZ, RotX, RotY, RotZ, BowX, BowY, BowZ,
55  NTransformPar, MaxNPar=10 };

Constructor & Destructor Documentation

◆ AlignModule() [1/3]

AlignModule::AlignModule ( const AlgTool *  algtool,
const Amg::Transform3D globalToAlignXform = Amg::Transform3D::Identity(),
const std::string &  name = "" 
)

constructor creates MsgStream with output level of parent tool and AlignModule for name.

Transform is global to align frame transform

Definition at line 23 of file AlignModule.cxx.

26  : AthMessaging("AlignModule")
29  , m_alignModuleToDetElementTransforms(AlignModule::NDetectorTypes, (std::vector<Amg::Transform3D>*)nullptr)
30  , m_nChamberShifts(8)
31  , m_chi2VAlignParam(nullptr)
32  , m_chi2VAlignParamX(nullptr)
34  , m_name(name)
35  , m_ntracks(0)
36  , m_nhits(0)
37  , m_trackchi2(0.)
38  , m_nDoF(0)
39  {
42 
43  const AthAlgTool* athAlgTool=dynamic_cast<const AthAlgTool*>(algtool);
44  if (athAlgTool)
45  this->setLevel(athAlgTool->msg().level());
46 
48  }

◆ AlignModule() [2/3]

Trk::AlignModule::AlignModule ( )
delete

◆ AlignModule() [3/3]

Trk::AlignModule::AlignModule ( const AlignModule rhs)
delete

forbid copy constructor

◆ ~AlignModule()

AlignModule::~AlignModule ( )
virtual

Definition at line 51 of file AlignModule.cxx.

52  {
53  delete [] m_chi2VAlignParamMeasType;
54  }

Member Function Documentation

◆ addDetElement()

void AlignModule::addDetElement ( AlignModule::DetectorType  detType,
const TrkDetElementBase det,
const Amg::Transform3D transform,
Identifier  id = Identifier() 
)

used to add a detector element to the align module with a align frame to detector element local frame transform

Definition at line 126 of file AlignModule.cxx.

130  {
131  ATH_MSG_DEBUG("adding detElement "<<det->identify()<<", detType "<<detType);
132  if (!m_detelements[detType])
133  m_detelements[detType]=new DetElementCollection;
134 
135  m_detelements[detType]->push_back(det);
136 
137  if (id.is_valid()) {
138  if(!m_detIdentifiers[detType])
139  m_detIdentifiers[detType] = new IdentifierCollection;
140  m_detIdentifiers[detType]->push_back(id);
141  }
142 
144  m_alignModuleToDetElementTransforms[detType]=new std::vector<Amg::Transform3D>;
145 
146  m_alignModuleToDetElementTransforms[detType]->push_back(transform);
147  }

◆ addHit()

void Trk::AlignModule::addHit ( int  nhits = 1)
inline

Increments and returns number of hits in align module.

Definition at line 186 of file AlignModule.h.

186 { m_nhits+=nhits; }

◆ addNDoF()

void Trk::AlignModule::addNDoF ( int  nDoF)
inline

Increments and returns number of degrees of freedom for tracks passing through align module.

Definition at line 192 of file AlignModule.h.

192 { m_nDoF+=nDoF; }

◆ addTrack()

void Trk::AlignModule::addTrack ( int  ntracks = 1)
inline

Increments and returns number of tracks passing through align module.

Definition at line 176 of file AlignModule.h.

176 { m_ntracks+=ntracks; }

◆ addTrackChi2()

void Trk::AlignModule::addTrackChi2 ( double  chi2)
inline

Increments and returns chi2 of tracks passing through align module.

Definition at line 181 of file AlignModule.h.

181 { m_trackchi2+=chi2; }

◆ alignModuleToDetElementTransform()

const Amg::Transform3D * AlignModule::alignModuleToDetElementTransform ( AlignModule::DetectorType  detType,
const TrkDetElementBase det,
const Identifier  id = Identifier() 
) const

returns AlignModule to DetElement transform for a detector element

Definition at line 150 of file AlignModule.cxx.

154  {
155  std::vector<Amg::Transform3D>* alignModToDetElemTransform=m_alignModuleToDetElementTransforms[detType];
156 
157  if(m_detIdentifiers[detType] && !m_detIdentifiers[detType]->empty()) {
158  if(id.is_valid()) {
160  for (int i=0;i<(int)alignModToDetElemTransform->size();i++)
161  if ((*ids)[i]==id)
162  return &(*alignModToDetElemTransform)[i];
163  }
164  return nullptr;
165  }
166 
167  DetElementCollection* detElements=m_detelements[detType];
168  for (int i=0;i<(int)alignModToDetElemTransform->size();i++)
169  if ((*detElements)[i]==det)
170  return &(*alignModToDetElemTransform)[i];
171 
172 
173  return nullptr;
174  }

◆ alignModuleToDetElementTransforms()

const std::vector<Amg::Transform3D>* Trk::AlignModule::alignModuleToDetElementTransforms ( AlignModule::DetectorType  detType)
inline

returns align module to detector element transforms

Definition at line 134 of file AlignModule.h.

134 { return m_alignModuleToDetElementTransforms[detType]; }

◆ calculateAlignModuleToGlobal()

Amg::Transform3D AlignModule::calculateAlignModuleToGlobal ( ) const

Calculates Align to Global transform based on the TrkDetElementBase in the alignmodule.

Caluluate Align to Global transform based on the TrkDetElementBase in the alignmodule.

Definition at line 214 of file AlignModule.cxx.

215  {
216  // returns the center of gravity in the global frame
217  // calculate the 'center' of this module
218  double sumx(0),sumy(0),sumz(0);
219  double sumRx(0),sumRy(0),sumRz(0);
220  size_t n(0);
221  for (auto *detelements : m_detelements) {
222  if (!detelements)
223  continue;
224 
225  double trans[6];
226  for(const auto *detelement : *detelements) {
227  decomposeTransform( detelement->transform(), trans);
228  sumx += trans[0];
229  sumy += trans[1];
230  sumz += trans[2];
231  sumRx += trans[3];
232  sumRy += trans[4];
233  sumRz += trans[5];
234  ATH_MSG_DEBUG(n << " " << trans[0] << " "<< trans[1] << " " << trans[2]
235  << " "<< trans[3] << " " << trans[4] << " "<< trans[5]);
236  ++n;
237 
238 // Amg::Translation3D surfaceCentre( trans[0],trans[1],trans[2] );
239 // Amg::Transform3D newtrans = surfaceCentre * Amg::RotationMatrix3D::Identity();
240 // newtrans *= Amg::AngleAxis3D(trans[5], Amg::Vector3D(0.,0.,1.));
241 // newtrans *= Amg::AngleAxis3D(trans[4], Amg::Vector3D(0.,1.,0.));
242 // newtrans *= Amg::AngleAxis3D(trans[3], Amg::Vector3D(1.,0.,0.));
243 //
244 // decomposeTransform( newtrans, trans);
245 //
246 // std::cout << " Check " << trans[0] << " "<< trans[1] << " " << trans[2] << " "<< trans[3] << " " << trans[4] << " "<< trans[5] << " "<< std::endl;
247 //
248 //
249 // Amg::Translation3D surfaceCentre2( trans[0],trans[1],trans[2] );
250 // Amg::Transform3D newtrans2 = surfaceCentre * Amg::RotationMatrix3D::Identity();
251 // newtrans2 *= Amg::AngleAxis3D(trans[5], Amg::Vector3D(0.,0.,1.));
252 // newtrans2 *= Amg::AngleAxis3D(trans[4], Amg::Vector3D(0.,1.,0.));
253 // newtrans2 *= Amg::AngleAxis3D(trans[3], Amg::Vector3D(1.,0.,0.));
254 //
255 // decomposeTransform( newtrans2, trans);
256 //
257 // std::cout << " Check2 " << trans[0] << " "<< trans[1] << " " << trans[2] << " "<< trans[3] << " " << trans[4] << " "<< trans[5] << " "<< std::endl;
258 
259 
260  }
261  }
262 
263  if (n==0)
264  return Amg::Transform3D::Identity();
265 
266  double oneOnN = 1./(double)n;
267 
268  ATH_MSG_DEBUG(" SUM " << oneOnN << " " << sumx*oneOnN << " "<< sumy*oneOnN
269  << " " << sumz*oneOnN << " "<< sumRx*oneOnN << " " << sumRy*oneOnN << " "<< sumRz*oneOnN);
270 
271 
272  Amg::Translation3D surfaceCentre( sumx*oneOnN, sumy*oneOnN, sumz*oneOnN );
273  Amg::Transform3D newtrans = surfaceCentre * Amg::RotationMatrix3D::Identity();
274  newtrans *= Amg::AngleAxis3D(sumRz*oneOnN, Amg::Vector3D(0.,0.,1.));
275  newtrans *= Amg::AngleAxis3D(sumRy*oneOnN, Amg::Vector3D(0.,1.,0.));
276  newtrans *= Amg::AngleAxis3D(sumRx*oneOnN, Amg::Vector3D(1.,0.,0.));
277 
278 
279  Amg::Translation3D newtranslation(0,0,0);
280  Amg::Transform3D test = newtranslation * Amg::RotationMatrix3D::Identity();
281  test *= Amg::AngleAxis3D(M_PI * 0.25, Amg::Vector3D(0.,0.,1.));
282 
283  return newtrans;
284  }

◆ centerOfGravity() [1/2]

Amg::Vector3D AlignModule::centerOfGravity ( ) const

Definition at line 119 of file AlignModule.cxx.

120  {
122  }

◆ centerOfGravity() [2/2]

Amg::Vector3D AlignModule::centerOfGravity ( const std::vector< DetElementCollection * > &  detelementsVec)
static

Calculates center of gravity (average center of associated det-elements)

Definition at line 95 of file AlignModule.cxx.

96  {
97  // returns the center of gravity in the global frame
98  // calculate the 'center' of this module
99  double sumx(0),sumy(0),sumz(0);
100  size_t n(0);
101  for (auto *detelements : detelementsVec) {
102  if (!detelements)
103  continue;
104 
105  for(const auto *detelement : *detelements) {
106  sumx += detelement->surface().center().x();
107  sumy += detelement->surface().center().y();
108  sumz += detelement->surface().center().z();
109  }
110  n += detelements->size();
111  }
112 
113  if (n!=0) return Amg::Vector3D( sumx/n, sumy/n, sumz/n);
114  else return Amg::Vector3D(0.0,0.0,0.0);
115 
116  }

◆ chi2VAlignParamArray()

double** Trk::AlignModule::chi2VAlignParamArray ( ) const
inline

Definition at line 161 of file AlignModule.h.

161 { return m_chi2VAlignParam; }

◆ chi2VAlignParamArrayMeasType()

double** Trk::AlignModule::chi2VAlignParamArrayMeasType ( int  measType) const
inline

Definition at line 169 of file AlignModule.h.

169 { return m_chi2VAlignParamMeasType[measType]; }

◆ chi2VAlignParamXArray()

double** Trk::AlignModule::chi2VAlignParamXArray ( ) const
inline

Definition at line 165 of file AlignModule.h.

165 { return m_chi2VAlignParamX; }

◆ detElementCollection()

const DetElementCollection* Trk::AlignModule::detElementCollection ( AlignModule::DetectorType  detType) const
inline

returns collection of detector elements

Definition at line 128 of file AlignModule.h.

128 { return m_detelements[detType]; }

◆ globalFrameToAlignFrame()

const Amg::Transform3D& Trk::AlignModule::globalFrameToAlignFrame ( ) const
inline

returns global frame to alignment frame

Definition at line 107 of file AlignModule.h.

◆ globalToAlignFrameRotation()

const Amg::RotationMatrix3D& Trk::AlignModule::globalToAlignFrameRotation ( ) const
inline

returns global to alignment frame transforms

Definition at line 110 of file AlignModule.h.

110 { return m_globalToAlignFrameRotation ; }

◆ globalToAlignFrameTranslation()

const Amg::Vector3D& Trk::AlignModule::globalToAlignFrameTranslation ( ) const
inline

Definition at line 111 of file AlignModule.h.

◆ identifierCollection()

const IdentifierCollection* Trk::AlignModule::identifierCollection ( AlignModule::DetectorType  detType) const
inline

returns collection of Identifiers

Definition at line 131 of file AlignModule.h.

131 { return m_detIdentifiers[detType]; }

◆ identify()

Identifier Trk::AlignModule::identify ( ) const
inline

Definition at line 97 of file AlignModule.h.

97 { return m_identifier; }

◆ identify32()

unsigned int Trk::AlignModule::identify32 ( ) const
inline

returns 32-bit compact identifier

Definition at line 100 of file AlignModule.h.

◆ identifyHash()

IdentifierHash Trk::AlignModule::identifyHash ( ) const
inline

Set and return index of module, used by alignment classes to keep track of order of align module.

Definition at line 92 of file AlignModule.h.

92 { return m_idHash; }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ name()

const std::string& Trk::AlignModule::name ( ) const
inline

Definition at line 89 of file AlignModule.h.

89 { return m_name; }

◆ nChamberShifts()

int Trk::AlignModule::nChamberShifts ( ) const
inline

Definition at line 156 of file AlignModule.h.

156 { return m_nChamberShifts; }

◆ nDoF()

int Trk::AlignModule::nDoF ( ) const
inline

Definition at line 193 of file AlignModule.h.

193 { return m_nDoF; }

◆ nHits()

int Trk::AlignModule::nHits ( ) const
inline

Definition at line 187 of file AlignModule.h.

187 { return m_nhits; }

◆ nTracks()

int Trk::AlignModule::nTracks ( ) const
inline

Definition at line 177 of file AlignModule.h.

177 { return m_ntracks; }

◆ operator=()

AlignModule& Trk::AlignModule::operator= ( const AlignModule rhs)
delete

forbid assignment

◆ resetAlignModuleToDetElementTransforms()

void AlignModule::resetAlignModuleToDetElementTransforms ( )

Reset align module to detector element transforms based on the AlignModuleToGlobal transform and the global to DetElementTransform.

Definition at line 287 of file AlignModule.cxx.

288  {
289 
290 
291  for (int i=0;i<(int)m_detelements.size();i++) {
292  DetElementCollection* detelements=m_detelements[i];
293  if (!detelements)
294  continue;
295 
296  int j(0);
297  for(DetElementCollection::const_iterator it = detelements->begin() ;
298  it != detelements->end(); ++it, ++j ) {
299  Amg::Transform3D localToGlobal = (*it)->transform();
300  (*m_alignModuleToDetElementTransforms[i])[j] = (localToGlobal * m_globalToAlignFrameTransform).inverse();
301 
302  double trans[6];
304  ATH_MSG_DEBUG(j << " " << trans[0] << " "<< trans[1] << " " << trans[2]
305  << " "<< trans[3] << " " << trans[4] << " "<< trans[5]);
306  }
307  }
308  }

◆ restoreSurfaces()

void Trk::AlignModule::restoreSurfaces ( TrkDetElementBase ) const
inline

Definition at line 201 of file AlignModule.h.

201 {}

◆ setAlignParShift()

void Trk::AlignModule::setAlignParShift ( const AlignPar alignPar) const

set values for a set of alignment parameters and errors

◆ setChi2VAlignParamArray()

void Trk::AlignModule::setChi2VAlignParamArray ( double **  chi2VAlignParam)
inline

Used only for numerical derivatives to get chi2 as a function of alignment parameters.

Definition at line 160 of file AlignModule.h.

160 { m_chi2VAlignParam = chi2VAlignParam; }

◆ setChi2VAlignParamArrayMeasType()

void Trk::AlignModule::setChi2VAlignParamArrayMeasType ( int  measType,
double **  chi2VAlignParam 
)
inline

vector of arrays of chamber shifts and chi2, one for each type of TrackState::MeasurementType

Definition at line 168 of file AlignModule.h.

168 { m_chi2VAlignParamMeasType[measType]=chi2VAlignParam; }

◆ setChi2VAlignParamXArray()

void Trk::AlignModule::setChi2VAlignParamXArray ( double **  chi2VAlignParamX)
inline

sets the values of chamber shifts in array

Definition at line 164 of file AlignModule.h.

164 { m_chi2VAlignParamX = chi2VAlignParamX; }

◆ setGlobalFrameToAlignFrameTransform()

void Trk::AlignModule::setGlobalFrameToAlignFrameTransform ( const Amg::Transform3D t)
inline

set global to alignment frame transforms

Definition at line 114 of file AlignModule.h.

114  {
116  m_globalToAlignFrameTranslation = t.translation() ;
117  m_globalToAlignFrameRotation = t.rotation() ;
118  }

◆ setIdentifier()

void Trk::AlignModule::setIdentifier ( Identifier  identifier)
inline

Set and return identifier of module.

Definition at line 96 of file AlignModule.h.

◆ setIdHash()

void Trk::AlignModule::setIdHash ( IdentifierHash  id)
inline

Definition at line 93 of file AlignModule.h.

93 { m_idHash = id; }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ setName()

void Trk::AlignModule::setName ( const std::string &  name)
inline

Set and return name of align module (i.e.

endcap A, etc.)

Definition at line 88 of file AlignModule.h.

88 { m_name=name; }

◆ setNChamberShifts()

void Trk::AlignModule::setNChamberShifts ( int  nShifts)
inline

Used only for numerical derivatives.

Sets and returns number of chamber shifts used to plot chi2 as a function of alignment parameter.

Definition at line 155 of file AlignModule.h.

155 { m_nChamberShifts = nShifts; }

◆ setNDoF()

void Trk::AlignModule::setNDoF ( int  nDoF)
inline

Definition at line 194 of file AlignModule.h.

194 { m_nDoF=nDoF; }

◆ setNHits()

void Trk::AlignModule::setNHits ( int  nhits)
inline

Definition at line 188 of file AlignModule.h.

188 { m_nhits=nhits; }

◆ setNTracks()

void Trk::AlignModule::setNTracks ( int  ntracks)
inline

Definition at line 178 of file AlignModule.h.

178 { m_ntracks=ntracks; }

◆ setTrackChi2()

void Trk::AlignModule::setTrackChi2 ( double  chi2)
inline

Definition at line 183 of file AlignModule.h.

183 { m_trackchi2=chi2; }

◆ shiftSurface()

void Trk::AlignModule::shiftSurface ( TrkDetElementBase ,
Identifier   
) const
inline

Definition at line 200 of file AlignModule.h.

200 {}

◆ trackChi2()

double Trk::AlignModule::trackChi2 ( ) const
inline

Definition at line 182 of file AlignModule.h.

182 { return m_trackchi2; }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_alignModuleToDetElementTransforms

std::vector<std::vector<Amg::Transform3D>* > Trk::AlignModule::m_alignModuleToDetElementTransforms
protected

Definition at line 218 of file AlignModule.h.

◆ m_chi2VAlignParam

double** Trk::AlignModule::m_chi2VAlignParam
private

Definition at line 231 of file AlignModule.h.

◆ m_chi2VAlignParamMeasType

double*** Trk::AlignModule::m_chi2VAlignParamMeasType
private

Definition at line 233 of file AlignModule.h.

◆ m_chi2VAlignParamX

double** Trk::AlignModule::m_chi2VAlignParamX
private

Definition at line 232 of file AlignModule.h.

◆ m_detelements

std::vector<DetElementCollection*> Trk::AlignModule::m_detelements
protected

Definition at line 214 of file AlignModule.h.

◆ m_detIdentifiers

std::vector<IdentifierCollection*> Trk::AlignModule::m_detIdentifiers
protected

Definition at line 215 of file AlignModule.h.

◆ m_globalToAlignFrameRotation

Amg::RotationMatrix3D Trk::AlignModule::m_globalToAlignFrameRotation
private

Definition at line 225 of file AlignModule.h.

◆ m_globalToAlignFrameTransform

Amg::Transform3D Trk::AlignModule::m_globalToAlignFrameTransform
private

Definition at line 224 of file AlignModule.h.

◆ m_globalToAlignFrameTranslation

Amg::Vector3D Trk::AlignModule::m_globalToAlignFrameTranslation
private

Definition at line 226 of file AlignModule.h.

◆ m_identifier

Identifier Trk::AlignModule::m_identifier
private

Definition at line 237 of file AlignModule.h.

◆ m_idHash

IdentifierHash Trk::AlignModule::m_idHash
private

Definition at line 236 of file AlignModule.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_name

std::string Trk::AlignModule::m_name
private

Definition at line 235 of file AlignModule.h.

◆ m_nChamberShifts

int Trk::AlignModule::m_nChamberShifts
private

Definition at line 230 of file AlignModule.h.

◆ m_nDoF

int Trk::AlignModule::m_nDoF
private

Definition at line 243 of file AlignModule.h.

◆ m_nhits

int Trk::AlignModule::m_nhits
private

Definition at line 240 of file AlignModule.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_ntracks

int Trk::AlignModule::m_ntracks
private

Definition at line 239 of file AlignModule.h.

◆ m_trackchi2

double Trk::AlignModule::m_trackchi2
private

Definition at line 242 of file AlignModule.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
Trk::AlignModule::m_nChamberShifts
int m_nChamberShifts
Definition: AlignModule.h:230
Trk::AlignModule::BowY
@ BowY
Definition: AlignModule.h:54
Trk::AlignModule::TGC
@ TGC
Definition: AlignModule.h:57
Trk::AlignModule::TRT
@ TRT
Definition: AlignModule.h:57
Trk::AlignModule::TransZ
@ TransZ
Definition: AlignModule.h:54
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
Trk::AlignModule::m_detelements
std::vector< DetElementCollection * > m_detelements
Definition: AlignModule.h:214
Trk::AlignModule::m_nDoF
int m_nDoF
Definition: AlignModule.h:243
skel.it
it
Definition: skel.GENtoEVGEN.py:396
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Trk::AlignModule::centerOfGravity
Amg::Vector3D centerOfGravity() const
Definition: AlignModule.cxx:119
Trk::decomposeTransform
void decomposeTransform(const Amg::Transform3D &transform, double *values)
Definition: AlignModule.cxx:57
Trk::AlignModule::Pixel
@ Pixel
Definition: AlignModule.h:57
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
Trk::AlignModule::NDetectorTypes
@ NDetectorTypes
Definition: AlignModule.h:57
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
Trk::AlignModule::m_chi2VAlignParamX
double ** m_chi2VAlignParamX
Definition: AlignModule.h:232
Trk::AlignModule::m_name
std::string m_name
Definition: AlignModule.h:235
AthMessaging::setLevel
void setLevel(MSG::Level lvl)
Change the current logging level.
Definition: AthMessaging.cxx:28
Trk::AlignModule::BowX
@ BowX
Definition: AlignModule.h:54
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
Trk::AlignModule::setGlobalFrameToAlignFrameTransform
void setGlobalFrameToAlignFrameTransform(const Amg::Transform3D &t)
set global to alignment frame transforms
Definition: AlignModule.h:114
Trk::AlignModule::m_chi2VAlignParam
double ** m_chi2VAlignParam
Definition: AlignModule.h:231
Trk::AlignModule::m_ntracks
int m_ntracks
Definition: AlignModule.h:239
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::AlignModule::m_chi2VAlignParamMeasType
double *** m_chi2VAlignParamMeasType
Definition: AlignModule.h:233
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
Trk::AlignModule::unidentified
@ unidentified
Definition: AlignModule.h:57
Trk::AlignModule::RotX
@ RotX
Definition: AlignModule.h:54
Trk::AlignModule::SCT
@ SCT
Definition: AlignModule.h:57
Trk::AlignModule::m_detIdentifiers
std::vector< IdentifierCollection * > m_detIdentifiers
Definition: AlignModule.h:215
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Trk::AlignModule::IdentifierCollection
std::vector< Identifier > IdentifierCollection
Definition: AlignModule.h:61
Trk::AlignModule::MaxNPar
@ MaxNPar
Definition: AlignModule.h:55
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
Trk::AlignModule::DetElementCollection
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
Definition: AlignModule.h:60
Trk::AlignModule::m_identifier
Identifier m_identifier
Definition: AlignModule.h:237
Trk::AlignModule::name
const std::string & name() const
Definition: AlignModule.h:89
Trk::AlignModule::CSC
@ CSC
Definition: AlignModule.h:57
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::AlignModule::TransX
@ TransX
Definition: AlignModule.h:54
Trk::AlignModule::NTransformPar
@ NTransformPar
Definition: AlignModule.h:55
Trk::AlignModule::m_trackchi2
double m_trackchi2
Definition: AlignModule.h:242
Trk::AlignModule::m_nhits
int m_nhits
Definition: AlignModule.h:240
Trk::AlignModule::RotY
@ RotY
Definition: AlignModule.h:54
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
Trk::AlignModule::m_idHash
IdentifierHash m_idHash
Definition: AlignModule.h:236
Trk::AlignModule::nDoF
int nDoF() const
Definition: AlignModule.h:193
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
AthAlgTool
Definition: AthAlgTool.h:26
Trk::AlignModule::RotZ
@ RotZ
Definition: AlignModule.h:54
Trk::AlignModule::m_alignModuleToDetElementTransforms
std::vector< std::vector< Amg::Transform3D > * > m_alignModuleToDetElementTransforms
Definition: AlignModule.h:218
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
Trk::AlignModule::BowZ
@ BowZ
Definition: AlignModule.h:54
Trk::AlignModule::MDT
@ MDT
Definition: AlignModule.h:57
Trk::AlignModule::m_globalToAlignFrameRotation
Amg::RotationMatrix3D m_globalToAlignFrameRotation
Definition: AlignModule.h:225
Trk::AlignModule::m_globalToAlignFrameTranslation
Amg::Vector3D m_globalToAlignFrameTranslation
Definition: AlignModule.h:226
Trk::AlignModule::TransY
@ TransY
Definition: AlignModule.h:54
Trk::AlignModule::m_globalToAlignFrameTransform
Amg::Transform3D m_globalToAlignFrameTransform
Definition: AlignModule.h:224
Trk::AlignModule::RPC
@ RPC
Definition: AlignModule.h:57
Trk::TrackState::NumberOfMeasurementTypes
@ NumberOfMeasurementTypes
Definition: TrackStateDefs.h:43