ATLAS Offline Software
Loading...
Searching...
No Matches
FillAlignTRTHits Class Reference

#include <FillAlignTRTHits.h>

Inheritance diagram for FillAlignTRTHits:
Collaboration diagram for FillAlignTRTHits:

Public Member Functions

 FillAlignTRTHits (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~FillAlignTRTHits ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual bool fill (const Trk::Track *aTrack, TRT::TrackInfo *output, const xAOD::EventInfo &eventInfo, const xAOD::VertexContainer &vertices)
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const AtlasDetectorIDm_DetID
const TRT_IDm_TRTID
ToolHandle< ITRT_DriftFunctionToolm_driftFunctionTool {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "Drift function tool name"}
ToolHandle< Trk::IUpdatorm_updator {this, "UpdatorTool" , "Trk::KalmanUpdator/TrkKalmanUpdator", "Measurement updator to calculate unbiased track states"}
ToolHandle< ITRT_CalDbToolm_trtcaldbTool {this, "TRTCalDbTool", "CalDbTool", "Access to the folder of the calibration constants"}
ServiceHandle< ITRT_StrawNeighbourSvcm_neighbourSvc {this, "NeighbourSvc", "NeighbourSvc", ""}
ToolHandle< ITRT_StrawStatusSummaryToolm_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "InDetTRTStrawStatusSummaryTool", ""}
Gaudi::Property< std::string > m_ntupleName {this, "NtupleName" , "basic.root", "Changes the name of the ntuple Output"}
float m_maxDistance
float m_maxTimeResidual
int m_minTimebinsOverThreshold
float m_maxTrackChisquarePerDof
unsigned int m_numOfHitsTotal
unsigned int m_numOfHitsAccepted
unsigned int m_numOfProcessedTracks
float m_DoMCCosmicTimeShift
TFile * m_f
TNtuple * m_ntuple
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 51 of file FillAlignTRTHits.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FillAlignTRTHits()

FillAlignTRTHits::FillAlignTRTHits ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 38 of file FillAlignTRTHits.cxx.

38 :
39 AthAlgTool(type, name, parent),
40 m_DetID(nullptr), m_TRTID(nullptr),
41 m_maxDistance(2.8),
49 m_f(nullptr), m_ntuple(nullptr)
50{
51 declareInterface<IFillAlignTrkInfo>(this);
52 declareProperty("maxDistance",m_maxDistance) ;
53 declareProperty("maxTimeResidual",m_maxTimeResidual) ;
54 declareProperty("minTimebinsOverThreshold",m_minTimebinsOverThreshold) ;
55 declareProperty("maxTrackChisquarePerDof",m_maxTrackChisquarePerDof) ;
56 declareProperty("DoMCCosmicTimeShift",m_DoMCCosmicTimeShift);
57}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const TRT_ID * m_TRTID
unsigned int m_numOfHitsTotal
unsigned int m_numOfProcessedTracks
const AtlasDetectorID * m_DetID
unsigned int m_numOfHitsAccepted

◆ ~FillAlignTRTHits()

virtual FillAlignTRTHits::~FillAlignTRTHits ( )
inlinevirtual

Definition at line 56 of file FillAlignTRTHits.h.

56{}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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

◆ fill()

bool FillAlignTRTHits::fill ( const Trk::Track * aTrack,
TRT::TrackInfo * output,
const xAOD::EventInfo & eventInfo,
const xAOD::VertexContainer & vertices )
virtual

INCLUDE TO HAVE UNBIAS RESIDUAL!!

END INCLUDE TO HAVE UNBIAS RESIDUAL!!

Implements IFillAlignTrkInfo.

Definition at line 85 of file FillAlignTRTHits.cxx.

