ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AddTRTMomConstr Class Reference

#include <AddTRTMomConstr.h>

Inheritance diagram for AddTRTMomConstr:
Collaboration diagram for AddTRTMomConstr:

Public Member Functions

 AddTRTMomConstr (const std::string &name, ISvcLocator *pSvcLocator)
 The AddTRTMomConstr is an implementation to add the so-called TRT momentum constraint on a track. More...
 
 ~AddTRTMomConstr ()
 
StatusCode initialize ()
 initialize method of this algorithm. More...
 
StatusCode execute ()
 execute method of this algorithm that is called for each event
More...
 
StatusCode finalize ()
 finalize method of this algorithm. More...
 
MsgStream & dump (MsgStream &outst) const
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

const Trk::TrackStateOnSurfacefindouterscthit (const Trk::Track *track)
 Returns the outermost SCT TSOS on the given Track. More...
 
const Trk::TrackStateOnSurfacefindinnertrthit (const Trk::Track *track)
 Returns the innermost TRT TSOS on the given Track. More...
 
bool accept (const Trk::Track &track)
 Verifies if the given track passes the track selection criteria specified via the jobOptions. More...
 
const Trk::MeasurementSet addPM (Trk::MeasurementSet &ms, const Trk::PseudoMeasurementOnTrack *pm)
 adds a PseudoMeasurement to a MeasurementSet More...
 
const Trk::PseudoMeasurementOnTrackcreatePMfromSi (const Trk::Perigee *mp)
 creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters More...
 
const Trk::PseudoMeasurementOnTrackcreatePMfromTRT (const Trk::Perigee *mpSi, const Trk::Perigee *mpTRT)
 creates a PseudoMeasurement with (z0, theta, q/p) from TRT track perigee parameters More...
 
Trk::TrackaddTRTMomentumConstraint (const Trk::Track *track)
 Strips of all TRT hits from the track and replaces them with a TRT momentum constraint from a the TRT segment belonging to the (extended) track (returns NULL in case of failure) More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const AtlasDetectorIDm_idHelper
 Detector ID helper. More...
 
const TRT_IDm_trtid
 Identifier helper class for the TRT. More...
 
std::string m_trackListInput
 Name of the TrackCollection (input) More...
 
std::string m_trackListOutput
 Name of the TrackCollection (Output) More...
 
ToolHandle< Trk::ITrackSummaryToolm_trackSummaryTool
 The summary tool to make the track selection. More...
 
ToolHandle< Trk::ITrackFitterm_trackFitter
 The TrackFitter to refit the tracks (segment, momentum constraint) More...
 
bool m_useThetaCorrection
 correct theta after TRT+PM(z0,theta) refit, small diff. More...
 
double m_thetaCorr
 theta can be different after TRT+PM fit by < o(10e-4). More...
 
bool m_applyTrkSel
 apply a selection on tracks or not More...
 
double m_selPtMin
 minimal pT cut value for the TrackSelection More...
 
double m_selEtaMin
 minimal eta cut value for the TrackSelection More...
 
double m_selEtaMax
 maximal eta cut value for the TrackSelection More...
 
int m_selNHitPIXMin
 minimal number of PIX hits cut value for the TrackSelection More...
 
int m_selNHitSCTMin
 minimal number of SCT hits cut value for the TrackSelection More...
 
int m_selNHitTRTMin
 minimal number of TRT hits cut value for the TrackSelection More...
 
int m_selNHitTRTMinCrack
 minimal number of TRT hits cut value in trans. More...
 
double m_selEtaCrackMin
 minimum |eta| to define the transition region More...
 
double m_selEtaCrackMax
 maximum |eta| to define the transition region More...
 
double m_selChiSqPerDOFMin
 maximal Chisquare per degree of freedom cut value for the TrackSelection More...
 
size_t m_nTracksProcessed
 Counter for number of tracks processed. More...
 
size_t m_nTracksPresel
 Counter for number of tracks passing the preselection. More...
 
size_t m_nTracksAccepted
 Counter for number of tracks passing the preselection and with PM. More...
 
size_t m_nRejectPIX
 Counter for number of tracks failing the min number of PIX hits req. More...
 
size_t m_nRejectSCT
 Counter for number of tracks failing the min number of SCT hits req. More...
 
size_t m_nRejectTRT
 Counter for number of tracks failing the min number of TRT hits req. More...
 
