ATLAS Offline Software
Loading...
Searching...
No Matches
AddTRTMomConstr.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// @file AddTRTMomConstr.cxx
6//
7// @author Oleg Brandt
8// many thanks to the TRTAlignAlgs designers and Pawel Bruckman, Markus Elsing, Thijs Cornelissen.
9//
10
12#include "GaudiKernel/TypeNameString.h"
13#include "GaudiKernel/SystemOfUnits.h"
25#include "Identifier/Identifier.h"
30#include <cmath>
31
32
33
34AddTRTMomConstr::AddTRTMomConstr( const std::string& name, ISvcLocator* pSvcLocator )
35 : AthAlgorithm (name, pSvcLocator)
36 , m_idHelper(nullptr)
37 , m_trtid(nullptr)
38 , m_trackListInput("ExtendedTracks")
39 , m_trackListOutput("SiTracksWithTRTMomConstr")
40 , m_trackSummaryTool("Trk::ITrackSummaryTool/ITrackSummaryTool")
41 , m_trackFitter("Trk::KalmanFitter/TrkKalmanFitter")
43 , m_thetaCorr(1.)
44 , m_applyTrkSel(false)
45 , m_selPtMin(0)
46 , m_selEtaMin(-2.5)
47 , m_selEtaMax(2.5)
50 , m_selNHitTRTMin(20)
52 , m_selEtaCrackMin(0.7)
58 , m_nRejectPIX(0)
59 , m_nRejectSCT(0)
60 , m_nRejectTRT(0)
61 , m_nRejectPM(0)
62{
63 // declare algorithm parameters
64 declareProperty("TrackListInput" , m_trackListInput) ;
65 declareProperty("TrackListOutput" , m_trackListOutput) ;
66 declareProperty("TrackFitter" , m_trackFitter) ;
67 declareProperty("TrackSummaryTool" , m_trackSummaryTool) ;
68 declareProperty("UseThetaCorrection" , m_useThetaCorrection) ;
69 declareProperty("ApplyTrkSel" , m_applyTrkSel) ;
70 declareProperty("SelPtMin" , m_selPtMin) ;
71 declareProperty("SelEtaMin" , m_selEtaMin) ;
72 declareProperty("SelEtaMax" , m_selEtaMax) ;
73 declareProperty("SelNHitPIXMin" , m_selNHitPIXMin) ;
74 declareProperty("SelNHitSCTMin" , m_selNHitSCTMin) ;
75 declareProperty("SelNHitTRTMin" , m_selNHitTRTMin) ;
76 declareProperty("SelNHitTRTMinCrack" , m_selNHitTRTMinCrack) ;
77 declareProperty("SelEtaCrackMin" , m_selEtaCrackMin) ;
78 declareProperty("SelEtaCrackMax" , m_selEtaCrackMax) ;
79 declareProperty("SelChiSqPerDOFMin" , m_selChiSqPerDOFMin) ;
80}
81
83
85 //retrieve the DetectorStore service
86 ATH_CHECK(detStore().retrieve()) ;
87 ATH_CHECK(detStore()->retrieve(m_trtid));
88 ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
89 // get TrackSummaryTool
90 ATH_CHECK(m_trackSummaryTool.retrieve());
91 // Set up fitter
92 ATH_CHECK(m_trackFitter.retrieve());
93 // Print input properties
94 if( m_applyTrkSel ) {
96 "Track selection will be applied:"
97 << "\n " << m_selEtaMin << " < eta < " << m_selEtaMax
98 << "\n trans. region: " << m_selEtaCrackMin << " < |eta| < " << m_selEtaCrackMax
99 << "\n pT > " << m_selPtMin/Gaudi::Units::GeV << " GeV"
100 << "\n number_of_PIXEL_hits >= " << m_selNHitPIXMin
101 << "\n number_of_SCT_hits >= " << m_selNHitSCTMin
102 << "\n number_of_TRT_hits >= " << m_selNHitTRTMin
103 << "\n number_of_TRT_hits in crack >= " << m_selNHitTRTMinCrack
104 << "\n chi2/dof < " << m_selChiSqPerDOFMin
105 ) ;
106 } else {
107 ATH_MSG_DEBUG( "NO selection will be applied to tracks" ) ;
108 }
109 return StatusCode::SUCCESS;
110} // initialize(.)
111
113 ATH_MSG_DEBUG( (*this) ) ;
114 return StatusCode::SUCCESS;
115}
116
118 if( !m_trackListOutput.empty() && !m_trackListInput.empty() ) {
119 const TrackCollection* inputtracks = nullptr;
120 ATH_CHECK(evtStore()->retrieve( inputtracks, m_trackListInput) );
121 auto outputtracks = std::make_unique<ConstDataVector<TrackCollection> >( SG::VIEW_ELEMENTS ) ;
122 for (const auto it : *inputtracks){
123 auto track=it;
124 if( m_applyTrkSel && !accept( *track ) ) {
125 ATH_MSG_DEBUG( "kinematic requirements not passed, skip track") ;
126 continue ;
127 }
129 track = addTRTMomentumConstraint( track ) ;
130 if( track ) {
131 ATH_MSG_VERBOSE ( "addTRTMomentumConstraint(.) produced new track" ) ;
132 outputtracks->push_back( track ) ;
133 } else {
134 ATH_MSG_DEBUG( "addTRTMomentumConstraint(.) returned 0 pointer, skip track") ;
135 ++m_nRejectPM ;
136 }
137 }
138
139 m_nTracksProcessed += inputtracks->size() ;
140 m_nTracksAccepted += outputtracks->size() ;
141
142 if( evtStore()->record( std::move(outputtracks), m_trackListOutput ).isFailure() ) {
143 ATH_MSG_ERROR( "Failed to record trackcollection with name " << m_trackListOutput );
144 }
145 }
146 return StatusCode::SUCCESS;
147} // execute(.)
148
150 // selection for alignment quality tracks
151 ATH_MSG_DEBUG( "Inside accept(.)") ;
152
153 bool rc=true ;
154 const Trk::Track* pTrack = &track ;
155 const Trk::Perigee* mesp = pTrack->perigeeParameters();
156 if( !mesp ) {
157 ATH_MSG_WARNING("MeasuredPerigee pointer 0, track not accepted") ;
158 return false ;
159 }
160
161 float theta = mesp->parameters()[Trk::theta] ;
162 float pt = 0. ;
163 if( theta != 0 ){
164 float ptInv = std::abs( mesp->parameters()[Trk::qOverP] ) / std::sin( theta ) ;
165 if( ptInv != 0 ) {
166 pt = 1./ptInv ;
167 if( m_selPtMin > 0 && pt < m_selPtMin ) rc = false ;
168 }
169 } else {
170 ATH_MSG_WARNING( "theta = 0, q/p conversion to p_T failed!" );
171 return false ;
172 }
173
174 float eta = -std::log( std::tan( theta/2. ) ) ;
176 rc = false ;
177 }
178
179 float chisqpdof = track.fitQuality()->chiSquared() / track.fitQuality()->numberDoF() ;
180 if( m_selChiSqPerDOFMin > 0 && chisqpdof > m_selChiSqPerDOFMin ) rc = false ;
181 std::unique_ptr<const Trk::TrackSummary> summary
182 = m_trackSummaryTool->summary(Gaudi::Hive::currentContext(), *pTrack ) ;
183 if( summary->get(Trk::numberOfPixelHits) < m_selNHitPIXMin ) {
184 ++m_nRejectPIX ;
185 rc = false;
186 }
187 if( summary->get(Trk::numberOfSCTHits) < m_selNHitSCTMin ) {
188 ++m_nRejectSCT ;
189 rc = false ;
190 }
191 // different treatment for TRT in transition region
192 bool isInTransitionRegion = std::abs(eta) > m_selEtaCrackMin && std::abs(eta) < m_selEtaCrackMax ;
193 if( isInTransitionRegion ) {
194 if( int(summary->get(Trk::numberOfTRTHits)) < m_selNHitTRTMinCrack ) {
195 ++m_nRejectTRT ;
196 rc = false ;
197 }
198 } else {
199 if( int(summary->get(Trk::numberOfTRTHits)) < m_selNHitTRTMin ) {
200 ++m_nRejectTRT ;
201 rc = false ;
202 }
203 }
204
205 // All cuts passed...
206 ATH_MSG_DEBUG( "Track selection:"
207 << "\n\t passed : " << rc
208 << "\n\t Pt = " << pt
209 << "\n\t phi = " << mesp->parameters()[Trk::phi]
210 << "\n\t eta = " << eta
211 << "\n\t nPIX = " << summary->get(Trk::numberOfPixelHits)
212 << "\n\t nSCT = " << summary->get(Trk::numberOfSCTHits)
213 << "\n\t nTRT = " << summary->get(Trk::numberOfTRTHits)
214 ) ;
215 ATH_MSG_DEBUG( "leaving accept(.)" ) ;
216 return rc ;
217} // accept(.)
218
220 ATH_MSG_VERBOSE ("Inside findouterscthit: " << track->trackStateOnSurfaces()->size());
221 double rmax=0. ;
222 const Trk::TrackStateOnSurface* rc=nullptr ;
223 for (const Trk::TrackStateOnSurface* tsos : *track->trackStateOnSurfaces()) {
224 if( !tsos->type(Trk::TrackStateOnSurface::Outlier) &&
225 tsos->measurementOnTrack() &&
226 tsos->trackParameters() ) {
227 ATH_MSG_VERBOSE ( "Found good measuredtrackparameters" );
228 const InDet::SCT_ClusterOnTrack* sctclus = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(tsos->measurementOnTrack());
229 if(sctclus) {
230 ATH_MSG_VERBOSE ( "Found SCT_ClusterOnTrack");
231 const Amg::Vector3D& pos = sctclus->globalPosition() ;
232 double r = std::sqrt(pos.x()*pos.x() + pos.y()*pos.y()) ;
233 if(rc==nullptr || r>rmax) {
234 rc = tsos ;
235 rmax = r ;
236 }
237 }
238 }
239 }
240 ATH_MSG_VERBOSE ( "Returning surface with adress: " << rc << " at radius " << rmax);
241 return rc ;
242}
243
245 ATH_MSG_VERBOSE ( "Inside findinnerscthit: " << track->trackStateOnSurfaces()->size() );
246 double rmin=9999999. ;
247 const Trk::TrackStateOnSurface* rc=nullptr ;
248 for (const Trk::TrackStateOnSurface* tsos : *track->trackStateOnSurfaces()) {
249 if( !tsos->type(Trk::TrackStateOnSurface::Outlier) &&
250 tsos->measurementOnTrack() &&
251 tsos->trackParameters() ) {
252 ATH_MSG_VERBOSE ( "Found good measuredtrackparameters" );
253 const InDet::TRT_DriftCircleOnTrack* trthit = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(tsos->measurementOnTrack());
254 if(trthit) {
255 ATH_MSG_VERBOSE ( "Found TRT_DriftCircleOnTrack" );
256 const Amg::Vector3D& pos = trthit->globalPosition() ;
257 double r = sqrt(pos.x()*pos.x() + pos.y()*pos.y()) ;
258 if(rc==nullptr || r<rmin) {
259 rc = tsos ;
260 rmin = r ;
261 }
262 }
263 }
264 }
265 ATH_MSG_VERBOSE ( "Returning surface with adress: " << rc << " at radius " << rmin );
266 return rc ;
267}
268
270 Trk::DefinedParameter z0 ( mp->parameters()[Trk::z0], Trk::z0 ) ;
271 Trk::DefinedParameter theta( mp->parameters()[Trk::theta], Trk::theta ) ;
272 std::array<Trk::DefinedParameter, 2> defPar = {z0, theta};
273 if( !mp->covariance() ) return nullptr;
274 Trk::LocalParameters parFromSi( defPar ) ;
275 AmgSymMatrix(2) covFromSi;
276
277 covFromSi( 0, 0 ) = (*mp->covariance())( Trk::z0,Trk::z0 ) ;
278 covFromSi( 1, 1 ) = (*mp->covariance())( Trk::theta,Trk::theta ) ;
279 covFromSi( 1, 0 ) = (*mp->covariance())( Trk::z0, Trk::theta ) ;
280 covFromSi( 0, 1 ) = (*mp->covariance())( Trk::z0, Trk::theta ) ;
281
282 const Trk::Surface& mpSurf = mp->associatedSurface() ;
283
285 , covFromSi
286 , mpSurf
287 ) ;
288 return pm ;
289}
290
292 , const Trk::Perigee* mpTRT ) {
293
294 if( !mpSi->covariance() || !mpTRT->covariance() ) return nullptr;
295
296 // since z0, theta not measured by TRT, take back initial Si values with blown up errors.
297 Trk::DefinedParameter z0TRT ( mpSi->parameters()[Trk::z0], Trk::z0 ) ;
298 Trk::DefinedParameter thetaTRT ( mpSi->parameters()[Trk::theta], Trk::theta ) ;
299 Trk::DefinedParameter qOvewPTRT( mpTRT->parameters()[Trk::qOverP]*m_thetaCorr, Trk::qOverP ) ;
300 std::array<Trk::DefinedParameter, 3> parFromTRT_vec = {z0TRT, thetaTRT,
301 qOvewPTRT};
302 Trk::LocalParameters parFromTRT(parFromTRT_vec);
303 double A = 1e6 ; // scale up the errorfor z0 and theta to avoid double-counting when including the PM
304
305
306 AmgSymMatrix(3) covFromTRT;
307
308 // take the z0 theta part from extended track (correl. messed up by TRT fit) and scale it up with A
309 covFromTRT( 0, 0 ) = (*mpSi->covariance())( Trk::z0, Trk::z0 ) * A * A ;
310 covFromTRT( 1, 1 ) = (*mpSi->covariance())( Trk::theta, Trk::theta ) * A * A ;
311 covFromTRT( 1, 0 ) = (*mpSi->covariance())( Trk::z0 , Trk::theta ) * A * A ;
312 covFromTRT( 0, 1 ) = (*mpSi->covariance())( Trk::z0 , Trk::theta ) * A * A ;
313 // scale up the cov terms dependant on z0 and theta by A, and m_thetaCorr from q/p. Same m_thetaCorr for theta
314 covFromTRT( 2, 2 ) = (*mpTRT->covariance())( Trk::qOverP, Trk::qOverP ) * m_thetaCorr * m_thetaCorr ;
315 covFromTRT( 2, 0 ) = (*mpTRT->covariance())( Trk::z0 , Trk::qOverP ) * A * m_thetaCorr ;
316 covFromTRT( 2, 1 ) = (*mpTRT->covariance())( Trk::theta, Trk::qOverP ) * A * m_thetaCorr * m_thetaCorr ;
317 covFromTRT( 0, 2 ) = (*mpTRT->covariance())( Trk::z0 , Trk::qOverP ) * A * m_thetaCorr ;
318 covFromTRT( 1, 2 ) = (*mpTRT->covariance())( Trk::theta, Trk::qOverP ) * A * m_thetaCorr * m_thetaCorr ;
319
320 const Trk::Surface& mpTRTSurf = mpSi->associatedSurface() ;
321
322 Trk::PseudoMeasurementOnTrack *pm = new Trk::PseudoMeasurementOnTrack( std::move(parFromTRT)
323 , covFromTRT
324 , mpTRTSurf
325 ) ;
326 return pm ;
327}
328
330 Trk::MeasurementSet sortedMS ;
331 sortedMS.push_back( pm ) ;
332 for( int i=0, i_max=ms.size() ; i!=i_max ; ++i ) {
333 sortedMS.push_back( ms[i] ) ;
334 }
335 return sortedMS ;
336}
337
339 Trk::MeasurementSet setSi ;
340 Trk::MeasurementSet setTRT ;
341 //store all silicon measurements into the measurementset
342 for (const auto it:*(track->measurementsOnTrack())){
343 const Trk::RIO_OnTrack* rio = dynamic_cast <const Trk::RIO_OnTrack*>(it);
344 if (rio) {
345 const Identifier& surfaceID = (rio->identify()) ;
346 if( m_idHelper->is_sct(surfaceID) || m_idHelper->is_pixel(surfaceID) ) {
347 setSi.push_back ( it ) ;
348 }
349 if( m_idHelper->is_trt(surfaceID) ) {
350 setTRT.push_back ( it ) ;
351 }
352 }
353 }
354 ATH_MSG_DEBUG("TRTMomConstr() : Found " << setSi.size() << " Si measurm's!" ) ;
355 ATH_MSG_DEBUG("TRTMomConstr() : Found " << setTRT.size() << " TRT measurm's!") ;
356 if( int(setTRT.size()) < m_selNHitTRTMin ) {
357 ATH_MSG_DEBUG( "TRTMomConstr() : fewer TRT measurements than required: "
358 << setTRT.size() << " < " << m_selNHitTRTMin << ", skip track" ) ;
359 return nullptr ;
360 }
361
362 ATH_MSG_DEBUG( std::setiosflags( std::ios::scientific )) ;
363 ATH_MSG_DEBUG (std::setprecision( 7 )) ;
364 ATH_MSG_VERBOSE ( std::setiosflags( std::ios::scientific )) ;
365 ATH_MSG_VERBOSE ( std::setprecision( 7 )) ;
366 const Trk::Perigee* perTrk = track->perigeeParameters();
367 if( !perTrk ) {
368 ATH_MSG_WARNING("TRTMomConstr() : No Perigee parameter on track!");
369 return nullptr ;
370 }
371
372 // now add z_0 and theta from original track as PseudoMeas to the TRT MeasurementSet
373 const Trk::PseudoMeasurementOnTrack *pmFromSi = createPMfromSi( perTrk ) ;
374 if( !pmFromSi ) {
375 ATH_MSG_ERROR( "TRTMomConstr() : PseudoMeasurementOnTrack creation failed! " );
376 return nullptr ;
377 }
378 ATH_MSG_DEBUG( "TRTMomConstr() : pmFromSi " << *pmFromSi) ;
379 Trk::MeasurementSet setTRTPM = addPM( setTRT, pmFromSi ) ;
380
381 ATH_MSG_VERBOSE ( "TRTMomConstr() : TRT+PM MeasurementSet : " );
382 for( int i=0, i_max=setTRTPM.size() ; i!=i_max ; ++i ) {
383 ATH_MSG_VERBOSE ("============== i=" << i << " =============");
384 ATH_MSG_VERBOSE ( *(setTRTPM[i]));
385 }
386 ATH_MSG_VERBOSE ("==========================================");
387
388 // fit TRT part of the track with PseudoMeas on z_0, theta
389 Trk::Track* trkTRT = (m_trackFitter->fit(
390 Gaudi::Hive::currentContext(), setTRTPM, *perTrk, true, Trk::pion
391 //, Trk::muon
392 //, Trk::nonInteracting
393 )).release();
394 if (!trkTRT) {
395 ATH_MSG_DEBUG("TRTMomConstr() : Fit of TRT part of the track failed! ");
396 return nullptr;
397 }
398 const Trk::Perigee* perTRT = trkTRT->perigeeParameters();
399 ATH_MSG_DEBUG( "TRTMomConstr() : perTRT " << *perTRT) ;
400 // the theta value after TRT+PM fit can be different from the initial one by < o(10e-4). Correct q/p optionally
401 if( m_useThetaCorrection ) m_thetaCorr = std::sin( perTrk->parameters()[Trk::theta] )
402 / std::sin( perTRT->parameters()[Trk::theta] ) ;
403 ATH_MSG_DEBUG( "TRTMomConstr() : Scalefactor to correct q/p: " << m_thetaCorr) ;
404
405 // define new PM with the momentum constraint from the TRT to pass to Si
406 const Trk::PseudoMeasurementOnTrack *pmFromTRT = createPMfromTRT( perTrk, perTRT ) ;
407 if( !pmFromTRT ) {
408 ATH_MSG_ERROR( "TRTMomConstr() : PseudoMeasurementOnTrack creation failed! " );
409 return nullptr ;
410 }
411 ATH_MSG_DEBUG("TRTMomConstr() : pmFromTRT " << *pmFromTRT ) ;
412 Trk::MeasurementSet setSiPM = addPM( setSi, pmFromTRT ) ;
413
414 // fit Si part of the track with PM from TRT
415 Trk::Track* fittedTrack =
417 ->fit(Gaudi::Hive::currentContext(), setSiPM, *perTrk, true, Trk::pion
418 //, Trk::muon
419 //, Trk::nonInteracting
420 ).release();
421 if (!fittedTrack) {
422 ATH_MSG_DEBUG( "TRTMomConstr() : Si+TRT-p_T Track fit failed !" ) ;
423 } else {
424 const Trk::Perigee* perSi = fittedTrack->perigeeParameters();
425
426 ATH_MSG_DEBUG( "TRTMomConstr() : Si+PM(TRT) track parameteres @ perigee: " << *perSi ) ;
427 }
428
429 return fittedTrack;
430} // TRTMomentumConstraintForExtTracks
431
432MsgStream& operator<<( MsgStream& outst, const AddTRTMomConstr& alg ) {
433 return alg.dump( outst ) ;
434}
435
436MsgStream& AddTRTMomConstr::dump( MsgStream& outst ) const {
437 outst << "\n|-------------------------------------------------------------------";
438 outst << "-----------------------------|\n" ;
439 outst << "| processed : "
440 << std::setw(7) << m_nTracksProcessed
441 << " tracks |\n";
442 outst << "| accepted by track presel. : "
443 << std::setw(7) << m_nTracksPresel
444 << " tracks |\n";
445 outst << "| accepted by track presel. + PM : "
446 << std::setw(7) << m_nTracksAccepted
447 << " tracks |\n";
448 outst << "| ------------------------------------------------------------------";
449 outst << "---------------------------- |\n" ;
450 outst << "| reject by # PIX hits : "
451 << std::setw(7) << m_nRejectPIX
452 << " tracks |\n";
453 outst << "| reject by # SCT hits : "
454 << std::setw(7) << m_nRejectSCT
455 << " tracks |\n";
456 outst << "| reject by # TRT hits : "
457 << std::setw(7) << m_nRejectTRT
458 << " tracks |\n";
459 outst << "| ------------------------------------------------------------------";
460 outst << "---------------------------- |\n" ;
461 outst << "| reject by exist. PM(TRT) : "
462 << std::setw(7) << m_nRejectPM
463 << " tracks |\n";
464
465 outst << "|-------------------------------------------------------------------";
466 outst << "-----------------------------|\n" ;
467 return outst ;
468}
MsgStream & operator<<(MsgStream &outst, const AddTRTMomConstr &alg)
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
DataVector adapter that acts like it holds const pointers.
#define AmgSymMatrix(dim)
static Double_t rc
This is an Identifier helper class for the TRT subdetector.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
size_t m_nRejectPM
Counter for number of tracks failing the addition of a pseudo-measurement (PM)
Trk::Track * addTRTMomentumConstraint(const Trk::Track *track)
Strips of all TRT hits from the track and replaces them with a TRT momentum constraint from a the TRT...
std::string m_trackListInput
Name of the TrackCollection (input)
double m_selPtMin
minimal pT cut value for the TrackSelection
bool m_useThetaCorrection
correct theta after TRT+PM(z0,theta) refit, small diff.
StatusCode finalize()
finalize method of this algorithm.
size_t m_nRejectSCT
Counter for number of tracks failing the min number of SCT hits req.
size_t m_nTracksProcessed
Counter for number of tracks processed.
const Trk::TrackStateOnSurface * findouterscthit(const Trk::Track *track)
Returns the outermost SCT TSOS on the given Track.
double m_selEtaCrackMax
maximum |eta| to define the transition region
const Trk::PseudoMeasurementOnTrack * createPMfromSi(const Trk::Perigee *mp)
creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters
bool accept(const Trk::Track &track)
Verifies if the given track passes the track selection criteria specified via the jobOptions.
MsgStream & dump(MsgStream &outst) const
size_t m_nTracksAccepted
Counter for number of tracks passing the preselection and with PM.
std::string m_trackListOutput
Name of the TrackCollection (Output)
ToolHandle< Trk::ITrackFitter > m_trackFitter
The TrackFitter to refit the tracks (segment, momentum constraint)
AddTRTMomConstr(const std::string &name, ISvcLocator *pSvcLocator)
The AddTRTMomConstr is an implementation to add the so-called TRT momentum constraint on a track.
int m_selNHitPIXMin
minimal number of PIX hits cut value for the TrackSelection
const TRT_ID * m_trtid
Identifier helper class for the TRT.
double m_selEtaMax
maximal eta cut value for the TrackSelection
int m_selNHitTRTMinCrack
minimal number of TRT hits cut value in trans.
double m_selEtaMin
minimal eta cut value for the TrackSelection
StatusCode execute()
execute method of this algorithm that is called for each event
int m_selNHitSCTMin
minimal number of SCT hits cut value for the TrackSelection
ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool
The summary tool to make the track selection.
double m_selEtaCrackMin
minimum |eta| to define the transition region
int m_selNHitTRTMin
minimal number of TRT hits cut value for the TrackSelection
const Trk::PseudoMeasurementOnTrack * createPMfromTRT(const Trk::Perigee *mpSi, const Trk::Perigee *mpTRT)
creates a PseudoMeasurement with (z0, theta, q/p) from TRT track perigee parameters
double m_selChiSqPerDOFMin
maximal Chisquare per degree of freedom cut value for the TrackSelection
StatusCode initialize()
initialize method of this algorithm.
size_t m_nTracksPresel
Counter for number of tracks passing the preselection.
double m_thetaCorr
theta can be different after TRT+PM fit by < o(10e-4).
bool m_applyTrkSel
apply a selection on tracks or not
size_t m_nRejectTRT
Counter for number of tracks failing the min number of TRT hits req.
size_t m_nRejectPIX
Counter for number of tracks failing the min number of PIX hits req.
const Trk::TrackStateOnSurface * findinnertrthit(const Trk::Track *track)
Returns the innermost TRT TSOS on the given Track.
const AtlasDetectorID * m_idHelper
Detector ID helper.
const Trk::MeasurementSet addPM(Trk::MeasurementSet &ms, const Trk::PseudoMeasurementOnTrack *pm)
adds a PseudoMeasurement to a MeasurementSet
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
size_type size() const noexcept
Returns the number of elements in the collection.
Specific class to represent the SCT measurements.
virtual const Amg::Vector3D & globalPosition() const override
returns global position (gathered through Surface constraint)
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
virtual const Amg::Vector3D & globalPosition() const override final
return the global position of this RIO_OnTrack
virtual const S & associatedSurface() const override final
Access to the Surface method.
Class to handle pseudo-measurements in fitters and on track objects.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Identifier identify() const
return the identifier -extends MeasurementBase
Abstract Base Class for tracking surfaces.
represents the track state (measurement, material, fit parameters and quality) at a surface.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
const Perigee * perigeeParameters() const
return Perigee.
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition FitterTypes.h:30
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ phi
Definition ParamDefs.h:75
@ z0
Definition ParamDefs.h:64
std::pair< double, ParamDefs > DefinedParameter
Typedef to of a std::pair<double, ParamDefs> to identify a passed-through double as a specific type o...
@ numberOfPixelHits
number of pixel layers on track with absence of hits
hold the test vectors and ease the comparison