86 {
87
89 float rtrackunbias = 0;
90 float drrtrackunbias = 0;
91 float drrtrack = 0;
92 float ttrackunbias = 0;
93 (*output)[TRT::Track::numberOfPixelHits] = 0;
94 (*output)[TRT::Track::numberOfSCTHits] = 0;
95 (*output)[TRT::Track::numberOfTRTHits] = 0;
96 // loop over the TrackStateonSurfaces
97
98 const Trk::TrackParameters *unbiasedTrkParameters(nullptr);
99 const Trk::TrackStateOnSurface* HitOnTrackToRemove(nullptr);
100
101 double timecor = 0.;
102 const Trk::Track* pTrack = aTrack ;
103 const Trk::Perigee* mesp = pTrack->perigeeParameters();
104 float lbn = -1;
105 float nvrt_rec = -1;
106 double phi = 10;
107 double theta = 100;
108 double pt = 0;
109 double qoverp = 0;
110 double d0 = 0;
111
112 if(mesp){
113 phi = mesp->parameters()[Trk::phi0];
114 theta = mesp->parameters()[Trk::theta];
115 if(fabs(theta)==0) theta=1e-24;
116 float ptinv = std::abs(mesp->parameters()[Trk::qOverP]) / sin(theta);
117 qoverp = mesp->parameters()[Trk::qOverP];
118 if (ptinv != 0) {
119 pt = 1. / ptinv;
120 } else {
121 pt = 1e24;
122 }
123 d0 = mesp->parameters()[Trk::d0];
124 }
125
126 timecor = m_DoMCCosmicTimeShift ;
127
128 lbn = (float)eventInfo.lumiBlock();
129 //Number of Prim vertex:
130 nvrt_rec = 0;
131 int countVertices(0);
132 for (const xAOD::Vertex* vx : vertices) {
133 if (vx->vertexType() == xAOD::VxType::PriVtx) {
134 if ( vx-> nTrackParticles() >= 3) countVertices++;
135 }
136 }
137 nvrt_rec = countVertices;
138
139 auto tsos = aTrack->trackStateOnSurfaces()->begin();
140 auto tsosEnd = aTrack->trackStateOnSurfaces()->end();
141
142 const Trk::MeasurementBase* mesb = nullptr;
143 const Trk::RIO_OnTrack* rotp = nullptr;
144 const InDet::TRT_DriftCircle* dcp = nullptr;
145 const Trk::TrackParameters* tparp = nullptr;
146 const Trk::TrackParameters* mparp = nullptr;
147 const InDet::TRT_DriftCircleOnTrack* trtcirc = nullptr;
148 const TRTCond::RtRelation* rtrelation = nullptr;
149
150
151 for (; tsos != tsosEnd; ++tsos) {
152 mesb = (*tsos)->measurementOnTrack();
153 rotp = dynamic_cast<const Trk::RIO_OnTrack*>(mesb);
154 if(rotp != nullptr) {
155 Identifier ident = rotp->identify();
156 if (m_DetID->is_sct(ident)) {
157 (*output)[TRT::Track::numberOfSCTHits]++;
158 } else if (m_DetID->is_trt(ident)) {
159 (*output)[TRT::Track::numberOfTRTHits]++;
161 trtcirc = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(rotp);
162 if (trtcirc != nullptr) {
163 dcp = trtcirc->prepRawData();
164 tparp = ((*tsos)->trackParameters());
165 mparp = (tparp);
166
167 if (tparp == nullptr) {
168 if (msgLvl(MSG::DEBUG)) msg() << "strange: trk parameters not available" << endmsg;
169 }
170 if (dcp == nullptr) {
171 msg(MSG::ERROR) << "strange: prepRawData not available" << endmsg;
172 }
173
174 if (mparp && dcp) {
175 TRT::HitInfo* newhit = new TRT::HitInfo();
176 output->push_back(newhit); // do we make sure this one is deleted properly
177
178 (*newhit)[TRT::Hit::ident] = ident.get_identifier32().get_compact();
179 (*newhit)[TRT::Hit::detector] = m_TRTID->barrel_ec(ident);
180 (*newhit)[TRT::Hit::layer] = m_TRTID->layer_or_wheel(ident);
181 (*newhit)[TRT::Hit::phiModule] = m_TRTID->phi_module(ident);
182 (*newhit)[TRT::Hit::strawLayer] = m_TRTID->straw_layer(ident);
183 (*newhit)[TRT::Hit::straw] = m_TRTID->straw(ident);
184 (*newhit)[TRT::Hit::side] = static_cast<int>(trtcirc->side());
185
186 // Local wire specific
188 float errsq=Amg::error(rotp->localCovariance(),Trk::driftRadius);
189 if(errsq<0) errsq=1.0;
190 (*newhit)[TRT::Hit::errorSignedDriftRadius] = sqrt(errsq) ;
191 bool isvalid = false;
192
193
194 (*newhit)[TRT::Hit::driftTime] = dcp->driftTime(isvalid) - timecor;
195 (*newhit)[TRT::Hit::driftTimeStatus] = isvalid ;
196 // this is the integer drift time, but multiplied by the scale.
197 // to calculate the residual in the drift time, I need to have the t0 as well.
198 // I'd also like to store the drift velocity
199 if (!isvalid) (*newhit)[TRT::Hit::driftTime] = -1.0;
200
201 (*newhit)[TRT::Hit::t0] = m_trtcaldbTool->getT0(ident) ;
202
204 //CORRECT FOR TUBEHITS!!!:
205 rtrelation = m_trtcaldbTool->getRtRelation(ident) ;
206 // added High Level Threshold information
207 (*newhit)[TRT::Hit::HTLevel] = dcp->highLevel();
208 // Extract the correction in the db for the ToT:
209 float tot = (*newhit)[TRT::Hit::TimeoverThreshold];
210 float ToTCorrection = m_driftFunctionTool->driftTimeToTCorrection(tot, ident);
211
212 // Extract the correction for HT:
213 float HTCorrection = 0;
214 if ((*newhit)[TRT::Hit::HTLevel]){
215 HTCorrection = m_driftFunctionTool->driftTimeHTCorrection(ident);
216 }
217
218 (*newhit)[TRT::Hit::positionOnWire] = tparp->parameters()[Trk::locZ];
219
220 (*newhit)[TRT::Hit::trackDriftRadius] = tparp->parameters()[Trk::driftRadius];
221 errsq=Amg::error(*(mparp->covariance()),Trk::locZ);
222 if(errsq<0) errsq=1.0;
223 (*newhit)[TRT::Hit::errorPositionOnWire] = sqrt(errsq);
224 errsq=Amg::error(*(mparp->covariance()),Trk::driftRadius);
225 if(errsq<0) errsq=1.0;
226 (*newhit)[TRT::Hit::errorTrackDriftRadius] = sqrt(errsq);
227 // calculate the 'trktime' and the 'trkdriftvelocity'
228 if( rtrelation ) {
229 (*newhit)[TRT::Hit::trackDriftTime] = rtrelation->drifttime(std::abs( (*newhit)[TRT::Hit::trackDriftRadius] )) ;
230 (*newhit)[TRT::Hit::driftVelocity] = rtrelation->drdt( (*newhit)[TRT::Hit::trackDriftTime] ) ;
231 }
232
233 (*newhit)[TRT::Hit::trackT0]= timecor ;
234
235 int chip = 0;
236 int board = -1;
237 m_neighbourSvc->getChip(ident,chip);
238 if(abs(m_TRTID->barrel_ec(ident))<2){
239 board = m_neighbourSvc->chipToBoardBarrel(chip, m_TRTID->layer_or_wheel(ident));
240 } else if (chip<12) {
241 board = 0;
242 } else {
243 chip = chip-20;
244 board = 1;
245 }
246
247 // Prepare for Xe-Ar mixed conditions:
248 int isArgonStraw = 0;
249 if (!m_TRTStrawSummaryTool.empty()) {
250 if (m_TRTStrawSummaryTool->getStatusHT(ident, Gaudi::Hive::currentContext()) != TRTCond::StrawStatus::Good) {
251 isArgonStraw = 1;
252 }
253 }
254
255
256 float h_trkDistance = (*newhit)[TRT::Hit::trackDriftRadius];
257
258 float h_driftTime = (*newhit)[TRT::Hit::driftTime] - (*newhit)[TRT::Hit::t0];
259 float h_trkDriftTime = (*newhit)[TRT::Hit::trackDriftTime];
260 float h_timeResidual = h_driftTime - h_trkDriftTime;
261
262 float h_trkVariance = (*newhit)[TRT::Hit::errorTrackDriftRadius] * (*newhit)[TRT::Hit::errorTrackDriftRadius];
263
264 bool h_hasValidDriftTime = (*newhit)[TRT::Hit::driftTimeStatus] ;
265
266 float h_timeOverThreshold = (*newhit)[TRT::Hit::TimeoverThreshold] ;
267
268 float h_residual = (*newhit)[TRT::Hit::signedDriftRadius] - (*newhit)[TRT::Hit::trackDriftRadius] ;
269 float h_residualVariance = h_trkVariance + ((*newhit)[TRT::Hit::errorSignedDriftRadius] * (*newhit)[TRT::Hit::errorSignedDriftRadius]);
270 float d = h_residualVariance;
271 if(d==0) d=1.0e-24;
272 float h_chiSquare = h_residual*h_residual/d ;
273 int dof = (*output)[TRT::Track::degreesOfFreedom]-1;
274 if(dof<1) dof=1;
275 bool hitsel=false;
276 if( std::abs( h_trkDistance ) < m_maxDistance &&
277 std::abs( h_timeResidual ) < m_maxTimeResidual &&
278 h_trkVariance > 0 &&
279 h_hasValidDriftTime &&
280 h_timeOverThreshold/3.125 >= m_minTimebinsOverThreshold &&
281 ((*output)[TRT::Track::chiSquare] - h_chiSquare) / (float)dof < m_maxTrackChisquarePerDof ){
282 hitsel = true;
283 }
284
286 rtrackunbias = 0;
287 drrtrackunbias = 0;
288 errsq = Amg::error(*(mparp->covariance()),Trk::driftRadius);
289 drrtrack = sqrt(errsq);
290 ttrackunbias = 0;
291
292 if (m_updator){
293 tparp = ((*tsos)->trackParameters());
294 HitOnTrackToRemove = *tsos;
295
296 if(HitOnTrackToRemove){
297 unbiasedTrkParameters = m_updator->removeFromState(*(HitOnTrackToRemove->trackParameters()),
298 HitOnTrackToRemove->measurementOnTrack()->localParameters(),
299 HitOnTrackToRemove->measurementOnTrack()->localCovariance()).release();
300 ATH_MSG_DEBUG ("TrackParameters 1: " << *(HitOnTrackToRemove->trackParameters()));
301 }
302 else if (msgLvl(MSG::DEBUG)) {
303 msg() << "TrackParameters 1: nullptr" << endmsg;
304 }
305
306 if(unbiasedTrkParameters){
307 const Trk::TrackParameters *unmparp = (unbiasedTrkParameters);
308 rtrackunbias = unbiasedTrkParameters->parameters()[Trk::driftRadius];
309 errsq=Amg::error(*(unmparp->covariance()),Trk::driftRadius);
310 if(errsq<0) errsq=1.;
311 drrtrackunbias = sqrt(errsq);
312
313 if( rtrelation ) ttrackunbias = rtrelation->drifttime(std::abs( rtrackunbias ));
314 ATH_MSG_DEBUG("Unbiased TrackParameters 2: " << *unbiasedTrkParameters );
315 ATH_MSG_DEBUG("Radius : " << (*newhit)[TRT::Hit::trackDriftRadius] );
316 ATH_MSG_DEBUG("Radius 2: " << rtrackunbias );
317 }
318
319 }
321 float const ntvar[40]={
322 (float)(*output)[TRT::Track::run],
323 (float)(*output)[TRT::Track::event],
324 lbn,
325 nvrt_rec,
326 (float)(*output)[TRT::Track::trackNumber],
327
328 (float)(*newhit)[TRT::Hit::detector],
329 (float)(*newhit)[TRT::Hit::layer],
330 (float)(*newhit)[TRT::Hit::phiModule],
331 (float)(*newhit)[TRT::Hit::strawLayer],
332 (float)(*newhit)[TRT::Hit::straw],
333 (float)board,
334 (float)chip,
335 (float)m_TRTID->straw_id((*newhit)[TRT::Hit::detector],
336 (*newhit)[TRT::Hit::phiModule],
337 (*newhit)[TRT::Hit::layer],
338 (*newhit)[TRT::Hit::strawLayer],
339 (*newhit)[TRT::Hit::straw]).get_identifier32().get_compact() ,
340 (float)tparp->position().x(),
341 (float)tparp->position().y(),
342 (float)tparp->position().z(),
343 (float)(rotp->detectorElement()->center(ident)).x(),
344 (float)(rotp->detectorElement()->center(ident)).y(),
345 (float)(rotp->detectorElement()->center(ident)).z(),
346
349 (*newhit)[TRT::Hit::driftTime],
351 drrtrack,
352 rtrackunbias,
353 drrtrackunbias,
354 (*newhit)[TRT::Hit::trackDriftTime],
355 ttrackunbias,
356 m_trtcaldbTool->getT0(ident),
357 (float)timecor,
358 (float)phi ,
359 (float)theta,
360 (float)pt ,
361 (float)qoverp ,
362 (float)d0 ,
364 (*newhit)[TRT::Hit::HTLevel],
365 ToTCorrection,
366 HTCorrection,
367 (float)isArgonStraw
368 };
369
370 if (hitsel) {
372 m_ntuple->Fill(ntvar);
373 }
374
375 }
376 } else {
377 msg(MSG::ERROR) << "TRT drift RIO cast failed - no hit stored" << endmsg;
378 }
379
380
381 } // identified TRT hit
382 else if (m_DetID->is_pixel(ident)) (*output)[TRT::Track::numberOfPixelHits]++;
383 } // non-zero ROTpointer
384 } // end loop on Surfaces
385 if (msgLvl(MSG::VERBOSE)) msg() << "Track has " << (*output)[TRT::Track::numberOfTRTHits] << " TRT hits --> of which "
386 << output->size() << " hits had FULL info available" << endmsg;
387
388
389
390 delete unbiasedTrkParameters;
391
392
393 return true;
394}
Scalar phi() const
phi method
Scalar theta() const
theta method
#define endmsg
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() 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.
ToolHandle< Trk::IUpdator > m_updator
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
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.
virtual float drdt(float driftime) const =0
driftvelocity for given drifttime
virtual float drifttime(float radius) const =0
drifttime for given radius
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.
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
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 ...
@ layer
Definition HitInfo.h:79
@ strawLayer
Definition HitInfo.h:81
@ phiModule
Definition HitInfo.h:80
@ ident
Definition HitInfo.h:77
@ driftTimeStatus
Definition HitInfo.h:84
@ straw
Definition HitInfo.h:82
@ detector
Definition HitInfo.h:78
@ TimeoverThreshold
Definition HitInfo.h:44
@ driftVelocity
Definition HitInfo.h:50
@ trackT0
Definition HitInfo.h:52
@ driftTime
Definition HitInfo.h:43
@ signedDriftRadius
Definition HitInfo.h:40
@ errorTrackDriftRadius
Definition HitInfo.h:49
@ errorPositionOnWire
Definition HitInfo.h:47
@ errorSignedDriftRadius
Definition HitInfo.h:41
@ trackDriftRadius
Definition HitInfo.h:48
@ HTLevel
Definition HitInfo.h:45
@ positionOnWire
Definition HitInfo.h:46
@ trackDriftTime
Definition HitInfo.h:51
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ driftRadius
trt, straws
Definition ParamDefs.h:53
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ locZ
local cylindrical
Definition ParamDefs.h:42
@ d0
Definition ParamDefs.h:63
ParametersBase< TrackParametersDim, Charged > TrackParameters
output
Definition merge.py:16
@ PriVtx
Primary vertex.
Vertex_v1 Vertex
Define the latest version of the vertex class.

