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

#include <FtfRoadDefiner.h>

Inheritance diagram for TrigL2MuonSA::FtfRoadDefiner:
Collaboration diagram for TrigL2MuonSA::FtfRoadDefiner:

Public Member Functions

 FtfRoadDefiner (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
StatusCode defineRoad (const xAOD::TrackParticle *idtrack, TrigL2MuonSA::MuonRoad &muonRoad) const
 
std::unique_ptr< const Trk::TrackParametersextTrack (const bool CylinderFirst, const xAOD::TrackParticle *trk, const double R, const double Z, int &extFlag) const
 
std::unique_ptr< const Trk::TrackParametersextTrack (const bool CylinderFirst, const Trk::TrackParameters &param, const double R, const double Z, int &extFlag) const
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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

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

ToolHandle< Trk::IExtrapolatorm_extrapolator
 
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 21 of file FtfRoadDefiner.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

◆ FtfRoadDefiner()

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

Definition at line 7 of file FtfRoadDefiner.cxx.

9  :
11 {
12 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ defineRoad()

StatusCode TrigL2MuonSA::FtfRoadDefiner::defineRoad ( const xAOD::TrackParticle idtrack,
TrigL2MuonSA::MuonRoad muonRoad 
) const

Definition at line 28 of file FtfRoadDefiner.cxx.

30 {
31  ATH_MSG_DEBUG("FtfRoadDefiner::defineRoad");
32 
33  const int N_SECTOR = 2; // 0: normal, 1:overlap
34 
35  double extFtfInnerEta=0., extFtfInnerZ=0., extFtfInnerR=0., extFtfInnerPhi=0.;
36  double extFtfMiddleEta=0., extFtfMiddleZ=0., extFtfMiddleR=0., extFtfMiddlePhi=0.;
37  double extFtfOuterEta=0., extFtfOuterZ=0., extFtfOuterR=0., extFtfOuterPhi=0.;
38 
39  double aw_ftf[3]={0.,0.,0.}; // slope of FTF Road for Inner/Middle/Outer
40  double bw_ftf[3]={0.,0.,0.}; // intercept of FTF Road for Inner/Middle/Outer
41  // Inner
42 
43  bool CylinderFirst = (std::abs(idtrack->eta()) < 1.05);
44 
45  double innerCylinderZ = 7500.;
46  double middleCylinderZ = 14000.;
47  double outerCylinderZ = 21500.;
48  if(idtrack->eta() < 0) {
49  innerCylinderZ = -innerCylinderZ;
50  middleCylinderZ = -middleCylinderZ;
51  outerCylinderZ = -outerCylinderZ;
52  }
53 
54  auto extFtfInner = extTrack( CylinderFirst, idtrack, 4700., innerCylinderZ, muonRoad.ext_ftf_flag[0][0]);
55  if( !extFtfInner ) {
56  ATH_MSG_DEBUG("extrapolated track parameters on BarrelInner is null");
57  } else {
58  extFtfInnerEta = extFtfInner->eta();
59  extFtfInnerPhi = extFtfInner->position().phi();
60  extFtfInnerZ = extFtfInner->position().z();
61  extFtfInnerR = std::hypot(extFtfInner->position().x(), extFtfInner->position().y());
62  ATH_MSG_DEBUG("extFtfInnerEta: " << extFtfInnerEta << ", extFtfInnerPhi: " << extFtfInnerPhi << ", extFtfInnerZ: " << extFtfInnerZ << ", extFtfInnerR: " << extFtfInnerR);
63  aw_ftf[0] = std::tan(2*std::atan(std::exp(-extFtfInnerEta)));
64  bw_ftf[0] = extFtfInnerR - (aw_ftf[0])*extFtfInnerZ;
65  muonRoad.r_ftf[0][0] = extFtfInnerR;
66  muonRoad.z_ftf[0][0] = extFtfInnerZ;
67 
68  // Middle
69  if(muonRoad.ext_ftf_flag[0][0]==0||
70  muonRoad.ext_ftf_flag[0][0]==3)
71  CylinderFirst = true;
72  else
73  CylinderFirst = false;
74 
75  auto extFtfMiddle = extTrack( CylinderFirst, *extFtfInner, 7300., middleCylinderZ, muonRoad.ext_ftf_flag[1][0]);
76  if( !extFtfMiddle ) {
77  ATH_MSG_DEBUG("extrapolated track parameters on BarrelMiddle is null");
78  } else {
79  extFtfMiddleEta = extFtfMiddle->eta();
80  extFtfMiddlePhi = extFtfMiddle->position().phi();
81  extFtfMiddleZ = extFtfMiddle->position().z();
82  extFtfMiddleR = std::hypot(extFtfMiddle->position().x(), extFtfMiddle->position().y());
83  ATH_MSG_DEBUG("extFtfMiddleEta: " << extFtfMiddleEta << ", extFtfMiddlePhi: " << extFtfMiddlePhi << ", extFtfMiddleZ: " << extFtfMiddleZ << ", extFtfMiddleR: " << extFtfMiddleR);
84  aw_ftf[1] = std::tan(2*std::atan(std::exp(-extFtfMiddleEta)));
85  bw_ftf[1] = extFtfMiddleR - (aw_ftf[1])*extFtfMiddleZ;
86  muonRoad.r_ftf[1][0] = extFtfMiddleR;
87  muonRoad.z_ftf[1][0] = extFtfMiddleZ;
88 
89  // Outer
90  if(muonRoad.ext_ftf_flag[1][0]==0||
91  muonRoad.ext_ftf_flag[1][0]==3)
92  CylinderFirst = true;
93  else
94  CylinderFirst = false;
95 
96  auto extFtfOuter = extTrack( CylinderFirst, *extFtfMiddle, 9800., outerCylinderZ, muonRoad.ext_ftf_flag[2][0]);
97  if( !extFtfOuter ) {
98  ATH_MSG_DEBUG("extrapolated track parameters on BarrelOuter is null");
99  } else {
100  extFtfOuterEta = extFtfOuter->eta();
101  extFtfOuterPhi = extFtfOuter->position().phi();
102  extFtfOuterZ = extFtfOuter->position().z();
103  extFtfOuterR = std::hypot(extFtfOuter->position().x(), extFtfOuter->position().y());
104  ATH_MSG_DEBUG("extFtfOuterEta: " << extFtfOuterEta << ", extFtfOuterPhi: " << extFtfOuterPhi << ", extFtfOuterZ: " << extFtfOuterZ << ", extFtfOuterR: " << extFtfOuterR);
105  aw_ftf[2] = std::tan(2*std::atan(std::exp(-extFtfOuterEta)));
106  bw_ftf[2] = extFtfOuterR - (aw_ftf[2])*extFtfOuterZ;
107  muonRoad.r_ftf[2][0] = extFtfOuterR;
108  muonRoad.z_ftf[2][0] = extFtfOuterZ;
109  }
110  }
111  }
112 
113  muonRoad.extFtfMiddleEta = extFtfMiddleEta;
114  muonRoad.extFtfMiddlePhi = extFtfMiddlePhi;
115 
116  for (int i_sector=0; i_sector<N_SECTOR; i_sector++) { // 0: normal sector, 1: overlap sector, which is used when a muon pass through boundary of MS sectors
117  muonRoad.aw_ftf[0][i_sector] = aw_ftf[0];
118  muonRoad.bw_ftf[0][i_sector] = bw_ftf[0];
119  muonRoad.aw_ftf[1][i_sector] = aw_ftf[1];
120  muonRoad.bw_ftf[1][i_sector] = bw_ftf[1];
121  muonRoad.aw_ftf[2][i_sector] = aw_ftf[2];
122  muonRoad.bw_ftf[2][i_sector] = bw_ftf[2];
123  muonRoad.aw_ftf[3][i_sector] = aw_ftf[0];
124  muonRoad.bw_ftf[3][i_sector] = bw_ftf[0];
125  muonRoad.aw_ftf[4][i_sector] = aw_ftf[1];
126  muonRoad.bw_ftf[4][i_sector] = bw_ftf[1];
127  muonRoad.aw_ftf[5][i_sector] = aw_ftf[2];
128  muonRoad.bw_ftf[5][i_sector] = bw_ftf[2];
129  muonRoad.aw_ftf[6][i_sector] = aw_ftf[0];
130  muonRoad.bw_ftf[6][i_sector] = bw_ftf[0];
131  muonRoad.aw_ftf[7][i_sector] = aw_ftf[0];
132  muonRoad.bw_ftf[7][i_sector] = bw_ftf[0];
133  muonRoad.aw_ftf[8][i_sector] = aw_ftf[0];
134  muonRoad.bw_ftf[8][i_sector] = bw_ftf[0];
135  muonRoad.aw_ftf[9][i_sector] = aw_ftf[1];//BME
136  muonRoad.bw_ftf[9][i_sector] = bw_ftf[1];
137  muonRoad.aw_ftf[10][i_sector] = aw_ftf[1];//BMG
138  muonRoad.bw_ftf[10][i_sector] = bw_ftf[1];
139 
140  muonRoad.eta_ftf[0][i_sector] = extFtfInnerEta;
141  muonRoad.phi_ftf[0][i_sector] = extFtfInnerPhi;
142  muonRoad.eta_ftf[1][i_sector] = extFtfMiddleEta;
143  muonRoad.phi_ftf[1][i_sector] = extFtfMiddlePhi;
144  muonRoad.eta_ftf[2][i_sector] = extFtfOuterEta;
145  muonRoad.phi_ftf[2][i_sector] = extFtfOuterPhi;
146  muonRoad.eta_ftf[3][i_sector] = extFtfInnerEta;
147  muonRoad.phi_ftf[3][i_sector] = extFtfInnerPhi;
148  muonRoad.eta_ftf[4][i_sector] = extFtfMiddleEta;
149  muonRoad.phi_ftf[4][i_sector] = extFtfMiddlePhi;
150  muonRoad.eta_ftf[5][i_sector] = extFtfOuterEta;
151  muonRoad.phi_ftf[5][i_sector] = extFtfOuterPhi;
152  muonRoad.eta_ftf[6][i_sector] = extFtfInnerEta;
153  muonRoad.phi_ftf[6][i_sector] = extFtfInnerPhi;
154  muonRoad.eta_ftf[7][i_sector] = extFtfInnerEta;
155  muonRoad.phi_ftf[7][i_sector] = extFtfInnerPhi;
156  muonRoad.eta_ftf[8][i_sector] = extFtfInnerEta;
157  muonRoad.phi_ftf[8][i_sector] = extFtfInnerPhi;
158  muonRoad.eta_ftf[9][i_sector] = extFtfMiddleEta;//BME
159  muonRoad.phi_ftf[9][i_sector] = extFtfMiddlePhi;
160  muonRoad.eta_ftf[10][i_sector] = extFtfMiddleEta;//BMG
161  muonRoad.phi_ftf[10][i_sector] = extFtfMiddlePhi;
162  }
163 
164  return StatusCode::SUCCESS;
165 }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::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; }

◆ 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

◆ extTrack() [1/2]

std::unique_ptr< const Trk::TrackParameters > TrigL2MuonSA::FtfRoadDefiner::extTrack ( const bool  CylinderFirst,
const Trk::TrackParameters param,
const double  R,
const double  Z,
int &  extFlag 
) const

Definition at line 235 of file FtfRoadDefiner.cxx.

236 {
237 
238  const EventContext& ctx = Gaudi::Hive::currentContext();
239  const bool boundaryCheck = true;
240 
241  // Cylinder
242  std::unique_ptr<const Trk::CylinderSurface> barrel = std::make_unique<const Trk::CylinderSurface>( R, Z );
243 
244  // Disk
246  std::unique_ptr<const Trk::DiscSurface> disc = std::make_unique<const Trk::DiscSurface>( matrix, 0, R );
247 
248  ATH_MSG_DEBUG("R: " << R << ", Z: " << Z);
249 
250  if(CylinderFirst) {
251  std::unique_ptr<const Trk::TrackParameters> param1( m_extrapolator->extrapolate(ctx,
252  param,
253  *barrel,
254  Trk::anyDirection, boundaryCheck, Trk::muon) );
255  if(param1){
256  ATH_MSG_DEBUG("Cylinder -> eta: " << param1->eta() << ", phi: " << param1->position().phi() << ", Z: " << param1->position().z() << ", Rms: " << std::hypot(param1->position().x(), param1->position().y()));
257  extFlag = 0;
258  return param1;
259  }
260  // Cylinder failed, try Disk
261  std::unique_ptr<const Trk::TrackParameters> param2( m_extrapolator->extrapolate(ctx,
262  param,
263  *disc,
264  Trk::anyDirection, boundaryCheck, Trk::muon) );
265  if(param2){
266  ATH_MSG_DEBUG("Disk -> eta: " << param2->eta() << ", phi: " << param2->position().phi() << ", Z: " << param2->position().z() << ", Rms: " << std::hypot(param2->position().x(), param2->position().y()));
267  extFlag = 1;
268  return param2;
269  }
270  }
271  else { // Endcap First
272  std::unique_ptr<const Trk::TrackParameters> param2( m_extrapolator->extrapolate(ctx,
273  param,
274  *disc,
275  Trk::anyDirection, boundaryCheck, Trk::muon) );
276  if(param2){
277  ATH_MSG_DEBUG("Disk -> eta: " << param2->eta() << ", phi: " << param2->position().phi() << ", Z: " << param2->position().z() << ", Rms: " << std::hypot(param2->position().x(), param2->position().y()));
278  extFlag = 2;
279  return param2;
280  }
281  // Disk failed, try Cylinder
282  std::unique_ptr<const Trk::TrackParameters> param1( m_extrapolator->extrapolate(ctx,
283  param,
284  *barrel,
285  Trk::anyDirection, boundaryCheck, Trk::muon) );
286  if(param1){
287  ATH_MSG_DEBUG("Cylinder -> eta: " << param1->eta() << ", phi: " << param1->position().phi() << ", Z: " << param1->position().z() << ", Rms: " << std::hypot(param1->position().x(), param1->position().y()));
288  extFlag = 3;
289  return param1;
290  }
291  }
292 
293  extFlag = 4;
294 
295  return nullptr;
296 }

◆ extTrack() [2/2]

std::unique_ptr< const Trk::TrackParameters > TrigL2MuonSA::FtfRoadDefiner::extTrack ( const bool  CylinderFirst,
const xAOD::TrackParticle trk,
const double  R,
const double  Z,
int &  extFlag 
) const

Definition at line 171 of file FtfRoadDefiner.cxx.

172 {
173 
174  const EventContext& ctx = Gaudi::Hive::currentContext();
175  const bool boundaryCheck = true;
176 
177  // Cylinder
178  std::unique_ptr<const Trk::CylinderSurface> barrel = std::make_unique<const Trk::CylinderSurface>( R, Z );
179 
180  // Disk
182  std::unique_ptr<const Trk::DiscSurface> disc = std::make_unique<const Trk::DiscSurface>( matrix, 0, R );
183 
184  ATH_MSG_DEBUG("R: " << R << ", Z: " << Z);
185 
186  if(CylinderFirst) {
187  std::unique_ptr<const Trk::TrackParameters> param1( m_extrapolator->extrapolate(ctx,
188  trk->perigeeParameters(),
189  *barrel,
190  Trk::anyDirection, boundaryCheck, Trk::muon) );
191  if(param1){
192  ATH_MSG_DEBUG("Cylinder -> eta: " << param1->eta() << ", phi: " << param1->position().phi() << ", Z: " << param1->position().z() << ", Rms: " << std::hypot(param1->position().x(), param1->position().y()));
193  extFlag = 0;
194  return param1;
195  }
196  // Cylinder failed, try Disk
197  std::unique_ptr<const Trk::TrackParameters> param2( m_extrapolator->extrapolate(ctx,
198  trk->perigeeParameters(),
199  *disc,
200  Trk::anyDirection, boundaryCheck, Trk::muon) );
201  if(param2){
202  ATH_MSG_DEBUG("Disk -> eta: " << param2->eta() << ", phi: " << param2->position().phi() << ", Z: " << param2->position().z() << ", Rms: " << std::hypot(param2->position().x(), param2->position().y()));
203  extFlag = 1;
204  return param2;
205  }
206  }
207  else { // Endcap First
208  std::unique_ptr<const Trk::TrackParameters> param2( m_extrapolator->extrapolate(ctx,
209  trk->perigeeParameters(),
210  *disc,
211  Trk::anyDirection, boundaryCheck, Trk::muon) );
212  if(param2){
213  ATH_MSG_DEBUG("Disk -> eta: " << param2->eta() << ", phi: " << param2->position().phi() << ", Z: " << param2->position().z() << ", Rms: " << std::hypot(param2->position().x(), param2->position().y()));
214  extFlag = 2;
215  return param2;
216  }
217  // Disk failed, try Cylinder
218  std::unique_ptr<const Trk::TrackParameters> param1( m_extrapolator->extrapolate(ctx,
219  trk->perigeeParameters(),
220  *barrel,
221  Trk::anyDirection, boundaryCheck, Trk::muon) );
222  if(param1){
223  ATH_MSG_DEBUG("Cylinder -> eta: " << param1->eta() << ", phi: " << param1->position().phi() << ", Z: " << param1->position().z() << ", Rms: " << std::hypot(param1->position().x(), param1->position().y()));
224  extFlag = 3;
225  return param1;
226  }
227  }
228 
229  extFlag = 4;
230 
231  return nullptr;
232 }

◆ initialize()

StatusCode TrigL2MuonSA::FtfRoadDefiner::initialize ( )
overridevirtual

Definition at line 17 of file FtfRoadDefiner.cxx.

18 {
19 
20  ATH_CHECK( m_extrapolator.retrieve() );
21 
22  return StatusCode::SUCCESS;
23 }

◆ 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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

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

Member Data Documentation

◆ 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_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_extrapolator

ToolHandle<Trk::IExtrapolator> TrigL2MuonSA::FtfRoadDefiner::m_extrapolator
private
Initial value:
{
this, "IOExtrapolator", "Trk::Extrapolator/AtlasExtrapolator"}

Definition at line 40 of file FtfRoadDefiner.h.

◆ 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:
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
TrigL2MuonSA::N_SECTOR
constexpr int N_SECTOR
Definition: MuonRoad.h:16
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TrigL2MuonSA::MuonRoad::z_ftf
double z_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:97
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ReadBchFromCool.barrel
barrel
Definition: ReadBchFromCool.py:405
TrigL2MuonSA::MuonRoad::phi_ftf
double phi_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:94
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigL2MuonSA::FtfRoadDefiner::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: FtfRoadDefiner.h:40
TrigL2MuonSA::MuonRoad::r_ftf
double r_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:96
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
TrigL2MuonSA::MuonRoad::ext_ftf_flag
int ext_ftf_flag[N_STATION][N_SECTOR]
Definition: MuonRoad.h:98
TrigL2MuonSA::FtfRoadDefiner::extTrack
std::unique_ptr< const Trk::TrackParameters > extTrack(const bool CylinderFirst, const xAOD::TrackParticle *trk, const double R, const double Z, int &extFlag) const
Definition: FtfRoadDefiner.cxx:171
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TrigL2MuonSA::MuonRoad::bw_ftf
double bw_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TrigL2MuonSA::MuonRoad::eta_ftf
double eta_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:95
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigL2MuonSA::MuonRoad::extFtfMiddlePhi
double extFtfMiddlePhi
Definition: MuonRoad.h:91
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TrigL2MuonSA::MuonRoad::aw_ftf
double aw_ftf[N_STATION][N_SECTOR]
Definition: MuonRoad.h:92
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TrigL2MuonSA::MuonRoad::extFtfMiddleEta
double extFtfMiddleEta
Definition: MuonRoad.h:90
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528