size_t m_nRejectPM
 Counter for number of tracks failing the addition of a pseudo-measurement (PM) More...
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 36 of file AddTRTMomConstr.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AddTRTMomConstr()

AddTRTMomConstr::AddTRTMomConstr ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

The AddTRTMomConstr is an implementation to add the so-called TRT momentum constraint on a track.

It was developed in the context of alignment, and its main idea is that if the TRT is free from "weak modes", its curvature measurement can be added as a PseudoMeasurement (PM) to a Si-only track. This extra information, taken into account while refitting the Si-only part of the track or read in by the alignment algorithms directly, can serve to eliminate the alignment weak modes from the Si tracker of ATLAS. More details can be found at: https://twiki.cern.ch/twiki/bin/view/Atlas/TRTMomConstraint

Definition at line 34 of file AddTRTMomConstr.cxx.

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")
42  , m_useThetaCorrection(false)
43  , m_thetaCorr(1.)
44  , m_applyTrkSel(false)
45  , m_selPtMin(0)
46  , m_selEtaMin(-2.5)
47  , m_selEtaMax(2.5)
48  , m_selNHitPIXMin(0)
49  , m_selNHitSCTMin(0)
50  , m_selNHitTRTMin(20)
52  , m_selEtaCrackMin(0.7)
53  , m_selEtaCrackMax(1.)
54  , m_selChiSqPerDOFMin(100)
56  , m_nTracksPresel(0)
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 }

◆ ~AddTRTMomConstr()

AddTRTMomConstr::~AddTRTMomConstr ( )

Definition at line 82 of file AddTRTMomConstr.cxx.

82 {}

Member Function Documentation

◆ accept()

bool AddTRTMomConstr::accept ( const Trk::Track track)
private

Verifies if the given track passes the track selection criteria specified via the jobOptions.

Definition at line 149 of file AddTRTMomConstr.cxx.