◆ finalize()

StatusCode FillAlignTRTHits::finalize ( )
virtual

Definition at line 75 of file FillAlignTRTHits.cxx.

75 {
76 m_f->Write();
77 m_f->Close();
78 std::cout << "CALIBSTAT TRKS: " << m_numOfProcessedTracks << std::endl;
79 std::cout << "CALIBSTAT HTOT: " << m_numOfHitsTotal << std::endl;
80 std::cout << "CALIBSTAT HACC: " << m_numOfHitsAccepted << std::endl;
81 return StatusCode::SUCCESS;
82}

◆ initialize()

StatusCode FillAlignTRTHits::initialize ( )
virtual

Definition at line 59 of file FillAlignTRTHits.cxx.

59 {
60 ATH_CHECK ( detStore()->retrieve(m_DetID, "AtlasID") );
61 ATH_CHECK ( detStore()->retrieve(m_TRTID, "TRT_ID") );
62
63 ATH_CHECK ( m_trtcaldbTool.retrieve() );
64 ATH_CHECK ( m_neighbourSvc.retrieve() );
65 ATH_CHECK ( m_driftFunctionTool.retrieve() );
66 ATH_CHECK ( m_updator.retrieve() );
67 ATH_CHECK ( m_TRTStrawSummaryTool.retrieve() );
68
69 m_f = new TFile(m_ntupleName.value().c_str(),"RECREATE");
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;
72}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::string > m_ntupleName
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ interfaceID()

