|
ATLAS Offline Software
|
#include <AlignAlg.h>
|
| AlignAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| constructor More...
|
|
virtual | ~AlignAlg () |
| destructor More...
|
|
virtual StatusCode | initialize () |
| initialize method More...
|
|
virtual StatusCode | start () |
| set up geometry and prepare the tools More...
|
|
virtual StatusCode | execute () |
| loops over tracks in event, and accumulates information necessary for alignmnet More...
|
|
virtual StatusCode | stop () |
| processes information accumulated in execute method to determine alignment parameters More...
|
|
virtual StatusCode | finalize () |
| finalize method More...
|
|
void | showStatistics () |
| dumps statistics accumulated in each event More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 | 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 |
|
Definition at line 38 of file AlignAlg.h.
◆ StoreGateSvc_t
◆ AlignAlg()
AlignAlg::AlignAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
constructor
Definition at line 23 of file AlignAlg.cxx.
46 "tool for handling DB stuff ");
49 "tool for getting track collection from StoreGate");
52 "tool for converting Trk::Track to AlignTrack after processing if necessary");
55 "tool for creating AlignTSOSCollection to store on AlignTrack");
58 "tool for dressing AlignTrack with residuals, derivatives, etc.");
61 "alignment algorithm-specific tool");
64 "tool for configuring geometry");
67 "tool for storing Trk::Track information into the ntuple");
◆ ~AlignAlg()
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode AlignAlg::execute |
( |
| ) |
|
|
virtual |
loops over tracks in event, and accumulates information necessary for alignmnet
Definition at line 250 of file AlignAlg.cxx.
259 return StatusCode::SUCCESS;
262 msg(MSG::INFO)<<
"Only doing the solving. Aborting event processing after first event."<<
endmsg;
263 msg(MSG::INFO)<<
"Following ERROR message is not a problem..."<<
endmsg;
264 return StatusCode::FAILURE;
279 if (!originalTracks ||
sc.isFailure())
return sc;
281 if(originalTracks->
empty()) {
283 return StatusCode::SUCCESS;
294 if (!alignTracks || alignTracks->
empty()) {
295 ATH_MSG_DEBUG(
"processTrackCollection() returned empty Track collection.");
296 return StatusCode::SUCCESS;
304 for (
Track* trk : *alignTracks) {
311 msg(
MSG::FATAL)<<
"Track is not an AlignTrack. PreProcessor returns TrackCollection but"
312 <<
"it has to be filled with AlignTracks. Otherwise the code doesn't work."<<
endmsg;
313 return StatusCode::FAILURE;
319 ATH_MSG_DEBUG(
"processAlignTrack() returned FALSE, Skipping the track.");
330 ATH_MSG_DEBUG(
"dressAlignTrack() returned FALSE, Skipping the track.");
348 for (
Track* trk : *alignTracks) {
355 msg(
MSG::FATAL)<<
"Track is not an AlignTrack. PreProcessor returns TrackCollection but"
356 <<
"it has to be filled with AlignTracks. Otherwise the code doesn't work."<<
endmsg;
357 return StatusCode::FAILURE;
364 ATH_MSG_DEBUG(
"dressAlignTrack failed, Skipping the track.");
369 const AlignVertex * ptrVertex = alignTrack->getVtx();
371 ATH_MSG_DEBUG(
"Vertex fit failed for this track. Skipping the track.");
377 bool success =
m_alignTool->accumulate(alignTrack);
381 ATH_MSG_DEBUG(
"accumulate() returned FALSE, Skipping the track.");
403 alignTracks =
nullptr;
408 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode AlignAlg::finalize |
( |
| ) |
|
|
virtual |
finalize method
Definition at line 484 of file AlignAlg.cxx.
490 if(std::ofstream * ofs =
dynamic_cast<std::ofstream *
>(
m_logStream)) {
504 return StatusCode::SUCCESS;
◆ initialize()
StatusCode AlignAlg::initialize |
( |
| ) |
|
|
virtual |
initialize method
Definition at line 97 of file AlignAlg.cxx.
105 return StatusCode::FAILURE;
118 return StatusCode::FAILURE;
126 return StatusCode::FAILURE;
132 return StatusCode::FAILURE;
140 return StatusCode::FAILURE;
149 return StatusCode::FAILURE;
159 return StatusCode::FAILURE;
167 return StatusCode::FAILURE;
176 return StatusCode::FAILURE;
181 std::ostream *
out = &std::cout;
183 if(!
ofile->is_open()) {
184 msg(MSG::ERROR)<<
"Couldn't open logfile. Writing to standard output."<<
endmsg;
206 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ showStatistics()
void Trk::AlignAlg::showStatistics |
( |
| ) |
|
dumps statistics accumulated in each event
◆ start()
StatusCode AlignAlg::start |
( |
| ) |
|
|
virtual |
set up geometry and prepare the tools
Definition at line 210 of file AlignAlg.cxx.
227 ATH_MSG_DEBUG(
"read geometry, "<<NDoF<<
" alignment parameters");
236 if (
sc != StatusCode::SUCCESS) {
238 return StatusCode::FAILURE;
246 return StatusCode::SUCCESS;
◆ stop()
StatusCode AlignAlg::stop |
( |
| ) |
|
|
virtual |
processes information accumulated in execute method to determine alignment parameters
Definition at line 412 of file AlignAlg.cxx.
417 *
m_logStream<<
"*************************************************************"<<std::endl;
418 *
m_logStream<<
"****** Alignment Job summary ******"<<std::endl;
419 *
m_logStream<<
"*************************************************************"<<std::endl;
438 msg(MSG::ERROR)<<
"problem with alignTool fillNtuple()!"<<
endmsg;
439 return StatusCode::FAILURE;
443 msg(MSG::ERROR)<<
"problem with fillNtupleTool fillNtuple()!"<<
endmsg;
444 return StatusCode::FAILURE;
447 ATH_MSG_INFO(
"calling alignTrackPreProcessor->fillNtuple()");
449 msg(MSG::ERROR)<<
"problem with alignTrackPreProcessor fillNtuple()!"<<
endmsg;
450 return StatusCode::FAILURE;
453 ATH_MSG_INFO(
"calling trackCollectionProvider->fillNtuple()");
455 msg(MSG::ERROR)<<
"problem with trackCollectionProvider fillNtuple()!"<<
endmsg;
456 return StatusCode::FAILURE;
461 msg(MSG::WARNING)<<
"No tracks passed track selection. No solving."<<
endmsg;
462 return StatusCode::SUCCESS;
468 return StatusCode::FAILURE;
474 return StatusCode::FAILURE;
477 ATH_MSG_INFO(
"calling trkAlignDBTool->writeAlignPar()");
480 return StatusCode::SUCCESS;
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_alignSolveLevel
int Trk::AlignAlg::m_alignSolveLevel |
|
private |
Set the Alignment Solve Level.
Definition at line 112 of file AlignAlg.h.
◆ m_alignTool
Pointer to alignTool.
Definition at line 93 of file AlignAlg.h.
◆ m_alignTrackCreator
◆ m_alignTrackDresser
Pointer to alignTrackDresser, used to add residuals, derivatives, etc.
to vector of AlignTrack
Definition at line 90 of file AlignAlg.h.
◆ m_alignTrackPreProcessor
◆ m_alignTracksName
std::string Trk::AlignAlg::m_alignTracksName |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_filename
std::string Trk::AlignAlg::m_filename |
|
private |
◆ m_filepath
std::string Trk::AlignAlg::m_filepath |
|
private |
◆ m_fillNtupleTool
Pointer to FillNtupleTool, used to write track information to ntuple.
Definition at line 102 of file AlignAlg.h.
◆ m_geometryManagerTool
Pointer to GeometryManagerTool, used to get lists of chambers for which alignment parameters will be determined.
Definition at line 96 of file AlignAlg.h.
◆ m_logfileName
std::string Trk::AlignAlg::m_logfileName |
|
private |
◆ m_logStream
std::ostream* Trk::AlignAlg::m_logStream |
|
private |
◆ m_nDoF
int Trk::AlignAlg::m_nDoF |
|
private |
Number of degrees of freedom = sum over chambers(DoF per chamber)
Definition at line 114 of file AlignAlg.h.
◆ m_nevents
int Trk::AlignAlg::m_nevents |
|
private |
number of processed events
Definition at line 121 of file AlignAlg.h.
◆ m_ntracks
int Trk::AlignAlg::m_ntracks |
|
private |
number of processed tracks
Definition at line 122 of file AlignAlg.h.
◆ m_ntracksAccum
int Trk::AlignAlg::m_ntracksAccum |
|
private |
number of tracks successfully accumulated
Definition at line 126 of file AlignAlg.h.
◆ m_ntracksDress
int Trk::AlignAlg::m_ntracksDress |
|
private |
number of tracks successfully dressed
Definition at line 125 of file AlignAlg.h.
◆ m_ntracksProc
int Trk::AlignAlg::m_ntracksProc |
|
private |
number of tracks successfully processed
Definition at line 124 of file AlignAlg.h.
◆ m_ntracksSel
int Trk::AlignAlg::m_ntracksSel |
|
private |
number of selected tracks
Definition at line 123 of file AlignAlg.h.
◆ m_ntuple
TFile* Trk::AlignAlg::m_ntuple |
|
private |
◆ m_solveOnly
bool Trk::AlignAlg::m_solveOnly |
|
private |
only do the solving (accumulate from binaries)
Definition at line 109 of file AlignAlg.h.
◆ m_trackCollectionProvider
◆ m_trkAlignDBTool
Pointer to TrkAlignDBTool, used for reading/writing alignment parameters from/to the database.
Definition at line 99 of file AlignAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeLogfile
bool Trk::AlignAlg::m_writeLogfile |
|
private |
write a logfile for solving
Definition at line 117 of file AlignAlg.h.
◆ m_writeNtuple
bool Trk::AlignAlg::m_writeNtuple |
|
private |
write track and event information to ntuple
Definition at line 110 of file AlignAlg.h.
The documentation for this class was generated from the following files:
int m_ntracksSel
number of selected tracks
int m_ntracksProc
number of tracks successfully processed
ToolHandle< IFillNtupleTool > m_fillNtupleTool
Pointer to FillNtupleTool, used to write track information to ntuple.
bool m_writeNtuple
write track and event information to ntuple
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int m_ntracksDress
number of tracks successfully dressed
int m_nDoF
Number of degrees of freedom = sum over chambers(DoF per chamber)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ToolHandle< IAlignTrackCreator > m_alignTrackCreator
Pointer to alignTrackCreator, used to convert Trk::Track to vector of AlignTrack.
int m_ntracksAccum
number of tracks successfully accumulated
TFile * m_ntuple
output ntuple
bool m_solveOnly
only do the solving (accumulate from binaries)
std::string m_alignTracksName
name of the AlignTrack collection in the StoreGate
virtual void setOwner(IDataHandleHolder *o)=0
ToolHandle< ITrackCollectionProvider > m_trackCollectionProvider
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ToolHandle< ITrkAlignDBTool > m_trkAlignDBTool
Pointer to TrkAlignDBTool, used for reading/writing alignment parameters from/to the database.
std::ostream * m_logStream
logfile output stream
::StatusCode StatusCode
StatusCode definition for legacy code.
int m_alignSolveLevel
Set the Alignment Solve Level.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
ToolHandle< IAlignTrackDresser > m_alignTrackDresser
Pointer to alignTrackDresser, used to add residuals, derivatives, etc.
int m_ntracks
number of processed tracks
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ToolHandle< IAlignTool > m_alignTool
Pointer to alignTool.
ToolHandle< IGeometryManagerTool > m_geometryManagerTool
Pointer to GeometryManagerTool, used to get lists of chambers for which alignment parameters will be ...
ToolHandle< IAlignTrackPreProcessor > m_alignTrackPreProcessor
Pointer to AlignTrackPreProcessor, used to select hits on tracks and/or tracks before passing to Alig...
DataObjIDColl m_extendedExtraObjects
std::string m_filename
name of ntuple file
#define ATH_MSG_WARNING(x)
bool m_writeLogfile
write a logfile for solving
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::string m_filepath
path to ntuple file
std::string m_logfileName
name of the logfile
AthAlgorithm()
Default constructor:
@ Refitted
normally refitted, without adding any pseudo-measurement
int m_nevents
number of processed events
AlignVertex is a simple structure to store objects belonging to a vertex. Contains a pointer to the o...
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool empty() const noexcept
Returns true if the collection is empty.
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > SymMatrixX