149  {
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. ) ) ;
175  if( m_selEtaMin < m_selEtaMax && (eta < m_selEtaMin || eta > m_selEtaMax ) ) {
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( *pTrack ) ;
184  ++m_nRejectPIX ;
185  rc = false;
186  }
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 ) {
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(.)

◆ addPM()

const Trk::MeasurementSet AddTRTMomConstr::addPM ( Trk::MeasurementSet ms,
const Trk::PseudoMeasurementOnTrack pm 
)
private

adds a PseudoMeasurement to a MeasurementSet

Definition at line 329 of file AddTRTMomConstr.cxx.

329  {
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 }

◆ addTRTMomentumConstraint()

Trk::Track * AddTRTMomConstr::addTRTMomentumConstraint ( const Trk::Track track)
private

Strips of all TRT hits from the track and replaces them with a TRT momentum constraint from a the TRT segment belonging to the (extended) track (returns NULL in case of failure)

Definition at line 338 of file AddTRTMomConstr.cxx.

338  {
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

◆ createPMfromSi()

const Trk::PseudoMeasurementOnTrack * AddTRTMomConstr::createPMfromSi ( const Trk::Perigee mp)
private

creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters

Definition at line 269 of file AddTRTMomConstr.cxx.

269  {
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 
284  Trk::PseudoMeasurementOnTrack *pm = new Trk::PseudoMeasurementOnTrack( std::move(parFromSi)
285  , covFromSi
286  , mpSurf
287  ) ;
288  return pm ;
289 }

◆ createPMfromTRT()

const Trk::PseudoMeasurementOnTrack * AddTRTMomConstr::createPMfromTRT ( const Trk::Perigee mpSi,
const Trk::Perigee mpTRT 
)
private

creates a PseudoMeasurement with (z0, theta, q/p) from TRT track perigee parameters

< from Si

< from Si

< from TRT

Definition at line 291 of file AddTRTMomConstr.cxx.

292  {
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 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ dump()

MsgStream & AddTRTMomConstr::dump ( MsgStream &  outst) const

Definition at line 436 of file AddTRTMomConstr.cxx.

436  {
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 }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode AddTRTMomConstr::execute ( )

execute method of this algorithm that is called for each event

Definition at line 117 of file AddTRTMomConstr.cxx.

117  {
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  }
128  ++m_nTracksPresel ;
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(.)

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode AddTRTMomConstr::finalize ( )

finalize method of this algorithm.

Prints out a summary of all events

Definition at line 112 of file AddTRTMomConstr.cxx.

112  {
113  ATH_MSG_DEBUG( (*this) ) ;
114  return StatusCode::SUCCESS;
115 }

◆ findinnertrthit()

const Trk::TrackStateOnSurface * AddTRTMomConstr::findinnertrthit ( const Trk::Track track)
private

Returns the innermost TRT TSOS on the given Track.

Definition at line 244 of file AddTRTMomConstr.cxx.

244  {
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 }

◆ findouterscthit()

const Trk::TrackStateOnSurface * AddTRTMomConstr::findouterscthit ( const Trk::Track track)
private

Returns the outermost SCT TSOS on the given Track.

Definition at line 219 of file AddTRTMomConstr.cxx.

219  {
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 }

◆ initialize()

StatusCode AddTRTMomConstr::initialize ( )

initialize method of this algorithm.


Definition at line 84 of file AddTRTMomConstr.cxx.

84  {
85  //retrieve the DetectorStore service
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(.)

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::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< Algorithm > >::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< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_applyTrkSel

bool AddTRTMomConstr::m_applyTrkSel
private

apply a selection on tracks or not

Definition at line 82 of file AddTRTMomConstr.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_idHelper

const AtlasDetectorID* AddTRTMomConstr::m_idHelper
private

Detector ID helper.

Definition at line 72 of file AddTRTMomConstr.h.

◆ m_nRejectPIX

size_t AddTRTMomConstr::m_nRejectPIX
private

Counter for number of tracks failing the min number of PIX hits req.

Definition at line 96 of file AddTRTMomConstr.h.

◆ m_nRejectPM

size_t AddTRTMomConstr::m_nRejectPM
private

Counter for number of tracks failing the addition of a pseudo-measurement (PM)

Definition at line 99 of file AddTRTMomConstr.h.

◆ m_nRejectSCT

size_t AddTRTMomConstr::m_nRejectSCT
private

Counter for number of tracks failing the min number of SCT hits req.

Definition at line 97 of file AddTRTMomConstr.h.

◆ m_nRejectTRT

size_t AddTRTMomConstr::m_nRejectTRT
private

Counter for number of tracks failing the min number of TRT hits req.

Definition at line 98 of file AddTRTMomConstr.h.

◆ m_nTracksAccepted

size_t AddTRTMomConstr::m_nTracksAccepted
private

Counter for number of tracks passing the preselection and with PM.

Definition at line 95 of file AddTRTMomConstr.h.

◆ m_nTracksPresel

size_t AddTRTMomConstr::m_nTracksPresel
private

Counter for number of tracks passing the preselection.

Definition at line 94 of file AddTRTMomConstr.h.

◆ m_nTracksProcessed

size_t AddTRTMomConstr::m_nTracksProcessed
private

Counter for number of tracks processed.

Definition at line 93 of file AddTRTMomConstr.h.

◆ m_selChiSqPerDOFMin

double AddTRTMomConstr::m_selChiSqPerDOFMin
private

maximal Chisquare per degree of freedom cut value for the TrackSelection

Definition at line 92 of file AddTRTMomConstr.h.

◆ m_selEtaCrackMax

double AddTRTMomConstr::m_selEtaCrackMax
private

maximum |eta| to define the transition region

Definition at line 91 of file AddTRTMomConstr.h.

◆ m_selEtaCrackMin

double AddTRTMomConstr::m_selEtaCrackMin
private

minimum |eta| to define the transition region

Definition at line 90 of file AddTRTMomConstr.h.

◆ m_selEtaMax

double AddTRTMomConstr::m_selEtaMax
private

maximal eta cut value for the TrackSelection

Definition at line 85 of file AddTRTMomConstr.h.

◆ m_selEtaMin

double AddTRTMomConstr::m_selEtaMin
private

minimal eta cut value for the TrackSelection

Definition at line 84 of file AddTRTMomConstr.h.

◆ m_selNHitPIXMin

int AddTRTMomConstr::m_selNHitPIXMin
private

minimal number of PIX hits cut value for the TrackSelection

Definition at line 86 of file AddTRTMomConstr.h.

◆ m_selNHitSCTMin

int AddTRTMomConstr::m_selNHitSCTMin
private

minimal number of SCT hits cut value for the TrackSelection

Definition at line 87 of file AddTRTMomConstr.h.

◆ m_selNHitTRTMin

int AddTRTMomConstr::m_selNHitTRTMin
private

minimal number of TRT hits cut value for the TrackSelection

Definition at line 88 of file AddTRTMomConstr.h.

◆ m_selNHitTRTMinCrack

int AddTRTMomConstr::m_selNHitTRTMinCrack
private

minimal number of TRT hits cut value in trans.

region for the TrackSelection

Definition at line 89 of file AddTRTMomConstr.h.

◆ m_selPtMin

double AddTRTMomConstr::m_selPtMin
private

minimal pT cut value for the TrackSelection

Definition at line 83 of file AddTRTMomConstr.h.

◆ m_thetaCorr

double AddTRTMomConstr::m_thetaCorr
private

theta can be different after TRT+PM fit by < o(10e-4).

Correct q/p optionally

Definition at line 81 of file AddTRTMomConstr.h.

◆ m_trackFitter

ToolHandle<Trk::ITrackFitter> AddTRTMomConstr::m_trackFitter
private

The TrackFitter to refit the tracks (segment, momentum constraint)

Definition at line 77 of file AddTRTMomConstr.h.

◆ m_trackListInput

std::string AddTRTMomConstr::m_trackListInput
private

Name of the TrackCollection (input)

Definition at line 74 of file AddTRTMomConstr.h.

◆ m_trackListOutput

std::string AddTRTMomConstr::m_trackListOutput
private

Name of the TrackCollection (Output)

Definition at line 75 of file AddTRTMomConstr.h.

◆ m_trackSummaryTool

ToolHandle<Trk::ITrackSummaryTool> AddTRTMomConstr::m_trackSummaryTool
private

The summary tool to make the track selection.

Definition at line 76 of file AddTRTMomConstr.h.

◆ m_trtid

const TRT_ID* AddTRTMomConstr::m_trtid
private

Identifier helper class for the TRT.

Definition at line 73 of file AddTRTMomConstr.h.

◆ m_useThetaCorrection

bool AddTRTMomConstr::m_useThetaCorrection
private

correct theta after TRT+PM(z0,theta) refit, small diff.

typically < o(3x10e-4)

Definition at line 80 of file AddTRTMomConstr.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AddTRTMomConstr::m_selNHitPIXMin
int m_selNHitPIXMin
minimal number of PIX hits cut value for the TrackSelection
Definition: AddTRTMomConstr.h:86
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::LocalParameters
Definition: LocalParameters.h:98
AddTRTMomConstr::m_selPtMin
double m_selPtMin
minimal pT cut value for the TrackSelection
Definition: AddTRTMomConstr.h:83
AddTRTMomConstr::createPMfromTRT
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
Definition: AddTRTMomConstr.cxx:291
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
AddTRTMomConstr::m_trackSummaryTool
ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool
The summary tool to make the track selection.
Definition: AddTRTMomConstr.h:76
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AddTRTMomConstr::addTRTMomentumConstraint
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...
Definition: AddTRTMomConstr.cxx:338
AddTRTMomConstr::m_selEtaCrackMax
double m_selEtaCrackMax
maximum |eta| to define the transition region
Definition: AddTRTMomConstr.h:91
AddTRTMomConstr::m_selEtaCrackMin
double m_selEtaCrackMin
minimum |eta| to define the transition region
Definition: AddTRTMomConstr.h:90
AddTRTMomConstr::m_trtid
const TRT_ID * m_trtid
Identifier helper class for the TRT.
Definition: AddTRTMomConstr.h:73
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
AddTRTMomConstr::m_trackListInput
std::string m_trackListInput
Name of the TrackCollection (input)
Definition: AddTRTMomConstr.h:74
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
AddTRTMomConstr::m_idHelper
const AtlasDetectorID * m_idHelper
Detector ID helper.
Definition: AddTRTMomConstr.h:72
AddTRTMomConstr::m_nTracksPresel
size_t m_nTracksPresel
Counter for number of tracks passing the preselection.
Definition: AddTRTMomConstr.h:94
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AddTRTMomConstr::m_selEtaMax
double m_selEtaMax
maximal eta cut value for the TrackSelection
Definition: AddTRTMomConstr.h:85
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:7
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::z0
@ z0
Definition: ParamDefs.h:70
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
InDet::TRT_DriftCircleOnTrack
Definition: TRT_DriftCircleOnTrack.h:53
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
AddTRTMomConstr::m_useThetaCorrection
bool m_useThetaCorrection
correct theta after TRT+PM(z0,theta) refit, small diff.
Definition: AddTRTMomConstr.h:80
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
AddTRTMomConstr::m_applyTrkSel
bool m_applyTrkSel
apply a selection on tracks or not
Definition: AddTRTMomConstr.h:82
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AddTRTMomConstr::addPM
const Trk::MeasurementSet addPM(Trk::MeasurementSet &ms, const Trk::PseudoMeasurementOnTrack *pm)
adds a PseudoMeasurement to a MeasurementSet
Definition: AddTRTMomConstr.cxx:329
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
AddTRTMomConstr::m_nTracksProcessed
size_t m_nTracksProcessed
Counter for number of tracks processed.
Definition: AddTRTMomConstr.h:93
Trk::PseudoMeasurementOnTrack
Class to handle pseudo-measurements in fitters and on track objects.
Definition: PseudoMeasurementOnTrack.h:44
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
InDet::SiClusterOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override
returns global position (gathered through Surface constraint)
Definition: SiClusterOnTrack.h:115
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Trk::theta
@ theta
Definition: ParamDefs.h:72
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
AddTRTMomConstr::m_thetaCorr
double m_thetaCorr
theta can be different after TRT+PM fit by < o(10e-4).
Definition: AddTRTMomConstr.h:81
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AddTRTMomConstr::m_nRejectPM
size_t m_nRejectPM
Counter for number of tracks failing the addition of a pseudo-measurement (PM)
Definition: AddTRTMomConstr.h:99
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
AddTRTMomConstr::m_nRejectTRT
size_t m_nRejectTRT
Counter for number of tracks failing the min number of TRT hits req.
Definition: AddTRTMomConstr.h:98
DataVector< Trk::Track >
AddTRTMomConstr::m_selEtaMin
double m_selEtaMin
minimal eta cut value for the TrackSelection
Definition: AddTRTMomConstr.h:84
AddTRTMomConstr::accept
bool accept(const Trk::Track &track)
Verifies if the given track passes the track selection criteria specified via the jobOptions.
Definition: AddTRTMomConstr.cxx:149
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Trk::MeasurementSet
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition: FitterTypes.h:30
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
AddTRTMomConstr::m_nTracksAccepted
size_t m_nTracksAccepted
Counter for number of tracks passing the preselection and with PM.
Definition: AddTRTMomConstr.h:95
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AddTRTMomConstr::m_nRejectSCT
size_t m_nRejectSCT
Counter for number of tracks failing the min number of SCT hits req.
Definition: AddTRTMomConstr.h:97
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
AddTRTMomConstr::m_selChiSqPerDOFMin
double m_selChiSqPerDOFMin
maximal Chisquare per degree of freedom cut value for the TrackSelection
Definition: AddTRTMomConstr.h:92
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
AddTRTMomConstr::m_trackListOutput
std::string m_trackListOutput
Name of the TrackCollection (Output)
Definition: AddTRTMomConstr.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
h
AddTRTMomConstr::m_selNHitTRTMin
int m_selNHitTRTMin
minimal number of TRT hits cut value for the TrackSelection
Definition: AddTRTMomConstr.h:88
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AddTRTMomConstr::m_selNHitSCTMin
int m_selNHitSCTMin
minimal number of SCT hits cut value for the TrackSelection
Definition: AddTRTMomConstr.h:87
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
AddTRTMomConstr::m_trackFitter
ToolHandle< Trk::ITrackFitter > m_trackFitter
The TrackFitter to refit the tracks (segment, momentum constraint)
Definition: AddTRTMomConstr.h:77
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Trk::MeasurementBaseType::PseudoMeasurementOnTrack
@ PseudoMeasurementOnTrack
Definition: MeasurementBase.h:51
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Trk::phi
@ phi
Definition: ParamDefs.h:81
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
AddTRTMomConstr::m_nRejectPIX
size_t m_nRejectPIX
Counter for number of tracks failing the min number of PIX hits req.
Definition: AddTRTMomConstr.h:96
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDet::TRT_DriftCircleOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
return the global position of this RIO_OnTrack
Definition: TRT_DriftCircleOnTrack.cxx:160
AddTRTMomConstr::createPMfromSi
const Trk::PseudoMeasurementOnTrack * createPMfromSi(const Trk::Perigee *mp)
creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters
Definition: AddTRTMomConstr.cxx:269
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AddTRTMomConstr::m_selNHitTRTMinCrack
int m_selNHitTRTMinCrack
minimal number of TRT hits cut value in trans.
Definition: AddTRTMomConstr.h:89
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:357
fitman.k
k
Definition: fitman.py:528
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44
ServiceHandle< ICondSvc >
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65