|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #include "GaudiKernel/IToolSvc.h"
14 #include "CLHEP/Units/SystemOfUnits.h"
20 const std::string&
name,
21 const IInterface*
parent ) :
37 return StatusCode::SUCCESS;
44 return StatusCode::SUCCESS;
57 my_trainBars[theHit->trainID()].push_back(theHit);
59 catch (
const std::out_of_range& outOfRange) {
60 ATH_MSG_WARNING(
"Bar with station outside expected range. Aborting track reconstruction.");
70 return StatusCode::SUCCESS;
77 return StatusCode::SUCCESS;
81 std::list<AFPTDBasicToolTrack> reconstructedTracks;
83 std::vector<const xAOD::AFPToFHit*> my_trainBars[4];
88 ATH_MSG_DEBUG(
"Number of AFP ToF hits in each train = " << my_trainBars[0].
size()<<
", "<<my_trainBars[1].
size()<<
", "<<my_trainBars[2].
size()<<
", "<<my_trainBars[3].
size());
93 bool dataTLP_init{
false};
95 for (
int k=0;
k<4;
k++)
97 unsigned int TrSize = my_trainBars[
k].size();
100 unsigned int TrSat = 0;
103 for (
unsigned int l=0;
l<TrSize;
l++)
126 if( TrSize!=TrSat) TrTime /=
weight;
129 reconstructedTracks.emplace_back(
m_stationID,
k,TrTime, TrSize, TrSat);
131 for(
unsigned int l=0;
l<TrSize;
l++) theTrack.
addBar(my_trainBars[
k].at(
l));
140 return StatusCode::SUCCESS;
146 auto *
track = containerToFill->
push_back(std::make_unique<xAOD::AFPToFTrack>());
155 ATH_MSG_DEBUG(
"Track time: (time="<<
track->trainTime()<<
", size="<<
track->trainSize()<<
", train id="<<
track->trainID()<<
") station: (st="<<
track->stationID()<<
")");
159 track->addBar(barLink);
161 ATH_MSG_DEBUG(
"bar time="<<theHit->time()<<
" bar in train ="<<theHit->barInTrainID()<<
", trin id ="<<theHit->trainID()<<
")");
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Class representing a hit in ToF detector.
::StatusCode StatusCode
StatusCode definition for legacy code.
double barTimeOffset() const
Time offset for this particular bar.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
std::string to_string(const DetectorType &type)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
#define ATH_MSG_WARNING(x)
double barWeight() const
Weight for this particular bar.
Class storing information about alignment.
size_type size() const noexcept
Returns the number of elements in the collection.