Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
25 , m_trackCollectionProvider(
"Trk::TrackCollectionProvider",this)
26 , m_alignTrackPreProcessor(
"Trk::AlignTrackPreProcessor",this)
27 , m_alignTrackCreator(
"Trk::AlignTrackCreator",this)
28 , m_alignTrackDresser(
"Trk::AlignTrackDresser",this)
29 , m_alignTool(
"Trk::GlobalChi2AlignTool",this)
30 , m_geometryManagerTool(
"Muon::MuonGeometryManagerTool")
31 , m_trkAlignDBTool(
"Trk::TrkAlignDBTool", this)
32 , m_fillNtupleTool(
"",this)
35 , m_logStream(nullptr)
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");
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;
227 ATH_MSG_DEBUG(
"read geometry, "<<NDoF<<
" alignment parameters");
236 if (
sc != StatusCode::SUCCESS) {
238 return StatusCode::FAILURE;
246 return StatusCode::SUCCESS;
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.");
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;
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;
490 if(std::ofstream * ofs =
dynamic_cast<std::ofstream *
>(
m_logStream)) {
504 return StatusCode::SUCCESS;
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.
virtual StatusCode finalize()
finalize method
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
virtual StatusCode start()
set up geometry and prepare the tools
virtual StatusCode initialize()
initialize method
virtual StatusCode stop()
processes information accumulated in execute method to determine alignment parameters
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)
AlignAlg(const std::string &name, ISvcLocator *pSvcLocator)
constructor
std::string m_alignTracksName
name of the AlignTrack collection in the StoreGate
ToolHandle< ITrackCollectionProvider > m_trackCollectionProvider
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
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.
const AlignVertex * getVtx() const
set and get pointer to the associated vertex
ToolHandle< IAlignTrackDresser > m_alignTrackDresser
Pointer to alignTrackDresser, used to add residuals, derivatives, etc.
int m_ntracks
number of processed tracks
const Amg::SymMatrixX * weightMatrix() const
Weight matrix is W from Si alignment (see Eqn.
Ensure that the ATLAS eigen extensions are properly loaded.
virtual ~AlignAlg()
destructor
virtual StatusCode execute()
loops over tracks in event, and accumulates information necessary for alignmnet
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...
std::string m_filename
name of ntuple file
bool m_writeLogfile
write a logfile for solving
std::string m_filepath
path to ntuple file
std::string m_logfileName
name of the logfile
@ Refitted
normally refitted, without adding any pseudo-measurement
int m_nevents
number of processed events
AlignVertexType type() const
get and set the refit type
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > SymMatrixX