51 declareInterface<IFillAlignTrkInfo>(
this);
70 m_ntuple =
new TNtuple(
"ntuple",
"TRT calibration ntuple",
"run:evt:lbn:nvx:trk:det:lay:mod:stl:stw:brd:chp:sid:locx:locy:locz:x:y:z:r:dr:t:rtrack:drrtrack:rtrackunbias:drrtrackunbias:ttrack:ttrackunbias:t0:ephase:phi:theta:pt:qoverp:d0:ToT:HT:ToTCorrection:HTCorrection:isArgonStraw");
71 return StatusCode::SUCCESS;
81 return StatusCode::SUCCESS;
89 float rtrackunbias = 0;
90 float drrtrackunbias = 0;
92 float ttrackunbias = 0;
123 d0 = mesp->parameters()[
Trk::d0];
131 int countVertices(0);
134 if ( vx-> nTrackParticles() >= 3) countVertices++;
137 nvrt_rec = countVertices;
151 for (; tsos != tsosEnd; ++tsos) {
152 mesb = (*tsos)->measurementOnTrack();
154 if(rotp !=
nullptr) {
158 }
else if (
m_DetID->is_trt(ident)) {
162 if (trtcirc !=
nullptr) {
164 tparp = ((*tsos)->trackParameters());
167 if (tparp ==
nullptr) {
168 if (
msgLvl(MSG::DEBUG))
msg() <<
"strange: trk parameters not available" <<
endmsg;
170 if (dcp ==
nullptr) {
171 msg(MSG::ERROR) <<
"strange: prepRawData not available" <<
endmsg;
176 output->push_back(newhit);
189 if(errsq<0) errsq=1.0;
191 bool isvalid =
false;
213 float HTCorrection = 0;
222 if(errsq<0) errsq=1.0;
225 if(errsq<0) errsq=1.0;
238 if(abs(
m_TRTID->barrel_ec(ident))<2){
240 }
else if (chip<12) {
248 int isArgonStraw = 0;
260 float h_timeResidual = h_driftTime - h_trkDriftTime;
270 float d = h_residualVariance;
272 float h_chiSquare = h_residual*h_residual/d ;
279 h_hasValidDriftTime &&
289 drrtrack = sqrt(errsq);
293 tparp = ((*tsos)->trackParameters());
294 HitOnTrackToRemove = *tsos;
296 if(HitOnTrackToRemove){
302 else if (
msgLvl(MSG::DEBUG)) {
303 msg() <<
"TrackParameters 1: nullptr" <<
endmsg;
306 if(unbiasedTrkParameters){
310 if(errsq<0) errsq=1.;
311 drrtrackunbias = sqrt(errsq);
313 if( rtrelation ) ttrackunbias = rtrelation->
drifttime(std::abs( rtrackunbias ));
314 ATH_MSG_DEBUG(
"Unbiased TrackParameters 2: " << *unbiasedTrkParameters );
321 float const ntvar[40]={
377 msg(MSG::ERROR) <<
"TRT drift RIO cast failed - no hit stored" <<
endmsg;
386 << output->size() <<
" hits had FULL info available" <<
endmsg;
390 delete unbiasedTrkParameters;
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
abstract base class for rt-relations
This is an Identifier helper class for the TRT subdetector.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
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.
int m_minTimebinsOverThreshold
FillAlignTRTHits(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode finalize()
virtual bool fill(const Trk::Track *aTrack, TRT::TrackInfo *output, const xAOD::EventInfo &eventInfo, const xAOD::VertexContainer &vertices)
unsigned int m_numOfHitsTotal
Gaudi::Property< std::string > m_ntupleName
unsigned int m_numOfProcessedTracks
ToolHandle< Trk::IUpdator > m_updator
virtual StatusCode initialize()
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
const AtlasDetectorID * m_DetID
float m_DoMCCosmicTimeShift
unsigned int m_numOfHitsAccepted
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
float m_maxTrackChisquarePerDof
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
Trk::DriftCircleSide side() const
returns the side on which the drift radius is.
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
bool highLevel() const
returns true if the high level threshold was passed
double timeOverThreshold() const
returns Time over threshold in ns
double driftTime(bool &valid) const
returns the raw driftTime, the passed boolean indicates if the drift time is valid or not.
Base class for rt-relations in the TRT.
virtual float drdt(float driftime) const =0
driftvelocity for given drifttime
virtual float drifttime(float radius) const =0
drifttime for given radius
This class is the pure abstract base class for all fittable tracking measurements.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
const Amg::Vector3D & position() const
Access method for the position.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
Identifier identify() const
return the identifier -extends MeasurementBase
represents the track state (measurement, material, fit parameters and quality) at a surface.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const Perigee * perigeeParameters() const
return Perigee.
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
uint32_t lumiBlock() const
The current event's luminosity block number.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersBase< TrackParametersDim, Charged > TrackParameters
EventInfo_v1 EventInfo
Definition of the latest event info version.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.