const InterfaceID & IFillAlignTrkInfo::interfaceID ( )
inlinestaticinherited

Definition at line 44 of file IFillAlignTrkInfo.h.

45{
47}
static const InterfaceID IID_IFillAlignTrkInfo("IFillAlignTrkInfo", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_DetID

const AtlasDetectorID* FillAlignTRTHits::m_DetID
private

Definition at line 66 of file FillAlignTRTHits.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DoMCCosmicTimeShift

float FillAlignTRTHits::m_DoMCCosmicTimeShift
private

Definition at line 84 of file FillAlignTRTHits.h.

◆ m_driftFunctionTool

ToolHandle< ITRT_DriftFunctionTool > FillAlignTRTHits::m_driftFunctionTool {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "Drift function tool name"}
private

Definition at line 69 of file FillAlignTRTHits.h.

69{this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "Drift function tool name"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_f

TFile* FillAlignTRTHits::m_f
private

Definition at line 86 of file FillAlignTRTHits.h.

◆ m_maxDistance

float FillAlignTRTHits::m_maxDistance
private

Definition at line 77 of file FillAlignTRTHits.h.

◆ m_maxTimeResidual

float FillAlignTRTHits::m_maxTimeResidual
private

Definition at line 78 of file FillAlignTRTHits.h.

◆ m_maxTrackChisquarePerDof

float FillAlignTRTHits::m_maxTrackChisquarePerDof
private

Definition at line 80 of file FillAlignTRTHits.h.

◆ m_minTimebinsOverThreshold

int FillAlignTRTHits::m_minTimebinsOverThreshold
private

Definition at line 79 of file FillAlignTRTHits.h.

◆ m_neighbourSvc

ServiceHandle<ITRT_StrawNeighbourSvc> FillAlignTRTHits::m_neighbourSvc {this, "NeighbourSvc", "NeighbourSvc", ""}
private

Definition at line 72 of file FillAlignTRTHits.h.

72{this, "NeighbourSvc", "NeighbourSvc", ""};

◆ m_ntuple

TNtuple* FillAlignTRTHits::m_ntuple
private

Definition at line 87 of file FillAlignTRTHits.h.

◆ m_ntupleName

Gaudi::Property<std::string> FillAlignTRTHits::m_ntupleName {this, "NtupleName" , "basic.root", "Changes the name of the ntuple Output"}
private

Definition at line 75 of file FillAlignTRTHits.h.

75{this, "NtupleName" , "basic.root", "Changes the name of the ntuple Output"};

◆ m_numOfHitsAccepted

unsigned int FillAlignTRTHits::m_numOfHitsAccepted
private

Definition at line 82 of file FillAlignTRTHits.h.

◆ m_numOfHitsTotal

unsigned int FillAlignTRTHits::m_numOfHitsTotal
private

Definition at line 81 of file FillAlignTRTHits.h.

◆ m_numOfProcessedTracks

unsigned int FillAlignTRTHits::m_numOfProcessedTracks
private

Definition at line 83 of file FillAlignTRTHits.h.

◆ m_trtcaldbTool

ToolHandle<ITRT_CalDbTool> FillAlignTRTHits::m_trtcaldbTool {this, "TRTCalDbTool", "CalDbTool", "Access to the folder of the calibration constants"}
private

Definition at line 71 of file FillAlignTRTHits.h.

71{this, "TRTCalDbTool", "CalDbTool", "Access to the folder of the calibration constants"};

◆ m_TRTID

const TRT_ID* FillAlignTRTHits::m_TRTID
private

Definition at line 67 of file FillAlignTRTHits.h.

◆ m_TRTStrawSummaryTool

ToolHandle<ITRT_StrawStatusSummaryTool> FillAlignTRTHits::m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "InDetTRTStrawStatusSummaryTool", ""}
private

Definition at line 73 of file FillAlignTRTHits.h.

73{this, "TRTStrawSummaryTool", "InDetTRTStrawStatusSummaryTool", ""};

◆ m_updator

ToolHandle<Trk::IUpdator> FillAlignTRTHits::m_updator {this, "UpdatorTool" , "Trk::KalmanUpdator/TrkKalmanUpdator", "Measurement updator to calculate unbiased track states"}
private

Definition at line 70 of file FillAlignTRTHits.h.

70{this, "UpdatorTool" , "Trk::KalmanUpdator/TrkKalmanUpdator", "Measurement updator to calculate unbiased track states"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: