15#include "GaudiKernel/ISvcLocator.h"
16#include "GaudiKernel/DataSvc.h"
17#include "GaudiKernel/SmartDataPtr.h"
42 const IInterface* p ):
45 declareInterface<ITRT_DriftCircleTool>(
this);
59 bool foundInterval =
false;
60 unsigned mask = 0x02000000;
62 while ( !foundInterval && (i < 24) ) {
64 float thisTime = ((0.5+i)*3.125)-
t0;
65 if (thisTime >= lowGate && thisTime <= highGate) foundInterval =
true;
68 if (i == 7 || i == 15)
83 StatusCode
sc = AthAlgTool::initialize();
89 return StatusCode::FAILURE;
95 if (
sc.isFailure() ) {
103 return StatusCode::FAILURE;
123 StatusCode
sc = AthAlgTool::finalize();
return sc;
132 const EventContext& ctx,
138 InDet::TRT_DriftCircleCollection* rio =
nullptr;
149 if (not trtDetEleHandle.
isValid() or elements==
nullptr) {
158 << theComTime.
key() <<
" found! Time="<<timecor);
170 rio =
new InDet::TRT_DriftCircleCollection(IHc);
171 rio->setIdentifier(rdo->
identify());
172 rio->reserve( std::distance(rb,
re) );
178 for(
r=rb;
r!=
re; ++
r) {
181 int LTbin = (*r)->driftTimeBin();
186 double driftTime =0.;
187 unsigned int word = (*r)->getWord();
197 if(!strawstat)
continue;
205 bool isArgonStraw=
true;
210 if( LTbin==0 || LTbin==24 ) {
214 driftTime = rawTime-
t0;
217 if(!isOK) word &= 0xF7FFFFFF;
218 else word |= 0x08000000;
223 <<
" " <<
m_trtid->straw_layer(
id)
225 <<
" time bin " << LTbin
226 <<
" timecor " << timecor
227 <<
" corrected time " << rawTime );
235 <<
" drifttime " << driftTime
236 <<
" radius " << radius <<
" error " <<
error);
238 if( !isOK || (
error==0.&&Mode<2) )
242 error = 4./sqrt(12.);
273 ATH_MSG_ERROR(
"Could not create InDet::TRT_DriftCircle object !");
const boost::regex re(r_e)
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Handle class for reading from StoreGate.
This is an Identifier helper class for the TRT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
a typed memory pool that saves time spent allocation small object.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
This is a "hash" representation of an Identifier.
Virtual base class of TRT readout elements.
Class to hold collection of TRT detector elements.
const TRT_BaseElement * getDetectorElement(const IdentifierHash &hash) const
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D