ATLAS Offline Software
IAlignModuleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRKALIGNINTERFACES_ALIGNMODULETOOL_IH
6 #define TRKALIGNINTERFACES_ALIGNMODULETOOL_IH
7 
8 #include "GaudiKernel/IAlgTool.h"
9 #include "GaudiKernel/ToolHandle.h"
11 
14 #include "TrkAlignEvent/AlignPar.h"
15 
16 #include <fstream>
17 
32 namespace Trk {
33  class Track;
34  class AlignTrack;
35  class AlignTSOS;
36  class RIO_OnTrack;
37 
38  static const InterfaceID
39  IID_TRKALIGNINTERFACES_IAlignModuleTool("Trk::IAlignModuleTool",1,0);
40 
41 
42  class IAlignModuleTool: virtual public IAlgTool {
43 
44  public:
45  static const InterfaceID& interfaceID();
46 
47  virtual ~IAlignModuleTool() {};
48 
49  virtual StatusCode initialize() = 0;
50  virtual StatusCode finalize() = 0;
51 
54 
57 
58  //
59  // GeometryManagerTool methods
60  //
61 
63  virtual void setAlignModules(AlignModuleList* alignmods,
64  std::vector<AlignModuleList*>* idHashToAlignModMap) = 0;
65 
67  virtual void setAlignParLists(DataVector<DataVector<AlignPar> >* fullAlignParList,
68  DataVector<DataVector<AlignPar> >* alignParList) = 0;
69 
71  virtual void setSubDetElement(AlignModule::DetectorType detType, bool status) = 0;
72  virtual bool subDetElement(AlignModule::DetectorType detType) const = 0;
73 
74  //
75  // AlignTrackCreator methods
76  //
77 
79  virtual AlignModule * findAlignModule(const RIO_OnTrack * rio,
81 
85 
87  virtual void setMeasurementProperties(AlignTSOS *) const {};
88 
89  //
90  // MatrixTool methods
91  //
92 
94  virtual int nAlignParameters() const = 0;
95 
98  virtual const AlignModuleList* alignModules1D() = 0;
100 
101 
102  // DerivCalcTool methods
103 
105  virtual DataVector<AlignPar>* getAlignPars(const AlignModule* alignModule) const = 0;
106 
108  virtual void shiftModule(const AlignModule*, const Track*,
109  AlignModule::TransformParameters, double) const {}
110  virtual void restoreModule(const AlignModule*) const {}
111 
112 
113  //
114  // AlignDBTool methods
115  //
116 
120  DataVector<AlignPar>* apVec,
122  AlignModule::NDetectorTypes) const = 0;
123 
125  virtual const AlignModuleList* getAlignModuleCollection() const = 0;
126 
127 
128  //
129  // FillNtuple methods
130  //
131 
133  virtual DataVector<AlignPar>* getFullAlignPars(const AlignModule* alignModule) const = 0;
134 
135  //
136  // Other
137  //
138 
140  virtual void setLogStream(std::ostream * os) { m_logStream = os; }
141 
142  protected:
144 
145  std::ostream * m_logStream;
146 
147  };
148 
149  inline const InterfaceID& IAlignModuleTool::interfaceID()
150  { return IID_TRKALIGNINTERFACES_IAlignModuleTool; }
151 
152 } // end namespace
153 
154 #endif // TRKALIGNINTERFACES_ALIGNMODULETOOL_IH
Trk::IAlignModuleTool::findAlignModule
virtual AlignModule * findAlignModule(const RIO_OnTrack *rio, AlignModule::DetectorType=AlignModule::NDetectorTypes) const =0
finds AlignModule for a detector element (used by AlignTrackCreator)
Trk::IAlignModuleTool::fillDetAlignmentParameters
virtual void fillDetAlignmentParameters(const TrkDetElementBase *det, DataVector< AlignPar > *apVec, AlignModule::DetectorType detType=AlignModule::NDetectorTypes) const =0
returns alignment parameters for a detector element, applying AlignModule transforms if necessary
Trk::IAlignModuleTool::getDetectorType
virtual AlignModule::DetectorType getDetectorType(const TrkDetElementBase *det) const =0
gets detector type for a detector element
Trk::IAlignModuleTool
Definition: IAlignModuleTool.h:42
Trk::IAlignModuleTool::alignModules1D
virtual const AlignModuleList * alignModules1D()=0
converts 2-D AlignParList and AlignModuleList for all detector types to single 1-D vectors (used by M...
Trk::AlignModuleList
std::vector< AlignModule * > AlignModuleList
Definition: AlignModuleList.h:37
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
Trk::AlignTSOS
Definition: AlignTSOS.h:37
Trk::AlignModule
Definition: AlignModule.h:45
Trk::IAlignModuleTool::restoreModule
virtual void restoreModule(const AlignModule *) const
Definition: IAlignModuleTool.h:110
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::IAlignModuleTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IAlignModuleTool.h:149
Trk::IAlignModuleTool::shiftModule
virtual void shiftModule(const AlignModule *, const Track *, AlignModule::TransformParameters, double) const
shifts and restores tubes traversed by track in module (used by ShiftingDerivCalcTool)
Definition: IAlignModuleTool.h:108
Trk::AlignModule::TransformParameters
TransformParameters
enum to keep track of transformation coordinates
Definition: AlignModule.h:54
Trk::AlignModule::NDetectorTypes
@ NDetectorTypes
Definition: AlignModule.h:57
Trk::IAlignModuleTool::subDetElement
virtual bool subDetElement(AlignModule::DetectorType detType) const =0
Trk::IAlignModuleTool::setAlignModules
virtual void setAlignModules(AlignModuleList *alignmods, std::vector< AlignModuleList * > *idHashToAlignModMap)=0
sets AlignModules for a particular detector type
Trk::IAlignModuleTool::getFullAlignPars
virtual DataVector< AlignPar > * getFullAlignPars(const AlignModule *alignModule) const =0
returns vector of full AlignPars for an AlignModule
Trk::IAlignModuleTool::alignParList1D
virtual DataVector< AlignPar > * alignParList1D()=0
AlignTSOS
AlignTSOS is a TSOS with extra variables useful for alignment. It is created using an implementation ...
Trk::IAlignModuleTool::setLogStream
virtual void setLogStream(std::ostream *os)
sets the output stream for the logfile
Definition: IAlignModuleTool.h:140
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::IAlignModuleTool::findAlignModule
virtual AlignModule * findAlignModule(const TrkDetElementBase *det, AlignModule::DetectorType=AlignModule::NDetectorTypes) const =0
finds AlignModule for a detector element
Trk::IAlignModuleTool::~IAlignModuleTool
virtual ~IAlignModuleTool()
Definition: IAlignModuleTool.h:47
Trk::IAlignModuleTool::m_alignModuleListType
int m_alignModuleListType
uses Trk enum AlignModuleListType (L1,L2,L3,L1_5,L2_5)
Definition: IAlignModuleTool.h:143
Trk::IAlignModuleTool::getAlignModuleCollection
virtual const AlignModuleList * getAlignModuleCollection() const =0
gets all AlignModules for a particular detector type
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AlignModuleList.h
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::IAlignModuleTool::setAlignParLists
virtual void setAlignParLists(DataVector< DataVector< AlignPar > > *fullAlignParList, DataVector< DataVector< AlignPar > > *alignParList)=0
sets AlignPar for AlignModules for a particular detector type
Trk::AlignModule::DetectorType
DetectorType
Definition: AlignModule.h:57
AlignModule.h
Trk::IAlignModuleTool::nAlignParameters
virtual int nAlignParameters() const =0
number of alignment parameters for all detector types
Trk::IAlignModuleTool::alignModuleListType
AlignModuleListType alignModuleListType()
returns type of AlignModuleList (see AlignModuleList.h for more info)
Definition: IAlignModuleTool.h:53
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
Trk::IAlignModuleTool::setMeasurementProperties
virtual void setMeasurementProperties(AlignTSOS *) const
allows to set detector specific properties of AlignTSOS, like measurement direction (CSC) or fan-out ...
Definition: IAlignModuleTool.h:87
Trk::IAlignModuleTool::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IAlignModuleTool.h:145
AlignPar.h
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
merge.status
status
Definition: merge.py:17
Trk::AlignModuleListType
AlignModuleListType
Type of AlignModuleList (see description above).
Definition: AlignModuleList.h:32
Trk::IAlignModuleTool::initialize
virtual StatusCode initialize()=0
Trk::IAlignModuleTool::getAlignPars
virtual DataVector< AlignPar > * getAlignPars(const AlignModule *alignModule) const =0
returns alignment parameters for a single module
Trk::IAlignModuleTool::finalize
virtual StatusCode finalize()=0
Trk::IAlignModuleTool::setSubDetElement
virtual void setSubDetElement(AlignModule::DetectorType detType, bool status)=0
set and retrieve flag whether or not the sub-TrkDetElementBase structures are aligned for a given det...
AlignTrack
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...